]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/commitdiff
Hardcode the dictionary path if the environment variable is not set. https://redmine...
authorSoren Stoutner <soren@stoutner.com>
Thu, 30 Jan 2025 21:42:11 +0000 (14:42 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 30 Jan 2025 21:42:11 +0000 (14:42 -0700)
src/dialogs/SettingsDialog.cpp

index 701d5e2ca804c46d4df479fca700ddfdd4245150..b9f1832f01cefbe334802ee8ead6c3ab8f65fc01 100644 (file)
@@ -82,8 +82,8 @@ SettingsDialog::SettingsDialog(QWidget *parentWidgetPointer, KCoreConfigSkeleton
     // Connect the download directory directory browse button.
     connect(browseButtonPointer, SIGNAL(clicked()), this, SLOT(showDownloadDirectoryBrowseDialog()));
 
-    // Create a dictionaries QDir from the `QTWEBENGINE_DICTIONARIES_PATH` environment variable.
-    QDir dictionariesDir = QDir(qEnvironmentVariable("QTWEBENGINE_DICTIONARIES_PATH"));
+    // Create a dictionaries QDir from the `QTWEBENGINE_DICTIONARIES_PATH` environment variable, defaulting to `/usr/share/hunspell-bdic` if no environment variable is set.
+    QDir dictionariesDir = QDir(qEnvironmentVariable("QTWEBENGINE_DICTIONARIES_PATH", QLatin1String("/usr/share/hunspell-bdic")));
 
     // Get a dictionaries string list.
     QStringList dictionariesStringList = dictionariesDir.entryList(QStringList(QLatin1String("*.bdic")), QDir::Files | QDir::NoSymLinks);