Commit b81629d3 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Use new connect syntax

parent 7737f1ca
......@@ -54,8 +54,8 @@ DialogInstaller::DialogInstaller(QWidget *parent)
connect(ui->theme_file, &KUrlRequester::textChanged, this, &DialogInstaller::themeAnalisys);
connect(ui->icon_file, &KUrlRequester::textChanged, this, &DialogInstaller::themeIconAnalisys);
connect(ui->but_icon_install, SIGNAL(clicked()), this, SLOT(installThemeIcon()));
connect(ui->but_theme_install, SIGNAL(clicked()), this, SLOT(installTheme()));
connect(ui->but_icon_install, &QAbstractButton::clicked, this, &DialogInstaller::installThemeIcon);
connect(ui->but_theme_install, &QAbstractButton::clicked, this, &DialogInstaller::installTheme);
connect(threadAnalisysTheme, &KJob::finished, this, &DialogInstaller::checkThemeAnalisys);
connect(threadAnalisysThemeIcon, &KJob::finished, this, &DialogInstaller::checkThemeIconAnalisys);
......
......@@ -39,8 +39,8 @@ DialogUninstaller::DialogUninstaller(QWidget* parent, AppearenceGTK *app)
refreshListsForUninstall();
connect(ui->but_uninstall_theme, SIGNAL(clicked()), this, SLOT(uninstallTheme()));
connect(ui->but_uninstall_icon, SIGNAL(clicked()), this, SLOT(uninstallIcon()));
connect(ui->but_uninstall_theme, &QAbstractButton::clicked, this, &DialogUninstaller::uninstallTheme);
connect(ui->but_uninstall_icon, &QAbstractButton::clicked, this, &DialogUninstaller::uninstallIcon);
}
DialogUninstaller::~DialogUninstaller()
......@@ -85,7 +85,7 @@ void DialogUninstaller::uninstallTheme()
ThreadErase* threadEraseTheme = new ThreadErase;
threadEraseTheme->setThemeForErase(themes.first());
connect(threadEraseTheme, SIGNAL(finished(KJob*)), this, SLOT(threadUninstalledThemeFinished(KJob*)));
connect(threadEraseTheme, &KJob::finished, this, &DialogUninstaller::threadUninstalledThemeFinished);
threadEraseTheme->start();
}
......@@ -105,7 +105,7 @@ void DialogUninstaller::uninstallIcon()
ThreadErase* threadEraseIcon = new ThreadErase;
threadEraseIcon->setThemeForErase(theme);
connect(threadEraseIcon, SIGNAL(finished(KJob*)), this, SLOT(threadUninstalledThemeIconFinished(KJob*)));
connect(threadEraseIcon, &KJob::finished, this, &DialogUninstaller::threadUninstalledThemeIconFinished);
threadEraseIcon->start();
}
......
......@@ -108,21 +108,21 @@ GTKConfigKCModule::GTKConfigKCModule(QWidget* parent, const QVariantList& args )
//UI changes
connect(ui->cb_theme, SIGNAL(currentIndexChanged(int)), this, SLOT(appChanged()));
connect(ui->cb_theme_gtk3, SIGNAL(currentIndexChanged(int)), this, SLOT(appChanged()));
connect(ui->checkBox_theme_gtk3_prefer_dark, SIGNAL(clicked(bool)), this, SLOT(appChanged()));
connect(ui->checkBox_theme_gtk3_prefer_dark, &QAbstractButton::clicked, this, &GTKConfigKCModule::appChanged);
connect(ui->cb_cursor, SIGNAL(currentIndexChanged(int)), this, SLOT(appChanged()));
connect(ui->cb_icon, SIGNAL(currentIndexChanged(int)), this, SLOT(appChanged()));
connect(ui->cb_icon_fallback ,SIGNAL(currentIndexChanged(int)), this, SLOT(appChanged()));
connect(ui->font, SIGNAL(fontSelected(QFont)), this, SLOT(appChanged()));
connect(ui->font, &KFontRequester::fontSelected, this, &GTKConfigKCModule::appChanged);
connect(ui->cb_toolbar_icons, SIGNAL(currentIndexChanged(int)), this, SLOT(appChanged()));
connect(ui->checkBox_icon_gtk_menus, SIGNAL(clicked(bool)), this, SLOT(appChanged()));
connect(ui->checkBox_icon_gtk_buttons, SIGNAL(clicked(bool)), this, SLOT(appChanged()));
connect(ui->checkBox_icon_gtk_menus, &QAbstractButton::clicked, this, &GTKConfigKCModule::appChanged);
connect(ui->checkBox_icon_gtk_buttons, &QAbstractButton::clicked, this, &GTKConfigKCModule::appChanged);
connect(ui->buttonGroup_primary_button_warps_slider, SIGNAL(buttonToggled(QAbstractButton*, bool)), this, SLOT(appChanged()));
//preview updates
connect(ui->cb_icon_fallback, SIGNAL(activated(QString)), this, SLOT(makePreviewIconTheme()));
connect(ui->cb_icon, SIGNAL(activated(QString)), this, SLOT(makePreviewIconTheme()));
connect(ui->gtk2Preview, SIGNAL(clicked(bool)), this, SLOT(runGtk2IfNecessary(bool)));
connect(ui->gtk3Preview, SIGNAL(clicked(bool)), this, SLOT(runGtk3IfNecessary(bool)));
connect(ui->gtk2Preview, &QAbstractButton::clicked, this, &GTKConfigKCModule::runGtk2IfNecessary);
connect(ui->gtk3Preview, &QAbstractButton::clicked, this, &GTKConfigKCModule::runGtk3IfNecessary);
QMenu* m = new QMenu(this);
m->addAction(QIcon::fromTheme("get-hot-new-stuff"), i18n("Download GTK2 themes..."), this, SLOT(showThemeGHNS()));
......@@ -438,7 +438,7 @@ void GTKConfigKCModule::showDialogForInstall()
{
if(!installer) {
installer = new DialogInstaller(this);
connect(installer, SIGNAL(themeInstalled()), SLOT(refreshLists()));
connect(installer, &DialogInstaller::themeInstalled, this, &GTKConfigKCModule::refreshLists);
}
installer->exec();
......@@ -449,7 +449,7 @@ void GTKConfigKCModule::showDialogForUninstall()
{
if(!uninstaller) {
uninstaller = new DialogUninstaller(this, appareance);
connect(uninstaller, SIGNAL(themeUninstalled()), SLOT(refreshLists()));
connect(uninstaller, &DialogUninstaller::themeUninstalled, this, &GTKConfigKCModule::refreshLists);
}
uninstaller->refreshListsForUninstall();
......
......@@ -199,7 +199,7 @@ void ThreadErase::setThemeForErase(const QString& theme)
void ThreadErase::start()
{
KIO::DeleteJob* job = KIO::del(QUrl::fromLocalFile(themeForErase), KIO::HideProgressInfo);
connect(job, SIGNAL(finished(KJob*)), SLOT(deleted(KJob*)));
connect(job, &KJob::finished, this, &ThreadErase::deleted);
}
void ThreadErase::deleted(KJob* job)
......
Supports Markdown
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