summaryrefslogtreecommitdiffstats
path: root/installerbuilder
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@nokia.com>2011-09-30 12:17:38 +0200
committerKarsten Heimrich <karsten.heimrich@nokia.com>2011-09-30 14:18:08 +0200
commit6f24db9d2372a27e2f57a8dac3266bde567953fe (patch)
tree45f4785b57d02ef2fa74807023f89fa4ea027be7 /installerbuilder
parent7cb720c413464af24d0c78e768f1164f2f91d7bf (diff)
Move these into private source files, Include cleanup.
Change-Id: I8118c45a015f403a3f9aa28eff2e2b3cb795d1d4 Reviewed-on: http://codereview.qt-project.org/5862 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'installerbuilder')
-rw-r--r--installerbuilder/installerbase/installerbase.cpp76
-rw-r--r--installerbuilder/installerbase/installerbase.pro4
-rw-r--r--installerbuilder/installerbase/installerbase_p.cpp74
-rw-r--r--installerbuilder/installerbase/installerbase_p.h57
4 files changed, 150 insertions, 61 deletions
diff --git a/installerbuilder/installerbase/installerbase.cpp b/installerbuilder/installerbase/installerbase.cpp
index 4256fae3e..50e645cc3 100644
--- a/installerbuilder/installerbase/installerbase.cpp
+++ b/installerbuilder/installerbase/installerbase.cpp
@@ -30,33 +30,32 @@
** (qt-info@nokia.com).
**
**************************************************************************/
-#include "common/binaryformat.h"
-#include "common/errors.h"
-#include "common/fileutils.h"
-#include "common/utils.h"
-#include "fsengineserver.h"
-#include "init.h"
+#include "installerbase_p.h"
+
#include "installerbasecommons.h"
-#include "lib7z_facade.h"
-#include "qinstallerglobal.h"
-#include "packagemanagergui.h"
#include "tabcontroller.h"
-#include "updater.h"
-#include "operationrunner.h"
+#include <common/binaryformat.h>
+#include <common/errors.h>
+#include <common/fileutils.h>
+#include <common/utils.h>
+#include <fsengineserver.h>
+#include <init.h>
+#include <lib7z_facade.h>
+#include <operationrunner.h>
#include <packagemanagercore.h>
+#include <packagemanagergui.h>
+#include <qinstallerglobal.h>
#include <settings.h>
+#include <updater.h>
-#include <QtCore/QTranslator>
-#include <QtCore/QThread>
+#include <KDToolsCore/KDSelfRestarter>
+#include <KDToolsCore/KDRunOnceChecker>
-#include <QtGui/QApplication>
+#include <QtCore/QTranslator>
#include <QtNetwork/QNetworkProxyFactory>
-#include <KDToolsCore/KDSelfRestarter>
-#include <KDToolsCore/KDRunOnceChecker>
-
#include <iostream>
#define INSTALLERBASE_VERSION "2"
@@ -64,49 +63,6 @@
using namespace QInstaller;
using namespace QInstallerCreator;
-class Sleep : public QThread
-{
-public:
- static void sleep(unsigned long ms)
- {
- QThread::usleep(ms);
- }
-};
-
-class MyApplication : public QApplication {
-public:
- MyApplication(int& argc, char ** argv) :
- QApplication(argc, argv) { }
- virtual ~MyApplication() { }
-
- // reimplemented from QApplication so we can throw exceptions in scripts and slots
- virtual bool notify(QObject * receiver, QEvent * event) {
- try {
- return QApplication::notify(receiver, event);
- } catch(std::exception& e) {
- qCritical() << "Exception thrown:" << e.what();
- }
- return false;
- }
-};
-
-class MyCoreApplication : public QCoreApplication {
-public:
- MyCoreApplication(int& argc, char ** argv) :
- QCoreApplication(argc, argv) { }
- virtual ~MyCoreApplication() { }
-
- // reimplemented from QCoreApplication so we can throw exceptions in scripts and slots
- virtual bool notify(QObject * receiver, QEvent * event) {
- try {
- return QCoreApplication::notify(receiver, event);
- } catch(std::exception& e) {
- qCritical() << "Exception thrown:" << e.what();
- }
- return false;
- }
-};
-
static QList<Repository> repositories(const QStringList &arguments, const int index)
{
QList<Repository> repoList;
diff --git a/installerbuilder/installerbase/installerbase.pro b/installerbuilder/installerbase/installerbase.pro
index 29376068a..f5530d6a7 100644
--- a/installerbuilder/installerbase/installerbase.pro
+++ b/installerbuilder/installerbase/installerbase.pro
@@ -23,10 +23,12 @@ include(../libinstaller/libinstaller.pri)
QT += network
-HEADERS += tabcontroller.h \
+HEADERS += installerbase_p.h \
+ tabcontroller.h \
installerbasecommons.h
SOURCES = installerbase.cpp \
+ installerbase_p.cpp \
tabcontroller.cpp \
installerbasecommons.cpp
diff --git a/installerbuilder/installerbase/installerbase_p.cpp b/installerbuilder/installerbase/installerbase_p.cpp
new file mode 100644
index 000000000..c4fc40f7e
--- /dev/null
+++ b/installerbuilder/installerbase/installerbase_p.cpp
@@ -0,0 +1,74 @@
+/**************************************************************************
+**
+** This file is part of Qt SDK**
+**
+** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).*
+**
+** Contact: Nokia Corporation qt-info@nokia.com**
+**
+** No Commercial Usage
+**
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception version
+** 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you are unsure which license is appropriate for your use, please contact
+** (qt-info@nokia.com).
+**
+**************************************************************************/
+#include "installerbase_p.h"
+
+#include <QtCore/QDebug>
+#include <QtGui/QMessageBox>
+
+
+// -- MyCoreApplication
+
+MyCoreApplication::MyCoreApplication(int &argc, char **argv)
+ : QCoreApplication(argc, argv)
+{
+}
+
+// reimplemented from QCoreApplication so we can throw exceptions in scripts and slots
+bool MyCoreApplication::notify(QObject *receiver, QEvent *event)
+{
+ try {
+ return QCoreApplication::notify(receiver, event);
+ } catch(std::exception &e) {
+ qCritical() << "Exception thrown:" << e.what();
+ }
+ return false;
+}
+
+
+// -- MyApplication
+
+MyApplication::MyApplication(int &argc, char **argv)
+ : QApplication(argc, argv)
+{
+}
+
+// reimplemented from QApplication so we can throw exceptions in scripts and slots
+bool MyApplication::notify(QObject *receiver, QEvent *event)
+{
+ try {
+ return QApplication::notify(receiver, event);
+ } catch(std::exception &e) {
+ qCritical() << "Exception thrown:" << e.what();
+ }
+ return false;
+}
diff --git a/installerbuilder/installerbase/installerbase_p.h b/installerbuilder/installerbase/installerbase_p.h
new file mode 100644
index 000000000..4cc8a6ce8
--- /dev/null
+++ b/installerbuilder/installerbase/installerbase_p.h
@@ -0,0 +1,57 @@
+/**************************************************************************
+**
+** This file is part of Qt SDK**
+**
+** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).*
+**
+** Contact: Nokia Corporation qt-info@nokia.com**
+**
+** No Commercial Usage
+**
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception version
+** 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you are unsure which license is appropriate for your use, please contact
+** (qt-info@nokia.com).
+**
+**************************************************************************/
+#include <QtCore/QThread>
+#include <QtGui/QApplication>
+
+class Sleep : public QThread
+{
+public:
+ static void sleep(unsigned long ms)
+ {
+ QThread::usleep(ms);
+ }
+};
+
+class MyCoreApplication : public QCoreApplication
+{
+public:
+ MyCoreApplication(int &argc, char **argv);
+ virtual bool notify(QObject *receiver, QEvent *event);
+};
+
+class MyApplication : public QApplication
+{
+public:
+ MyApplication(int &argc, char **argv);
+ virtual bool notify(QObject *receiver, QEvent *event);
+};