Fix some issues detected by Clazy (#384)

* Fix old style connect

* Fix unneeded QString memory allocations
This commit is contained in:
Alfredo Ramos
2018-10-23 18:04:42 -05:00
committed by Dharkael
parent 7d91b00072
commit ee2f583acd
48 changed files with 231 additions and 231 deletions

View File

@@ -47,7 +47,7 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool &ok) {
QDBusInterface gnomeInterface(QStringLiteral("org.gnome.Shell"),
QStringLiteral("/org/gnome/Shell/Screenshot"),
QStringLiteral("org.gnome.Shell.Screenshot"));
QDBusReply<bool> reply = gnomeInterface.call("Screenshot", false, false, path);
QDBusReply<bool> reply = gnomeInterface.call(QStringLiteral("Screenshot"), false, false, path);
if (reply.value()) {
res = QPixmap(path);
QFile dbusResult(path);
@@ -61,7 +61,7 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool &ok) {
QDBusInterface kwinInterface(QStringLiteral("org.kde.KWin"),
QStringLiteral("/Screenshot"),
QStringLiteral("org.kde.kwin.Screenshot"));
QDBusReply<QString> reply = kwinInterface.call("screenshotFullscreen");
QDBusReply<QString> reply = kwinInterface.call(QStringLiteral("screenshotFullscreen"));
res = QPixmap(reply.value());
if (!res.isNull()) {
QFile dbusResult(reply.value());