Przeglądaj źródła

Move from virtual functions to override keyword and add explicit to constructors.

Tobias Hieta 8 lat temu
rodzic
commit
3e80a24fb8

+ 1 - 1
.clang-tidy

@@ -1,6 +1,6 @@
 # Don't use the C++ new,delete check since it doesn't work with Qt.
 # Enable a bunch of modernization checks
-Checks:          '-clang-analyzer-cplusplus.NewDeleteLeaks,misc-forward-declaration-namespace,modernize-use-auto,modernize-use-nullptr,modernize-redudant-void-arg,readability-inconsistent-declaration-parameter-name,readability-simplify-boolean-expr,readability-container-size-empty,performance-for-range-copy,readability-identifier-naming'
+Checks:          '-clang-analyzer-cplusplus.NewDeleteLeaks,misc-forward-declaration-namespace,modernize-use-auto,modernize-use-nullptr,modernize-redudant-void-arg,readability-inconsistent-declaration-parameter-name,readability-simplify-boolean-expr,readability-container-size-empty,performance-for-range-copy,readability-identifier-naming,modernize-use-override,google-explicit-constructor'
 CheckOptions:
     - key: readability-identifier-naming.ClassCase
       value: CamelCase

+ 1 - 1
src/ComponentManager.h

@@ -12,7 +12,7 @@
 class ComponentBase : public QObject
 {
 public:
-  ComponentBase(QObject* parent = nullptr) : QObject(parent) { }
+  explicit ComponentBase(QObject* parent = nullptr) : QObject(parent) { }
   
   virtual bool componentInitialize() = 0;
   virtual const char* componentName() = 0;

+ 2 - 2
src/SignalManager.h

@@ -10,8 +10,8 @@ class SignalManager : public QObject
   Q_OBJECT
 
 public:
-  SignalManager(QGuiApplication* app);
-  ~SignalManager() {}
+  explicit SignalManager(QGuiApplication* app);
+  ~SignalManager() override {}
 
   // Unix signal handlers.
   static void signalHandler(int signal_num);

+ 6 - 6
src/display/DisplayComponent.h

@@ -12,12 +12,12 @@ class DisplayComponent : public ComponentBase
   DEFINE_SINGLETON(DisplayComponent);
 
 public:
-  ~DisplayComponent();
+  ~DisplayComponent() override;
 
-  virtual const char* componentName() { return "display"; }
-  virtual bool componentExport() { return true; }
-  virtual bool componentInitialize();
-  virtual void componentPostInitialize();
+  const char* componentName() override { return "display"; }
+  bool componentExport() override { return true; }
+  bool componentInitialize() override;
+  void componentPostInitialize() override;
 
   inline DisplayManager* getDisplayManager() { return m_displayManager; }
   int getApplicationDisplay(bool silent = false);
@@ -46,7 +46,7 @@ public:
   QString debugInformation();
 
 private:
-  DisplayComponent(QObject *parent = nullptr);
+  explicit DisplayComponent(QObject *parent = nullptr);
   QString displayName(int display);
   QString modePretty(int display, int mode);
 

+ 2 - 2
src/display/DisplayManager.h

@@ -100,8 +100,8 @@ class DisplayManager : public QObject
 {
   Q_OBJECT
 public:
-  DisplayManager(QObject* parent);
-  virtual ~DisplayManager() {}
+  explicit DisplayManager(QObject* parent);
+  ~DisplayManager() override {}
 
   DMDisplayMap m_displays;
 

+ 6 - 6
src/display/dummy/DisplayManagerDummy.h

@@ -13,13 +13,13 @@ private:
   int m_currentMode;
 
 public:
-  DisplayManagerDummy(QObject* parent) : DisplayManager(parent), m_currentMode(0) {};
+  explicit DisplayManagerDummy(QObject* parent) : DisplayManager(parent), m_currentMode(0) {};
 
-  virtual bool initialize();
-  virtual bool setDisplayMode(int display, int mode);
-  virtual int getCurrentDisplayMode(int display);
-  virtual int getMainDisplay();
-  virtual int getDisplayFromPoint(int x, int y);
+  bool initialize() override;
+  bool setDisplayMode(int display, int mode) override;
+  int getCurrentDisplayMode(int display) override;
+  int getMainDisplay() override;
+  int getDisplayFromPoint(int x, int y) override;
 };
 
 #endif /* DISPLAYMANAGERX11_H_ */

+ 8 - 8
src/display/osx/DisplayManagerOSX.h

@@ -29,14 +29,14 @@ private:
   OSXDisplayModeMap m_osxDisplayModes;
 
 public:
-  DisplayManagerOSX(QObject* parent) : DisplayManager(parent) {};
-  virtual ~DisplayManagerOSX();
-
-  virtual bool initialize();
-  virtual bool setDisplayMode(int display, int mode);
-  virtual int getCurrentDisplayMode(int display);
-  virtual int getMainDisplay();
-  virtual int getDisplayFromPoint(int x, int y);
+  explicit DisplayManagerOSX(QObject* parent) : DisplayManager(parent) {};
+  ~DisplayManagerOSX() override;
+
+  bool initialize() override;
+  bool setDisplayMode(int display, int mode) override;
+  int getCurrentDisplayMode(int display) override;
+  int getMainDisplay() override;
+  int getDisplayFromPoint(int x, int y) override;
 };
 
 #endif /* _DISPLAYMANAGEROSX_H_ */

