Drop now unneeded QOverload statements

By defining the KF_DISABLE_DEPRECATED_BEFORE_AND_AT value, the deprecated overloads are hidden.
This way we only have the un-deprecated one visible.
wilder-5.24
Alexander Lohnau 4 years ago
parent a83d5b21a5
commit c3201e74c2
  1. 2
      applets/kicker/plugin/appentry.cpp
  2. 2
      applets/kicker/plugin/appsmodel.cpp
  3. 2
      components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
  4. 2
      dataengines/apps/appsengine.cpp
  5. 2
      dataengines/weather/weatherengine.cpp
  6. 2
      freespacenotifier/freespacenotifier.cpp
  7. 2
      kcms/colors/colors.cpp
  8. 4
      kcms/feedback/feedback.cpp
  9. 31
      kcms/icons/main.cpp
  10. 2
      kcms/krdb/krdb.cpp
  11. 2
      kcms/translations/language.cpp
  12. 3
      libtaskmanager/launchertasksmodel.cpp
  13. 3
      libtaskmanager/xwindowtasksmodel.cpp
  14. 2
      runners/kill/killrunner_config.cpp
  15. 2
      runners/webshortcuts/webshortcutrunner.cpp
  16. 2
      shell/shellcorona.cpp
  17. 2
      startkde/plasma-session/sessiontrack.cpp
  18. 2
      startkde/plasma-session/startup.cpp
  19. 17
      startkde/startplasma.cpp

