summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--installerfw.pro2
-rw-r--r--tools/fileengineclient/fileengineclient.cpp7
-rw-r--r--tools/operationrunner/fakeinstaller.cpp18
-rw-r--r--tools/operationrunner/fakeinstaller.h24
-rw-r--r--tools/operationrunner/operationrunner.cpp11
-rw-r--r--tools/operationrunner/operationrunner.pro6
6 files changed, 10 insertions, 58 deletions
diff --git a/installerfw.pro b/installerfw.pro
index 7009c613f..d7fb2f429 100644
--- a/installerfw.pro
+++ b/installerfw.pro
@@ -1,6 +1,6 @@
TEMPLATE=subdirs
CONFIG += ordered
-SUBDIRS += installerbuilder examples
+SUBDIRS += installerbuilder examples tools
test.target=test
diff --git a/tools/fileengineclient/fileengineclient.cpp b/tools/fileengineclient/fileengineclient.cpp
index c8d56cc96..0d6363f1c 100644
--- a/tools/fileengineclient/fileengineclient.cpp
+++ b/tools/fileengineclient/fileengineclient.cpp
@@ -135,10 +135,9 @@ int main(int argc, char **argv)
//first run as a normal QProcess
QByteArray secondOutPut;
{
- FSEngineClientHandler* engineClientHandler = new FSEngineClientHandler();
- engineClientHandler->enableTestMode();
- engineClientHandler->init(39999);
- engineClientHandler->setActive(true);
+ FSEngineClientHandler::instance().enableTestMode();
+ FSEngineClientHandler::instance().init(39999);
+ FSEngineClientHandler::instance().setActive(true);
QProcess process;
OutputHandler outputer(&process);
diff --git a/tools/operationrunner/fakeinstaller.cpp b/tools/operationrunner/fakeinstaller.cpp
deleted file mode 100644
index e80dbb2a5..000000000
--- a/tools/operationrunner/fakeinstaller.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "fakeinstaller.h"
-
-#include <QFileInfo>
-
-void FakeInstaller::setTargetDir(const QString &targetDir)
-{
- m_targetDir = QFileInfo(targetDir).absoluteFilePath();
-}
-
-QString FakeInstaller::value(const QString &key, const QString &/*defaultValue*/) const
-{
- if(key == QLatin1String("TargetDir")) {
- return m_targetDir;
- } else {
- qFatal("This is only a fake installer and it can only handle \"TargetDir\" value.");
- }
- return QString();
-}
diff --git a/tools/operationrunner/fakeinstaller.h b/tools/operationrunner/fakeinstaller.h
deleted file mode 100644
index 6a581eda0..000000000
--- a/tools/operationrunner/fakeinstaller.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef FAKEINSTALLER_H
-#define FAKEINSTALLER_H
-
-#include <qinstaller.h>
-
-#include <QObject>
-#include <QMetaType>
-#include <QString>
-
-class FakeInstaller : public QInstaller::Installer
-{
- Q_OBJECT
-public:
- FakeInstaller() : QInstaller::Installer() {}
- void setTargetDir(const QString &targetDir);
- Q_INVOKABLE virtual QString value(const QString &key, const QString &defaultValue = QString()) const;
-
-private:
- QString m_targetDir;
-};
-
-Q_DECLARE_METATYPE(FakeInstaller*)
-
-#endif // FAKEINSTALLER_H
diff --git a/tools/operationrunner/operationrunner.cpp b/tools/operationrunner/operationrunner.cpp
index b76aed455..f5c9c5fb2 100644
--- a/tools/operationrunner/operationrunner.cpp
+++ b/tools/operationrunner/operationrunner.cpp
@@ -30,14 +30,11 @@
** (qt-info@nokia.com).
**
**************************************************************************/
-#include "fakeinstaller.h" //this should be the pseudo one next to this file
-
-#include <qinstaller.h>
+#include <packagemanagercore.h>
#include <common/errors.h>
#include <common/utils.h>
#include <common/repositorygen.h>
-#include <common/installersettings.h>
#include <init.h>
#include <KDUpdater/UpdateOperation>
@@ -129,12 +126,12 @@ int main(int argc, char **argv)
}
}
- FakeInstaller fakeInstaller;
+ QInstaller::PackageManagerCore packageManagerCore;
if (!sdkTargetDir.isEmpty()) {
- fakeInstaller.setTargetDir(sdkTargetDir);
+ packageManagerCore.setValue(QLatin1String("TargetDir"), QFileInfo(sdkTargetDir).absoluteFilePath());
operation->setValue(QLatin1String("installer"),
- QVariant::fromValue(static_cast<QInstaller::Installer*>(&fakeInstaller)));
+ QVariant::fromValue(&packageManagerCore));
}
operation->setArguments(argumentList);
diff --git a/tools/operationrunner/operationrunner.pro b/tools/operationrunner/operationrunner.pro
index a2882cbd7..bbef403ad 100644
--- a/tools/operationrunner/operationrunner.pro
+++ b/tools/operationrunner/operationrunner.pro
@@ -10,10 +10,8 @@ CONFIG -= app_bundle
include(../../installerbuilder/libinstaller/libinstaller.pri)
# Input
-SOURCES += operationrunner.cpp \
- fakeinstaller.cpp
+SOURCES += operationrunner.cpp
-HEADERS += \
- fakeinstaller.h
+HEADERS +=
LIBS = -L../../installerbuilder/lib -linstaller $$LIBS