Nim: Actually use the static instance

Amends e8fd863fcc, the global settings() function there was unused so
far, this here starts using it.

Change-Id: I0311baf7e4f86d138fdfafa146bf594b61b237f6
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2023-07-21 10:13:48 +02:00
parent 8a2aac2045
commit afe1fb3676

View File

@@ -41,14 +41,13 @@ class NimPluginPrivate
public:
NimPluginPrivate()
{
Suggest::NimSuggestCache::instance().setExecutablePath(settings.nimSuggestPath());
QObject::connect(&settings.nimSuggestPath, &StringAspect::changed,
Suggest::NimSuggestCache::instance().setExecutablePath(settings().nimSuggestPath());
QObject::connect(&settings().nimSuggestPath, &StringAspect::changed,
&Suggest::NimSuggestCache::instance(), [this] {
Suggest::NimSuggestCache::instance().setExecutablePath(settings.nimSuggestPath());
Suggest::NimSuggestCache::instance().setExecutablePath(settings().nimSuggestPath());
});
}
NimSettings settings;
NimEditorFactory editorFactory;
NimBuildConfigurationFactory buildConfigFactory;
NimbleBuildConfigurationFactory nimbleBuildConfigFactory;