Commit 9f7d6ba1 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

fix inverted handling of the option to force slow files indexing

partially rename confusing property in ElisaConfigurationDialog class

renaming in ElisaConfigurationDialog class but in KConfig as I do not
really know how to handle renaming of old configuration keys
parent 83d793e9
Pipeline #48439 canceled with stage
......@@ -74,7 +74,7 @@ void ElisaConfigurationDialog::save()
Elisa::ElisaConfiguration::setRootPath(mRootPath);
Elisa::ElisaConfiguration::setShowProgressOnTaskBar(mShowProgressInTaskBar);
Elisa::ElisaConfiguration::setShowSystemTrayIcon(mShowSystemTrayIcon);
Elisa::ElisaConfiguration::setForceUsageOfFastFileSearch(mForceUsageOfFastFileSearch);
Elisa::ElisaConfiguration::setForceUsageOfFastFileSearch(!mForceUsageOfSlowFileSystemIndexing);
Elisa::ElisaConfiguration::setPlayAtStartup(mPlayAtStartup);
Elisa::ElisaConfiguration::setColorScheme(mColorScheme);
......@@ -144,14 +144,14 @@ void ElisaConfigurationDialog::setShowSystemTrayIcon(bool showSystemTrayIcon)
setDirty();
}
void ElisaConfigurationDialog::setForceUsageOfFastFileSearch(bool forceUsageOfFastFileSearch)
void ElisaConfigurationDialog::setForceUsageOfSlowFileSystemIndexing(bool forceUsageOfSlowFileSystemIndexing)
{
if (mForceUsageOfFastFileSearch == forceUsageOfFastFileSearch) {
if (mForceUsageOfSlowFileSystemIndexing == forceUsageOfSlowFileSystemIndexing) {
return;
}
mForceUsageOfFastFileSearch = forceUsageOfFastFileSearch;
Q_EMIT forceUsageOfFastFileSearchChanged();
mForceUsageOfSlowFileSystemIndexing = forceUsageOfSlowFileSystemIndexing;
Q_EMIT forceUsageOfSlowFileSystemIndexingChanged();
setDirty();
}
......@@ -225,8 +225,8 @@ void ElisaConfigurationDialog::configChanged()
mColorScheme = Elisa::ElisaConfiguration::colorScheme();
Q_EMIT colorSchemeChanged();
mForceUsageOfFastFileSearch = Elisa::ElisaConfiguration::forceUsageOfFastFileSearch();
Q_EMIT forceUsageOfFastFileSearchChanged();
mForceUsageOfSlowFileSystemIndexing = !Elisa::ElisaConfiguration::forceUsageOfFastFileSearch();
Q_EMIT forceUsageOfSlowFileSystemIndexingChanged();
switch (Elisa::ElisaConfiguration::embeddedView())
{
......
......@@ -24,10 +24,10 @@ class ELISALIB_EXPORT ElisaConfigurationDialog : public QObject
WRITE setRootPath
NOTIFY rootPathChanged)
Q_PROPERTY(bool forceUsageOfFastFileSearch
READ forceUsageOfFastFileSearch
WRITE setForceUsageOfFastFileSearch
NOTIFY forceUsageOfFastFileSearchChanged)
Q_PROPERTY(bool forceUsageOfSlowFileSystemIndexing
READ forceUsageOfSlowFileSystemIndexing
WRITE setForceUsageOfSlowFileSystemIndexing
NOTIFY forceUsageOfSlowFileSystemIndexingChanged)
Q_PROPERTY(bool showProgressInTaskBar
READ showProgressInTaskBar
......@@ -86,9 +86,9 @@ public:
return mShowSystemTrayIcon;
}
[[nodiscard]] bool forceUsageOfFastFileSearch() const
[[nodiscard]] bool forceUsageOfSlowFileSystemIndexing() const
{
return mForceUsageOfFastFileSearch;
return mForceUsageOfSlowFileSystemIndexing;
}
[[nodiscard]] ElisaUtils::PlayListEntryType embeddedView() const
......@@ -124,7 +124,7 @@ Q_SIGNALS:
void showSystemTrayIconChanged();
void forceUsageOfFastFileSearchChanged();
void forceUsageOfSlowFileSystemIndexingChanged();
void embeddedViewChanged();
......@@ -146,7 +146,7 @@ public Q_SLOTS:
void setShowSystemTrayIcon(bool showSystemTrayIcon);
void setForceUsageOfFastFileSearch(bool forceUsageOfFastFileSearch);
void setForceUsageOfSlowFileSystemIndexing(bool forceUsageOfSlowFileSystemIndexing);
void setEmbeddedView(ElisaUtils::PlayListEntryType embeddedView);
......@@ -174,7 +174,7 @@ private:
bool mShowSystemTrayIcon = false;
bool mForceUsageOfFastFileSearch = true;
bool mForceUsageOfSlowFileSystemIndexing = true;
bool mPlayAtStartup = false;
......
......@@ -178,9 +178,9 @@ Window {
model: [i18nc("Configure dialog, indexing type", "Use fast native indexer"),
i18nc("Configure dialog, indexing type", "Scan the filesystem directly")]
currentIndex: ElisaConfigurationDialog.forceUsageOfFastFileSearch ? 1 : 0
currentIndex: ElisaConfigurationDialog.forceUsageOfSlowFileSystemIndexing ? 1 : 0
onActivated: {
ElisaConfigurationDialog.forceUsageOfFastFileSearch = currentIndex === 0 ? false : true
ElisaConfigurationDialog.forceUsageOfSlowFileSystemIndexing = currentIndex === 0 ? false : true
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment