diff --git a/applets/appmenu/plugin/appmenumodel.cpp b/applets/appmenu/plugin/appmenumodel.cpp index 7f80c9df4..a55995372 100644 --- a/applets/appmenu/plugin/appmenumodel.cpp +++ b/applets/appmenu/plugin/appmenumodel.cpp @@ -175,15 +175,15 @@ int AppMenuModel::rowCount(const QModelIndex &parent) const return 0; } - return m_menu->actions().count()+(KWindowSystem::isPlatformWayland() ? 1 : 0); + return m_menu->actions().count() + (KWindowSystem::isPlatformWayland() ? 1 : 0); } void AppMenuModel::removeSearchActionsFromMenu() { - for (const auto &action: m_currentSearchActions) { + for (const auto &action : m_currentSearchActions) { m_searchAction->menu()->removeAction(action); } - m_currentSearchActions = QList(); + m_currentSearchActions = QList(); } void AppMenuModel::insertSearchActionsIntoMenu(const QString &filter) @@ -193,7 +193,7 @@ void AppMenuModel::insertSearchActionsIntoMenu(const QString &filter) return; } const auto actions = flatActionList(); - for (const auto &action: actions) { + for (const auto &action : actions) { if (action->text().contains(filter, Qt::CaseInsensitive)) { m_searchAction->menu()->addAction(action); m_currentSearchActions << action; @@ -233,14 +233,14 @@ QHash AppMenuModel::roleNames() const return roleNames; } -QList AppMenuModel::flatActionList() +QList AppMenuModel::flatActionList() { - QList ret; + QList ret; if (!m_menuAvailable || !m_menu) { return ret; } - const auto actions = m_menu->findChildren(); - for (auto &action: actions) { + const auto actions = m_menu->findChildren(); + for (auto &action : actions) { if (action->menu() == nullptr) { ret << action; } @@ -260,7 +260,7 @@ QVariant AppMenuModel::data(const QModelIndex &index, int role) const if (role == MenuRole) { return m_searchAction->text(); } else if (role == ActionRole) { - return QVariant::fromValue((void*)m_searchAction); + return QVariant::fromValue((void *)m_searchAction); } } if (row >= actions.count()) { diff --git a/applets/appmenu/plugin/appmenumodel.h b/applets/appmenu/plugin/appmenumodel.h index 55d086219..4f6188b92 100644 --- a/applets/appmenu/plugin/appmenumodel.h +++ b/applets/appmenu/plugin/appmenumodel.h @@ -24,12 +24,10 @@ #include #include -#include #include #include #include #include -#include #include class QMenu; @@ -68,7 +66,7 @@ public: QRect screenGeometry() const; void setScreenGeometry(QRect geometry); - QList flatActionList(); + QList flatActionList(); Q_SIGNALS: void requestActivateIndex(int index); @@ -100,7 +98,7 @@ private: QScopedPointer m_searchMenu; QPointer m_menu; QPointer m_searchAction; - QList m_currentSearchActions; + QList m_currentSearchActions; void removeSearchActionsFromMenu(); void insertSearchActionsIntoMenu(const QString &filter = QString()); diff --git a/applets/kicker/plugin/kickerplugin.cpp b/applets/kicker/plugin/kickerplugin.cpp index 89191f1ea..7a631af91 100644 --- a/applets/kicker/plugin/kickerplugin.cpp +++ b/applets/kicker/plugin/kickerplugin.cpp @@ -62,5 +62,4 @@ void KickerPlugin::registerTypes(const char *uri) qmlRegisterType(uri, 0, 1, "TriangleMouseFilter"); qmlRegisterType(uri, 0, 1, "WheelInterceptor"); qmlRegisterType(uri, 0, 1, "WindowSystem"); - } diff --git a/applets/kicker/plugin/runnermodel.cpp b/applets/kicker/plugin/runnermodel.cpp index 2ad979914..fe83fa5cc 100644 --- a/applets/kicker/plugin/runnermodel.cpp +++ b/applets/kicker/plugin/runnermodel.cpp @@ -248,16 +248,18 @@ void RunnerModel::matchesChanged(const QList &matches) QList matches; // To preserve the old behavior when allowing all runners we use static sorting - const static QStringList runnerIds = {QStringLiteral("desktopsessions"), - QStringLiteral("services"), - QStringLiteral("places"), - QStringLiteral("PowerDevil"), - QStringLiteral("calculator"), - QStringLiteral("unitconverter"), - QStringLiteral("shell"), - QStringLiteral("bookmarks"), - QStringLiteral("recentdocuments"), - QStringLiteral("locations"),}; + const static QStringList runnerIds = { + QStringLiteral("desktopsessions"), + QStringLiteral("services"), + QStringLiteral("places"), + QStringLiteral("PowerDevil"), + QStringLiteral("calculator"), + QStringLiteral("unitconverter"), + QStringLiteral("shell"), + QStringLiteral("bookmarks"), + QStringLiteral("recentdocuments"), + QStringLiteral("locations"), + }; if (m_runners.isEmpty()) { const auto baloo = matchesForRunner.take(QStringLiteral("baloosearch")); const auto appstream = matchesForRunner.take(QStringLiteral("krunner_appstream")); diff --git a/applets/notifications/fileinfo.cpp b/applets/notifications/fileinfo.cpp index 08a73b316..a05a2056d 100644 --- a/applets/notifications/fileinfo.cpp +++ b/applets/notifications/fileinfo.cpp @@ -29,7 +29,6 @@ Application::Application() = default; Application::Application(const KService::Ptr &service) : m_service(service) { - } QString Application::name() const @@ -50,7 +49,6 @@ bool Application::isValid() const FileInfo::FileInfo(QObject *parent) : QObject(parent) { - } FileInfo::~FileInfo() = default; diff --git a/applets/notifications/fileinfo.h b/applets/notifications/fileinfo.h index df9c96a79..be6f86321 100644 --- a/applets/notifications/fileinfo.h +++ b/applets/notifications/fileinfo.h @@ -103,5 +103,4 @@ private: QString m_iconName; Application m_preferredApplication; - }; diff --git a/applets/notifications/texteditclickhandler.cpp b/applets/notifications/texteditclickhandler.cpp index 106413386..851e86a9e 100644 --- a/applets/notifications/texteditclickhandler.cpp +++ b/applets/notifications/texteditclickhandler.cpp @@ -61,7 +61,7 @@ bool TextEditClickHandler::eventFilter(QObject *watched, QEvent *event) const auto *e = static_cast(event); if (m_pressPos.x() > -1 && m_pressPos.y() > -1 // - && (m_pressPos - e->pos()).manhattanLength() < qGuiApp->styleHints()->startDragDistance()) { + && (m_pressPos - e->pos()).manhattanLength() < qGuiApp->styleHints()->startDragDistance()) { Q_EMIT clicked(); } } diff --git a/applets/notifications/texteditclickhandler.h b/applets/notifications/texteditclickhandler.h index 03dedfbfa..ec962fbf9 100644 --- a/applets/notifications/texteditclickhandler.h +++ b/applets/notifications/texteditclickhandler.h @@ -19,8 +19,8 @@ #pragma once #include -#include #include +#include class QQuickItem; @@ -53,5 +53,4 @@ Q_SIGNALS: private: QPointer m_target; QPointF m_pressPos{-1, -1}; - }; diff --git a/applets/systemmonitor/systemmonitor/systemmonitor.cpp b/applets/systemmonitor/systemmonitor/systemmonitor.cpp index 1cbd48848..d709752a0 100644 --- a/applets/systemmonitor/systemmonitor/systemmonitor.cpp +++ b/applets/systemmonitor/systemmonitor/systemmonitor.cpp @@ -86,7 +86,6 @@ KSysGuard::SensorFaceController *SystemMonitor::workaroundController(QQuickItem return new KSysGuard::SensorFaceController(cg, qmlEngine(context)); } - void SystemMonitor::configChanged() { if (m_sensorFaceController) { diff --git a/applets/systemtray/container/systemtraycontainer.cpp b/applets/systemtray/container/systemtraycontainer.cpp index 334be7858..49b695eb2 100644 --- a/applets/systemtray/container/systemtraycontainer.cpp +++ b/applets/systemtray/container/systemtraycontainer.cpp @@ -116,13 +116,13 @@ void SystemTrayContainer::ensureSystrayExists() // replace internal remove action with ours m_innerContainment->actions()->addAction("remove", actions()->action("remove")); - //Sync the display hints - m_innerContainment->setContainmentDisplayHints(containmentDisplayHints() | Plasma::Types::ContainmentDrawsPlasmoidHeading | Plasma::Types::ContainmentForcesSquarePlasmoids); - connect(cont, &Plasma::Containment::containmentDisplayHintsChanged, this, - [this]() { - m_innerContainment->setContainmentDisplayHints(containmentDisplayHints() | Plasma::Types::ContainmentDrawsPlasmoidHeading | Plasma::Types::ContainmentForcesSquarePlasmoids); - } - ); + // Sync the display hints + m_innerContainment->setContainmentDisplayHints(containmentDisplayHints() | Plasma::Types::ContainmentDrawsPlasmoidHeading + | Plasma::Types::ContainmentForcesSquarePlasmoids); + connect(cont, &Plasma::Containment::containmentDisplayHintsChanged, this, [this]() { + m_innerContainment->setContainmentDisplayHints(containmentDisplayHints() | Plasma::Types::ContainmentDrawsPlasmoidHeading + | Plasma::Types::ContainmentForcesSquarePlasmoids); + }); } void SystemTrayContainer::constraintsEvent(Plasma::Types::Constraints constraints) diff --git a/applets/systemtray/sortedsystemtraymodel.cpp b/applets/systemtray/sortedsystemtraymodel.cpp index 209d43b50..ee543a126 100644 --- a/applets/systemtray/sortedsystemtraymodel.cpp +++ b/applets/systemtray/sortedsystemtraymodel.cpp @@ -23,11 +23,13 @@ #include -static const QList s_categoryOrder = {QStringLiteral("UnknownCategory"), - QStringLiteral("ApplicationStatus"), - QStringLiteral("Communications"), - QStringLiteral("SystemServices"), - QStringLiteral("Hardware"),}; +static const QList s_categoryOrder = { + QStringLiteral("UnknownCategory"), + QStringLiteral("ApplicationStatus"), + QStringLiteral("Communications"), + QStringLiteral("SystemServices"), + QStringLiteral("Hardware"), +}; SortedSystemTrayModel::SortedSystemTrayModel(SortingType sorting, QObject *parent) : QSortFilterProxyModel(parent) diff --git a/applets/systemtray/systemtraymodel.cpp b/applets/systemtray/systemtraymodel.cpp index 76c2831b5..98374ee5e 100644 --- a/applets/systemtray/systemtraymodel.cpp +++ b/applets/systemtray/systemtraymodel.cpp @@ -291,7 +291,8 @@ static QVariant extractIcon(const Plasma::DataEngine::Data &sniData, const QStri } } -static QString extractItemId(const Plasma::DataEngine::Data &sniData) { +static QString extractItemId(const Plasma::DataEngine::Data &sniData) +{ const QString itemId = sniData.value(QStringLiteral("Id")).toString(); // Bug 378910: workaround for Dropbox not following the SNI specification if (itemId.startsWith(QLatin1String("dropbox-client-"))) {