- qCDebug(PRIVACYBROWSER) << "MainWindow::settingsConfigure()";
- // The preference dialog is derived from prefs_base.ui
- //
- // compare the names of the widgets in the .ui file
- // to the names of the variables in the .kcfg file
- //avoid to have 2 dialogs shown
- if (KConfigDialog::showDialog(QStringLiteral("settings"))) {
- return;
- }
+ // Check to make sure the dialog box isn't already displayed.
+ if (!KConfigDialog::exists(QStringLiteral("settings")))
+ {
+ // Create a general settings page.
+ QWidget *generalSettingsWidgetPointer = new QWidget;
+
+ // Instantiate the settings UI.
+ Ui::Settings settingsUi;
+
+ // Setup the UI to display the general settings widget.
+ settingsUi.setupUi(generalSettingsWidgetPointer);
+
+ // Instantiate a settings config dialog from the settings.kcfg file.
+ KConfigDialog *configDialogPointer = new KConfigDialog(this, QStringLiteral("settings"), Settings::self());