mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-03-13 05:41:17 +00:00
Merge pull request #10946 from Chocobo1/override
Add override keyword to functions
This commit is contained in:
commit
e53d4e5ff7
@ -91,7 +91,7 @@ before_install:
|
|||||||
fi
|
fi
|
||||||
- |
|
- |
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
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"
|
openssl_root_path="/usr/local/opt/openssl"
|
||||||
qmake_conf="$qmake_conf PKG_CONFIG_PATH=$openssl_root_path/lib/pkgconfig:$PKG_CONFIG_PATH"
|
qmake_conf="$qmake_conf PKG_CONFIG_PATH=$openssl_root_path/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
@ -61,7 +61,7 @@ macro(qbt_set_compiler_options)
|
|||||||
endif (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
endif (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||||
|
|
||||||
# Code should be improved to render this not needed
|
# 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")
|
else ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
# GCC supports it
|
# GCC supports it
|
||||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
||||||
|
@ -57,7 +57,7 @@ public:
|
|||||||
QtLockedFile(const QString &name);
|
QtLockedFile(const QString &name);
|
||||||
~QtLockedFile();
|
~QtLockedFile();
|
||||||
|
|
||||||
bool open(OpenMode mode);
|
bool open(OpenMode mode) override;
|
||||||
|
|
||||||
bool lock(LockMode mode, bool block = true);
|
bool lock(LockMode mode, bool block = true);
|
||||||
bool unlock();
|
bool unlock();
|
||||||
|
@ -50,7 +50,7 @@ signals:
|
|||||||
void IPFilterError();
|
void IPFilterError();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void run();
|
void run() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int findAndNullDelimiter(char *const data, char delimiter, int start, int end, bool reverse = false);
|
int findAndNullDelimiter(char *const data, char delimiter, int start, int end, bool reverse = false);
|
||||||
|
@ -60,7 +60,7 @@ namespace BitTorrent
|
|||||||
static int calculateTotalPieces(const QString &inputPath, int pieceSize, bool isAlignmentOptimized);
|
static int calculateTotalPieces(const QString &inputPath, int pieceSize, bool isAlignmentOptimized);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void run();
|
void run() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void creationFailure(const QString &msg);
|
void creationFailure(const QString &msg);
|
||||||
|
@ -83,7 +83,7 @@ namespace BitTorrent
|
|||||||
~Tracker();
|
~Tracker();
|
||||||
|
|
||||||
bool start();
|
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:
|
private:
|
||||||
void respondToAnnounceRequest();
|
void respondToAnnounceRequest();
|
||||||
|
@ -56,7 +56,7 @@ namespace Http
|
|||||||
void dropTimedOutConnection();
|
void dropTimedOutConnection();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void incomingConnection(qintptr socketDescriptor);
|
void incomingConnection(qintptr socketDescriptor) override;
|
||||||
void removeConnection(Connection *connection);
|
void removeConnection(Connection *connection);
|
||||||
|
|
||||||
IRequestHandler *m_requestHandler;
|
IRequestHandler *m_requestHandler;
|
||||||
|
@ -71,11 +71,11 @@ public:
|
|||||||
|
|
||||||
static QString pathTypeDisplayName(PathType type);
|
static QString pathTypeDisplayName(PathType type);
|
||||||
|
|
||||||
int rowCount(const QModelIndex &parent = {}) const;
|
int rowCount(const QModelIndex &parent = {}) const override;
|
||||||
int columnCount(const QModelIndex &parent = {}) const;
|
int columnCount(const QModelIndex &parent = {}) const override;
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||||
|
|
||||||
// TODO: removePaths(); singular version becomes private helper functions;
|
// TODO: removePaths(); singular version becomes private helper functions;
|
||||||
// also: remove functions should take modelindexes
|
// also: remove functions should take modelindexes
|
||||||
@ -99,7 +99,7 @@ private:
|
|||||||
explicit ScanFoldersModel(QObject *parent = nullptr);
|
explicit ScanFoldersModel(QObject *parent = nullptr);
|
||||||
~ScanFoldersModel();
|
~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 downloadInWatchFolder(const QString &filePath) const;
|
||||||
bool downloadInDefaultFolder(const QString &filePath) const;
|
bool downloadInDefaultFolder(const QString &filePath) const;
|
||||||
QString downloadPathTorrentFolder(const QString &filePath) const;
|
QString downloadPathTorrentFolder(const QString &filePath) const;
|
||||||
|
@ -65,8 +65,8 @@ private slots:
|
|||||||
void handleItemAboutToBeRemoved(RSS::Item *rssItem);
|
void handleItemAboutToBeRemoved(RSS::Item *rssItem);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void dragMoveEvent(QDragMoveEvent *event);
|
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event) override;
|
||||||
QTreeWidgetItem *createItem(RSS::Item *rssItem, QTreeWidgetItem *parentItem = nullptr);
|
QTreeWidgetItem *createItem(RSS::Item *rssItem, QTreeWidgetItem *parentItem = nullptr);
|
||||||
void fill(QTreeWidgetItem *parent, RSS::Folder *rssParent);
|
void fill(QTreeWidgetItem *parent, RSS::Folder *rssParent);
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public:
|
|||||||
explicit HtmlBrowser(QWidget* parent = nullptr);
|
explicit HtmlBrowser(QWidget* parent = nullptr);
|
||||||
~HtmlBrowser();
|
~HtmlBrowser();
|
||||||
|
|
||||||
virtual QVariant loadResource(int type, const QUrl &name);
|
virtual QVariant loadResource(int type, const QUrl &name) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QNetworkAccessManager *m_netManager;
|
QNetworkAccessManager *m_netManager;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user