diff options
author | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2015-06-24 14:14:46 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2015-06-25 15:33:04 +0000 |
commit | 0a229c256cfdc69e4209bc34290a8b657fa6fc6c (patch) | |
tree | 9328b48c76722dd1c861e313bd319bbb4fdadf4f | |
parent | 38bd4ceae105f45dc4cb42ddea65fcc16f946830 (diff) |
Remove superfluous clone() method. Prepare for next patch.
Task-number: QTIFW-180
Change-Id: I6aa8b409e323d14e353a1f80b0b2ec54daad184f
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
44 files changed, 1 insertions, 171 deletions
diff --git a/src/libs/installer/consumeoutputoperation.cpp b/src/libs/installer/consumeoutputoperation.cpp index 1a0e5f534..e366b655f 100644 --- a/src/libs/installer/consumeoutputoperation.cpp +++ b/src/libs/installer/consumeoutputoperation.cpp @@ -143,9 +143,3 @@ bool ConsumeOutputOperation::testOperation() { return true; } - -Operation *ConsumeOutputOperation::clone() const -{ - return new ConsumeOutputOperation(); -} - diff --git a/src/libs/installer/consumeoutputoperation.h b/src/libs/installer/consumeoutputoperation.h index 614a75a1c..bb8c28b0d 100644 --- a/src/libs/installer/consumeoutputoperation.h +++ b/src/libs/installer/consumeoutputoperation.h @@ -48,7 +48,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; private: }; diff --git a/src/libs/installer/copydirectoryoperation.cpp b/src/libs/installer/copydirectoryoperation.cpp index a25e00930..a30874da0 100644 --- a/src/libs/installer/copydirectoryoperation.cpp +++ b/src/libs/installer/copydirectoryoperation.cpp @@ -174,8 +174,3 @@ bool CopyDirectoryOperation::testOperation() { return true; } - -Operation *CopyDirectoryOperation::clone() const -{ - return new CopyDirectoryOperation(); -} diff --git a/src/libs/installer/copydirectoryoperation.h b/src/libs/installer/copydirectoryoperation.h index 0dd876f05..e9f5f32eb 100644 --- a/src/libs/installer/copydirectoryoperation.h +++ b/src/libs/installer/copydirectoryoperation.h @@ -52,7 +52,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; Q_SIGNALS: void outputTextChanged(const QString &progress); diff --git a/src/libs/installer/createdesktopentryoperation.cpp b/src/libs/installer/createdesktopentryoperation.cpp index ec98e7fc8..f2892dd19 100644 --- a/src/libs/installer/createdesktopentryoperation.cpp +++ b/src/libs/installer/createdesktopentryoperation.cpp @@ -193,8 +193,3 @@ bool CreateDesktopEntryOperation::testOperation() { return true; } - -Operation *CreateDesktopEntryOperation::clone() const -{ - return new CreateDesktopEntryOperation(); -} diff --git a/src/libs/installer/createdesktopentryoperation.h b/src/libs/installer/createdesktopentryoperation.h index 786f2891d..a40964566 100644 --- a/src/libs/installer/createdesktopentryoperation.h +++ b/src/libs/installer/createdesktopentryoperation.h @@ -49,7 +49,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation* clone() const; QString absoluteFileName(); }; diff --git a/src/libs/installer/createlinkoperation.cpp b/src/libs/installer/createlinkoperation.cpp index aa98c54a5..d60b7106c 100644 --- a/src/libs/installer/createlinkoperation.cpp +++ b/src/libs/installer/createlinkoperation.cpp @@ -94,8 +94,3 @@ bool CreateLinkOperation::testOperation() { return true; } - -Operation *CreateLinkOperation::clone() const -{ - return new CreateLinkOperation(); -} diff --git a/src/libs/installer/createlinkoperation.h b/src/libs/installer/createlinkoperation.h index 1d825d4f9..eb57c6f0d 100644 --- a/src/libs/installer/createlinkoperation.h +++ b/src/libs/installer/createlinkoperation.h @@ -48,7 +48,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; }; } diff --git a/src/libs/installer/createlocalrepositoryoperation.cpp b/src/libs/installer/createlocalrepositoryoperation.cpp index 18947a33c..1cb35f208 100644 --- a/src/libs/installer/createlocalrepositoryoperation.cpp +++ b/src/libs/installer/createlocalrepositoryoperation.cpp @@ -377,11 +377,6 @@ bool CreateLocalRepositoryOperation::testOperation() return true; } -Operation *CreateLocalRepositoryOperation::clone() const -{ - return new CreateLocalRepositoryOperation(); -} - void CreateLocalRepositoryOperation::emitFullProgress() { emit progressChanged(1.0); diff --git a/src/libs/installer/createlocalrepositoryoperation.h b/src/libs/installer/createlocalrepositoryoperation.h index 2eebb0dc9..56ffc8fec 100644 --- a/src/libs/installer/createlocalrepositoryoperation.h +++ b/src/libs/installer/createlocalrepositoryoperation.h @@ -53,7 +53,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; signals: void progressChanged(double progress); diff --git a/src/libs/installer/createshortcutoperation.cpp b/src/libs/installer/createshortcutoperation.cpp index 4bd5ca453..d51548d45 100644 --- a/src/libs/installer/createshortcutoperation.cpp +++ b/src/libs/installer/createshortcutoperation.cpp @@ -293,8 +293,3 @@ bool CreateShortcutOperation::testOperation() { return true; } - -Operation *CreateShortcutOperation::clone() const -{ - return new CreateShortcutOperation(); -} diff --git a/src/libs/installer/createshortcutoperation.h b/src/libs/installer/createshortcutoperation.h index 62ed53a82..49577812a 100644 --- a/src/libs/installer/createshortcutoperation.h +++ b/src/libs/installer/createshortcutoperation.h @@ -48,7 +48,7 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; + private: void ensureOptionalArgumentsRead(); diff --git a/src/libs/installer/elevatedexecuteoperation.cpp b/src/libs/installer/elevatedexecuteoperation.cpp index 640ae7c1a..6aa52e00b 100644 --- a/src/libs/installer/elevatedexecuteoperation.cpp +++ b/src/libs/installer/elevatedexecuteoperation.cpp @@ -287,11 +287,6 @@ bool ElevatedExecuteOperation::testOperation() return true; } -Operation *ElevatedExecuteOperation::clone() const -{ - return new ElevatedExecuteOperation; -} - void ElevatedExecuteOperation::backup() { } diff --git a/src/libs/installer/elevatedexecuteoperation.h b/src/libs/installer/elevatedexecuteoperation.h index ef659efca..63663ef54 100644 --- a/src/libs/installer/elevatedexecuteoperation.h +++ b/src/libs/installer/elevatedexecuteoperation.h @@ -51,7 +51,6 @@ public: virtual bool performOperation(); virtual bool undoOperation(); virtual bool testOperation(); - virtual Operation *clone() const; Q_SIGNALS: void cancelProcess(); diff --git a/src/libs/installer/environmentvariablesoperation.cpp b/src/libs/installer/environmentvariablesoperation.cpp index b3ac9c268..f962a6f73 100644 --- a/src/libs/installer/environmentvariablesoperation.cpp +++ b/src/libs/installer/environmentvariablesoperation.cpp @@ -209,8 +209,3 @@ bool EnvironmentVariableOperation::testOperation() { return true; } - -Operation *EnvironmentVariableOperation::clone() const -{ - return new EnvironmentVariableOperation(); -} diff --git a/src/libs/installer/environmentvariablesoperation.h b/src/libs/installer/environmentvariablesoperation.h index e765478bb..b52ee92d1 100644 --- a/src/libs/installer/environmentvariablesoperation.h +++ b/src/libs/installer/environmentvariablesoperation.h @@ -48,7 +48,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; }; } diff --git a/src/libs/installer/extractarchiveoperation.cpp b/src/libs/installer/extractarchiveoperation.cpp index 1b40c488f..344dd1b92 100644 --- a/src/libs/installer/extractarchiveoperation.cpp +++ b/src/libs/installer/extractarchiveoperation.cpp @@ -128,11 +128,6 @@ bool ExtractArchiveOperation::testOperation() return true; } -Operation *ExtractArchiveOperation::clone() const -{ - return new ExtractArchiveOperation(); -} - /*! This slot is direct connected to the caller so please don't call it from another thread in the same time. */ diff --git a/src/libs/installer/extractarchiveoperation.h b/src/libs/installer/extractarchiveoperation.h index b0898313b..2e2af2e5a 100644 --- a/src/libs/installer/extractarchiveoperation.h +++ b/src/libs/installer/extractarchiveoperation.h @@ -53,7 +53,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; Q_SIGNALS: void outputTextChanged(const QString &progress); diff --git a/src/libs/installer/fakestopprocessforupdateoperation.cpp b/src/libs/installer/fakestopprocessforupdateoperation.cpp index a30308712..4f348f606 100644 --- a/src/libs/installer/fakestopprocessforupdateoperation.cpp +++ b/src/libs/installer/fakestopprocessforupdateoperation.cpp @@ -91,8 +91,3 @@ bool FakeStopProcessForUpdateOperation::testOperation() { return true; } - -Operation *FakeStopProcessForUpdateOperation::clone() const -{ - return new FakeStopProcessForUpdateOperation(); -} diff --git a/src/libs/installer/fakestopprocessforupdateoperation.h b/src/libs/installer/fakestopprocessforupdateoperation.h index e21188e5a..87df0716a 100644 --- a/src/libs/installer/fakestopprocessforupdateoperation.h +++ b/src/libs/installer/fakestopprocessforupdateoperation.h @@ -50,7 +50,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; }; } diff --git a/src/libs/installer/globalsettingsoperation.cpp b/src/libs/installer/globalsettingsoperation.cpp index 3ddf8f05b..c96331937 100644 --- a/src/libs/installer/globalsettingsoperation.cpp +++ b/src/libs/installer/globalsettingsoperation.cpp @@ -98,11 +98,6 @@ bool GlobalSettingsOperation::testOperation() return true; } -Operation *GlobalSettingsOperation::clone() const -{ - return new GlobalSettingsOperation(); -} - QSettingsWrapper *GlobalSettingsOperation::setup(QString *key, QString *value, const QStringList &arguments) { if (!checkArgumentCount(3, 5)) diff --git a/src/libs/installer/globalsettingsoperation.h b/src/libs/installer/globalsettingsoperation.h index 3a15f03f9..10f2276f4 100644 --- a/src/libs/installer/globalsettingsoperation.h +++ b/src/libs/installer/globalsettingsoperation.h @@ -49,7 +49,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; private: QSettingsWrapper *setup(QString *key, QString *value, const QStringList &args); diff --git a/src/libs/installer/installiconsoperation.cpp b/src/libs/installer/installiconsoperation.cpp index 8c5541012..377151745 100644 --- a/src/libs/installer/installiconsoperation.cpp +++ b/src/libs/installer/installiconsoperation.cpp @@ -287,8 +287,3 @@ bool InstallIconsOperation::testOperation() { return true; } - -Operation *InstallIconsOperation::clone() const -{ - return new InstallIconsOperation(); -} diff --git a/src/libs/installer/installiconsoperation.h b/src/libs/installer/installiconsoperation.h index e93e55914..9f5058087 100644 --- a/src/libs/installer/installiconsoperation.h +++ b/src/libs/installer/installiconsoperation.h @@ -52,7 +52,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; Q_SIGNALS: void outputTextChanged(const QString &progress); diff --git a/src/libs/installer/licenseoperation.cpp b/src/libs/installer/licenseoperation.cpp index 195c6d777..fec4292b7 100644 --- a/src/libs/installer/licenseoperation.cpp +++ b/src/libs/installer/licenseoperation.cpp @@ -113,8 +113,3 @@ bool LicenseOperation::testOperation() { return true; } - -Operation *LicenseOperation::clone() const -{ - return new LicenseOperation(); -} diff --git a/src/libs/installer/licenseoperation.h b/src/libs/installer/licenseoperation.h index 542b8fe1b..21a994ca3 100644 --- a/src/libs/installer/licenseoperation.h +++ b/src/libs/installer/licenseoperation.h @@ -48,7 +48,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation* clone() const; }; } // namespace QInstaller diff --git a/src/libs/installer/linereplaceoperation.cpp b/src/libs/installer/linereplaceoperation.cpp index 11168b10e..4c41544f1 100644 --- a/src/libs/installer/linereplaceoperation.cpp +++ b/src/libs/installer/linereplaceoperation.cpp @@ -105,8 +105,3 @@ bool LineReplaceOperation::testOperation() { return true; } - -Operation *LineReplaceOperation::clone() const -{ - return new LineReplaceOperation(); -} diff --git a/src/libs/installer/linereplaceoperation.h b/src/libs/installer/linereplaceoperation.h index 38714b619..c5c23db37 100644 --- a/src/libs/installer/linereplaceoperation.h +++ b/src/libs/installer/linereplaceoperation.h @@ -48,7 +48,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; }; } // namespace diff --git a/src/libs/installer/minimumprogressoperation.cpp b/src/libs/installer/minimumprogressoperation.cpp index 1146bf598..d791352d7 100644 --- a/src/libs/installer/minimumprogressoperation.cpp +++ b/src/libs/installer/minimumprogressoperation.cpp @@ -62,9 +62,3 @@ bool MinimumProgressOperation::testOperation() { return true; } - -Operation *MinimumProgressOperation::clone() const -{ - return new MinimumProgressOperation(); -} - diff --git a/src/libs/installer/minimumprogressoperation.h b/src/libs/installer/minimumprogressoperation.h index 0afa5d190..e5083d2c2 100644 --- a/src/libs/installer/minimumprogressoperation.h +++ b/src/libs/installer/minimumprogressoperation.h @@ -52,7 +52,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; signals: void progressChanged(double progress); diff --git a/src/libs/installer/registerfiletypeoperation.cpp b/src/libs/installer/registerfiletypeoperation.cpp index 3e57cb5b9..ce3c11135 100644 --- a/src/libs/installer/registerfiletypeoperation.cpp +++ b/src/libs/installer/registerfiletypeoperation.cpp @@ -218,8 +218,3 @@ bool RegisterFileTypeOperation::testOperation() { return true; } - -Operation *RegisterFileTypeOperation::clone() const -{ - return new RegisterFileTypeOperation(); -} diff --git a/src/libs/installer/registerfiletypeoperation.h b/src/libs/installer/registerfiletypeoperation.h index 7c0220d29..46ee26385 100644 --- a/src/libs/installer/registerfiletypeoperation.h +++ b/src/libs/installer/registerfiletypeoperation.h @@ -50,7 +50,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; }; } diff --git a/src/libs/installer/replaceoperation.cpp b/src/libs/installer/replaceoperation.cpp index 8911534bb..bd9c1ec3b 100644 --- a/src/libs/installer/replaceoperation.cpp +++ b/src/libs/installer/replaceoperation.cpp @@ -99,8 +99,3 @@ bool ReplaceOperation::testOperation() { return true; } - -Operation *ReplaceOperation::clone() const -{ - return new ReplaceOperation(); -} diff --git a/src/libs/installer/replaceoperation.h b/src/libs/installer/replaceoperation.h index fe37b096f..dfde133b1 100644 --- a/src/libs/installer/replaceoperation.h +++ b/src/libs/installer/replaceoperation.h @@ -48,7 +48,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; }; } // namespace QInstaller diff --git a/src/libs/installer/selfrestartoperation.cpp b/src/libs/installer/selfrestartoperation.cpp index 8d18363d3..8177cf167 100644 --- a/src/libs/installer/selfrestartoperation.cpp +++ b/src/libs/installer/selfrestartoperation.cpp @@ -83,8 +83,3 @@ bool SelfRestartOperation::testOperation() { return true; } - -Operation *SelfRestartOperation::clone() const -{ - return new SelfRestartOperation(); -} diff --git a/src/libs/installer/selfrestartoperation.h b/src/libs/installer/selfrestartoperation.h index 4b83ff061..d49073d3f 100644 --- a/src/libs/installer/selfrestartoperation.h +++ b/src/libs/installer/selfrestartoperation.h @@ -48,7 +48,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; }; } diff --git a/src/libs/installer/settingsoperation.cpp b/src/libs/installer/settingsoperation.cpp index 2cb36bf48..38aec23b1 100644 --- a/src/libs/installer/settingsoperation.cpp +++ b/src/libs/installer/settingsoperation.cpp @@ -201,9 +201,3 @@ bool SettingsOperation::testOperation() { return true; } - -Operation *SettingsOperation::clone() const -{ - return new SettingsOperation(); -} - diff --git a/src/libs/installer/settingsoperation.h b/src/libs/installer/settingsoperation.h index c9b3dca98..dfaca4594 100644 --- a/src/libs/installer/settingsoperation.h +++ b/src/libs/installer/settingsoperation.h @@ -48,7 +48,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; private: bool checkArguments(); diff --git a/src/libs/installer/simplemovefileoperation.cpp b/src/libs/installer/simplemovefileoperation.cpp index ce643020d..75078b84e 100644 --- a/src/libs/installer/simplemovefileoperation.cpp +++ b/src/libs/installer/simplemovefileoperation.cpp @@ -107,9 +107,4 @@ bool SimpleMoveFileOperation::testOperation() return true; } -Operation *SimpleMoveFileOperation::clone() const -{ - return new SimpleMoveFileOperation(); -} - } // namespace QInstaller diff --git a/src/libs/installer/simplemovefileoperation.h b/src/libs/installer/simplemovefileoperation.h index 56f342094..c02ffbe6f 100644 --- a/src/libs/installer/simplemovefileoperation.h +++ b/src/libs/installer/simplemovefileoperation.h @@ -52,7 +52,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - Operation *clone() const; Q_SIGNALS: void outputTextChanged(const QString &progress); diff --git a/src/libs/kdtools/kdupdaterupdateoperation.cpp b/src/libs/kdtools/kdupdaterupdateoperation.cpp index 0c6621271..285f0c188 100644 --- a/src/libs/kdtools/kdupdaterupdateoperation.cpp +++ b/src/libs/kdtools/kdupdaterupdateoperation.cpp @@ -388,12 +388,6 @@ bool UpdateOperation::deleteFileNowOrLater(const QString &file, QString *errorSt */ /*! - \fn virtual bool KDUpdater::UpdateOperation::clone() const = 0; - - Subclasses must implement this function to clone the current operation. -*/ - -/*! Saves operation arguments and values as an XML document and returns the document. You can override this method to store your own extra-data. Extra-data can be any data that you need to store to perform or undo the diff --git a/src/libs/kdtools/kdupdaterupdateoperation.h b/src/libs/kdtools/kdupdaterupdateoperation.h index 3f2901b80..1b5e37c85 100644 --- a/src/libs/kdtools/kdupdaterupdateoperation.h +++ b/src/libs/kdtools/kdupdaterupdateoperation.h @@ -85,7 +85,6 @@ public: virtual bool performOperation() = 0; virtual bool undoOperation() = 0; virtual bool testOperation() = 0; - virtual UpdateOperation *clone() const = 0; virtual QDomDocument toXml() const; virtual bool fromXml(const QString &xml); diff --git a/src/libs/kdtools/kdupdaterupdateoperations.cpp b/src/libs/kdtools/kdupdaterupdateoperations.cpp index 944679070..093733337 100644 --- a/src/libs/kdtools/kdupdaterupdateoperations.cpp +++ b/src/libs/kdtools/kdupdaterupdateoperations.cpp @@ -235,11 +235,6 @@ bool CopyOperation::testOperation() return true; } -CopyOperation *CopyOperation::clone() const -{ - return new CopyOperation(); -} - //////////////////////////////////////////////////////////////////////////// // KDUpdater::MoveOperation @@ -342,11 +337,6 @@ bool MoveOperation::testOperation() return true; } -MoveOperation *MoveOperation::clone() const -{ - return new MoveOperation; -} - //////////////////////////////////////////////////////////////////////////// // KDUpdater::DeleteOperation @@ -402,11 +392,6 @@ bool DeleteOperation::testOperation() return true; } -DeleteOperation *DeleteOperation::clone() const -{ - return new DeleteOperation; -} - /*! \reimp */ @@ -516,10 +501,6 @@ bool KDUpdater::MkdirOperation::testOperation() return true; } -MkdirOperation *MkdirOperation::clone() const -{ - return new MkdirOperation; -} //////////////////////////////////////////////////////////////////////////// // KDUpdater::RmdirOperation @@ -583,11 +564,6 @@ bool RmdirOperation::testOperation() return true; } -RmdirOperation *RmdirOperation::clone() const -{ - return new RmdirOperation; -} - //////////////////////////////////////////////////////////////////////////// // KDUpdater::AppendFileOperation @@ -694,11 +670,6 @@ bool AppendFileOperation::testOperation() return true; } -AppendFileOperation *AppendFileOperation::clone() const -{ - return new AppendFileOperation; -} - //////////////////////////////////////////////////////////////////////////// // KDUpdater::PrependFileOperation @@ -806,8 +777,3 @@ bool PrependFileOperation::testOperation() // TODO return true; } - -PrependFileOperation *PrependFileOperation::clone() const -{ - return new PrependFileOperation; -} diff --git a/src/libs/kdtools/kdupdaterupdateoperations.h b/src/libs/kdtools/kdupdaterupdateoperations.h index 4eafed744..c04105c82 100644 --- a/src/libs/kdtools/kdupdaterupdateoperations.h +++ b/src/libs/kdtools/kdupdaterupdateoperations.h @@ -49,7 +49,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - CopyOperation *clone() const; QDomDocument toXml() const; private: @@ -67,7 +66,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - MoveOperation *clone() const; }; class KDTOOLS_EXPORT DeleteOperation : public UpdateOperation @@ -80,7 +78,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - DeleteOperation *clone() const; QDomDocument toXml() const; }; @@ -94,7 +91,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - MkdirOperation *clone() const; }; class KDTOOLS_EXPORT RmdirOperation : public UpdateOperation @@ -106,7 +102,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - RmdirOperation *clone() const; }; class KDTOOLS_EXPORT AppendFileOperation : public UpdateOperation @@ -118,7 +113,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - AppendFileOperation *clone() const; }; class KDTOOLS_EXPORT PrependFileOperation : public UpdateOperation @@ -130,7 +124,6 @@ public: bool performOperation(); bool undoOperation(); bool testOperation(); - PrependFileOperation *clone() const; }; } // namespace KDUpdater |