From 4543c74436020e770156c5db78a32563007d3bd7 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sun, 19 Jun 2022 08:35:11 +0200 Subject: [PATCH] Use QStringLiteral + use nullptr --- src/plugins/MouseGestures/mousegestures.cpp | 3 --- src/plugins/MouseGestures/mousegestures.h | 6 +++--- src/plugins/MouseGestures/mousegesturesplugin.cpp | 1 - src/plugins/MouseGestures/mousegesturesplugin.h | 2 +- src/plugins/PIM/PIM_handler.cpp | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/plugins/MouseGestures/mousegestures.cpp b/src/plugins/MouseGestures/mousegestures.cpp index a6a0b010a..c578125c4 100644 --- a/src/plugins/MouseGestures/mousegestures.cpp +++ b/src/plugins/MouseGestures/mousegestures.cpp @@ -36,9 +36,6 @@ MouseGestures::MouseGestures(const QString &settingsPath, QObject* parent) , m_filter(0) , m_settingsFile(settingsPath + QL1S("/extensions.ini")) , m_button(Qt::MiddleButton) - , m_enableRockerNavigation(false) - , m_blockNextRightMouseRelease(false) - , m_blockNextLeftMouseRelease(false) { loadSettings(); } diff --git a/src/plugins/MouseGestures/mousegestures.h b/src/plugins/MouseGestures/mousegestures.h index e4874a7b3..e080d323a 100644 --- a/src/plugins/MouseGestures/mousegestures.h +++ b/src/plugins/MouseGestures/mousegestures.h @@ -76,10 +76,10 @@ private: QString m_settingsFile; Qt::MouseButton m_button; - bool m_enableRockerNavigation; + bool m_enableRockerNavigation = false; - bool m_blockNextRightMouseRelease; - bool m_blockNextLeftMouseRelease; + bool m_blockNextRightMouseRelease = false; + bool m_blockNextLeftMouseRelease = false; bool m_oldWebViewForceContextMenuOnRelease = false; }; diff --git a/src/plugins/MouseGestures/mousegesturesplugin.cpp b/src/plugins/MouseGestures/mousegesturesplugin.cpp index 85bfcceae..da698ee95 100644 --- a/src/plugins/MouseGestures/mousegesturesplugin.cpp +++ b/src/plugins/MouseGestures/mousegesturesplugin.cpp @@ -24,7 +24,6 @@ MouseGesturesPlugin::MouseGesturesPlugin() : QObject() - , m_gestures(0) { } diff --git a/src/plugins/MouseGestures/mousegesturesplugin.h b/src/plugins/MouseGestures/mousegesturesplugin.h index ce6d1a740..ea2d4b15a 100644 --- a/src/plugins/MouseGestures/mousegesturesplugin.h +++ b/src/plugins/MouseGestures/mousegesturesplugin.h @@ -40,7 +40,7 @@ public: bool mouseMove(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override; private: - MouseGestures* m_gestures; + MouseGestures* m_gestures = nullptr; }; diff --git a/src/plugins/PIM/PIM_handler.cpp b/src/plugins/PIM/PIM_handler.cpp index 2aac230f8..03b10898e 100644 --- a/src/plugins/PIM/PIM_handler.cpp +++ b/src/plugins/PIM/PIM_handler.cpp @@ -112,7 +112,7 @@ void PIM_Handler::populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTe } QMenu* pimMenu = new QMenu(tr("Insert Personal Information")); - pimMenu->setIcon(QIcon(":/PIM/data/PIM.png")); + pimMenu->setIcon(QIcon(QStringLiteral(":/PIM/data/PIM.png"))); if (!m_allInfo[PI_FirstName].isEmpty() && !m_allInfo[PI_LastName].isEmpty()) { const QString fullname = m_allInfo[PI_FirstName] + QLatin1Char(' ') + m_allInfo[PI_LastName];