+ 5 - 5
src/input/InputCEC.h

@@ -18,10 +18,10 @@ class InputCECWorker;
 class InputCEC : public InputBase
 {
 public:
-  InputCEC(QObject* parent);
+  explicit InputCEC(QObject* parent);
 
-  virtual const char* inputName() override { return CEC_INPUT_NAME; }
-  virtual bool initInput() override;
+  const char* inputName() override { return CEC_INPUT_NAME; }
+  bool initInput() override;
 
 private:
   QThread* m_cecThread;
@@ -33,11 +33,11 @@ class InputCECWorker : public QObject
 {
 Q_OBJECT
 public:
-  InputCECWorker(QObject* parent = nullptr) : QObject(parent), m_adapter(nullptr), m_adapterPort("")
+  explicit InputCECWorker(QObject* parent = nullptr) : QObject(parent), m_adapter(nullptr), m_adapterPort("")
   {
   }
 
-  ~InputCECWorker();
+  ~InputCECWorker() override;
 
   Q_SLOT bool init();
   Q_SIGNAL void receivedInput(const QString& source, const QString& keycode, bool pressDown);

+ 5 - 5
src/input/InputComponent.h

@@ -12,7 +12,7 @@ class InputBase : public QObject
 {
   Q_OBJECT
 public:
-  InputBase(QObject* parent = nullptr) : QObject(parent) { }
+  explicit InputBase(QObject* parent = nullptr) : QObject(parent) { }
   virtual bool initInput() = 0;
   virtual const char* inputName() = 0;
   
@@ -81,9 +81,9 @@ class InputComponent : public ComponentBase
   DEFINE_SINGLETON(InputComponent);
 
 public:
-  virtual const char* componentName() { return "input"; }
-  virtual bool componentExport() { return true; }
-  virtual bool componentInitialize();
+  const char* componentName() override { return "input"; }
+  bool componentExport() override { return true; }
+  bool componentInitialize() override;
 
   void registerHostCommand(const QString& command, QObject* receiver, const char* slot);
 
@@ -94,7 +94,7 @@ private Q_SLOTS:
   void remapInput(const QString& source, const QString& keycode, bool pressDown = true);
   
 private:
-  InputComponent(QObject *parent = nullptr);
+  explicit InputComponent(QObject *parent = nullptr);
   bool addInput(InputBase* base);
   void handleAction(const QString& action, bool autoRepeat = true);
 

+ 2 - 2
src/input/InputKeyboard.h

@@ -15,8 +15,8 @@ class InputKeyboard : public InputBase
   DEFINE_SINGLETON(InputKeyboard);
 
 public:
-  virtual bool initInput() { return true; }
-  virtual const char* inputName() { return "Keyboard"; }
+  bool initInput() override { return true; }
+  const char* inputName() override { return "Keyboard"; }
 
   void keyPress(const QKeySequence& sequence, bool press)
   {

+ 2 - 2
src/input/InputRoku.h

@@ -15,8 +15,8 @@ class InputRoku : public InputBase
 
 public:
   explicit InputRoku(QObject* parent = nullptr) : InputBase(parent) { }
-  virtual bool initInput() override;
-  virtual const char* inputName() override { return "roku"; };
+  bool initInput() override;
+  const char* inputName() override { return "roku"; };
 
 private:
   void handleRequest(qhttp::server::QHttpRequest* request, qhttp::server::QHttpResponse* response);

+ 5 - 5
src/input/InputSDL.h

@@ -32,7 +32,7 @@ class InputSDLWorker : public QObject
   Q_OBJECT
 
 public:
-  InputSDLWorker(QObject* parent) : QObject(parent) {}
+  explicit InputSDLWorker(QObject* parent) : QObject(parent) {}
 
 public slots:
   void run();
@@ -56,11 +56,11 @@ class InputSDL : public InputBase
 {
   Q_OBJECT
 public:
-  InputSDL(QObject* parent);
-  ~InputSDL();
+  explicit InputSDL(QObject* parent);
+  ~InputSDL() override;
   
-  virtual const char* inputName() { return "SDL"; }
-  virtual bool initInput();
+  const char* inputName() override { return "SDL"; }
+  bool initInput() override;
   
   void close();
 private:

+ 2 - 2
src/input/InputSocket.h

@@ -19,8 +19,8 @@ public:
     connect(m_server, &LocalJsonServer::messageReceived, this, &InputSocket::messageReceived);
   }
 
-  virtual bool initInput() override;
-  virtual const char* inputName() override { return "socket"; };
+  bool initInput() override;
+  const char* inputName() override { return "socket"; };
 
 private Q_SLOTS:
   void clientConnected(QLocalSocket* socket);

+ 3 - 3
src/input/apple/InputAppleMediaKeys.h

@@ -11,9 +11,9 @@ class InputAppleMediaKeys : public InputBase
 {
   Q_OBJECT
 public:
-  InputAppleMediaKeys(QObject* parent = nullptr) : InputBase(parent) { }
-  bool initInput();
-  const char* inputName() { return "AppleMediaKeys"; }
+  explicit InputAppleMediaKeys(QObject* parent = nullptr) : InputBase(parent) { }
+  bool initInput() override;
+  const char* inputName() override { return "AppleMediaKeys"; }
 
 private:
   void* m_delegate;

+ 3 - 3
src/input/apple/InputAppleRemote.h

@@ -16,9 +16,9 @@ typedef void delegate;
 class InputAppleRemote : public InputBase
 {
 public:
-  InputAppleRemote(QObject* parent = nullptr) : InputBase(parent) { }
-  virtual const char* inputName() { return "AppleRemote"; }
-  virtual bool initInput();
+  explicit InputAppleRemote(QObject* parent = nullptr) : InputBase(parent) { }
+  const char* inputName() override { return "AppleRemote"; }
+  bool initInput() override;
   
   void remoteButtonEvent(quint8 code, bool pressed, const QString& name);
   

+ 5 - 5
src/player/PlayerComponent.h

@@ -23,13 +23,13 @@ class PlayerComponent : public ComponentBase
   DEFINE_SINGLETON(PlayerComponent);
 
 public:
-  virtual const char* componentName() { return "player"; }
-  virtual bool componentExport() { return true; }
-  virtual bool componentInitialize();
-  virtual void componentPostInitialize();
+  const char* componentName() override { return "player"; }
+  bool componentExport() override { return true; }
+  bool componentInitialize() override;
+  void componentPostInitialize() override;
   
   explicit PlayerComponent(QObject* parent = nullptr);
-  virtual ~PlayerComponent();
+  ~PlayerComponent() override;
 
   // Deprecated. Corresponds to stop() + queueMedia().
   Q_INVOKABLE bool load(const QString& url, const QVariantMap& options, const QVariantMap& metadata, const QString& audioStream = QString(), const QString& subtitleStream = QString());

+ 1 - 1
src/player/PlayerQuickItem.cpp

@@ -132,7 +132,7 @@ namespace {
 class RequestRepaintJob : public QRunnable
 {
 public:
-  RequestRepaintJob(QQuickWindow *window) : m_window(window) { }
+  explicit RequestRepaintJob(QQuickWindow *window) : m_window(window) { }
 
   void run() override
   {

+ 3 - 3
src/player/PlayerQuickItem.h

@@ -23,7 +23,7 @@ class PlayerRenderer : public QObject
 
   PlayerRenderer(mpv::qt::Handle mpv, QQuickWindow* window);
   bool init();
-  virtual ~PlayerRenderer();
+  ~PlayerRenderer() override;
   void render();
   void swap();
 
@@ -45,8 +45,8 @@ class PlayerQuickItem : public QQuickItem
     friend class PlayerRenderer;
 
 public:
-    PlayerQuickItem(QQuickItem* parent = nullptr);
-    virtual ~PlayerQuickItem();
+    explicit PlayerQuickItem(QQuickItem* parent = nullptr);
+    ~PlayerQuickItem() override;
     void initMpv(PlayerComponent* player);
     QString debugInfo() { return m_debugInfo; }
 

+ 14 - 5
src/power/PowerComponent.h

@@ -8,19 +8,28 @@ class PowerComponent : public ComponentBase
 {
   Q_OBJECT
 public:
+
+  enum PowerCapabilities
+  {
+    CAP_POWER_OFF,
+    CAP_REBOOT,
+    CAP_SUSPEND,
+    CAP_RELAUNCH
+  };
+
   static PowerComponent& Get();
 
-  PowerComponent(QObject* parent = nullptr)
+  explicit PowerComponent(QObject* parent = nullptr)
   : ComponentBase(parent),
     m_currentScreensaverEnabled(true),
     m_fullscreenState(false),
     m_videoPlaying(false)
     { }
 
-  virtual bool componentInitialize();
-  virtual bool componentExport() { return true; }
-  virtual const char* componentName() { return "power"; }
-  virtual void componentPostInitialize();
+  bool componentInitialize() override;
+  bool componentExport() override { return true; }
+  const char* componentName() override { return "power"; }
+  void componentPostInitialize() override;
 
   void setFullscreenState(bool fullscreen);
 

+ 2 - 2
src/power/PowerComponentMac.h

@@ -8,8 +8,8 @@ class PowerComponentMac : public PowerComponent
 {
 public:
   PowerComponentMac() : PowerComponent(nullptr), m_assertion(0) { }
-  virtual void doDisableScreensaver();
-  virtual void doEnableScreensaver();
+  void doDisableScreensaver() override;
+  void doEnableScreensaver() override;
 
 private:
   IOPMAssertionID m_assertion = 0;

+ 1 - 1
src/remote/GDMManager.h

@@ -12,7 +12,7 @@ class GDMManager : public QObject
   Q_OBJECT
 public:
   explicit GDMManager(QObject *parent = nullptr);
-  ~GDMManager() { stopAnnouncing(); }
+  ~GDMManager() override { stopAnnouncing(); }
   void startAnnouncing();
   void stopAnnouncing();
 

+ 4 - 4
src/remote/RemoteComponent.h

@@ -26,9 +26,9 @@ class RemoteComponent : public ComponentBase
 public:
   QNetworkAccessManager* getNetworkAccessManager();
 
-  virtual bool componentInitialize();
-  virtual const char* componentName() { return "remote"; }
-  virtual bool componentExport() { return true; }
+  bool componentInitialize() override;
+  const char* componentName() override { return "remote"; }
+  bool componentExport() override { return true; }
 
   static QVariantMap ResourceInformation();
   static QVariantMap GDMInformation();
@@ -55,7 +55,7 @@ private Q_SLOTS:
   void responseDone();
 
 private:
-  RemoteComponent(QObject* parent = nullptr);
+  explicit RemoteComponent(QObject* parent = nullptr);
   void handleSubscription(QHttpRequest * request, QHttpResponse * response, bool poll=false);
   void subscribeToWeb(bool subscribe);
 

+ 1 - 1
src/remote/RemoteSubscriber.h

@@ -75,7 +75,7 @@ class RemotePollSubscriber : public RemoteSubscriber
 public:
   RemotePollSubscriber(const QString& clientIdentifier, const QString& deviceName, qhttp::server::QHttpResponse *response, QObject* parent = nullptr);
   void setHTTPResponse(qhttp::server::QHttpResponse *response);
-  virtual void sendUpdate();
+  void sendUpdate() override;
 
 private :
    qhttp::server::QHttpResponse* m_response;

+ 1 - 1
src/server/HTTPServer.h

@@ -13,7 +13,7 @@ class HttpServer : public QObject
 {
 Q_OBJECT
 public:
-  HttpServer(QObject* parent);
+  explicit HttpServer(QObject* parent);
   bool start();
 
 private slots:

+ 1 - 1
src/settings/AudioSettingsController.h

@@ -11,7 +11,7 @@ class AudioSettingsController : public QObject
 {
   Q_OBJECT
 public:
-  AudioSettingsController(QObject* parent = nullptr);
+  explicit AudioSettingsController(QObject* parent = nullptr);
   Q_SLOT void valuesUpdated(const QVariantMap& values);
   Q_SIGNAL void settingsUpdated(const QString& section, const QVariant& description);
 

+ 3 - 3
src/settings/SettingsComponent.h

@@ -31,11 +31,11 @@ class SettingsComponent : public ComponentBase
   DEFINE_SINGLETON(SettingsComponent);
 
 public:
-  bool componentInitialize();
+  bool componentInitialize() override;
   void componentPostInitalize();
 
-  const char* componentName() { return "settings"; }
-  bool componentExport() { return true; }
+  const char* componentName() override { return "settings"; }
+  bool componentExport() override { return true; }
 
   SettingsSection* getSection(const QString& sectionID)
   {

+ 2 - 2
src/settings/SettingsValue.h

@@ -13,13 +13,13 @@ class SettingsValue : public QObject
   Q_OBJECT
 
 public:
-  SettingsValue(QObject* parent = nullptr)
+  explicit SettingsValue(QObject* parent = nullptr)
     : QObject(parent)
     , m_platform(PLATFORM_UNKNOWN)
     , m_hidden(true)
   {}
 
-  SettingsValue(const QString& _key, QVariant _defaultValue=QVariant(), quint8 platforms = PLATFORM_ANY, QObject* parent = nullptr)
+  explicit SettingsValue(const QString& _key, QVariant _defaultValue=QVariant(), quint8 platforms = PLATFORM_ANY, QObject* parent = nullptr)
     : QObject(parent)
     , m_key(_key)
     , m_value(QVariant())

+ 1 - 1
src/shared/UniqueApplication.h

@@ -17,7 +17,7 @@ class UniqueApplication : public QObject
 {
   Q_OBJECT
 public:
-  UniqueApplication(QObject* parent = nullptr, const QString& socketname = SOCKET_NAME) : QObject(parent)
+  explicit UniqueApplication(QObject* parent = nullptr, const QString& socketname = SOCKET_NAME) : QObject(parent)
   {
     m_socketName = socketname;
   }

+ 5 - 5
src/system/OEUpdateManager.h

@@ -6,12 +6,12 @@
 class OEUpdateManager : public UpdateManager
 {
 public:
-  OEUpdateManager(QObject *parent = nullptr) {};
-  ~OEUpdateManager() {};
+  explicit OEUpdateManager(QObject *parent = nullptr) {};
+  ~OEUpdateManager() override {};
 
-  virtual QString HaveUpdate();
-  virtual bool applyUpdate(const QString &version);
-  virtual void doUpdate(const QString& version);
+  QString HaveUpdate() override;
+  bool applyUpdate(const QString &version) override;
+  void doUpdate(const QString& version) override;
 
 private:
   bool isMiniUpdateArchive(QString archivePath);

+ 5 - 5
src/system/SystemComponent.h

@@ -16,10 +16,10 @@ class SystemComponent : public ComponentBase
   DEFINE_SINGLETON(SystemComponent);
 
 public:
-  virtual bool componentExport() { return true; }
-  virtual const char* componentName() { return "system"; }
-  virtual bool componentInitialize();
-  virtual void componentPostInitialize();
+  bool componentExport() override { return true; }
+  const char* componentName() override { return "system"; }
+  bool componentInitialize() override;
+  void componentPostInitialize() override;
 
   Q_INVOKABLE QVariantMap systemInformation() const;
   Q_INVOKABLE void exit();
@@ -76,7 +76,7 @@ signals:
   void scaleChanged(qreal scale);
 
 private:
-  SystemComponent(QObject* parent = nullptr);
+  explicit SystemComponent(QObject* parent = nullptr);
   static QMap<QString, QString> networkInterfaces();
 
   QTimer* m_mouseOutTimer;

+ 1 - 1
src/system/UpdateManager.h

@@ -10,7 +10,7 @@ public:
   static bool CheckForUpdates();
 
   explicit UpdateManager(QObject *parent = nullptr) {};
-  ~UpdateManager() {};
+  ~UpdateManager() override {};
 
   static UpdateManager* Get();
 

+ 3 - 3
src/system/UpdateManagerWin32.h

@@ -10,10 +10,10 @@
 class UpdateManagerWin32 : public UpdateManager
 {
 public:
-  UpdateManagerWin32(QObject *parent = nullptr) {};
-  ~UpdateManagerWin32() {};
+  explicit UpdateManagerWin32(QObject *parent = nullptr) {};
+  ~UpdateManagerWin32() override {};
 
-  virtual bool applyUpdate(const QString& version) override;
+  bool applyUpdate(const QString& version) override;
 };
 
 #endif //PLEXMEDIAPLAYER_UPDATEMANAGERWIN32_H

+ 4 - 4
src/system/UpdaterComponent.h

@@ -19,7 +19,7 @@ class Update : public QObject
 {
   Q_OBJECT
 public:
-  Update(const QString& url = "", const QString& localPath = "",
+  explicit Update(const QString& url = "", const QString& localPath = "",
          const QString& hash = "", QObject* parent = nullptr) : QObject(parent)
   {
     m_url = url;
@@ -137,9 +137,9 @@ class UpdaterComponent : public ComponentBase
   DEFINE_SINGLETON(UpdaterComponent);
 
 public:
-  virtual bool componentExport() { return true; }
-  virtual const char* componentName() { return "updater"; }
-  virtual bool componentInitialize() { return true; }
+  bool componentExport() override { return true; }
+  const char* componentName() override { return "updater"; }
+  bool componentInitialize() override { return true; }
 
   Q_INVOKABLE void downloadUpdate(const QVariantMap &updateInfo);
   Q_INVOKABLE void doUpdate();

+ 1 - 1
src/tools/helper/HelperSocket.h

@@ -14,7 +14,7 @@ class HelperSocket : public QObject
 {
   Q_OBJECT
 public:
-  HelperSocket(QObject* parent = nullptr);
+  explicit HelperSocket(QObject* parent = nullptr);
 
 private:
   Q_SLOT void clientConnected(QLocalSocket* socket);

+ 2 - 2
src/ui/EventFilter.h

@@ -12,10 +12,10 @@ class EventFilter : public QObject
 {
   Q_OBJECT
 public:
-  EventFilter(QObject* parent = nullptr) : QObject(parent) {}
+  explicit EventFilter(QObject* parent = nullptr) : QObject(parent) {}
 
 protected:
-  bool eventFilter(QObject* watched, QEvent* event);
+  bool eventFilter(QObject* watched, QEvent* event) override;
 };
 
 #endif //PLEXMEDIAPLAYER_EVENTFILTER_H

+ 4 - 4
src/ui/KonvergoWindow.h

@@ -37,8 +37,8 @@ class KonvergoWindow : public QQuickWindow
 public:
   static void RegisterClass();
 
-  KonvergoWindow(QWindow* parent = nullptr);
-  ~KonvergoWindow();
+  explicit KonvergoWindow(QWindow* parent = nullptr);
+  ~KonvergoWindow() override;
 
   bool isFullScreen()
   {
@@ -82,8 +82,8 @@ Q_SIGNALS:
   void reloadWebClient();
 
 protected:
-  virtual void focusOutEvent(QFocusEvent* ev) override;
-  virtual void resizeEvent(QResizeEvent* event) override;
+  void focusOutEvent(QFocusEvent* ev) override;
+  void resizeEvent(QResizeEvent* event) override;
 
 private slots:
   void closingWindow();

+ 1 - 1
src/utils/CachedRegexMatcher.h

@@ -16,7 +16,7 @@ typedef QList<MatcherValuePair> MatcherValueList;
 class CachedRegexMatcher : public QObject
 {
 public:
-  CachedRegexMatcher(QObject* parent = nullptr) : QObject(parent) {}
+  explicit CachedRegexMatcher(QObject* parent = nullptr) : QObject(parent) {}
 
   bool addMatcher(const QString& pattern, const QVariant& result);
   QVariant match(const QString& input);

+ 1 - 1
src/utils/HelperLaunchd.h

@@ -12,7 +12,7 @@ class HelperLaunchd : public QObject
 {
   Q_OBJECT
 public:
-  HelperLaunchd(QObject* parent = nullptr);
+  explicit HelperLaunchd(QObject* parent = nullptr);
 
   void start();
   void stop();

+ 1 - 1
src/utils/Utils.h

@@ -26,7 +26,7 @@ public:
   explicit FatalException(const QString& message) : m_message(message) {}
   const QString& message() const { return m_message; }
 
-  ~FatalException() throw() { }
+  ~FatalException() throw() override { }
 
 private:
   QString m_message;