@ -52,7 +52,7 @@ AppEntry::AppEntry(AbstractModel *owner, const QString &id)
if (url.scheme() == QLatin1String("preferred")) {
m_service = defaultAppByName(url.host());
m_id = id;
m_con = QObject::connect(KSycoca::self(), QOverload<>::of(&KSycoca::databaseChanged), owner, [this, owner, id]() {
m_con = QObject::connect(KSycoca::self(), &KSycoca::databaseChanged, owner, [this, owner, id]() {
KSharedConfig::openConfig()->reparseConfiguration();
m_service = defaultAppByName(QUrl(id).host());
if (m_service) {

@ -549,7 +549,7 @@ void AppsModel::refreshInternal()
m_changeTimer->setInterval(100);
connect(m_changeTimer, SIGNAL(timeout()), this, SLOT(refresh()));
connect(KSycoca::self(), QOverload<>::of(&KSycoca::databaseChanged), this, [this]() {
connect(KSycoca::self(), &KSycoca::databaseChanged, this, [this]() {
m_changeTimer->start();
});
} else {

@ -218,7 +218,7 @@ PlasmaAppletItemModel::PlasmaAppletItemModel(QObject *parent)
: QStandardItemModel(parent)
, m_startupCompleted(false)
{
connect(KSycoca::self(), QOverload<>::of(&KSycoca::databaseChanged), this, &PlasmaAppletItemModel::populateModel);
connect(KSycoca::self(), &KSycoca::databaseChanged, this, &PlasmaAppletItemModel::populateModel);
setSortRole(Qt::DisplayRole);
}

@ -23,7 +23,7 @@ AppsEngine::~AppsEngine()
void AppsEngine::init()
{
addGroup(KServiceGroup::root());
connect(KSycoca::self(), QOverload<>::of(&KSycoca::databaseChanged), this, [this]() {
connect(KSycoca::self(), &KSycoca::databaseChanged, this, [this]() {
removeAllSources();
addGroup(KServiceGroup::root());
});

@ -28,7 +28,7 @@ WeatherEngine::WeatherEngine(QObject *parent, const QVariantList &args)
connect(&m_networkConfigurationManager, &QNetworkConfigurationManager::onlineStateChanged, this, &WeatherEngine::onOnlineStateChanged);
// Get the list of available plugins but don't load them
connect(KSycoca::self(), static_cast<void (KSycoca::*)()>(&KSycoca::databaseChanged), this, &WeatherEngine::updateIonList);
connect(KSycoca::self(), &KSycoca::databaseChanged, this, &WeatherEngine::updateIonList);
updateIonList();
}

@ -100,7 +100,7 @@ void FreeSpaceNotifier::checkFreeDiskSpace()
m_notification->setActions(actions);
connect(m_notification, QOverload<uint>::of(&KNotification::activated), this, [this](uint actionId) {
connect(m_notification, &KNotification::activated, this, [this](uint actionId) {
if (actionId == 1) {
exploreDrive();
// TODO once we have "configure" action support in KNotification, wire it up instead of a button

@ -276,7 +276,7 @@ void KCMColors::editScheme(const QString &schemeName, QQuickItem *ctx)
QModelIndex idx = m_model->index(m_model->indexOfScheme(schemeName), 0);
m_editDialogProcess = new QProcess(this);
connect(m_editDialogProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, [this](int exitCode, QProcess::ExitStatus exitStatus) {
connect(m_editDialogProcess, &QProcess::finished, this, [this](int exitCode, QProcess::ExitStatus exitStatus) {
Q_UNUSED(exitCode);
Q_UNUSED(exitStatus);

@ -42,8 +42,6 @@ Feedback::Feedback(QObject *parent, const KPluginMetaData &data, const QVariantL
// UserFeedback.conf is used by KUserFeedback which uses QSettings and won't go through globals
, m_data(new FeedbackData(this))
{
Q_UNUSED(args)
qmlRegisterAnonymousType<FeedbackSettings>("org.kde.userfeedback.kcm", 1);
setAboutData(new KAboutData(QStringLiteral("kcm_feedback"),
@ -58,7 +56,7 @@ Feedback::Feedback(QObject *parent, const KPluginMetaData &data, const QVariantL
p->setProgram(exec);
p->setArguments({QStringLiteral("--feedback")});
p->start();
connect(p, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &Feedback::programFinished);
connect(p, &QProcess::finished, this, &Feedback::programFinished);
processes << p;
}
}

@ -280,23 +280,20 @@ void IconModule::exportToKDE4()
kde4config.sync();
QProcess *cachePathProcess = new QProcess(this);
connect(cachePathProcess,
QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this,
[cachePathProcess](int exitCode, QProcess::ExitStatus status) {
if (status == QProcess::NormalExit && exitCode == 0) {
QString path = cachePathProcess->readAllStandardOutput().trimmed();
path.append(QLatin1String("icon-cache.kcache"));
QFile::remove(path);
}
// message kde4 apps that icon theme has changed
for (int i = 0; i < KIconLoader::LastGroup; ++i) {
notifyKcmChange(GlobalChangeType::IconChanged, KIconLoader::Group(i));
}
cachePathProcess->deleteLater();
});
connect(cachePathProcess, &QProcess::finished, this, [cachePathProcess](int exitCode, QProcess::ExitStatus status) {
if (status == QProcess::NormalExit && exitCode == 0) {
QString path = cachePathProcess->readAllStandardOutput().trimmed();
path.append(QLatin1String("icon-cache.kcache"));
QFile::remove(path);
}
// message kde4 apps that icon theme has changed
for (int i = 0; i < KIconLoader::LastGroup; ++i) {
notifyKcmChange(GlobalChangeType::IconChanged, KIconLoader::Group(i));
}
cachePathProcess->deleteLater();
});
cachePathProcess->start(QStringLiteral("kde4-config"), {QStringLiteral("--path"), QStringLiteral("cache")});
}

@ -501,7 +501,7 @@ void runRdb(uint flags)
PropModeReplace,
(unsigned char *)stamp.buffer().data(),
stamp.buffer().size());
QApplication::flush();
qApp->processEvents();
}
#endif
}

@ -103,7 +103,7 @@ public:
{
proc.setProgram("/usr/bin/check-language-support");
proc.setArguments({"--language", m_languageCode.left(m_languageCode.indexOf(QLatin1Char('@')))});
connect(&proc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), this, [this] {
connect(&proc, &QProcess::finished, this, [this] {
const QString output = QString::fromUtf8(proc.readAllStandardOutput().simplified());
// Whenever we don't get packages back simply pretend the language is complete as we can't
// give any useful information on what's wrong anyway.

@ -103,8 +103,7 @@ void LauncherTasksModel::Private::init()
AbstractTasksModel::LauncherUrlWithoutIcon});
});
void (KSycoca::*myDatabaseChangeSignal)() = &KSycoca::databaseChanged;
QObject::connect(KSycoca::self(), myDatabaseChangeSignal, q, [this]() {
QObject::connect(KSycoca::self(), &KSycoca::databaseChanged, q, [this]() {
sycocaChangeTimer.start();
});
}

@ -121,8 +121,7 @@ void XWindowTasksModel::Private::init()
QObject::connect(&sycocaChangeTimer, &QTimer::timeout, q, clearCacheAndRefresh);
void (KSycoca::*myDatabaseChangeSignal)() = &KSycoca::databaseChanged;
QObject::connect(KSycoca::self(), myDatabaseChangeSignal, q, [this]() {
QObject::connect(KSycoca::self(), &KSycoca::databaseChanged, q, [this]() {
sycocaChangeTimer.start();
});

@ -35,7 +35,7 @@ KillRunnerConfig::KillRunnerConfig(QWidget *parent, const QVariantList &args)
connect(m_ui->useTriggerWord, &QCheckBox::stateChanged, this, &KillRunnerConfig::markAsChanged);
connect(m_ui->triggerWord, &KLineEdit::textChanged, this, &KillRunnerConfig::markAsChanged);
connect(m_ui->sorting, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &KillRunnerConfig::markAsChanged);
connect(m_ui->sorting, &QComboBox::currentIndexChanged, this, &KillRunnerConfig::markAsChanged);
load();
}

@ -31,7 +31,7 @@ WebshortcutRunner::WebshortcutRunner(QObject *parent, const KPluginMetaData &met
sessionDbus.connect(QString(), QStringLiteral("/"), QStringLiteral("org.kde.KUriFilterPlugin"), QStringLiteral("configure"), this, SLOT(loadSyntaxes()));
loadSyntaxes();
configurePrivateBrowsingActions();
connect(KSycoca::self(), QOverload<>::of(&KSycoca::databaseChanged), this, &WebshortcutRunner::configurePrivateBrowsingActions);
connect(KSycoca::self(), &KSycoca::databaseChanged, this, &WebshortcutRunner::configurePrivateBrowsingActions);
setMinLetterCount(3);
}

@ -153,7 +153,7 @@ void ShellCorona::init()
KGlobalAccel::self()->setGlobalShortcut(dashboardAction, Qt::CTRL | Qt::Key_F12);
checkAddPanelAction();
connect(KSycoca::self(), QOverload<>::of(&KSycoca::databaseChanged), this, &ShellCorona::checkAddPanelAction);
connect(KSycoca::self(), &KSycoca::databaseChanged, this, &ShellCorona::checkAddPanelAction);
// Activity stuff
QAction *activityAction = actions()->addAction(QStringLiteral("manage activities"));

@ -22,7 +22,7 @@ SessionTrack::SessionTrack(const QVector<QProcess *> &processes)
});
for (auto process : std::as_const(m_processes)) {
connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, [this] {
connect(process, &QProcess::finished, this, [this] {
m_processes.removeAll(static_cast<QProcess *>(sender()));
});
}

@ -419,7 +419,7 @@ StartProcessJob::StartProcessJob(const QString &process, const QStringList &args
env.insert(additionalEnv);
m_process->setProcessEnvironment(env);
connect(m_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [this](int exitCode) {
connect(m_process, &QProcess::finished, [this](int exitCode) {
qCInfo(PLASMA_SESSION) << "process job " << m_process->program() << "finished with exit code " << exitCode;
emitResult();
});

@ -598,16 +598,13 @@ bool startPlasmaSession(bool wayland)
}
startPlasmaSession->setProcessChannelMode(QProcess::ForwardedChannels);
QObject::connect(startPlasmaSession.data(),
QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
&e,
[&rc](int exitCode, QProcess::ExitStatus) {
if (exitCode == 255) {
// Startup error
messageBox(QStringLiteral("startkde: Could not start plasma_session. Check your installation.\n"));
rc = false;
}
});
QObject::connect(startPlasmaSession.data(), &QProcess::finished, &e, [&rc](int exitCode, QProcess::ExitStatus) {
if (exitCode == 255) {
// Startup error
messageBox(QStringLiteral("startkde: Could not start plasma_session. Check your installation.\n"));
rc = false;
}
});
startPlasmaSession->start(QStringLiteral(CMAKE_INSTALL_FULL_BINDIR "/plasma_session"), plasmaSessionOptions);
} else {

Loading…
Cancel
Save