Commit 20f45112 authored by Méven Car's avatar Méven Car

KCM/GlobalShortut: convert FOREACH and old signal syntax

Test Plan: Builds, changed a shortcut and back again

Reviewers: ervin, bport, crossi, hchain, #plasma

Reviewed By: ervin

Subscribers: ahmadsamir, davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28282
parent 22daee2f
......@@ -43,8 +43,7 @@ ExportSchemeDialog::ExportSchemeDialog(QStringList components, QWidget *parent)
QGridLayout *vb = new QGridLayout(this);
int item=0;
Q_FOREACH(QString component, mComponents)
{
for (const QString &component : qAsConst(mComponents)) {
QCheckBox *cb = new QCheckBox(component);
vb->addWidget(cb, item / 2, item % 2);
mButtons.addButton(cb, item);
......@@ -70,8 +69,8 @@ ExportSchemeDialog::~ExportSchemeDialog()
QStringList ExportSchemeDialog::selectedComponents() const
{
QStringList rc;
Q_FOREACH(QAbstractButton const *button, mButtons.buttons())
{
const auto buttons = mButtons.buttons();
for (const QAbstractButton *button : buttons) {
if (button->isChecked())
{
// Remove the '&' added by KAcceleratorManager magically
......
......@@ -37,10 +37,9 @@ GlobalShortcutsModule::GlobalShortcutsModule(QWidget *parent, const QVariantList
{
KCModule::setButtons(KCModule::Buttons(KCModule::Default | KCModule::Apply | KCModule::Help));
// Create the kglobaleditor
editor = new KGlobalShortcutsEditor(this, KShortcutsEditor::GlobalAction);
connect(editor, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
connect(editor, &KGlobalShortcutsEditor::changed, this, &GlobalShortcutsModule::markAsChanged);
// Layout the hole bunch
QVBoxLayout *global = new QVBoxLayout;
......
This diff is collapsed.
......@@ -81,7 +81,7 @@ public:
/**
* Save the shortcuts to the configuration.
*/
void exportConfiguration(QStringList componentsFriendly, KConfig *config) const;
void exportConfiguration(const QStringList &componentsFriendly, KConfig *config) const;
/**
......
......@@ -70,8 +70,8 @@ SelectSchemeDialog::SelectSchemeDialog(QWidget *parent)
ui->m_url->setMode(KFile::LocalOnly | KFile::ExistingOnly);
connect(ui->m_schemes, SIGNAL(activated(int)),
this, SLOT(schemeActivated(int)));
connect(ui->m_schemes, QOverload<int>::of(&KComboBox::activated),
this, &SelectSchemeDialog::schemeActivated);
connect(ui->m_url->lineEdit(), &QLineEdit::textChanged,
this, &SelectSchemeDialog::slotUrlChanged);
mOkButton->setEnabled(false);
......
Markdown is supported
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