#include <KConfigGroup>
#include <KDialog>
#include <KGlobal>
-#include <KLocale>
+#include <KLocalizedString>
#include <KNumInput>
#include <KServiceTypeTrader>
#include <KService>
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);
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()
}
}
- KConfigGroup globalConfig(KGlobal::config(), QLatin1String("PreviewSettings"));
+ KConfigGroup globalConfig(KSharedConfig::openConfig(), QLatin1String("PreviewSettings"));
globalConfig.writeEntry("Plugins", m_enabledPreviewPlugins);
const qulonglong maximumRemoteSize = static_cast<qulonglong>(m_remoteFileSizeBox->value()) * 1024 * 1024;
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());
void PreviewsSettingsPage::loadSettings()
{
- KConfigGroup globalConfig(KGlobal::config(), "PreviewSettings");
+ KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings");
m_enabledPreviewPlugins = globalConfig.readEntry("Plugins", QStringList()
<< QLatin1String("directorythumbnail")
<< QLatin1String("imagethumbnail")
m_remoteFileSizeBox->setValue(maxRemoteMByteSize);
}
-#include "previewssettingspage.moc"