Hi!

In my custom plugin, I've crafted a class, lets call it MyMakeStep which
inherits from ProjectExplorer::MakeStep. This class requires specific
settings from MySettings, a class that derives from Core::PagedSettings.
However, I'm encountering challenges when attempting to inject or retrieve
these settings within MyMakeStep. The construction of MakeStep instances
is managed by a factory which regrettably doesn't accept any arguments.
Currently, the only workaround I've discovered involves transforming
MySettings into a singleton, a solution that leaves me uneasy. Could an
alternative approach be employed to address this situation without
resorting to a singleton?

Knut



In my custom plugin, I've crafted a class called MyMakeStep which inherits from ProjectExplorer::MakeStep. This class requires specific settings from MySettings, a class that derives from Core::PagedSettings. However, I'm encountering challenges when attempting to inject or retrieve these settings within MyMakeStep. The construction of MakeStep instances is managed by a factory which regrettably doesn't accept any arguments. Currently, the only workaround I've discovered involves transforming MySettings into a singleton, a solution that leaves me uneasy. Could an alternative approach be employed to address this situation without resorting to a singleton?
-- 
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

Reply via email to