diff options
49 files changed, 359 insertions, 357 deletions
diff --git a/src/libs/installer/abstracttask.h b/src/libs/installer/abstracttask.h index 9a44c50a9..7daff848f 100644 --- a/src/libs/installer/abstracttask.h +++ b/src/libs/installer/abstracttask.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -58,9 +58,9 @@ public: : m_message(message) {} - void raise() const { throw *this; } + void raise() const override { throw *this; } QString message() const { return m_message; } - TaskException *clone() const { return new TaskException(*this); } + TaskException *clone() const override { return new TaskException(*this); } private: QString m_message; diff --git a/src/libs/installer/aspectratiolabel.h b/src/libs/installer/aspectratiolabel.h index 6fbc774a2..82ce0ebbd 100644 --- a/src/libs/installer/aspectratiolabel.h +++ b/src/libs/installer/aspectratiolabel.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -44,12 +44,12 @@ class INSTALLER_EXPORT AspectRatioLabel : public QLabel public: explicit AspectRatioLabel(QWidget *parent = nullptr); - int heightForWidth(int w) const Q_DECL_OVERRIDE; - QSize sizeHint() const Q_DECL_OVERRIDE; + int heightForWidth(int w) const override; + QSize sizeHint() const override; public slots: void setPixmap (const QPixmap &pixmap); - void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *event) override; private: QPixmap scaledPixmap() const; diff --git a/src/libs/installer/binaryformat.h b/src/libs/installer/binaryformat.h index 3bd8a6aa3..26d510530 100644 --- a/src/libs/installer/binaryformat.h +++ b/src/libs/installer/binaryformat.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -59,10 +59,10 @@ public: ~Resource(); bool open(); - void close(); + void close() override; - bool seek(qint64 pos); - qint64 size() const; + bool seek(qint64 pos) override; + qint64 size() const override; QByteArray name() const; void setName(const QByteArray &name); @@ -74,10 +74,10 @@ public: static void copyData(Resource *archive, QFileDevice *out); private: - qint64 readData(char *data, qint64 maxSize); - qint64 writeData(const char *data, qint64 maxSize); + qint64 readData(char *data, qint64 maxSize) override; + qint64 writeData(const char *data, qint64 maxSize) override; - bool open(OpenMode mode) { return QIODevice::open(mode); } + bool open(OpenMode mode) override { return QIODevice::open(mode); } void setOpenMode(OpenMode mode) { QIODevice::setOpenMode(mode); } private: diff --git a/src/libs/installer/binaryformatengine.h b/src/libs/installer/binaryformatengine.h index 64d0e95f7..bf72e5f1f 100644 --- a/src/libs/installer/binaryformatengine.h +++ b/src/libs/installer/binaryformatengine.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -43,21 +43,21 @@ public: BinaryFormatEngine(const QHash<QByteArray, ResourceCollection> &collections, const QString &fileName); - void setFileName(const QString &file); + void setFileName(const QString &file) override; - bool copy(const QString &newName); - bool close(); - bool open(QIODevice::OpenMode mode); - qint64 pos() const; - qint64 read(char *data, qint64 maxlen); - bool seek(qint64 offset); - qint64 size() const; + bool copy(const QString &newName) override; + bool close() override; + bool open(QIODevice::OpenMode mode) override; + qint64 pos() const override; + qint64 read(char *data, qint64 maxlen) override; + bool seek(qint64 offset) override; + qint64 size() const override; - QString fileName(FileName file = DefaultName) const; - FileFlags fileFlags(FileFlags type = FileInfoAll) const; + QString fileName(FileName file = DefaultName) const override; + FileFlags fileFlags(FileFlags type = FileInfoAll) const override; - Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames); - QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const; + Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override; + QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const override; private: QString m_fileNamePath; diff --git a/src/libs/installer/componentmodel.h b/src/libs/installer/componentmodel.h index 829c95111..78d7e6401 100644 --- a/src/libs/installer/componentmodel.h +++ b/src/libs/installer/componentmodel.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -59,20 +59,20 @@ public: explicit ComponentModel(int columns, PackageManagerCore *core = 0); ~ComponentModel(); - Qt::ItemFlags flags(const QModelIndex &index) const; + Qt::ItemFlags flags(const QModelIndex &index) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QModelIndex parent(const QModelIndex &child) const; - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; + QModelIndex parent(const QModelIndex &child) const override; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) 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; bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, - int role = Qt::EditRole); + int role = Qt::EditRole) override; QSet<Component *> checked() const; QSet<Component *> partially() const; diff --git a/src/libs/installer/componentsortfilterproxymodel.h b/src/libs/installer/componentsortfilterproxymodel.h index a6167d17b..12fd0a627 100644 --- a/src/libs/installer/componentsortfilterproxymodel.h +++ b/src/libs/installer/componentsortfilterproxymodel.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -51,7 +51,7 @@ public: QVector<QModelIndex> directlyAcceptedIndexes() const; protected: - bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE; + bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; private: bool acceptsRow(int sourceRow, const QModelIndex &sourceParent, AcceptType *type = nullptr) const; diff --git a/src/libs/installer/consumeoutputoperation.h b/src/libs/installer/consumeoutputoperation.h index a1f8a09ff..05f6425f3 100644 --- a/src/libs/installer/consumeoutputoperation.h +++ b/src/libs/installer/consumeoutputoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT ConsumeOutputOperation : public Operation public: explicit ConsumeOutputOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; private: }; diff --git a/src/libs/installer/copydirectoryoperation.h b/src/libs/installer/copydirectoryoperation.h index f934f8b91..2e96144d1 100644 --- a/src/libs/installer/copydirectoryoperation.h +++ b/src/libs/installer/copydirectoryoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -42,10 +42,10 @@ class INSTALLER_EXPORT CopyDirectoryOperation : public QObject, public Operation public: explicit CopyDirectoryOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; Q_SIGNALS: void outputTextChanged(const QString &progress); diff --git a/src/libs/installer/copyfiletask.h b/src/libs/installer/copyfiletask.h index cad3b6fcd..0f06ba871 100644 --- a/src/libs/installer/copyfiletask.h +++ b/src/libs/installer/copyfiletask.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -45,7 +45,7 @@ public: explicit CopyFileTask(const QString &source); CopyFileTask(const QString &source, const QString &target); - void doTask(QFutureInterface<FileTaskResult> &fi); + void doTask(QFutureInterface<FileTaskResult> &fi) override; }; } // namespace QInstaller diff --git a/src/libs/installer/createdesktopentryoperation.h b/src/libs/installer/createdesktopentryoperation.h index 793d1db16..be3b088b2 100644 --- a/src/libs/installer/createdesktopentryoperation.h +++ b/src/libs/installer/createdesktopentryoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -40,10 +40,10 @@ public: explicit CreateDesktopEntryOperation(PackageManagerCore *core); ~CreateDesktopEntryOperation(); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; QString absoluteFileName(); }; diff --git a/src/libs/installer/createlinkoperation.h b/src/libs/installer/createlinkoperation.h index 2e4ece9aa..b864f0e34 100644 --- a/src/libs/installer/createlinkoperation.h +++ b/src/libs/installer/createlinkoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT CreateLinkOperation : public Operation public: explicit CreateLinkOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; } diff --git a/src/libs/installer/createlocalrepositoryoperation.h b/src/libs/installer/createlocalrepositoryoperation.h index 275d7a409..c4b9264bc 100644 --- a/src/libs/installer/createlocalrepositoryoperation.h +++ b/src/libs/installer/createlocalrepositoryoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -43,10 +43,10 @@ class INSTALLER_EXPORT CreateLocalRepositoryOperation : public QObject, public O public: explicit CreateLocalRepositoryOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; signals: void progressChanged(double progress); diff --git a/src/libs/installer/createshortcutoperation.h b/src/libs/installer/createshortcutoperation.h index 9bf9ebdcb..e8276e976 100644 --- a/src/libs/installer/createshortcutoperation.h +++ b/src/libs/installer/createshortcutoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT CreateShortcutOperation : public Operation public: explicit CreateShortcutOperation(PackageManagerCore *core = nullptr); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; private: void ensureOptionalArgumentsRead(); diff --git a/src/libs/installer/downloadarchivesjob.h b/src/libs/installer/downloadarchivesjob.h index bd764e01c..c69291d69 100644 --- a/src/libs/installer/downloadarchivesjob.h +++ b/src/libs/installer/downloadarchivesjob.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -65,9 +65,9 @@ Q_SIGNALS: void downloadStatusChanged(const QString &status); protected: - void doStart(); - void doCancel(); - void timerEvent(QTimerEvent *event); + void doStart() override; + void doCancel() override; + void timerEvent(QTimerEvent *event) override; public Q_SLOTS: void onDownloadStatusChanged(const QString &status); diff --git a/src/libs/installer/downloadfiletask.h b/src/libs/installer/downloadfiletask.h index 21908549d..f50d4c0ff 100644 --- a/src/libs/installer/downloadfiletask.h +++ b/src/libs/installer/downloadfiletask.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -63,8 +63,8 @@ public: FileTaskItem taskItem() const { return m_fileTaskItem; } void setFileTaskItem(const FileTaskItem &item) { m_fileTaskItem = item; } - void raise() const { throw *this; } - AuthenticationRequiredException *clone() const { + void raise() const override { throw *this; } + AuthenticationRequiredException *clone() const override { return new AuthenticationRequiredException(*this); } private: @@ -98,7 +98,7 @@ public: void setAuthenticator(const QAuthenticator &authenticator); void setProxyFactory(KDUpdater::FileDownloaderProxyFactory *factory); - void doTask(QFutureInterface<FileTaskResult> &fi); + void doTask(QFutureInterface<FileTaskResult> &fi) override; private: friend class Downloader; diff --git a/src/libs/installer/elevatedexecuteoperation.h b/src/libs/installer/elevatedexecuteoperation.h index 470d3e506..69224f99f 100644 --- a/src/libs/installer/elevatedexecuteoperation.h +++ b/src/libs/installer/elevatedexecuteoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -47,10 +47,10 @@ public: explicit ElevatedExecuteOperation(PackageManagerCore *core); ~ElevatedExecuteOperation(); - void backup() Q_DECL_OVERRIDE; - bool performOperation() Q_DECL_OVERRIDE; - bool undoOperation() Q_DECL_OVERRIDE; - bool testOperation() Q_DECL_OVERRIDE; + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; Q_SIGNALS: void cancelProcess(); diff --git a/src/libs/installer/environmentvariablesoperation.h b/src/libs/installer/environmentvariablesoperation.h index 3c5252bc6..dea2d40c7 100644 --- a/src/libs/installer/environmentvariablesoperation.h +++ b/src/libs/installer/environmentvariablesoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT EnvironmentVariableOperation : public Operation public: explicit EnvironmentVariableOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; } diff --git a/src/libs/installer/extractarchiveoperation.h b/src/libs/installer/extractarchiveoperation.h index 7fc008887..5b13fd229 100644 --- a/src/libs/installer/extractarchiveoperation.h +++ b/src/libs/installer/extractarchiveoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -43,10 +43,10 @@ class INSTALLER_EXPORT ExtractArchiveOperation : public QObject, public Operatio public: explicit ExtractArchiveOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; bool readDataFileContents(QString &targetDir, QStringList *resultList); diff --git a/src/libs/installer/extractarchiveoperation_p.h b/src/libs/installer/extractarchiveoperation_p.h index 706187eb7..c674da78e 100644 --- a/src/libs/installer/extractarchiveoperation_p.h +++ b/src/libs/installer/extractarchiveoperation_p.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -52,7 +52,7 @@ public: setObjectName(QLatin1String("ExtractArchive")); } - void run() + void run() override { Q_ASSERT(m_op != 0); diff --git a/src/libs/installer/fakestopprocessforupdateoperation.h b/src/libs/installer/fakestopprocessforupdateoperation.h index 6fd5da44b..546c6e95c 100644 --- a/src/libs/installer/fakestopprocessforupdateoperation.h +++ b/src/libs/installer/fakestopprocessforupdateoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -40,10 +40,10 @@ class INSTALLER_EXPORT FakeStopProcessForUpdateOperation : public QObject, publi public: explicit FakeStopProcessForUpdateOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; } diff --git a/src/libs/installer/globalsettingsoperation.h b/src/libs/installer/globalsettingsoperation.h index fe5d14edb..473497614 100644 --- a/src/libs/installer/globalsettingsoperation.h +++ b/src/libs/installer/globalsettingsoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -40,10 +40,10 @@ class INSTALLER_EXPORT GlobalSettingsOperation : public Operation public: explicit GlobalSettingsOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; private: QSettingsWrapper *setup(QString *key, QString *value, const QStringList &args); diff --git a/src/libs/installer/installiconsoperation.h b/src/libs/installer/installiconsoperation.h index 7a4d1cc90..e7a8dd871 100644 --- a/src/libs/installer/installiconsoperation.h +++ b/src/libs/installer/installiconsoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -41,10 +41,10 @@ class INSTALLER_EXPORT InstallIconsOperation : public QObject, public Operation public: explicit InstallIconsOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; Q_SIGNALS: void outputTextChanged(const QString &progress); diff --git a/src/libs/installer/lib7zarchive.h b/src/libs/installer/lib7zarchive.h index 45f352aeb..f73670a4f 100644 --- a/src/libs/installer/lib7zarchive.h +++ b/src/libs/installer/lib7zarchive.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -45,18 +45,18 @@ public: explicit Lib7zArchive(QObject *parent = nullptr); ~Lib7zArchive(); - bool open(QIODevice::OpenMode mode) Q_DECL_OVERRIDE; - void close() Q_DECL_OVERRIDE; - void setFilename(const QString &filename) Q_DECL_OVERRIDE; + bool open(QIODevice::OpenMode mode) override; + void close() override; + void setFilename(const QString &filename) override; - bool extract(const QString &dirPath) Q_DECL_OVERRIDE; - bool extract(const QString &dirPath, const quint64 totalFiles) Q_DECL_OVERRIDE; - bool create(const QStringList &data) Q_DECL_OVERRIDE; - QVector<ArchiveEntry> list() Q_DECL_OVERRIDE; - bool isSupported() Q_DECL_OVERRIDE; + bool extract(const QString &dirPath) override; + bool extract(const QString &dirPath, const quint64 totalFiles) override; + bool create(const QStringList &data) override; + QVector<ArchiveEntry> list() override; + bool isSupported() override; public Q_SLOTS: - void cancel() Q_DECL_OVERRIDE; + void cancel() override; private: void listenExtractCallback(); @@ -83,8 +83,8 @@ Q_SIGNALS: void completedChanged(quint64 completed, quint64 total); private: - void setCurrentFile(const QString &filename) Q_DECL_OVERRIDE; - HRESULT setCompleted(quint64 completed, quint64 total) Q_DECL_OVERRIDE; + void setCurrentFile(const QString &filename) override; + HRESULT setCompleted(quint64 completed, quint64 total) override; private: HRESULT m_state; diff --git a/src/libs/installer/libarchivearchive.h b/src/libs/installer/libarchivearchive.h index 796069ed1..ec06ed309 100644 --- a/src/libs/installer/libarchivearchive.h +++ b/src/libs/installer/libarchivearchive.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -99,15 +99,15 @@ public: explicit LibArchiveArchive(QObject *parent = nullptr); ~LibArchiveArchive(); - bool open(QIODevice::OpenMode mode) Q_DECL_OVERRIDE; - void close() Q_DECL_OVERRIDE; - void setFilename(const QString &filename) Q_DECL_OVERRIDE; + bool open(QIODevice::OpenMode mode) override; + void close() override; + void setFilename(const QString &filename) override; - bool extract(const QString &dirPath) Q_DECL_OVERRIDE; - bool extract(const QString &dirPath, const quint64 totalFiles) Q_DECL_OVERRIDE; - bool create(const QStringList &data) Q_DECL_OVERRIDE; - QVector<ArchiveEntry> list() Q_DECL_OVERRIDE; - bool isSupported() Q_DECL_OVERRIDE; + bool extract(const QString &dirPath) override; + bool extract(const QString &dirPath, const quint64 totalFiles) override; + bool create(const QStringList &data) override; + QVector<ArchiveEntry> list() override; + bool isSupported() override; void workerExtract(const QString &dirPath, const quint64 totalFiles); void workerAddDataBlock(const QByteArray buffer); @@ -128,7 +128,7 @@ Q_SIGNALS: void workerAboutToCancel(); public Q_SLOTS: - void cancel() Q_DECL_OVERRIDE; + void cancel() override; private Q_SLOTS: void onWorkerFinished(const QString &errorString); diff --git a/src/libs/installer/libarchivewrapper.h b/src/libs/installer/libarchivewrapper.h index f5262f9a7..062d53f4a 100644 --- a/src/libs/installer/libarchivewrapper.h +++ b/src/libs/installer/libarchivewrapper.h @@ -46,22 +46,22 @@ public: explicit LibArchiveWrapper(QObject *parent = nullptr); ~LibArchiveWrapper(); - bool open(QIODevice::OpenMode mode) Q_DECL_OVERRIDE; - void close() Q_DECL_OVERRIDE; - void setFilename(const QString &filename) Q_DECL_OVERRIDE; + bool open(QIODevice::OpenMode mode) override; + void close() override; + void setFilename(const QString &filename) override; - QString errorString() const Q_DECL_OVERRIDE; + QString errorString() const override; - bool extract(const QString &dirPath) Q_DECL_OVERRIDE; - bool extract(const QString &dirPath, const quint64 totalFiles) Q_DECL_OVERRIDE; - bool create(const QStringList &data) Q_DECL_OVERRIDE; - QVector<ArchiveEntry> list() Q_DECL_OVERRIDE; - bool isSupported() Q_DECL_OVERRIDE; + bool extract(const QString &dirPath) override; + bool extract(const QString &dirPath, const quint64 totalFiles) override; + bool create(const QStringList &data) override; + QVector<ArchiveEntry> list() override; + bool isSupported() override; - void setCompressionLevel(const AbstractArchive::CompressionLevel level) Q_DECL_OVERRIDE; + void setCompressionLevel(const AbstractArchive::CompressionLevel level) override; public Q_SLOTS: - void cancel() Q_DECL_OVERRIDE; + void cancel() override; private: LibArchiveWrapperPrivate *const d; diff --git a/src/libs/installer/licenseoperation.h b/src/libs/installer/licenseoperation.h index 49b885565..6e7743428 100644 --- a/src/libs/installer/licenseoperation.h +++ b/src/libs/installer/licenseoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT LicenseOperation : public Operation public: explicit LicenseOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; } // namespace QInstaller diff --git a/src/libs/installer/linereplaceoperation.h b/src/libs/installer/linereplaceoperation.h index d15e11fef..13e764acc 100644 --- a/src/libs/installer/linereplaceoperation.h +++ b/src/libs/installer/linereplaceoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT LineReplaceOperation : public Operation public: explicit LineReplaceOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; } // namespace diff --git a/src/libs/installer/metadatajob.h b/src/libs/installer/metadatajob.h index 3ee6ccf46..d3b404c58 100644 --- a/src/libs/installer/metadatajob.h +++ b/src/libs/installer/metadatajob.h @@ -84,8 +84,8 @@ public: QStringList shaMismatchPackages() const { return m_shaMissmatchPackages; } private slots: - void doStart(); - void doCancel(); + void doStart() override; + void doCancel() override; void xmlTaskFinished(); void unzipTaskFinished(); diff --git a/src/libs/installer/metadatajob_p.h b/src/libs/installer/metadatajob_p.h index 2511f4b00..5fd44e6f9 100644 --- a/src/libs/installer/metadatajob_p.h +++ b/src/libs/installer/metadatajob_p.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -46,9 +46,9 @@ public: : m_message(message) {} - void raise() const { throw *this; } + void raise() const override { throw *this; } QString message() const { return m_message; } - UnzipArchiveException *clone() const { return new UnzipArchiveException(*this); } + UnzipArchiveException *clone() const override{ return new UnzipArchiveException(*this); } private: QString m_message; @@ -65,7 +65,7 @@ public: {} QString target() { return m_targetDir; } QString archive() { return m_archive; } - void doTask(QFutureInterface<void> &fi) + void doTask(QFutureInterface<void> &fi) override { fi.reportStarted(); fi.setExpectedResultCount(1); diff --git a/src/libs/installer/minimumprogressoperation.h b/src/libs/installer/minimumprogressoperation.h index 4cdafca70..a16345730 100644 --- a/src/libs/installer/minimumprogressoperation.h +++ b/src/libs/installer/minimumprogressoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -42,10 +42,10 @@ class MinimumProgressOperation : public QObject, public Operation public: explicit MinimumProgressOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; signals: void progressChanged(double progress); diff --git a/src/libs/installer/observer.h b/src/libs/installer/observer.h index 166ede6ac..198a0f89c 100644 --- a/src/libs/installer/observer.h +++ b/src/libs/installer/observer.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -56,14 +56,14 @@ public: FileTaskObserver(QCryptographicHash::Algorithm algorithm); ~FileTaskObserver(); - int progressValue() const; - QString progressText() const; + int progressValue() const override; + QString progressText() const override; QByteArray checkSum() const; void addCheckSumData(const char *data, int length); void addSample(qint64 sample); - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) override; void setBytesTransfered(qint64 bytesTransfered); void addBytesTransfered(qint64 bytesTransfered); diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index 962417139..fa46e4720 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -128,7 +128,7 @@ public: return m_widget; } - bool isComplete() const Q_DECL_OVERRIDE + bool isComplete() const override { return m_widget->property("complete").toBool(); } diff --git a/src/libs/installer/packagemanagergui.h b/src/libs/installer/packagemanagergui.h index c841192cf..21c885284 100644 --- a/src/libs/installer/packagemanagergui.h +++ b/src/libs/installer/packagemanagergui.h @@ -104,7 +104,7 @@ Q_SIGNALS: public Q_SLOTS: void cancelButtonClicked(); - void reject(); + void reject() override; void rejectWithoutPrompt(); void showFinishedPage(); void setModified(bool value); @@ -130,8 +130,8 @@ private Q_SLOTS: void currentPageChanged(int newId); protected: - bool event(QEvent *event); - void showEvent(QShowEvent *event); + bool event(QEvent *event) override; + void showEvent(QShowEvent *event) override; PackageManagerCore *packageManagerCore() const { return m_core; } void executeControlScript(int pageId); @@ -165,7 +165,7 @@ public: void setShowOnPageList(bool show); bool showOnPageList() const; - virtual bool isComplete() const; + virtual bool isComplete() const override; void setComplete(bool complete); virtual bool isInterruptible() const { return false; } @@ -173,7 +173,7 @@ public: void setValidatePageComponent(QInstaller::Component *component); - bool validatePage(); + bool validatePage() override; bool settingsButtonRequested() const { return m_needsSettingsButton; } void setSettingsButtonRequested(bool request) { m_needsSettingsButton = request; } @@ -192,7 +192,7 @@ protected: virtual void insertWidget(QWidget *widget, const QString &siblingName, int offset = 1); virtual QWidget *findWidget(const QString &objectName) const; - virtual int nextId() const; // reimp + virtual int nextId() const override; // Used to support some kind of initializePage() in the case the wizard has been set // to QWizard::IndependentPages. If that option has been set, initializePage() would be only @@ -226,8 +226,8 @@ public: void setText(const QString &text); - int nextId() const; - bool validatePage(); + int nextId() const override; + bool validatePage() override; void showAll(); void hideAll(); @@ -251,10 +251,10 @@ private Q_SLOTS: void setPackageManager(bool value); private: - void initializePage(); + void initializePage() override; - void entering(); - void leaving(); + void entering() override; + void leaving() override; void showWidgets(bool show); bool validRepositoriesAvailable() const; @@ -288,8 +288,8 @@ class INSTALLER_EXPORT LicenseAgreementPage : public PackageManagerPage public: explicit LicenseAgreementPage(PackageManagerCore *core); - void entering(); - bool isComplete() const; + void entering() override; + bool isComplete() const override; private Q_SLOTS: void openLicenseUrl(const QUrl &url); @@ -318,7 +318,7 @@ public: explicit ComponentSelectionPage(PackageManagerCore *core); ~ComponentSelectionPage(); - bool isComplete() const; + bool isComplete() const override; Q_INVOKABLE void selectAll(); Q_INVOKABLE void deselectAll(); @@ -329,9 +329,9 @@ public: Q_INVOKABLE bool addVirtualComponentToUninstall(const QString &name); protected: - void entering(); - void leaving(); - void showEvent(QShowEvent *event); + void entering() override; + void leaving() override; + void showEvent(QShowEvent *event) override; private Q_SLOTS: void setModified(bool modified); @@ -353,13 +353,13 @@ public: QString targetDir() const; void setTargetDir(const QString &dirName); - void initializePage(); - bool validatePage(); - bool isComplete() const; + void initializePage() override; + bool validatePage() override; + bool isComplete() const override; protected: - void entering(); - void leaving(); + void entering() override; + void leaving() override; private Q_SLOTS: void dirRequested(); @@ -387,7 +387,7 @@ public: void setStartMenuDir(const QString &startMenuDir); protected: - void leaving(); + void leaving() override; private Q_SLOTS: void currentItemChanged(QListWidgetItem* current); @@ -409,8 +409,8 @@ public: explicit ReadyForInstallationPage(PackageManagerCore *core); protected: - void entering(); - void leaving(); + void entering() override; + void leaving() override; private Q_SLOTS: void updatePageListTitle(); @@ -433,9 +433,9 @@ public: bool isAutoSwitching() const; protected: - void entering(); - void leaving(); - bool isInterruptible() const { return true; } + void entering() override; + void leaving() override; + bool isInterruptible() const override { return true; } public Q_SLOTS: void setTitleMessage(const QString& title); @@ -475,8 +475,8 @@ public Q_SLOTS: void cleanupChangedConnects(); protected: - void entering(); - void leaving(); + void entering() override; + void leaving() override; private: QLabel *m_msgLabel; @@ -494,11 +494,11 @@ class INSTALLER_EXPORT RestartPage : public PackageManagerPage public: explicit RestartPage(PackageManagerCore *core); - virtual int nextId() const; + virtual int nextId() const override; protected: - void entering(); - void leaving(); + void entering() override; + void leaving() override; Q_SIGNALS: void restart(); diff --git a/src/libs/installer/packagemanagerproxyfactory.h b/src/libs/installer/packagemanagerproxyfactory.h index 31f1ffeba..bbb30aed8 100644 --- a/src/libs/installer/packagemanagerproxyfactory.h +++ b/src/libs/installer/packagemanagerproxyfactory.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -47,8 +47,8 @@ class PackageManagerProxyFactory : public KDUpdater::FileDownloaderProxyFactory public: explicit PackageManagerProxyFactory(const PackageManagerCore *const core); - PackageManagerProxyFactory *clone() const; - QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()); + PackageManagerProxyFactory *clone() const override; + QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()) override; void setProxyCredentials(const QNetworkProxy &proxy, const QString &user, const QString &password); diff --git a/src/libs/installer/registerfiletypeoperation.h b/src/libs/installer/registerfiletypeoperation.h index 8850ab44b..c8fd454fe 100644 --- a/src/libs/installer/registerfiletypeoperation.h +++ b/src/libs/installer/registerfiletypeoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -40,10 +40,10 @@ class INSTALLER_EXPORT RegisterFileTypeOperation : public QObject, public Operat public: explicit RegisterFileTypeOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; private: void ensureOptionalArgumentsRead(); diff --git a/src/libs/installer/remotefileengine.h b/src/libs/installer/remotefileengine.h index 9544403f7..35ebf7742 100644 --- a/src/libs/installer/remotefileengine.h +++ b/src/libs/installer/remotefileengine.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -42,7 +42,7 @@ class INSTALLER_EXPORT RemoteFileEngineHandler : public QAbstractFileEngineHandl public: RemoteFileEngineHandler() : QAbstractFileEngineHandler() {} - QAbstractFileEngine* create(const QString &fileName) const Q_DECL_OVERRIDE; + QAbstractFileEngine* create(const QString &fileName) const override; }; class RemoteFileEngine : public RemoteObject, public QAbstractFileEngine @@ -53,50 +53,50 @@ public: RemoteFileEngine(); ~RemoteFileEngine(); - bool open(QIODevice::OpenMode mode) Q_DECL_OVERRIDE; - bool close() Q_DECL_OVERRIDE; - bool flush() Q_DECL_OVERRIDE; - bool syncToDisk() Q_DECL_OVERRIDE; - qint64 size() const Q_DECL_OVERRIDE; - qint64 pos() const Q_DECL_OVERRIDE; - bool seek(qint64 offset) Q_DECL_OVERRIDE; - bool isSequential() const Q_DECL_OVERRIDE; - bool remove() Q_DECL_OVERRIDE; - bool copy(const QString &newName) Q_DECL_OVERRIDE; - bool rename(const QString &newName) Q_DECL_OVERRIDE; - bool renameOverwrite(const QString &newName) Q_DECL_OVERRIDE; - bool link(const QString &newName) Q_DECL_OVERRIDE; - bool mkdir(const QString &dirName, bool createParentDirectories) const Q_DECL_OVERRIDE; - bool rmdir(const QString &dirName, bool recurseParentDirectories) const Q_DECL_OVERRIDE; - bool setSize(qint64 size) Q_DECL_OVERRIDE; - bool caseSensitive() const Q_DECL_OVERRIDE; - bool isRelativePath() const Q_DECL_OVERRIDE; - QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const Q_DECL_OVERRIDE; - FileFlags fileFlags(FileFlags type = FileInfoAll) const Q_DECL_OVERRIDE; - bool setPermissions(uint perms) Q_DECL_OVERRIDE; - QString fileName(FileName file = DefaultName) const Q_DECL_OVERRIDE; - uint ownerId(FileOwner owner) const Q_DECL_OVERRIDE; - QString owner(FileOwner owner) const Q_DECL_OVERRIDE; - QDateTime fileTime(FileTime time) const Q_DECL_OVERRIDE; - void setFileName(const QString &fileName) Q_DECL_OVERRIDE; - int handle() const Q_DECL_OVERRIDE; + bool open(QIODevice::OpenMode mode) override; + bool close() override; + bool flush() override; + bool syncToDisk() override; + qint64 size() const override; + qint64 pos() const override; + bool seek(qint64 offset) override; + bool isSequential() const override; + bool remove() override; + bool copy(const QString &newName) override; + bool rename(const QString &newName) override; + bool renameOverwrite(const QString &newName) override; + bool link(const QString &newName) override; + bool mkdir(const QString &dirName, bool createParentDirectories) const override; + bool rmdir(const QString &dirName, bool recurseParentDirectories) const override; + bool setSize(qint64 size) override; + bool caseSensitive() const override; + bool isRelativePath() const override; + QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const override; + FileFlags fileFlags(FileFlags type = FileInfoAll) const override; + bool setPermissions(uint perms) override; + QString fileName(FileName file = DefaultName) const override; + uint ownerId(FileOwner owner) const override; + QString owner(FileOwner owner) const override; + QDateTime fileTime(FileTime time) const override; + void setFileName(const QString &fileName) override; + int handle() const override; bool atEnd() const; uchar *map(qint64, qint64, QFile::MemoryMapFlags) { return 0; } bool unmap(uchar *) { return true; } - Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) Q_DECL_OVERRIDE; - Iterator *endEntryList() Q_DECL_OVERRIDE; + Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override; + Iterator *endEntryList() override; - qint64 read(char *data, qint64 maxlen) Q_DECL_OVERRIDE; - qint64 readLine(char *data, qint64 maxlen) Q_DECL_OVERRIDE; - qint64 write(const char *data, qint64 len) Q_DECL_OVERRIDE; + qint64 read(char *data, qint64 maxlen) override; + qint64 readLine(char *data, qint64 maxlen) override; + qint64 write(const char *data, qint64 len) override; QFile::FileError error() const; QString errorString() const; bool extension(Extension extension, const ExtensionOption *option = 0, - ExtensionReturn *output = 0) Q_DECL_OVERRIDE; - bool supportsExtension(Extension extension) const Q_DECL_OVERRIDE; + ExtensionReturn *output = 0) override; + bool supportsExtension(Extension extension) const override; private: QFSFileEngine m_fileEngine; diff --git a/src/libs/installer/remoteserver_p.h b/src/libs/installer/remoteserver_p.h index e39350f2f..0723c7be6 100644 --- a/src/libs/installer/remoteserver_p.h +++ b/src/libs/installer/remoteserver_p.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -75,7 +75,7 @@ private slots: } private: - void incomingConnection(quintptr socketDescriptor) Q_DECL_OVERRIDE { + void incomingConnection(quintptr socketDescriptor) override { if (m_shutdown) return; diff --git a/src/libs/installer/remoteserverconnection.h b/src/libs/installer/remoteserverconnection.h index 253360db4..f7661e70e 100644 --- a/src/libs/installer/remoteserverconnection.h +++ b/src/libs/installer/remoteserverconnection.h @@ -56,7 +56,7 @@ public: RemoteServerConnection(qintptr socketDescriptor, const QString &authorizationKey, QObject *parent); - void run() Q_DECL_OVERRIDE; + void run() override; signals: void shutdownRequested(); diff --git a/src/libs/installer/replaceoperation.h b/src/libs/installer/replaceoperation.h index 0d2783ab6..09cca99c2 100644 --- a/src/libs/installer/replaceoperation.h +++ b/src/libs/installer/replaceoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT ReplaceOperation : public Operation public: explicit ReplaceOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; } // namespace QInstaller diff --git a/src/libs/installer/runextensions.h b/src/libs/installer/runextensions.h index fd76db060..e39ae6c81 100644 --- a/src/libs/installer/runextensions.h +++ b/src/libs/installer/runextensions.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -52,7 +52,7 @@ public: return future; } - void run() + void run() override { fn(futureInterface); futureInterface.reportFinished(); @@ -77,7 +77,7 @@ public: return future; } - void run() + void run() override { (object->*fn)(futureInterface); futureInterface.reportFinished(); @@ -104,7 +104,7 @@ public: return future; } - void run() + void run() override { fn(futureInterface, arg1); futureInterface.reportFinished(); @@ -129,7 +129,7 @@ public: return future; } - void run() + void run() override { (object->*fn)(futureInterface, arg1); futureInterface.reportFinished(); @@ -156,7 +156,7 @@ public: return future; } - void run() + void run() override { fn(futureInterface, arg1, arg2); futureInterface.reportFinished(); @@ -181,7 +181,7 @@ public: return future; } - void run() + void run() override { (object->*fn)(futureInterface, arg1, arg2); futureInterface.reportFinished(); @@ -208,7 +208,7 @@ public: return future; } - void run() + void run() override { fn(futureInterface, arg1, arg2, arg3); futureInterface.reportFinished(); @@ -233,7 +233,7 @@ public: return future; } - void run() + void run() override { (object->*fn)(futureInterface, arg1, arg2, arg3); futureInterface.reportFinished(); @@ -260,7 +260,7 @@ public: return future; } - void run() + void run() override { fn(futureInterface, arg1, arg2, arg3, arg4); futureInterface.reportFinished(); @@ -285,7 +285,7 @@ public: return future; } - void run() + void run() override { (object->*fn)(futureInterface, arg1, arg2, arg3, arg4); futureInterface.reportFinished(); @@ -312,7 +312,7 @@ public: return future; } - void run() + void run() override { fn(futureInterface, arg1, arg2, arg3, arg4, arg5); futureInterface.reportFinished(); @@ -337,7 +337,7 @@ public: return future; } - void run() + void run() override { (object->*fn)(futureInterface, arg1, arg2, arg3, arg4, arg5); futureInterface.reportFinished(); diff --git a/src/libs/installer/selfrestartoperation.h b/src/libs/installer/selfrestartoperation.h index 7adccd183..0554df2af 100644 --- a/src/libs/installer/selfrestartoperation.h +++ b/src/libs/installer/selfrestartoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT SelfRestartOperation : public Operation public: explicit SelfRestartOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; } diff --git a/src/libs/installer/settingsoperation.h b/src/libs/installer/settingsoperation.h index 0b94ea015..97655a85c 100644 --- a/src/libs/installer/settingsoperation.h +++ b/src/libs/installer/settingsoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -39,10 +39,10 @@ class INSTALLER_EXPORT SettingsOperation : public Operation public: explicit SettingsOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; private: bool checkArguments(); diff --git a/src/libs/installer/simplemovefileoperation.h b/src/libs/installer/simplemovefileoperation.h index 26cb5c462..850468b2f 100644 --- a/src/libs/installer/simplemovefileoperation.h +++ b/src/libs/installer/simplemovefileoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -42,10 +42,10 @@ class INSTALLER_EXPORT SimpleMoveFileOperation : public QObject, public Operatio public: explicit SimpleMoveFileOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; Q_SIGNALS: void outputTextChanged(const QString &progress); diff --git a/src/libs/installer/testrepository.h b/src/libs/installer/testrepository.h index 80d964692..a214188a9 100644 --- a/src/libs/installer/testrepository.h +++ b/src/libs/installer/testrepository.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -52,8 +52,8 @@ public: void setRepository(const Repository &repository); private slots: - void doStart(); - void doCancel(); + void doStart() override; + void doCancel() override; void onTimeout(); void downloadCompleted(); diff --git a/src/libs/installer/unziptask.h b/src/libs/installer/unziptask.h index e382b9f47..877b9b970 100644 --- a/src/libs/installer/unziptask.h +++ b/src/libs/installer/unziptask.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -40,7 +40,7 @@ public: UnzipTask() {} UnzipTask(const QString &source, const QString &target); - void doTask(QFutureInterface<QString> &fi); + void doTask(QFutureInterface<QString> &fi) override; private: void setBytesToExtract(qint64 bytes); diff --git a/src/libs/kdtools/filedownloader_p.h b/src/libs/kdtools/filedownloader_p.h index 41a430554..ec47e31ca 100644 --- a/src/libs/kdtools/filedownloader_p.h +++ b/src/libs/kdtools/filedownloader_p.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB) +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -46,22 +47,22 @@ public: explicit LocalFileDownloader(QObject *parent = 0); ~LocalFileDownloader(); - bool canDownload() const; - bool isDownloaded() const; - QString downloadedFileName() const; - void setDownloadedFileName(const QString &name); - LocalFileDownloader *clone(QObject *parent = 0) const; + bool canDownload() const override; + bool isDownloaded() const override; + QString downloadedFileName() const override; + void setDownloadedFileName(const QString &name) override; + LocalFileDownloader *clone(QObject *parent = 0) const override; public Q_SLOTS: - void cancelDownload(); + void cancelDownload() override; protected: - void timerEvent(QTimerEvent *te); - void onError(); - void onSuccess(); + void timerEvent(QTimerEvent *te) override; + void onError() override; + void onSuccess() override; private Q_SLOTS: - void doDownload(); + void doDownload() override; private: struct Private; @@ -76,22 +77,22 @@ public: explicit ResourceFileDownloader(QObject *parent = 0); ~ResourceFileDownloader(); - bool canDownload() const; - bool isDownloaded() const; - QString downloadedFileName() const; - void setDownloadedFileName(const QString &name); - ResourceFileDownloader *clone(QObject *parent = 0) const; + bool canDownload() const override; + bool isDownloaded() const override; + QString downloadedFileName() const override; + void setDownloadedFileName(const QString &name) override; + ResourceFileDownloader *clone(QObject *parent = 0) const override; public Q_SLOTS: - void cancelDownload(); + void cancelDownload() override; protected: - void timerEvent(QTimerEvent *te); - void onError(); - void onSuccess(); + void timerEvent(QTimerEvent *te) override; + void onError() override; + void onSuccess() override; private Q_SLOTS: - void doDownload(); + void doDownload() override; private: struct Private; @@ -106,22 +107,22 @@ public: explicit HttpDownloader(QObject *parent = 0); ~HttpDownloader(); - bool canDownload() const; - bool isDownloaded() const; - QString downloadedFileName() const; - void setDownloadedFileName(const QString &name); - HttpDownloader *clone(QObject *parent = 0) const; + bool canDownload() const override; + bool isDownloaded() const override; + QString downloadedFileName() const override; + void setDownloadedFileName(const QString &name) override; + HttpDownloader *clone(QObject *parent = 0) const override; public Q_SLOTS: - void cancelDownload(); + void cancelDownload() override; protected: - void onError(); - void onSuccess(); - void timerEvent(QTimerEvent *event); + void onError() override; + void onSuccess() override; + void timerEvent(QTimerEvent *event) override; private Q_SLOTS: - void doDownload(); + void doDownload() override; void httpReadyRead(); void httpReadProgress(qint64 done, qint64 total); diff --git a/src/libs/kdtools/updatefinder.h b/src/libs/kdtools/updatefinder.h index 7a3e4df1e..83b6a5f13 100644 --- a/src/libs/kdtools/updatefinder.h +++ b/src/libs/kdtools/updatefinder.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB) -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -55,10 +55,10 @@ public: void setPackageSources(const QSet<QInstaller::PackageSource> &sources); private: - void doRun(); - bool doStop(); - bool doPause(); - bool doResume(); + void doRun() override; + bool doStop() override; + bool doPause() override; + bool doResume() override; private: Private *d; diff --git a/src/libs/kdtools/updateoperations.h b/src/libs/kdtools/updateoperations.h index b13a42559..c789975e2 100644 --- a/src/libs/kdtools/updateoperations.h +++ b/src/libs/kdtools/updateoperations.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB) +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -40,12 +41,12 @@ public: explicit CopyOperation(QInstaller::PackageManagerCore *core = 0); ~CopyOperation(); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; - QDomDocument toXml() const; + QDomDocument toXml() const override; private: QString sourcePath(); QString destinationPath(); @@ -58,10 +59,10 @@ public: explicit MoveOperation(QInstaller::PackageManagerCore *core = 0); ~MoveOperation(); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; class KDTOOLS_EXPORT DeleteOperation : public UpdateOperation @@ -71,12 +72,12 @@ public: explicit DeleteOperation(QInstaller::PackageManagerCore *core = 0); ~DeleteOperation(); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; - QDomDocument toXml() const; + QDomDocument toXml() const override; }; class KDTOOLS_EXPORT MkdirOperation : public UpdateOperation @@ -85,10 +86,10 @@ class KDTOOLS_EXPORT MkdirOperation : public UpdateOperation public: explicit MkdirOperation(QInstaller::PackageManagerCore *core = 0); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; class KDTOOLS_EXPORT RmdirOperation : public UpdateOperation @@ -97,10 +98,10 @@ class KDTOOLS_EXPORT RmdirOperation : public UpdateOperation public: RmdirOperation(QInstaller::PackageManagerCore *core = 0); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; class KDTOOLS_EXPORT AppendFileOperation : public UpdateOperation @@ -109,10 +110,10 @@ class KDTOOLS_EXPORT AppendFileOperation : public UpdateOperation public: explicit AppendFileOperation(QInstaller::PackageManagerCore *core = 0); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; class KDTOOLS_EXPORT PrependFileOperation : public UpdateOperation @@ -121,10 +122,10 @@ class KDTOOLS_EXPORT PrependFileOperation : public UpdateOperation public: explicit PrependFileOperation(QInstaller::PackageManagerCore *core = 0); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; }; } // namespace KDUpdater diff --git a/tests/auto/installer/factory/tst_factory.cpp b/tests/auto/installer/factory/tst_factory.cpp index eb7e2c36c..ead282599 100644 --- a/tests/auto/installer/factory/tst_factory.cpp +++ b/tests/auto/installer/factory/tst_factory.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -82,7 +82,7 @@ public: : Food(amount) , m_expireDate(expireDate) { qDebug().nospace().noquote() << "Constructor."; } - QDate expireDate() const Q_DECL_OVERRIDE { + QDate expireDate() const override { return m_expireDate; } private: @@ -92,7 +92,7 @@ private: class Butter : public Food { public: - QDate expireDate() const Q_DECL_OVERRIDE { + QDate expireDate() const override { return m_expireDate; } static Food *create(int amount, const QDate expireDate) { @@ -117,7 +117,7 @@ public: : Food(amount) , m_expireDate(expireDate) { qDebug().nospace().noquote() << "Constructor."; } - QDate expireDate() const Q_DECL_OVERRIDE { + QDate expireDate() const override { return m_expireDate; } |