summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/settingsoperation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/settingsoperation.cpp')
-rw-r--r--src/libs/installer/settingsoperation.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/libs/installer/settingsoperation.cpp b/src/libs/installer/settingsoperation.cpp
index c7e15c423..1692cab91 100644
--- a/src/libs/installer/settingsoperation.cpp
+++ b/src/libs/installer/settingsoperation.cpp
@@ -32,7 +32,7 @@
**************************************************************************/
#include "settingsoperation.h"
#include "packagemanagercore.h"
-#include "kdupdaterupdateoperations.h"
+#include "updateoperations.h"
#include "qsettingswrapper.h"
#include <QDir>
@@ -40,7 +40,8 @@
using namespace QInstaller;
-SettingsOperation::SettingsOperation()
+SettingsOperation::SettingsOperation(PackageManagerCore *core)
+ : UpdateOperation(core)
{
setName(QLatin1String("Settings"));
}
@@ -68,7 +69,7 @@ bool SettingsOperation::checkArguments()
if (!missingArguments.isEmpty()) {
setError(InvalidArguments);
- setErrorString(tr("Missing argument(s) '%1' calling '%2' with arguments '%3'.").arg(
+ setErrorString(tr("Missing argument(s) \"%1\" calling %2 with arguments \"%3\".").arg(
missingArguments.join(QLatin1String("; ")), name(), arguments().join(QLatin1String("; "))));
return false;
}
@@ -78,7 +79,7 @@ bool SettingsOperation::checkArguments()
if (!possibleMethodValues.contains(method)) {
setError(InvalidArguments);
- setErrorString(tr("Current method argument calling '%1' with arguments '%2' is not "
+ setErrorString(tr("Current method argument calling \"%1\" with arguments \"%2\" is not "
"supported. Please use set, remove, add_array_value or remove_array_value.").arg(name(),
arguments().join(QLatin1String("; "))));
return false;
@@ -182,14 +183,14 @@ bool SettingsOperation::undoOperation()
if (cleanUp) {
QFile settingsFile(path);
if (!settingsFile.remove())
- qWarning() << settingsFile.errorString();
+ qWarning().noquote() << settingsFile.errorString();
if (!value(QLatin1String("createddir")).toString().isEmpty()) {
KDUpdater::MkdirOperation mkDirOperation;
mkDirOperation.setArguments(QStringList() << QFileInfo(path).absolutePath());
mkDirOperation.setValue(QLatin1String("createddir"), value(QLatin1String("createddir")));
if (!mkDirOperation.undoOperation()) {
- qWarning() << mkDirOperation.errorString();
+ qWarning().noquote() << mkDirOperation.errorString();
}
}
}
@@ -200,9 +201,3 @@ bool SettingsOperation::testOperation()
{
return true;
}
-
-Operation *SettingsOperation::clone() const
-{
- return new SettingsOperation();
-}
-