diff options
Diffstat (limited to 'src/settings/general')
| -rw-r--r-- | src/settings/general/behaviorsettingspage.cpp | 15 | ||||
| -rw-r--r-- | src/settings/general/configurepreviewplugindialog.cpp | 6 | ||||
| -rw-r--r-- | src/settings/general/confirmationssettingspage.cpp | 7 | ||||
| -rw-r--r-- | src/settings/general/generalsettingspage.cpp | 9 | ||||
| -rw-r--r-- | src/settings/general/previewssettingspage.cpp | 11 | ||||
| -rw-r--r-- | src/settings/general/statusbarsettingspage.cpp | 5 |
6 files changed, 24 insertions, 29 deletions
diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp index cbbde1d7c..635a1b2c4 100644 --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -79,12 +79,12 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) : loadSettings(); - connect(m_localViewProps, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_globalViewProps, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_showToolTips, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_showSelectionToggle, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_naturalSorting, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_localViewProps, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed); + connect(m_globalViewProps, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed); + connect(m_showToolTips, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); + connect(m_showSelectionToggle, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); + connect(m_naturalSorting, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); + connect(m_renameInline, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); } BehaviorSettingsPage::~BehaviorSettingsPage() @@ -115,7 +115,7 @@ void BehaviorSettingsPage::applySettings() const bool naturalSorting = m_naturalSorting->isChecked(); if (KGlobalSettings::naturalSorting() != naturalSorting) { - KConfigGroup group(KGlobal::config(), "KDE"); + KConfigGroup group(KSharedConfig::openConfig(), "KDE"); group.writeEntry("NaturalSorting", naturalSorting, KConfig::Persistent | KConfig::Global); KGlobalSettings::emitChange(KGlobalSettings::NaturalSortingChanged); } @@ -141,4 +141,3 @@ void BehaviorSettingsPage::loadSettings() m_renameInline->setChecked(GeneralSettings::renameInline()); } -#include "behaviorsettingspage.moc" diff --git a/src/settings/general/configurepreviewplugindialog.cpp b/src/settings/general/configurepreviewplugindialog.cpp index 3ca08dfd0..ce70e2bad 100644 --- a/src/settings/general/configurepreviewplugindialog.cpp +++ b/src/settings/general/configurepreviewplugindialog.cpp @@ -27,6 +27,7 @@ #include <QApplication> #include <QDir> #include <QVBoxLayout> +#include <QUrl> ConfigurePreviewPluginDialog::ConfigurePreviewPluginDialog(const QString& pluginName, const QString& desktopEntryName, @@ -59,7 +60,7 @@ ConfigurePreviewPluginDialog::ConfigurePreviewPluginDialog(const QString& plugin setMainWidget(mainWidget); - connect(this, SIGNAL(okClicked()), this, SLOT(slotOk())); + connect(this, &ConfigurePreviewPluginDialog::okClicked, this, &ConfigurePreviewPluginDialog::slotOk); } ConfigurePreviewPluginDialog::~ConfigurePreviewPluginDialog() @@ -73,9 +74,8 @@ void ConfigurePreviewPluginDialog::slotOk() // for a specific MIME-type should be regenerated. As this is not available yet we // delete the whole thumbnails directory. QApplication::changeOverrideCursor(Qt::BusyCursor); - KIO::NetAccess::del(QString(QDir::homePath() + "/.thumbnails/"), this); + KIO::NetAccess::del(QUrl::fromLocalFile(QDir::homePath() + "/.thumbnails/"), this); QApplication::restoreOverrideCursor(); } -#include "configurepreviewplugindialog.moc" diff --git a/src/settings/general/confirmationssettingspage.cpp b/src/settings/general/confirmationssettingspage.cpp index ab23a1908..532821159 100644 --- a/src/settings/general/confirmationssettingspage.cpp +++ b/src/settings/general/confirmationssettingspage.cpp @@ -68,9 +68,9 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget* parent) : loadSettings(); - connect(m_confirmMoveToTrash, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_confirmDelete, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_confirmClosingMultipleTabs, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_confirmMoveToTrash, &QCheckBox::toggled, this, &ConfirmationsSettingsPage::changed); + connect(m_confirmDelete, &QCheckBox::toggled, this, &ConfirmationsSettingsPage::changed); + connect(m_confirmClosingMultipleTabs, &QCheckBox::toggled, this, &ConfirmationsSettingsPage::changed); } ConfirmationsSettingsPage::~ConfirmationsSettingsPage() @@ -111,4 +111,3 @@ void ConfirmationsSettingsPage::loadSettings() m_confirmClosingMultipleTabs->setChecked(GeneralSettings::confirmClosingMultipleTabs()); } -#include "confirmationssettingspage.moc" diff --git a/src/settings/general/generalsettingspage.cpp b/src/settings/general/generalsettingspage.cpp index 18e152880..3b196e837 100644 --- a/src/settings/general/generalsettingspage.cpp +++ b/src/settings/general/generalsettingspage.cpp @@ -46,22 +46,22 @@ GeneralSettingsPage::GeneralSettingsPage(const KUrl& url, QWidget* parent) : // initialize 'Behavior' tab BehaviorSettingsPage* behaviorPage = new BehaviorSettingsPage(url, tabWidget); tabWidget->addTab(behaviorPage, i18nc("@title:tab Behavior settings", "Behavior")); - connect(behaviorPage, SIGNAL(changed()), this, SIGNAL(changed())); + connect(behaviorPage, &BehaviorSettingsPage::changed, this, &GeneralSettingsPage::changed); // initialize 'Previews' tab PreviewsSettingsPage* previewsPage = new PreviewsSettingsPage(tabWidget); tabWidget->addTab(previewsPage, i18nc("@title:tab Previews settings", "Previews")); - connect(previewsPage, SIGNAL(changed()), this, SIGNAL(changed())); + connect(previewsPage, &PreviewsSettingsPage::changed, this, &GeneralSettingsPage::changed); // initialize 'Context Menu' tab ConfirmationsSettingsPage* confirmationsPage = new ConfirmationsSettingsPage(tabWidget); tabWidget->addTab(confirmationsPage, i18nc("@title:tab Confirmations settings", "Confirmations")); - connect(confirmationsPage, SIGNAL(changed()), this, SIGNAL(changed())); + connect(confirmationsPage, &ConfirmationsSettingsPage::changed, this, &GeneralSettingsPage::changed); // initialize 'Status Bar' tab StatusBarSettingsPage* statusBarPage = new StatusBarSettingsPage(tabWidget); tabWidget->addTab(statusBarPage, i18nc("@title:tab Status Bar settings", "Status Bar")); - connect(statusBarPage, SIGNAL(changed()), this, SIGNAL(changed())); + connect(statusBarPage, &StatusBarSettingsPage::changed, this, &GeneralSettingsPage::changed); m_pages.append(behaviorPage); m_pages.append(previewsPage); @@ -89,4 +89,3 @@ void GeneralSettingsPage::restoreDefaults() } } -#include "generalsettingspage.moc" diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index 38b61b996..428e4fe28 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -65,8 +65,8 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : m_listView = new QListView(this); ServiceItemDelegate* delegate = new ServiceItemDelegate(m_listView, m_listView); - connect(delegate, SIGNAL(requestServiceConfiguration(QModelIndex)), - this, SLOT(configureService(QModelIndex))); + connect(delegate, &ServiceItemDelegate::requestServiceConfiguration, + this, &PreviewsSettingsPage::configureService); ServiceModel* serviceModel = new ServiceModel(this); QSortFilterProxyModel* proxyModel = new QSortFilterProxyModel(this); @@ -95,8 +95,8 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : loadSettings(); - connect(m_listView, SIGNAL(clicked(QModelIndex)), this, SIGNAL(changed())); - connect(m_remoteFileSizeBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); + connect(m_listView, &QListView::clicked, this, &PreviewsSettingsPage::changed); + connect(m_remoteFileSizeBox, static_cast<void(KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &PreviewsSettingsPage::changed); } PreviewsSettingsPage::~PreviewsSettingsPage() @@ -159,7 +159,7 @@ void PreviewsSettingsPage::loadPreviewPlugins() QAbstractItemModel* model = m_listView->model(); const KService::List plugins = KServiceTypeTrader::self()->query(QLatin1String("ThumbCreator")); - foreach (const KSharedPtr<KService>& service, plugins) { + foreach (const KService::Ptr& service, plugins) { const bool configurable = service->property("Configurable", QVariant::Bool).toBool(); const bool show = m_enabledPreviewPlugins.contains(service->desktopEntryName()); @@ -201,4 +201,3 @@ void PreviewsSettingsPage::loadSettings() m_remoteFileSizeBox->setValue(maxRemoteMByteSize); } -#include "previewssettingspage.moc" diff --git a/src/settings/general/statusbarsettingspage.cpp b/src/settings/general/statusbarsettingspage.cpp index 48622ac4c..78ee3856b 100644 --- a/src/settings/general/statusbarsettingspage.cpp +++ b/src/settings/general/statusbarsettingspage.cpp @@ -43,8 +43,8 @@ StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) : loadSettings(); - connect(m_showZoomSlider, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_showSpaceInfo, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_showZoomSlider, &QCheckBox::toggled, this, &StatusBarSettingsPage::changed); + connect(m_showSpaceInfo, &QCheckBox::toggled, this, &StatusBarSettingsPage::changed); } StatusBarSettingsPage::~StatusBarSettingsPage() @@ -73,4 +73,3 @@ void StatusBarSettingsPage::loadSettings() m_showSpaceInfo->setChecked(GeneralSettings::showSpaceInfo()); } -#include "statusbarsettingspage.moc" |
