Commit 37e57bc1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add explicit, use nullptr etc.

parent 631502ed
......@@ -33,7 +33,7 @@ Q_OBJECT
Q_PROPERTY(bool dragActive READ dragActive NOTIFY dragActiveChanged)
public:
DragHelper(QObject *parent = nullptr);
explicit DragHelper(QObject *parent = nullptr);
~DragHelper();
bool dragActive() const;
......
......@@ -48,7 +48,7 @@ public:
};
Q_ENUM(PositionOnScreen)
NotificationsHelper(QObject *parent = nullptr);
explicit NotificationsHelper(QObject *parent = nullptr);
~NotificationsHelper() override;
Q_INVOKABLE void addNotificationPopup(QObject *win);
Q_INVOKABLE void closePopup(const QString &sourceName);
......
......@@ -133,7 +133,7 @@ void Thumbnailer::showContextMenu(int x, int y, const QString &path, QQuickItem
});
if (KProtocolManager::supportsListing(url)) {
QAction *openContainingFolderAction = menu->addAction(QIcon::fromTheme("folder-open"), i18n("Open Containing Folder"));
QAction *openContainingFolderAction = menu->addAction(QIcon::fromTheme(QStringLiteral("folder-open")), i18n("Open Containing Folder"));
connect(openContainingFolderAction, &QAction::triggered, [url] {
KIO::highlightInFileManager({url});
});
......@@ -158,7 +158,7 @@ void Thumbnailer::showContextMenu(int x, int y, const QString &path, QQuickItem
actions->addServiceActionsTo(menu);
actions->addPluginActionsTo(menu);
QAction *propertiesAction = menu->addAction(QIcon::fromTheme("document-properties"), i18n("Properties"));
QAction *propertiesAction = menu->addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18n("Properties"));
connect(propertiesAction, &QAction::triggered, [fileItem] {
KPropertiesDialog *dialog = new KPropertiesDialog(fileItem.url());
dialog->setAttribute(Qt::WA_DeleteOnClose);
......
......@@ -79,7 +79,7 @@ void SystemTrayContainer::ensureSystrayExists()
}
if (!m_innerContainment) {
m_innerContainment = c->createContainment("org.kde.plasma.private.systemtray", QVariantList() << "org.kde.plasma:force-create");
m_innerContainment = c->createContainment(QStringLiteral("org.kde.plasma.private.systemtray"), QVariantList() << "org.kde.plasma:force-create");
config().writeEntry("SystrayContainmentId", m_innerContainment->id());
}
......
......@@ -346,7 +346,7 @@ bool SystemTray::isSystemTrayApplet(const QString &appletId)
void SystemTray::restoreContents(KConfigGroup &group)
{
Q_UNUSED(group);
//NOTE: RestoreContents shouldnn't do anything here because is too soon, so have an empty reimplementation
//NOTE: RestoreContents shouldn't do anything here because is too soon, so have an empty reimplementation
}
void SystemTray::restorePlasmoids()
......
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