diff --git a/.travis.yml b/.travis.yml index 02c6cf456..b9fe9b956 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,7 +91,7 @@ before_install: fi - | if [ "$TRAVIS_OS_NAME" = "osx" ]; then - CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedefs -Wno-inconsistent-missing-override" + CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedefs" openssl_root_path="/usr/local/opt/openssl" qmake_conf="$qmake_conf PKG_CONFIG_PATH=$openssl_root_path/lib/pkgconfig:$PKG_CONFIG_PATH" diff --git a/cmake/Modules/MacroQbtCompilerSettings.cmake b/cmake/Modules/MacroQbtCompilerSettings.cmake index 8c3ae7b44..5f830c190 100644 --- a/cmake/Modules/MacroQbtCompilerSettings.cmake +++ b/cmake/Modules/MacroQbtCompilerSettings.cmake @@ -61,7 +61,7 @@ macro(qbt_set_compiler_options) endif (_STRICT_NULL_SENTINEL_IS_SUPPORTED) # Code should be improved to render this not needed - list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=unused-function -Wno-error=inconsistent-missing-override") + list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=unused-function") else ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # GCC supports it list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel") diff --git a/src/app/qtlocalpeer/qtlockedfile.h b/src/app/qtlocalpeer/qtlockedfile.h index 5bfce71a7..ad3c5ab39 100644 --- a/src/app/qtlocalpeer/qtlockedfile.h +++ b/src/app/qtlocalpeer/qtlockedfile.h @@ -57,7 +57,7 @@ public: QtLockedFile(const QString &name); ~QtLockedFile(); - bool open(OpenMode mode); + bool open(OpenMode mode) override; bool lock(LockMode mode, bool block = true); bool unlock(); diff --git a/src/base/bittorrent/private/filterparserthread.h b/src/base/bittorrent/private/filterparserthread.h index 7b86aa4f6..f7e93379d 100644 --- a/src/base/bittorrent/private/filterparserthread.h +++ b/src/base/bittorrent/private/filterparserthread.h @@ -50,7 +50,7 @@ signals: void IPFilterError(); protected: - void run(); + void run() override; private: int findAndNullDelimiter(char *const data, char delimiter, int start, int end, bool reverse = false); diff --git a/src/base/bittorrent/torrentcreatorthread.h b/src/base/bittorrent/torrentcreatorthread.h index 010021c5f..f772d9ecf 100644 --- a/src/base/bittorrent/torrentcreatorthread.h +++ b/src/base/bittorrent/torrentcreatorthread.h @@ -60,7 +60,7 @@ namespace BitTorrent static int calculateTotalPieces(const QString &inputPath, int pieceSize, bool isAlignmentOptimized); protected: - void run(); + void run() override; signals: void creationFailure(const QString &msg); diff --git a/src/base/bittorrent/tracker.h b/src/base/bittorrent/tracker.h index dff8c908c..b4db4c0ce 100644 --- a/src/base/bittorrent/tracker.h +++ b/src/base/bittorrent/tracker.h @@ -83,7 +83,7 @@ namespace BitTorrent ~Tracker(); bool start(); - Http::Response processRequest(const Http::Request &request, const Http::Environment &env); + Http::Response processRequest(const Http::Request &request, const Http::Environment &env) override; private: void respondToAnnounceRequest(); diff --git a/src/base/http/server.h b/src/base/http/server.h index e0433f96c..8bd7c8589 100644 --- a/src/base/http/server.h +++ b/src/base/http/server.h @@ -56,7 +56,7 @@ namespace Http void dropTimedOutConnection(); private: - void incomingConnection(qintptr socketDescriptor); + void incomingConnection(qintptr socketDescriptor) override; void removeConnection(Connection *connection); IRequestHandler *m_requestHandler; diff --git a/src/base/scanfoldersmodel.h b/src/base/scanfoldersmodel.h index 212899d9c..fb1925ab9 100644 --- a/src/base/scanfoldersmodel.h +++ b/src/base/scanfoldersmodel.h @@ -71,11 +71,11 @@ public: static QString pathTypeDisplayName(PathType type); - int rowCount(const QModelIndex &parent = {}) const; - int columnCount(const QModelIndex &parent = {}) const; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - Qt::ItemFlags flags(const QModelIndex &index) const; + int rowCount(const QModelIndex &parent = {}) const override; + int columnCount(const QModelIndex &parent = {}) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + Qt::ItemFlags flags(const QModelIndex &index) const override; // TODO: removePaths(); singular version becomes private helper functions; // also: remove functions should take modelindexes @@ -99,7 +99,7 @@ private: explicit ScanFoldersModel(QObject *parent = nullptr); ~ScanFoldersModel(); - virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; bool downloadInWatchFolder(const QString &filePath) const; bool downloadInDefaultFolder(const QString &filePath) const; QString downloadPathTorrentFolder(const QString &filePath) const; diff --git a/src/gui/rss/feedlistwidget.h b/src/gui/rss/feedlistwidget.h index e3cd65411..9fcf7eadb 100644 --- a/src/gui/rss/feedlistwidget.h +++ b/src/gui/rss/feedlistwidget.h @@ -65,8 +65,8 @@ private slots: void handleItemAboutToBeRemoved(RSS::Item *rssItem); private: - void dragMoveEvent(QDragMoveEvent *event); - void dropEvent(QDropEvent *event); + void dragMoveEvent(QDragMoveEvent *event) override; + void dropEvent(QDropEvent *event) override; QTreeWidgetItem *createItem(RSS::Item *rssItem, QTreeWidgetItem *parentItem = nullptr); void fill(QTreeWidgetItem *parent, RSS::Folder *rssParent); diff --git a/src/gui/rss/htmlbrowser.h b/src/gui/rss/htmlbrowser.h index c6f772d96..d2497540d 100644 --- a/src/gui/rss/htmlbrowser.h +++ b/src/gui/rss/htmlbrowser.h @@ -44,7 +44,7 @@ public: explicit HtmlBrowser(QWidget* parent = nullptr); ~HtmlBrowser(); - virtual QVariant loadResource(int type, const QUrl &name); + virtual QVariant loadResource(int type, const QUrl &name) override; protected: QNetworkAccessManager *m_netManager;