summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/examples/config.xml1
-rw-r--r--doc/installerfw.qdoc3
-rw-r--r--examples/examples.pro22
-rw-r--r--examples/testapp/components.xml13
-rw-r--r--examples/testapp/componentselectiondialog.cpp203
-rw-r--r--examples/testapp/componentselectiondialog.h77
-rw-r--r--examples/testapp/componentselectiondialog.ui184
-rw-r--r--examples/testapp/config.xml16
-rw-r--r--examples/testapp/config/config.xml20
-rw-r--r--examples/testapp/config/license.txt84
-rw-r--r--examples/testapp/config/logo.pngbin1592 -> 0 bytes
-rw-r--r--examples/testapp/config/qticon.icnsbin162568 -> 0 bytes
-rw-r--r--examples/testapp/config/qticon.icobin355574 -> 0 bytes
-rw-r--r--examples/testapp/config/qticon.pngbin2109 -> 0 bytes
-rw-r--r--examples/testapp/config/watermark.pngbin14462 -> 0 bytes
-rw-r--r--examples/testapp/logo.pngbin5437 -> 0 bytes
-rw-r--r--examples/testapp/main.cpp61
-rw-r--r--examples/testapp/mainwindow.cpp182
-rw-r--r--examples/testapp/mainwindow.h68
-rw-r--r--examples/testapp/packages/com.nokia.testapp.subcomponent.alwaysvisible/meta/package.xml8
-rw-r--r--examples/testapp/packages/com.nokia.testapp.subcomponent.virtual/meta/installscript.qs4
-rw-r--r--examples/testapp/packages/com.nokia.testapp.subcomponent.virtual/meta/package.xml9
-rw-r--r--examples/testapp/packages/com.nokia.testapp.subcomponent/meta/package.xml7
-rw-r--r--examples/testapp/packages/com.nokia.testapp/meta/installscript.js18
-rw-r--r--examples/testapp/packages/com.nokia.testapp/meta/package.xml9
-rw-r--r--examples/testapp/testapp.pro49
-rw-r--r--examples/testapp/testapp.qrc8
-rw-r--r--examples/testapp/updateagent.cpp119
-rw-r--r--examples/testapp/updateagent.h65
-rw-r--r--examples/testapp/updatesettingsdialog.cpp91
-rw-r--r--examples/testapp/updatesettingsdialog.h66
-rw-r--r--examples/testapp/updatesettingsdialog.ui39
-rw-r--r--examples/testapp/updatesettingswidget.cpp162
-rw-r--r--examples/testapp/updatesettingswidget.h73
-rw-r--r--examples/testapp/updatesettingswidget.ui286
-rw-r--r--installerfw.pro2
-rw-r--r--src/libs/installer/addqtcreatorarrayvalueoperation.h6
-rw-r--r--src/libs/installer/adminauthorization_win.cpp6
-rw-r--r--src/libs/installer/adminauthorization_x11.cpp2
-rw-r--r--src/libs/installer/binaryformat.h2
-rw-r--r--src/libs/installer/component.cpp26
-rw-r--r--src/libs/installer/component.h8
-rw-r--r--src/libs/installer/component_p.cpp6
-rw-r--r--src/libs/installer/componentmodel.cpp4
-rw-r--r--src/libs/installer/constants.h1
-rw-r--r--src/libs/installer/createshortcutoperation.cpp12
-rw-r--r--src/libs/installer/fsengineclient.cpp2
-rw-r--r--src/libs/installer/fsengineserver.cpp2
-rw-r--r--src/libs/installer/getrepositoriesmetainfojob.cpp1
-rw-r--r--src/libs/installer/getrepositorymetainfojob.cpp11
-rw-r--r--src/libs/installer/init.cpp2
-rw-r--r--src/libs/installer/installer.pro11
-rw-r--r--src/libs/installer/lib7z_facade.cpp10
-rw-r--r--src/libs/installer/lib7z_facade.h14
-rw-r--r--src/libs/installer/link.h2
-rw-r--r--src/libs/installer/macreplaceinstallnamesoperation.h6
-rw-r--r--src/libs/installer/messageboxhandler.cpp4
-rw-r--r--src/libs/installer/packagemanagercore.cpp51
-rw-r--r--src/libs/installer/packagemanagercore.h2
-rw-r--r--src/libs/installer/packagemanagercore_p.cpp14
-rw-r--r--src/libs/installer/packagemanagercore_p.h17
-rw-r--r--src/libs/installer/packagemanagercoredata.cpp1
-rw-r--r--src/libs/installer/packagemanagergui.cpp7
-rw-r--r--src/libs/installer/packagemanagerproxyfactory.h2
-rw-r--r--src/libs/installer/performinstallationform.h2
-rw-r--r--src/libs/installer/progresscoordinator.h6
-rw-r--r--src/libs/installer/qinstallerglobal.h6
-rw-r--r--src/libs/installer/registerqtincreatorqnxoperation.cpp (renamed from src/libs/installer/registerqtvqnxoperation.cpp)2
-rw-r--r--src/libs/installer/registerqtincreatorqnxoperation.h (renamed from src/libs/installer/registerqtvqnxoperation.h)6
-rw-r--r--src/libs/installer/settings.cpp8
-rw-r--r--src/libs/installer/settings.h1
-rw-r--r--src/libs/installer/utils.h2
-rw-r--r--src/libs/kdtools/kdsysinfo_win.cpp2
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperation.cpp2
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperations.cpp2
-rw-r--r--src/sdk/installerbase_p.h2
-rw-r--r--src/sdk/settingsdialog.cpp52
-rw-r--r--src/sdk/settingsdialog.h10
-rw-r--r--tests/auto/installer/settings/data/full_config.xml1
-rw-r--r--tests/auto/installer/settings/tst_settings.cpp1
-rw-r--r--tools/common/repositorygen.cpp2
-rw-r--r--tools/repogenfromonlinerepo/downloadmanager.h2
-rw-r--r--tools/repogenfromonlinerepo/main.cpp4
83 files changed, 174 insertions, 2120 deletions
diff --git a/doc/examples/config.xml b/doc/examples/config.xml
index c234bab25..daf212711 100644
--- a/doc/examples/config.xml
+++ b/doc/examples/config.xml
@@ -8,6 +8,7 @@
<Logo>logo.png</Logo>
<Watermark>watermark.png</Watermark>
<RunProgram></RunProgram>
+ <RunProgramArguments></RunProgramArguments>
<RunProgramDescription></RunProgramDescription>
<StartMenuDir>Some Application Entry Dir</StartMenuDir>
<UninstallerName>SDKMaintenanceTool</UninstallerName>
diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc
index c57260e91..00d602bce 100644
--- a/doc/installerfw.qdoc
+++ b/doc/installerfw.qdoc
@@ -200,6 +200,9 @@
\o Command executed after the installer is done if the user accepts
the action.
\row
+ \o RunProgramArguments
+ \o Arguments passed to the program specified in RunProgram.
+ \row
\o RunProgramDescription
\o Text shown next to the check box for running the program after
the installation. Defaults to \gui {Run <Name>}.
diff --git a/examples/examples.pro b/examples/examples.pro
deleted file mode 100644
index 854677b57..000000000
--- a/examples/examples.pro
+++ /dev/null
@@ -1,22 +0,0 @@
-CONFIG += ordered
-TEMPLATE = subdirs
-
-EXTRASUBDIRS = testapp
-
-
-include(../installerfw.pri)
-
-!isEqual(IFW_SOURCE_TREE, $$IFW_BUILD_TREE) {
- for(SUBDIR, EXTRASUBDIRS) {
- mkdir.commands += $$QMAKE_MKDIR $$SUBDIR $${IFW_NEWLINE}
- }
- QMAKE_EXTRA_TARGETS += mkdir
-}
-
-for(SUBDIR, EXTRASUBDIRS) {
- examples.commands += cd $$SUBDIR && $(QMAKE) -r $$PWD/$$SUBDIR && $(MAKE) $${IFW_NEWLINE}
-}
-!isEqual(IFW_SOURCE_TREE, $$IFW_BUILD_TREE) {
- examples.depends = mkdir
-}
-QMAKE_EXTRA_TARGETS += examples
diff --git a/examples/testapp/components.xml b/examples/testapp/components.xml
deleted file mode 100644
index ce4e15ad5..000000000
--- a/examples/testapp/components.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<Packages>
- <ApplicationName>Test App</ApplicationName>
- <ApplicationVersion>1</ApplicationVersion>
- <Package>
- <Name>Test App</Name>
- <Pixmap></Pixmap>
- <Title></Title>
- <Description></Description>
- <Version>1</Version>
- <LastUpdateDate></LastUpdateDate>
- <InstallDate>2009-12-01</InstallDate>
- </Package>
-</Packages>
diff --git a/examples/testapp/componentselectiondialog.cpp b/examples/testapp/componentselectiondialog.cpp
deleted file mode 100644
index c56ee5413..000000000
--- a/examples/testapp/componentselectiondialog.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "componentselectiondialog.h"
-#include "ui_componentselectiondialog.h"
-
-#include <component.h>
-#include <componentmodel.h>
-#include <packagemanagercore.h>
-
-#include <QHeaderView>
-#include <QPushButton>
-
-using namespace QInstaller;
-
-class ComponentSelectionDialog::Private : public QObject
-{
- Q_OBJECT
-
-public:
- Private(ComponentSelectionDialog *qq, PackageManagerCore *core)
- : q(qq),
- m_core(core)
- {
- }
-
- void currentChanged(const QModelIndex &index)
- {
- installBtn->setEnabled(componentModel->hasCheckedComponents());
- const int selectionCount = componentModel->checkedComponents().count();
- installBtn->setText(selectionCount > 1 ? tr("Install %1 Items").arg(selectionCount) :
- selectionCount == 1 ? tr("Install 1 Item") : tr("Install"));
- ui.buttonBox->button(QDialogButtonBox::Cancel)->setText(selectionCount > 0 ? tr("Cancel")
- : tr("Close"));
-
- if (index.isValid()) {
- ui.textBrowser->setHtml(componentModel->data(componentModel->index(index.row(), 0,
- index.parent()), Qt::ToolTipRole).toString());
- } else {
- ui.textBrowser->clear();
- }
- }
-
- void modelReset()
- {
- ui.treeView->header()->resizeSection(0, ui.labelTitle->sizeHint().width() / 1.5);
- ui.treeView->header()->setStretchLastSection(true);
- for (int i = 0; i < ui.treeView->model()->columnCount(); ++i)
- ui.treeView->resizeColumnToContents(i);
-
- bool hasChildren = false;
- const int rowCount = ui.treeView->model()->rowCount();
- for (int row = 0; row < rowCount && !hasChildren; ++row)
- hasChildren = ui.treeView->model()->hasChildren(ui.treeView->model()->index(row, 0));
- ui.treeView->setRootIsDecorated(hasChildren);
- ui.treeView->expandToDepth(0);
- }
-
-private:
- ComponentSelectionDialog *const q;
-
-public:
- Ui::ComponentSelectionDialog ui;
- PackageManagerCore *const m_core;
- ComponentModel *componentModel;
- QPushButton *installBtn;
-
-public Q_SLOTS:
- void selectAll();
- void deselectAll();
-};
-
-void ComponentSelectionDialog::Private::selectAll()
-{
- componentModel->selectAll();
-}
-
-void ComponentSelectionDialog::Private::deselectAll()
-{
- componentModel->deselectAll();
-}
-
-
-// -- ComponentSelectionDialog
-
-ComponentSelectionDialog::ComponentSelectionDialog(PackageManagerCore *core, QWidget *parent)
- : QDialog(parent),
- d(new Private(this, core))
-{
- d->ui.setupUi(this);
- d->ui.icon->setPixmap(windowIcon().pixmap(48, 48));
-
- d->ui.splitter->setStretchFactor(0, 2);
- d->ui.splitter->setStretchFactor(1, 1);
- d->ui.splitter->setCollapsible(0, false);
-
- d->componentModel = new ComponentModel(4, core);
- d->componentModel->setHeaderData(0, Qt::Horizontal, tr("Name"));
- d->componentModel->setHeaderData(1, Qt::Horizontal, tr("Installed Version"));
- d->componentModel->setHeaderData(2, Qt::Horizontal, tr("New Version"));
- d->componentModel->setHeaderData(3, Qt::Horizontal, tr("Size"));
-
- d->ui.treeView->setModel(d->componentModel);
- d->ui.treeView->setAttribute(Qt::WA_MacShowFocusRect, false);
- connect(d->ui.treeView->model(), SIGNAL(modelReset()), this, SLOT(modelReset()));
- connect(d->ui.treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)),
- this, SLOT(currentChanged(QModelIndex)));
-
- d->ui.labelSubTitle->setAttribute(Qt::WA_MacSmallSize);
- d->ui.labelLicenseBlurb->setAttribute(Qt::WA_MacSmallSize);
- d->ui.textBrowser->setAttribute(Qt::WA_MacShowFocusRect, false);
-
- d->installBtn = d->ui.buttonBox->addButton(tr("Install"), QDialogButtonBox::AcceptRole) ;
- if (!d->ui.buttonBox->button(QDialogButtonBox::Cancel)->icon().isNull())
- d->installBtn->setIcon(style()->standardIcon(QStyle::SP_DialogOkButton));
-
- connect(d->installBtn, SIGNAL(clicked()), this, SIGNAL(requestUpdate()));
- connect(d->ui.selectAll, SIGNAL(clicked()), d, SLOT(selectAll()), Qt::QueuedConnection);
- connect(d->ui.deselectAll, SIGNAL(clicked()), d, SLOT(deselectAll()), Qt::QueuedConnection);
-
- d->ui.treeView->header()->setStretchLastSection(true);
- d->ui.treeView->setCurrentIndex(d->ui.treeView->model()->index(0, 0));
- for (int i = 0; i < d->ui.treeView->model()->columnCount(); ++i)
- d->ui.treeView->resizeColumnToContents(i);
- d->modelReset();
-}
-
-ComponentSelectionDialog::~ComponentSelectionDialog()
-{
- delete d;
-}
-
-void ComponentSelectionDialog::selectAll()
-{
- d->selectAll();
-}
-
-void ComponentSelectionDialog::deselectAll()
-{
- d->deselectAll();
-}
-
-void ComponentSelectionDialog::install()
-{
- emit requestUpdate();
-}
-
-void ComponentSelectionDialog::selectComponent(const QString &id)
-{
- const QModelIndex &idx = d->componentModel->indexFromComponentName(id);
- if (!idx.isValid())
- return;
- d->componentModel->setData(idx, Qt::Checked, Qt::CheckStateRole);
-}
-
-void ComponentSelectionDialog::deselectComponent(const QString &id)
-{
- const QModelIndex &idx = d->componentModel->indexFromComponentName(id);
- if (!idx.isValid())
- return;
- d->componentModel->setData(idx, Qt::Unchecked, Qt::CheckStateRole);
-}
-
-#include "moc_componentselectiondialog.cpp"
-#include "componentselectiondialog.moc"
diff --git a/examples/testapp/componentselectiondialog.h b/examples/testapp/componentselectiondialog.h
deleted file mode 100644
index cb0134481..000000000
--- a/examples/testapp/componentselectiondialog.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef COMPONENTSELECTIONDIALOG_H
-#define COMPONENTSELECTIONDIALOG_H
-
-#include <QDialog>
-
-namespace QInstaller {
- class PackageManagerCore;
-}
-
-class ComponentSelectionDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- explicit ComponentSelectionDialog(QInstaller::PackageManagerCore *core, QWidget *parent = 0);
- virtual ~ComponentSelectionDialog();
-
- Q_INVOKABLE void selectComponent(const QString &compoenent);
- Q_INVOKABLE void deselectComponent(const QString &component);
- Q_INVOKABLE void selectAll();
- Q_INVOKABLE void deselectAll();
- Q_INVOKABLE void install();
-
-Q_SIGNALS:
- void requestUpdate();
-
-private:
- Q_PRIVATE_SLOT(d, void modelReset())
- Q_PRIVATE_SLOT(d, void currentChanged(const QModelIndex &index))
-
-private:
- class Private;
- Private *d;
-};
-
-#endif
diff --git a/examples/testapp/componentselectiondialog.ui b/examples/testapp/componentselectiondialog.ui
deleted file mode 100644
index 74f3b3fe4..000000000
--- a/examples/testapp/componentselectiondialog.ui
+++ /dev/null
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ComponentSelectionDialog</class>
- <widget class="QDialog" name="ComponentSelectionDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>656</width>
- <height>409</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Software Update</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0" rowspan="3">
- <widget class="QLabel" name="icon">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="pixmap">
- <pixmap resource="testapp.qrc">:/logo.png</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="labelTitle">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>All available updates are shown below.</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" rowspan="2">
- <widget class="QLabel" name="labelSubTitle">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Installing this software may take some time. If you're not ready to install now, you can choose Software Update from the menu later.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QSplitter" name="splitter">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <widget class="QTreeView" name="treeView">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- <widget class="QTextBrowser" name="textBrowser">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0">
- <item>
- <widget class="QPushButton" name="selectAll">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Select All</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="deselectAll">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Deselect All</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="labelLicenseBlurb">
- <property name="text">
- <string>Note: Use of this software is subject to the original Software License Agreement(s) that accompanied the software being updated.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources>
- <include location="testapp.qrc"/>
- </resources>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>ComponentSelectionDialog</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
diff --git a/examples/testapp/config.xml b/examples/testapp/config.xml
deleted file mode 100644
index bc00e2c20..000000000
--- a/examples/testapp/config.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<Installer>
- <Name>Test App</Name>
- <Version>1</Version>
- <Title>Test App</Title>
- <Publisher>Nokia</Publisher>
- <ProductUrl>http://qt.nokia.com</ProductUrl>
-
- <!-- @homeDir@ and @rootDir@ are some of the supported vars -->
- <TargetDir>@homeDir@/testinstall</TargetDir>
- <RemoteRepositories>
- <Repository>
- <Url>http://www.kdab.com/~christoph/testapp</Url>
- </Repository>
- </RemoteRepositories>
-</Installer>
diff --git a/examples/testapp/config/config.xml b/examples/testapp/config/config.xml
deleted file mode 100644
index e49ab7337..000000000
--- a/examples/testapp/config/config.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<Installer>
- <Name>Test App</Name>
- <Version>1.0.0</Version>
- <Title>Test App_Hurra</Title>
- <Publisher>Digia</Publisher>
- <ProductUrl>http://qt.digia.com</ProductUrl>
-
- <Icon>qticon</Icon>
- <Watermark>watermark.png</Watermark>
- <UninstallerName>TestAppUninstaller</UninstallerName>
- <RemoteRepositories>
- <Repository>
- <Url>http://www.example.com/repository</Url>
- </Repository>
- </RemoteRepositories>
-
- <!-- @homeDir@ and @rootDir@ are some of the supported vars -->
- <TargetDir>@homeDir@/testinstall</TargetDir>
-</Installer>
diff --git a/examples/testapp/config/license.txt b/examples/testapp/config/license.txt
deleted file mode 100644
index a55990fe3..000000000
--- a/examples/testapp/config/license.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-For individuals and/or legal entities resident in the American Continent (including those resident in Canada, South America, and the United States of America), the applicable licensing terms are specified under the heading "Trolltech Technology Preview License
-Agreement: American Continent".
-
-For individuals and/or legal entities not resident in the American Continent, the applicable licensing terms are specified under the heading "Trolltech Technology Preview License Agreement: Norway".
-
-TROLLTECH TECHNOLOGY PREVIEW LICENSE AGREEMENT: AMERICAN CONTINENT Agreement version 2.0
-IMPORTANT-READ CAREFULLY:
-
-1. This Trolltech Technology Preview License Agreement ("Agreement") is a legal agreement between you (either an individual or a legal entity) and Trolltech, Inc. ("Trolltech"), and pertains to the Trolltech software product(s) accompanying this Agreement, which include(s) computer software and may include "online" or electronic documentation, associated media, and printed materials, including the source code, example programs and the documentation ("Licensed Software").
-
-2. The Licensed Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. Trolltech retains all rights not expressly granted. No title, property rights or copyright in the Licensed Software or in any modifications to the Licensed Software shall pass to the Licensee under any circumstances. The Licensed Software is licensed, not sold.
-
-3. By installing, copying, or otherwise using the Licensed Software, Licensee agrees to be bound by the terms of this Agreement. If Licensee does not agree to the terms of this Agreement, Licensee should not install, copy, or otherwise use the Licensed Software.
-
-4. Upon Licensee's acceptance of the terms and conditions of this Agreement, Trolltech grants Licensee the right to use the Licensed Software in the manner provided below.
-
-5. Trolltech grants to Licensee as an individual a personal, non-exclusive, non-transferable license to make and use copies of the Licensed Software for the sole purpose of evaluating and testing the Licensed Software and/or providing feedback to Trolltech. Licensee may install copies of the Licensed Software on an unlimited number of computers provided that Licensee is the only individual using the Licensed Software. If Licensee is an entity, Trolltech grants Licensee the right to designate one, and only one, individual within Licensee's organization who shall have the sole right to use the Licensed Software in the manner provided in this Agreement. Licensee may, at any time, but not more frequently than once every six (6) months, designate another individual to replace the current designated user by notifying Trolltech, so long as there is no more than one (1) designated user at any given time
-
-6. Licensee may not loan, rent, lease, or license the Licensed Software or any copy of it. Licensee may not alter or remove any details of ownership, copyright, trademark or other property right connected with the Licensed Software. Licensee may not modify or distribute the Licensed Software. Licensee may not distribute any software statically or dynamically linked with the Licensed Software.
-
-7. This Licensed Software is time-limited. All rights granted to Licensee in this Agreement will be void three (3) months after Licensee received the Licensed Software.
-
-8. The Licensed Software may provide links to third party libraries or code (collectively "Third Party Libraries") to implement various functions. Third Party Libraries do not comprise part of the Licensed Software. In some cases, access to Third Party Libraries may be included along with the Licensed Software delivery as a convenience for development and testing only. Such source code and libraries as are or may be listed in the ".../src/3rdparty" source tree delivered with the Licensed Software, as may be amended from time to time, do not comprise the Licensed Software. Licensee acknowledges (1) that some Third Party Libraries may require additional licensing of copyright and patents from the owners of such, and (2) that distribution of any of the Licensed Software referencing any portion of a Third Party Library may require appropriate licensing from such third parties.
-
-9. Pre-Release Code, Non-Commercial Use: The Licensed Software contains Pre-release Code that is not at the level of performance and compatibility of a final, generally available, product offering. The Licensed Software may not operate correctly and may be substantially modified prior to the first commercial shipment, if any. Trolltech is not obligated to make this or any later version of the Licensed Software commercially available. The License Software is "Not for Commercial Use" and may only be used for the purposes described in Section 5. You may not use the Licensed Software in a live operating environment where it may be relied upon to perform in the same manner as a commercially released product or with data that has not been sufficiently backed up.
-
-10. WARRANTY DISCLAIMER: THE LICENSED SOFTWARE IS LICENSED TO LICENSEE "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, TROLLTECH ON BEHALF OF ITSELF AND ITS SUPPLIERS, DISCLAIMS ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT WITH REGARD TO THE LICENSED SOFTWARE.
-
-11. LIMITATION OF LIABILITY: IF, TROLLTECH'S WARRANTY DISCLAIMER NOTWITHSTANDING, TROLLTECH IS HELD LIABLE TO LICENSEE, WHETHER IN CONTRACT, TORT OR ANY OTHER LEGAL THEORY, BASED ON THE LICENSED SOFTWARE, TROLLTECH'S ENTIRE LIABILITY TO LICENSEE AND LICENSEE'S EXCLUSIVE REMEDY SHALL BE, AT TROLLTECH'S OPTION, EITHER (A) RETURN OF THE PRICE LICENSEE PAID FOR THE LICENSED SOFTWARE, OR (B) REPAIR OR REPLACEMENT OF THE LICENSED SOFTWARE, PROVIDED LICENSEE RETURNS TO TROLLTECH ALL COPIES OF THE LICENSED SOFTWARE AS ORIGINALLY DELIVERED TO LICENSEE. TROLLTECH SHALL NOT UNDER ANY CIRCUMSTANCES BE LIABLE TO LICENSEE BASED ON FAILURE OF THE LICENSED SOFTWARE IF THE FAILURE RESULTED FROM ACCIDENT, ABUSE OR MISAPPLICATION, NOR SHALL TROLLTECH UNDER ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL DAMAGES, PUNITIVE OR EXEMPLARY DAMAGES, DAMAGES FOR LOSS OF PROFITS OR INTERRUPTION OF BUSINESS OR FOR LOSS OR CORRUPTION OF DATA. ANY AWARD OF DAMAGES FROM TROLLTECH TO LICENSEE SHALL NOT EXCEED THE TOTAL AMOUNT LICENSEE HAS PAID TO TROLLTECH IN CONNECTION WITH THIS AGREEMENT.
-
-12. Termination: Without prejudice to any other rights, Trolltech may terminate this Agreement if Licensee fails to comply with the terms and conditions of this Agreement. In such event, Licensee must destroy all copies of the Licensed Software and all of its components.
-
-13. Export Restrictions: Licensee agrees not to export or re-export the Licensed Software, any part thereof, or any process or service that is the direct product of the Licensed Software. Licensee may not sell, resell, or otherwise transfer for value, the Licensed Software (the foregoing collectively referred to as the "Restricted Components"), to any country, person, entity or end user subject to U.S. export restrictions. Licensee specifically agrees not to export or re-export any of the Restricted Components (i) to any country to which the U.S. has embargoed or restricted the export of goods or services, which currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria, or to any national of any such country, wherever located, who intends to transmit or transport the Restricted Components back to such country; (ii) to any end-user who Licensee knows or has reason to know will utilize the Restricted Components in the design, development or production of nuclear, chemical or biological weapons; or (iii) to any end-user who has been prohibited from participating in U.S. export transactions by any federal agency of the U.S. government. Licensee warrants and represents that neither the U.S. Commerce Department, Bureau of Export Administration nor any other U.S. federal agency has suspended, revoked or denied Licensee's export privileges.
-
-14. Government End Users: A "U.S. Government End User" shall mean any agency or entity of the government of the United States. The following shall apply if Licensee is a U.S. Government End User. The Licensed Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire the Licensed Software with only those rights set forth herein. The Licensed Software (including related documentation) is provided to U.S. Government End Users: (a) only as a commercial end item; and (b) only pursuant to this Agreement.
-
-15. Compliance with local laws: Licensee shall comply with all applicable laws and regulations relating to the Licensed Software in the United States and in other countries in which Licensee uses or modifies the Licensed Software. Without limiting the generality of the foregoing, Licensee shall not export, re-export, disclose or distribute any of the Licensed Software in violation of any applicable laws or regulations, including the export laws and regulations of the United States, and shall comply with all such laws and regulations.
-
-16. Entire Agreement: This Agreement constitutes the complete agreement between the parties and supersedes all prior or contemporaneous discussions, representations, and proposals, written or oral, with respect to the subject matters discussed herein. No modification of this Agreement will be effective unless contained in a writing executed by an authorized representative of each party. No term or condition contained in Licensee's purchase order will apply unless expressly accepted by Trolltech in writing. If any provision of the Agreement is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in this Agreement shall remain in effect.
-
-17. Governing law, legal venue: This Agreement shall be construed, interpreted and governed by the laws of the State of California, USA. Any action or proceeding arising from or relating to this Agreement shall be brought in a federal court in the Northern District of California or in the State Court in Santa Clara County, California, and each party irrevocably submits to the personal jurisdiction of any such court in any such action or proceeding. The Agreement gives Licensee specific legal rights; Licensee may have others, which vary from state to state and from country to country. Trolltech reserves all rights not specifically granted in this Agreement.
-
-
-
-
-For legal entities and/or individuals residing in any country other than Canada, the United States of America or South America:
-TROLLTECH TECHNOLOGY PREVIEW LICENSE AGREEMENT: NORWAY
-
-Agreement version 2.0
-IMPORTANT-READ CAREFULLY:
-
-1. This Trolltech Technology Preview License Agreement ("Agreement") is a legal agreement between you (either an individual or a legal entity) and Trolltech ASA ("Trolltech"), and pertains to the Trolltech software product(s) accompanying this Agreement, which include(s) computer software and may include "online" or electronic documentation, associated media, and printed materials, including the source code, example programs and the documentation ("Licensed Software").
-
-2. The Licensed Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. Trolltech retains all rights not expressly granted. No title, property rights or copyright in the Licensed Software or in any modifications to the Licensed Software shall pass to the Licensee under any circumstances. The Licensed Software is licensed, not sold.
-
-3. By installing, copying, or otherwise using the Licensed Software, Licensee agrees to be bound by the terms of this Agreement. If Licensee does not agree to the terms of this Agreement, Licensee should not install, copy, or otherwise use the Licensed Software.
-
-4. Upon Licensee's acceptance of the terms and conditions of this Agreement, Trolltech grants Licensee the right to use the Licensed Software in the manner provided below.
-
-5. Trolltech grants to Licensee as an individual a personal, non-exclusive, non-transferable license to make and use copies of the Licensed Software for the sole purpose of evaluating and testing the Licensed Software and/or providing feedback to Trolltech. Licensee may install copies of the Licensed Software on an unlimited number of computers provided that Licensee is the only individual using the Licensed Software. If Licensee is an entity, Trolltech grants Licensee the right to designate one, and only one, individual within Licensee's organization who shall have the sole right to use the Licensed Software in the manner provided in this Agreement. Licensee may, at any time, but not more frequently than once every six (6) months, designate another individual to replace the current designated user by notifying Trolltech, so long as there is no more than one (1) designated user at any given time
-
-6. Licensee may not loan, rent, lease, or license the Licensed Software or any copy of it. Licensee may not alter or remove any details of ownership, copyright, trademark or other property right connected with the Licensed Software. Licensee may not modify or distribute the Licensed Software. Licensee may not distribute any software statically or dynamically linked with the Licensed Software.
-
-7. This Licensed Software is time-limited. All rights granted to Licensee in this Agreement will be void three (3) months after Licensee received the Licensed Software.
-
-8. The Licensed Software may provide links to third party libraries or code (collectively "Third Party Libraries") to implement various functions. Third Party Libraries do not comprise part of the Licensed Software. In some cases, access to Third Party Libraries may be included along with the Licensed Software delivery as a convenience for development and testing only. Such source code and libraries as are or may be listed in the ".../src/3rdparty" source tree delivered with the Licensed Software, as may be amended from time to time, do not comprise the Licensed Software. Licensee acknowledges (1) that some Third Party Libraries may require additional licensing of copyright and patents from the owners of such, and (2) that distribution of any of the Licensed Software referencing any portion of a Third Party Library may require appropriate licensing from such third parties.
-
-9. Pre-Release Code, Non-Commercial Use: The Licensed Software contains Pre-release Code that is not at the level of performance and compatibility of a final, generally available, product offering. The Licensed Software may not operate correctly and may be substantially modified prior to the first commercial shipment, if any. Trolltech is not obligated to make this or any later version of the Licensed Software commercially available. The License Software is "Not for Commercial Use" and may only be used for the purposes described in Section 5. You may not use the Licensed Software in a live operating environment where it may be relied upon to perform in the same manner as a commercially released product or with data that has not been sufficiently backed up.
-
-10. WARRANTY DISCLAIMER: THE LICENSED SOFTWARE IS LICENSED TO LICENSEE "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, TROLLTECH ON BEHALF OF ITSELF AND ITS SUPPLIERS, DISCLAIMS ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT WITH REGARD TO THE LICENSED SOFTWARE.
-
-11. LIMITATION OF LIABILITY: IF, TROLLTECH'S WARRANTY DISCLAIMER NOTWITHSTANDING, TROLLTECH IS HELD LIABLE TO LICENSEE, WHETHER IN CONTRACT, TORT OR ANY OTHER LEGAL THEORY, BASED ON THE LICENSED SOFTWARE, TROLLTECH'S ENTIRE LIABILITY TO LICENSEE AND LICENSEE'S EXCLUSIVE REMEDY SHALL BE, AT TROLLTECH'S OPTION, EITHER (A) RETURN OF THE PRICE LICENSEE PAID FOR THE LICENSED SOFTWARE, OR (B) REPAIR OR REPLACEMENT OF THE LICENSED SOFTWARE, PROVIDED LICENSEE RETURNS TO TROLLTECH ALL COPIES OF THE LICENSED SOFTWARE AS ORIGINALLY DELIVERED TO LICENSEE. TROLLTECH SHALL NOT UNDER ANY CIRCUMSTANCES BE LIABLE TO LICENSEE BASED ON FAILURE OF THE LICENSED SOFTWARE IF THE FAILURE RESULTED FROM ACCIDENT, ABUSE OR MISAPPLICATION, NOR SHALL TROLLTECH UNDER ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL DAMAGES, PUNITIVE OR EXEMPLARY DAMAGES, DAMAGES FOR LOSS OF PROFITS OR INTERRUPTION OF BUSINESS OR FOR LOSS OR CORRUPTION OF DATA. ANY AWARD OF DAMAGES FROM TROLLTECH TO LICENSEE SHALL NOT EXCEED THE TOTAL AMOUNT LICENSEE HAS PAID TO TROLLTECH IN CONNECTION WITH THIS AGREEMENT.
-
-12. Termination: Without prejudice to any other rights, Trolltech may terminate this Agreement if Licensee fails to comply with the terms and conditions of this Agreement. In such event, Licensee must destroy all copies of the Licensed Software and all of its components.
-
-13. Export Restrictions: Licensee agrees not to export or re-export the Licensed Software, any part thereof, or any process or service that is the direct product of the Licensed Software. Licensee may not sell, resell, or otherwise transfer for value, the Licensed Software (the foregoing collectively referred to as the "Restricted Components"), to any country, person, entity or end user subject to U.S. export restrictions. Licensee specifically agrees not to export or re-export any of the Restricted Components (i) to any country to which the U.S. has embargoed or restricted the export of goods or services, which currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria, or to any national of any such country, wherever located, who intends to transmit or transport the Restricted Components back to such country; (ii) to any end-user who Licensee knows or has reason to know will utilize the Restricted Components in the design, development or production of nuclear, chemical or biological weapons; or (iii) to any end-user who has been prohibited from participating in U.S. export transactions by any federal agency of the U.S. government. Licensee warrants and represents that neither the U.S. Commerce Department, Bureau of Export Administration nor any other U.S. federal agency has suspended, revoked or denied Licensee's export privileges.
-
-14. Government End Users: A "U.S. Government End User" shall mean any agency or entity of the government of the United States. The following shall apply if Licensee is a U.S. Government End User. The Licensed Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire the Licensed Software with only those rights set forth herein. The Licensed Software (including related documentation) is provided to U.S. Government End Users: (a) only as a commercial end item; and (b) only pursuant to this Agreement.
-
-15. Compliance with local laws: Licensee shall comply with all applicable laws and regulations relating to the Licensed Software in the United States and in other countries in which Licensee uses or modifies the Licensed Software. Without limiting the generality of the foregoing, Licensee shall not export, re-export, disclose or distribute any of the Licensed Software in violation of any applicable laws or regulations, including the export laws and regulations of the United States, and shall comply with all such laws and regulations.
-
-16. Entire Agreement: This Agreement constitutes the complete agreement between the parties and supersedes all prior or contemporaneous discussions, representations, and proposals, written or oral, with respect to the subject matters discussed herein. No modification of this Agreement will be effective unless contained in a writing executed by an authorized representative of each party. No term or condition contained in Licensee's purchase order will apply unless expressly accepted by Trolltech in writing. If any provision of the Agreement is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in this Agreement shall remain in effect.
-
-17. Governing law, legal venue: This Agreement shall be construed, interpreted and governed by the laws of Norway, the legal venue to be Oslo City Court. Trolltech reserves all rights not specifically granted in this Agreement.
diff --git a/examples/testapp/config/logo.png b/examples/testapp/config/logo.png
deleted file mode 100644
index 8a9562614..000000000
--- a/examples/testapp/config/logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/testapp/config/qticon.icns b/examples/testapp/config/qticon.icns
deleted file mode 100644
index 6291dd397..000000000
--- a/examples/testapp/config/qticon.icns
+++ /dev/null
Binary files differ
diff --git a/examples/testapp/config/qticon.ico b/examples/testapp/config/qticon.ico
deleted file mode 100644
index 9e1b83f1b..000000000
--- a/examples/testapp/config/qticon.ico
+++ /dev/null
Binary files differ
diff --git a/examples/testapp/config/qticon.png b/examples/testapp/config/qticon.png
deleted file mode 100644
index d68b205cd..000000000
--- a/examples/testapp/config/qticon.png
+++ /dev/null
Binary files differ
diff --git a/examples/testapp/config/watermark.png b/examples/testapp/config/watermark.png
deleted file mode 100644
index b07780d9d..000000000
--- a/examples/testapp/config/watermark.png
+++ /dev/null
Binary files differ
diff --git a/examples/testapp/logo.png b/examples/testapp/logo.png
deleted file mode 100644
index 3d5865a60..000000000
--- a/examples/testapp/logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/testapp/main.cpp b/examples/testapp/main.cpp
deleted file mode 100644
index b1b039822..000000000
--- a/examples/testapp/main.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#include "mainwindow.h"
-
-#include <init.h>
-
-#include <kdselfrestarter.h>
-
-#include <QApplication>
-
-
-int main(int argc, char *argv[])
-{
- QInstaller::init();
- const KDSelfRestarter restarter(argc, argv);
-
- QApplication app(argc, argv);
- MainWindow mw(app.arguments());
- mw.show();
-
- return app.exec();
-}
diff --git a/examples/testapp/mainwindow.cpp b/examples/testapp/mainwindow.cpp
deleted file mode 100644
index 016b568af..000000000
--- a/examples/testapp/mainwindow.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-#include "mainwindow.h"
-
-#include "componentselectiondialog.h"
-#include "updateagent.h"
-#include "updatesettingsdialog.h"
-
-#include <binaryformat.h>
-#include <errors.h>
-#include <updatesettings.h>
-
-#include <kdselfrestarter.h>
-
-#include <QAbstractButton>
-#include <QApplication>
-#include <QLabel>
-#include <QMenuBar>
-#include <QMessageBox>
-#include <QProgressDialog>
-
-using namespace QInstaller;
-using namespace QInstallerCreator;
-
-MainWindow::MainWindow(const QStringList &args, QWidget *parent)
- : QMainWindow(parent)
- , m_dialog(new UpdateSettingsDialog(this))
-{
- m_core.setUpdater();
-
- QMenu *fm = menuBar()->addMenu(QObject::tr("File"));
- fm->addAction(QObject::tr("Check for Updates"), this, SLOT(checkForUpdates()),
- QKeySequence(QLatin1String("Ctrl+U")));
- fm->addAction(QObject::tr("Update Settings"), this, SLOT(editUpdateSettings()));
- fm->addAction(QObject::tr("Quit"), QApplication::instance(), SLOT(quit()),
- QKeySequence(QLatin1String("Ctrl+Q")));
-
- QLabel *label = new QLabel(this);
- label->setWordWrap(true);
- label->setAlignment(Qt::AlignCenter);
- setCentralWidget(label);
- label->setText(QString::fromLatin1("Version: %1\n").arg(m_core.settings().applicationVersion())
- + args.join(QLatin1String(" ")));
-
- UpdateAgent *const agent = new UpdateAgent(this);
- connect(agent, SIGNAL(updatesAvailable()), this, SLOT(updatesAvailable()));
-}
-
-void MainWindow::editUpdateSettings()
-{
- connect(m_dialog, SIGNAL(checkForUpdates()), this, SLOT(checkForUpdates()));
- m_dialog->show();
-}
-
-void MainWindow::checkForUpdates()
-{
- QScopedPointer<BinaryFormatEngineHandler> handler(new BinaryFormatEngineHandler(ComponentIndex()));
- handler->setComponentIndex(QInstallerCreator::ComponentIndex());
-
- UpdateSettings settings;
- try {
- // TODO: check what this should have done
- //m_core.setTemporaryRepositories(settings.repositories());
- settings.setLastCheck(QDateTime::currentDateTime());
-
- if (!m_core.fetchRemotePackagesTree()) {
- settings.setLastResult(tr("Software Update failed."));
- QMessageBox::information(this, tr("Check for Updates"), tr("Failed to retrieve updates!"));
- return;
- }
-
- // no updates for us
- if (m_core.updaterComponents().isEmpty()) {
- QMessageBox::information(this, tr("Check for Updates"), tr("There are currently no updates "
- "available for you."));
- return;
- }
-
- // TODO: fix this, set the target directory to the actual one
- // m_core.setValue(scTargetDir, QFileInfo(updaterapp.packagesInfo()->fileName()).absolutePath());
-
- // this will automatically mark components as to get installed
- ComponentSelectionDialog componentSelection(&m_core, this);
- if (componentSelection.exec() == QDialog::Rejected)
- return;
-
- QProgressDialog dialog(this);
- dialog.setRange(0, 100);
- dialog.show();
- connect(&dialog, SIGNAL(canceled()), &m_core, SLOT(interrupt()));
- connect(&m_core, SIGNAL(installationProgressTextChanged(QString)), &dialog,
- SLOT(setLabelText(QString)));
- connect(&m_core, SIGNAL(installationProgressChanged(int)), &dialog, SLOT(setValue(int)));
- //m_core.installSelectedComponents(); //method doesn't exist anymore
- updatesInstalled();
- } catch (const QInstaller::Error &error) {
- QMessageBox::critical(this, tr("Check for Updates"), tr("Error while installing updates:\n%1")
- .arg(error.message()));
- m_core.rollBackInstallation();
- settings.setLastResult(tr("Software Update failed."));
- } catch (...) {
- QMessageBox::critical(this, tr("Check for Updates"), tr("Unknown error while installing updates."));
- m_core.rollBackInstallation();
- settings.setLastResult(tr("Software Update failed."));
- }
-}
-
-void MainWindow::updatesAvailable()
-{
- QScopedPointer<QMessageBox> box(new QMessageBox(this));
- box->setWindowTitle(tr("Updates Available"));
- box->setText(tr("Software updates are available for your computer. Do you want to install them?"));
- box->setStandardButtons(QMessageBox::Yes|QMessageBox::No);
- box->button(QMessageBox::Yes)->setText(tr("Continue"));
- box->button(QMessageBox::No)->setText(tr("Not Now"));
- box->exec();
-
- if (box && box->clickedButton() == box->button(QMessageBox::Yes))
- checkForUpdates();
-}
-
-void MainWindow::updatesInstalled()
-{
- // only ask that dumb question if a SelfUpdateOperation was executed
- if (!KDSelfRestarter::restartOnQuit()) {
- QMessageBox::information(this, tr("Updates Installed"), tr("Installation complete."));
- return;
- }
-
- QScopedPointer<QMessageBox> box(new QMessageBox(this));
- box->setWindowTitle(tr("Updates Installed"));
- box->setText(tr("Installation complete, you need to restart the application for the changes to take effect."));
- box->setStandardButtons(QMessageBox::Yes|QMessageBox::No);
- box->button(QMessageBox::Yes)->setText(tr("Restart Now"));
- box->button(QMessageBox::No)->setText(tr("Restart Later"));
- box->exec();
- if (!box)
- return;
- if (box->clickedButton() == box->button(QMessageBox::Yes))
- QCoreApplication::quit();
- else
- KDSelfRestarter::setRestartOnQuit(false);
-}
-
diff --git a/examples/testapp/mainwindow.h b/examples/testapp/mainwindow.h
deleted file mode 100644
index 7a0466dd1..000000000
--- a/examples/testapp/mainwindow.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-
-#include <packagemanagercore.h>
-#include <settings.h>
-
-#include <QMainWindow>
-
-class UpdateSettingsDialog;
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- explicit MainWindow(const QStringList &args, QWidget *parent = 0);
-
-private Q_SLOTS:
- void editUpdateSettings();
- void checkForUpdates();
- void updatesInstalled();
- void updatesAvailable();
-
-private:
- UpdateSettingsDialog *m_dialog;
-
- QInstaller::Settings m_settings;
- QInstaller::PackageManagerCore m_core;
-};
diff --git a/examples/testapp/packages/com.nokia.testapp.subcomponent.alwaysvisible/meta/package.xml b/examples/testapp/packages/com.nokia.testapp.subcomponent.alwaysvisible/meta/package.xml
deleted file mode 100644
index 5ab9c9fc9..000000000
--- a/examples/testapp/packages/com.nokia.testapp.subcomponent.alwaysvisible/meta/package.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<Package>
- <DisplayName>visible subcomponent</DisplayName>
- <Version>1337</Version>
- <ReleaseDate>2009-12-03</ReleaseDate>
- <Name>com.nokia.testapp.subcomponent.alwaysvisible</Name>
- <Default>true</Default>
-</Package>
diff --git a/examples/testapp/packages/com.nokia.testapp.subcomponent.virtual/meta/installscript.qs b/examples/testapp/packages/com.nokia.testapp.subcomponent.virtual/meta/installscript.qs
deleted file mode 100644
index 7907a268a..000000000
--- a/examples/testapp/packages/com.nokia.testapp.subcomponent.virtual/meta/installscript.qs
+++ /dev/null
@@ -1,4 +0,0 @@
-// constructor
-function Component()
-{
-}
diff --git a/examples/testapp/packages/com.nokia.testapp.subcomponent.virtual/meta/package.xml b/examples/testapp/packages/com.nokia.testapp.subcomponent.virtual/meta/package.xml
deleted file mode 100644
index d60cf21f4..000000000
--- a/examples/testapp/packages/com.nokia.testapp.subcomponent.virtual/meta/package.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<Package>
- <DisplayName>virtual subcomponent</DisplayName>
- <Version>1</Version>
- <ReleaseDate>2009-12-03</ReleaseDate>
- <Name>com.nokia.testapp.subcomponent.virtual</Name>
- <Virtual>true</Virtual>
- <Script>installscript.qs</Script>
-</Package>
diff --git a/examples/testapp/packages/com.nokia.testapp.subcomponent/meta/package.xml b/examples/testapp/packages/com.nokia.testapp.subcomponent/meta/package.xml
deleted file mode 100644
index 8d299684a..000000000
--- a/examples/testapp/packages/com.nokia.testapp.subcomponent/meta/package.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<Package>
- <DisplayName>subcomponents parent</DisplayName>
- <Version>1</Version>
- <ReleaseDate>2009-12-03</ReleaseDate>
- <Name>com.nokia.testapp.subcomponent</Name>
-</Package>
diff --git a/examples/testapp/packages/com.nokia.testapp/meta/installscript.js b/examples/testapp/packages/com.nokia.testapp/meta/installscript.js
deleted file mode 100644
index d1dded25b..000000000
--- a/examples/testapp/packages/com.nokia.testapp/meta/installscript.js
+++ /dev/null
@@ -1,18 +0,0 @@
-function Component()
-{
- if( installer.isUpdater() )
- {
- if( installer.value( "os" ) == "win" )
- component.addDownloadableArchive( "testapp.exe" );
- else
- component.addDownloadableArchive( "testapp.app.7z" );
- }
-}
-
-Component.prototype.createOperationsForArchive = function( archive )
-{
- component.createOperationsForArchive( archive );
-
- if( installer.isUpdater() )
- component.addOperation( "SelfRestart" );
-}
diff --git a/examples/testapp/packages/com.nokia.testapp/meta/package.xml b/examples/testapp/packages/com.nokia.testapp/meta/package.xml
deleted file mode 100644
index 2755d33f2..000000000
--- a/examples/testapp/packages/com.nokia.testapp/meta/package.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<Package>
- <DisplayName>Test App</DisplayName>
- <Description>Installs the complete Nokia SDK.</Description>
- <Version inheritVersionFrom="com.nokia.testapp.subcomponent.alwaysvisible">1</Version>
- <ReleaseDate>2009-12-03</ReleaseDate>
- <Name>com.nokia.testapp</Name>
- <Script>installscript.js</Script>
-</Package>
diff --git a/examples/testapp/testapp.pro b/examples/testapp/testapp.pro
deleted file mode 100644
index 4b2e622df..000000000
--- a/examples/testapp/testapp.pro
+++ /dev/null
@@ -1,49 +0,0 @@
-TEMPLATE = app
-INCLUDEPATH += . ..
-TARGET = testapp
-
-include(../../installerfw.pri)
-
-isEqual(QT_MAJOR_VERSION, 5) {
- QT += widgets
-}
-
-!static {
- warning("You can use this example only with a static build of Qt and IFW!")
-}
-
-DESTDIR = $$IFW_BUILD_TREE/examples/testapp/packages/com.nokia.testapp/data
-
-FORMS += \
- componentselectiondialog.ui \
- updatesettingsdialog.ui \
- updatesettingswidget.ui
-
-HEADERS += mainwindow.h \
- componentselectiondialog.h \
- updatesettingsdialog.h \
- updateagent.h \
- updatesettingswidget.h
-
-SOURCES += main.cpp \
- mainwindow.cpp \
- componentselectiondialog.cpp \
- updatesettingsdialog.cpp \
- updateagent.cpp \
- updatesettingswidget.cpp
-
-RESOURCES += testapp.qrc
-
-macx {
- QMAKE_POST_LINK = ($$IFW_APP_PATH/binarycreator -p $$IFW_SOURCE_TREE/examples/testapp/packages \
- -c $$IFW_SOURCE_TREE/examples/testapp/config/config.xml -t $$IFW_APP_PATH/installerbase \
- TestAppInstaller.app
-} win32: {
- QMAKE_POST_LINK = ($$IFW_APP_PATH/binarycreator.exe -p $$IFW_SOURCE_TREE/examples/testapp/packages \
- -c $$IFW_SOURCE_TREE/examples/testapp/config/config.xml -t $$IFW_APP_PATH/installerbase.exe \
- TestAppInstaller.exe)
-} else {
- QMAKE_POST_LINK = ($$IFW_APP_PATH/binarycreator -p $$IFW_SOURCE_TREE/examples/testapp/packages \
- -c $$IFW_SOURCE_TREE/examples/testapp/config/config.xml -t $$IFW_APP_PATH/installerbase \
- TestAppInstaller)
-}
diff --git a/examples/testapp/testapp.qrc b/examples/testapp/testapp.qrc
deleted file mode 100644
index 89c08ca9e..000000000
--- a/examples/testapp/testapp.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/metadata/installer-config">
- <file>config.xml</file>
- </qresource>
- <qresource>
- <file>logo.png</file>
- </qresource>
-</RCC>
diff --git a/examples/testapp/updateagent.cpp b/examples/testapp/updateagent.cpp
deleted file mode 100644
index 0523f6da7..000000000
--- a/examples/testapp/updateagent.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-#include "updateagent.h"
-
-#include <binaryformatenginehandler.h>
-#include <binaryformat.h>
-#include <errors.h>
-#include <component.h>
-#include <packagemanagercore.h>
-#include <updatesettings.h>
-
-#include <QtCore/QDateTime>
-#include <QtCore/QTimer>
-
-using namespace QInstaller;
-using QInstallerCreator::ComponentIndex;
-using QInstallerCreator::BinaryFormatEngineHandler;
-
-class UpdateAgent::Private
-{
-public:
- Private(UpdateAgent *qq)
- : q(qq)
- {
- connect(&checkTimer, SIGNAL(timeout()), q, SLOT(maybeCheck()));
- checkTimer.start(1000);
- }
-
-private:
- QTimer checkTimer;
- UpdateAgent *const q;
-
-public:
- void maybeCheck()
- {
- checkTimer.stop();
-
- UpdateSettings settings;
- try {
- if (settings.updateInterval() > 0
- && settings.lastCheck().secsTo(QDateTime::currentDateTime()) >= settings.updateInterval()) {
- // update the time we last checked for updates
- settings.setLastCheck(QDateTime::currentDateTime());
-
- QScopedPointer<BinaryFormatEngineHandler> handler;
- handler.reset(new BinaryFormatEngineHandler(ComponentIndex()));
- handler->setComponentIndex(QInstallerCreator::ComponentIndex());
-
- PackageManagerCore core(QInstaller::MagicUpdaterMarker);
- // TODO: check what this should have done
- //core.setTemporaryRepositories(settings.repositories());
- if (!core.fetchRemotePackagesTree())
- throw Error(tr("Software Update failed."));
- settings.setLastResult(tr("Software Update run successfully."));
-
- QList<Component*> components = core.updaterComponents();
- // no updates available
- if (components.isEmpty())
- return;
- emit q->updatesAvailable();
- }
- } catch (...) {
- settings.setLastResult(tr("Software Update failed."));
- return;
- }
- checkTimer.start();
- }
-};
-
-UpdateAgent::UpdateAgent(QObject *parent)
- : QObject(parent),
- d(new Private(this))
-{
-}
-
-UpdateAgent::~UpdateAgent()
-{
- delete d;
-}
-
-#include "moc_updateagent.cpp"
diff --git a/examples/testapp/updateagent.h b/examples/testapp/updateagent.h
deleted file mode 100644
index 7e634a302..000000000
--- a/examples/testapp/updateagent.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef UPDATEAGENT_H
-#define UPDATEAGENT_H
-
-#include <QtCore/QObject>
-
-class UpdateAgent : public QObject
-{
- Q_OBJECT
-public:
- explicit UpdateAgent(QObject *parent = 0);
- ~UpdateAgent();
-
-Q_SIGNALS:
- void updatesAvailable();
-
-private:
- Q_PRIVATE_SLOT(d, void maybeCheck());
-
-private:
- class Private;
- Private *const d;
-};
-
-#endif
diff --git a/examples/testapp/updatesettingsdialog.cpp b/examples/testapp/updatesettingsdialog.cpp
deleted file mode 100644
index 9013da67c..000000000
--- a/examples/testapp/updatesettingsdialog.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-#include "updatesettingsdialog.h"
-#include "ui_updatesettingsdialog.h"
-
-#include <repository.h>
-#include <updatesettings.h>
-
-#include <QDateTime>
-#include <QStringListModel>
-
-using namespace QInstaller;
-
-class UpdateSettingsDialog::Private
-{
-public:
- Private(UpdateSettingsDialog *qq)
- : q(qq)
- {
- ui.setupUi(q);
- }
-
-private:
- UpdateSettingsDialog *const q;
-
-public:
- Ui::UpdateSettingsDialog ui;
-};
-
-UpdateSettingsDialog::UpdateSettingsDialog(QWidget *parent)
- : QDialog(parent),
- d(new Private(this))
-{
- connect(d->ui.buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
- connect(d->ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
-
- connect(d->ui.widget, SIGNAL(checkForUpdates()), this, SLOT(accept()));
- connect(d->ui.widget, SIGNAL(checkForUpdates()), this, SIGNAL(checkForUpdates()));
- setFixedSize(size());
-}
-
-UpdateSettingsDialog::~UpdateSettingsDialog()
-{
- delete d;
-}
-
-void UpdateSettingsDialog::accept()
-{
- d->ui.widget->accept();
- QDialog::accept();
-}
-
-#include "moc_updatesettingsdialog.cpp"
diff --git a/examples/testapp/updatesettingsdialog.h b/examples/testapp/updatesettingsdialog.h
deleted file mode 100644
index e952d4d2d..000000000
--- a/examples/testapp/updatesettingsdialog.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef UPDATESETTINGSDIALOG_H
-#define UPDATESETTINGSDIALOG_H
-
-#include <QDialog>
-
-class UpdateSettingsDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- explicit UpdateSettingsDialog(QWidget *parent = 0);
- ~UpdateSettingsDialog();
-
-public Q_SLOTS:
- void accept();
-
-Q_SIGNALS:
- void checkForUpdates();
-
-private:
- class Private;
- Private *const d;
-};
-
-#endif
diff --git a/examples/testapp/updatesettingsdialog.ui b/examples/testapp/updatesettingsdialog.ui
deleted file mode 100644
index 0a879257b..000000000
--- a/examples/testapp/updatesettingsdialog.ui
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>UpdateSettingsDialog</class>
- <widget class="QWidget" name="UpdateSettingsDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>447</width>
- <height>312</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Software Update Settings</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="UpdateSettingsWidget" name="widget" native="true"/>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>UpdateSettingsWidget</class>
- <extends>QWidget</extends>
- <header>updatesettingswidget.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/testapp/updatesettingswidget.cpp b/examples/testapp/updatesettingswidget.cpp
deleted file mode 100644
index b1f36304d..000000000
--- a/examples/testapp/updatesettingswidget.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-#include "updatesettingswidget.h"
-#include "ui_updatesettingswidget.h"
-
-#include <repository.h>
-#include <updatesettings.h>
-
-#include <QDateTime>
-#include <QStringListModel>
-
-using namespace QInstaller;
-
-class UpdateSettingsWidget::Private
-{
-public:
- Private(UpdateSettingsWidget *qq)
- : q(qq),
- initialized(false)
- {
- ui.setupUi(q);
- }
-
- void addUpdateSource()
- {
- const int newRow = model.rowCount();
- if (model.insertRow(newRow))
- ui.treeViewUpdateSources->edit(model.index(newRow, 0));
- }
-
- void removeUpdateSource()
- {
- model.removeRow(ui.treeViewUpdateSources->currentIndex().row());
- }
-
-private:
- UpdateSettingsWidget *const q;
-
-public:
- bool initialized;
- QStringListModel model;
- UpdateSettings settings;
-
- Ui::UpdateSettingsWidget ui;
-};
-
-
-// -- UpdateSettingsWidget
-
-UpdateSettingsWidget::UpdateSettingsWidget(QWidget *parent)
- : QWidget(parent),
- d(new Private(this))
-{
-}
-
-UpdateSettingsWidget::~UpdateSettingsWidget()
-{
- delete d;
-}
-
-void UpdateSettingsWidget::showEvent(QShowEvent *event)
-{
- Q_UNUSED(event)
- if (d->initialized)
- return;
-
- d->ui.checkBoxCheckForUpdates->setChecked(d->settings.updateInterval() > 0);
- d->ui.checkBoxCheckOnlyImportant->setChecked(d->settings.checkOnlyImportantUpdates());
- switch (qAbs(d->settings.updateInterval())) {
- case UpdateSettings::Daily:
- d->ui.comboBoxFrequency->setCurrentIndex(0);
- break;
- case UpdateSettings::Weekly:
- d->ui.comboBoxFrequency->setCurrentIndex(1);
- break;
- case UpdateSettings::Monthly:
- d->ui.comboBoxFrequency->setCurrentIndex(2);
- break;
- }
-
- connect(d->ui.buttonCheckNow, SIGNAL(clicked()), this, SIGNAL(checkForUpdates()));
- connect(d->ui.buttonAddUpdateSource, SIGNAL(clicked()), this, SLOT(addUpdateSource()));
- connect(d->ui.buttonRemoveUpdateSource, SIGNAL(clicked()), this, SLOT(removeUpdateSource()));
-
- QStringList reps;
- foreach (const Repository &repository, d->settings.repositories())
- reps.append(repository.url().toString());
-
- d->model.setStringList(reps);
- d->ui.treeViewUpdateSources->setModel(&d->model);
-
- d->ui.labelLastUpdateResult->clear();
- if (!d->settings.lastResult().isEmpty()) {
- d->ui.labelLastUpdateResult->setText(d->settings.lastResult() + QLatin1Char('\n')
- + d->settings.lastCheck().toString());
- }
- d->initialized = true;
-}
-
-void UpdateSettingsWidget::accept()
-{
- switch(d->ui.comboBoxFrequency->currentIndex()) {
- case 0:
- d->settings.setUpdateInterval(UpdateSettings::Daily);
- break;
- case 1:
- d->settings.setUpdateInterval(UpdateSettings::Weekly);
- break;
- case 2:
- d->settings.setUpdateInterval(UpdateSettings::Monthly);
- break;
- }
-
- if (!d->ui.checkBoxCheckForUpdates->isChecked())
- d->settings.setUpdateInterval(-d->settings.updateInterval());
- d->settings.setCheckOnlyImportantUpdates(d->ui.checkBoxCheckOnlyImportant->isChecked());
-
- QSet<Repository> repositories;
- foreach (const QString &url, d->model.stringList())
- repositories.insert(Repository(QUrl(url), false));
- d->settings.setRepositories(repositories);
-}
-
-#include "moc_updatesettingswidget.cpp"
diff --git a/examples/testapp/updatesettingswidget.h b/examples/testapp/updatesettingswidget.h
deleted file mode 100644
index 11ab70bf3..000000000
--- a/examples/testapp/updatesettingswidget.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, 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, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-#ifndef UPDATESETTINGSWIDGET_H
-#define UPDATESETTINGSWIDGET_H
-
-#include <QWidget>
-
-class UpdateSettingsWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit UpdateSettingsWidget(QWidget *parent = 0);
- ~UpdateSettingsWidget();
-
-public Q_SLOTS:
- void accept();
-
-Q_SIGNALS:
- void checkForUpdates();
-
-protected:
- void showEvent(QShowEvent *event);
-
-private:
- Q_PRIVATE_SLOT(d, void addUpdateSource());
- Q_PRIVATE_SLOT(d, void removeUpdateSource());
-
-private:
- class Private;
- Private *const d;
-};
-
-#endif
diff --git a/examples/testapp/updatesettingswidget.ui b/examples/testapp/updatesettingswidget.ui
deleted file mode 100644
index 49525e1b9..000000000
--- a/examples/testapp/updatesettingswidget.ui
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>UpdateSettingsWidget</class>
- <widget class="QWidget" name="UpdateSettingsWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>438</width>
- <height>247</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Software Update Settings</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_4">
- <item row="0" column="0">
- <widget class="QTabWidget" name="tabWidget">
- <widget class="QWidget" name="tab">
- <attribute name="title">
- <string>Scheduled Check</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>16</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="1" colspan="2">
- <widget class="QCheckBox" name="checkBoxCheckForUpdates">
- <property name="text">
- <string>Check for updates:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QComboBox" name="comboBoxFrequency">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <item>
- <property name="text">
- <string>Daily</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Weekly</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Monthly</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="0" column="4">
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>16</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="1">
- <widget class="QWidget" name="widget" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>8</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>8</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="2" colspan="2">
- <widget class="QCheckBox" name="checkBoxCheckOnlyImportant">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Check only for important updates</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>11</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="2">
- <widget class="QPushButton" name="buttonCheckNow">
- <property name="text">
- <string>Check Now</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="labelLastCheck">
- <property name="text">
- <string>Last check:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- </widget>
- </item>
- <item row="1" column="2" colspan="2">
- <widget class="QLabel" name="labelLastUpdateResult">
- <property name="text">
- <string>Software Update ran successfully.
-Monday, 2009 december 16 20.36</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>1</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="4">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>1</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>23</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tab_2">
- <attribute name="title">
- <string>Update Sources</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_3">
- <item row="0" column="0" colspan="3">
- <widget class="QTreeView" name="treeViewUpdateSources">
- <property name="rootIsDecorated">
- <bool>false</bool>
- </property>
- <property name="headerHidden">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QToolButton" name="buttonAddUpdateSource">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>25</height>
- </size>
- </property>
- <property name="text">
- <string>+</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QToolButton" name="buttonRemoveUpdateSource">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>25</height>
- </size>
- </property>
- <property name="text">
- <string>-</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections>
- <connection>
- <sender>checkBoxCheckForUpdates</sender>
- <signal>toggled(bool)</signal>
- <receiver>comboBoxFrequency</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>179</x>
- <y>59</y>
- </hint>
- <hint type="destinationlabel">
- <x>293</x>
- <y>61</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>checkBoxCheckForUpdates</sender>
- <signal>toggled(bool)</signal>
- <receiver>checkBoxCheckOnlyImportant</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>135</x>
- <y>64</y>
- </hint>
- <hint type="destinationlabel">
- <x>149</x>
- <y>91</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
diff --git a/installerfw.pro b/installerfw.pro
index 2f0b653d7..1f17d1dc9 100644
--- a/installerfw.pro
+++ b/installerfw.pro
@@ -1,6 +1,6 @@
CONFIG += ordered
TEMPLATE = subdirs
-SUBDIRS += src examples tests tools
+SUBDIRS += src tests tools
include (installerfw.pri)
include (doc/doc.pri)
diff --git a/src/libs/installer/addqtcreatorarrayvalueoperation.h b/src/libs/installer/addqtcreatorarrayvalueoperation.h
index 6792b8e88..670dccff8 100644
--- a/src/libs/installer/addqtcreatorarrayvalueoperation.h
+++ b/src/libs/installer/addqtcreatorarrayvalueoperation.h
@@ -39,8 +39,8 @@
**
**************************************************************************/
-#ifndef ADDQTCREATORVALUEOPERATION_H
-#define ADDQTCREATORVALUEOPERATION_H
+#ifndef ADDQTCREATORARRAYVALUEOPERATION_H
+#define ADDQTCREATORARRAYVALUEOPERATION_H
#include "qinstallerglobal.h"
@@ -60,4 +60,4 @@ public:
} // namespace QInstaller
-#endif // ADDQTCREATORVALUEOPERATION_H
+#endif // ADDQTCREATORARRAYVALUEOPERATION_H
diff --git a/src/libs/installer/adminauthorization_win.cpp b/src/libs/installer/adminauthorization_win.cpp
index 20420cef0..151fef953 100644
--- a/src/libs/installer/adminauthorization_win.cpp
+++ b/src/libs/installer/adminauthorization_win.cpp
@@ -91,9 +91,9 @@ bool AdminAuthorization::hasAdminRights()
&adminGroup))
return false;
- BOOL isInAdminGroup = FALSE;
- if (!CheckTokenMembership(0, adminGroup, &isInAdminGroup))
- isInAdminGroup = FALSE;
+ bool isInAdminGroup = false;
+ if (!CheckTokenMembership(0, adminGroup, (int*)&isInAdminGroup))
+ isInAdminGroup = false;
FreeSid(adminGroup);
return isInAdminGroup;
diff --git a/src/libs/installer/adminauthorization_x11.cpp b/src/libs/installer/adminauthorization_x11.cpp
index 71a66cd83..6d5a52357 100644
--- a/src/libs/installer/adminauthorization_x11.cpp
+++ b/src/libs/installer/adminauthorization_x11.cpp
@@ -194,7 +194,7 @@ bool AdminAuthorization::execute(QWidget *parent, const QString &program, const
const QString line = QString::fromLatin1(buf, bytes);
if (re.indexIn(line) != -1) {
const QString password = getPassword(parent);
- if (password == QString()) {
+ if (password.isEmpty()) {
QByteArray pwd = password.toLatin1();
for (int i = 0; i < 3; ++i) {
::write(masterFD, pwd.data(), pwd.length());
diff --git a/src/libs/installer/binaryformat.h b/src/libs/installer/binaryformat.h
index 49be60a06..d255ea8a9 100644
--- a/src/libs/installer/binaryformat.h
+++ b/src/libs/installer/binaryformat.h
@@ -203,7 +203,7 @@ class INSTALLER_EXPORT BinaryContentPrivate : public QSharedData
{
public:
BinaryContentPrivate();
- BinaryContentPrivate(const QString &path);
+ explicit BinaryContentPrivate(const QString &path);
BinaryContentPrivate(const BinaryContentPrivate &other);
~BinaryContentPrivate();
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index f9e809565..fb554155f 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -45,7 +45,6 @@
#include "fsengineclient.h"
#include "lib7z_facade.h"
#include "packagemanagercore.h"
-#include "qinstallerglobal.h"
#include "messageboxhandler.h"
#include <kdupdaterupdatesourcesinfo.h>
@@ -308,23 +307,22 @@ void Component::removeComponent(Component *component)
}
/*!
- Returns a list of child components. If \a recursive is set to true, the returned list
- contains not only the direct children, but all ancestors. Note: The returned list does include ALL
- children, non virtual components as well as virtual components.
+ Returns a list of child components. If \a kind is set to DirectChildrenOnly, the returned list contains
+ only the direct children, if set to Descendants it will also include all descendants of the components
+ children. Note: The returned list does include ALL children, non virtual components as well as virtual
+ components.
*/
-QList<Component*> Component::childComponents(bool recursive, RunMode runMode) const
+QList<Component *> Component::childComponents(Kind kind) const
{
- QList<Component*> result;
- if (runMode == UpdaterMode)
- return result;
+ if (d->m_core->isUpdater())
+ return QList<Component*>();
- if (!recursive)
- return d->m_allChildComponents;
+ QList<Component *> result = d->m_allChildComponents;
+ if (kind == DirectChildrenOnly)
+ return result;
- foreach (Component *component, d->m_allChildComponents) {
- result.append(component);
- result += component->childComponents(true, runMode);
- }
+ foreach (Component *component, d->m_allChildComponents)
+ result += component->childComponents(kind);
return result;
}
diff --git a/src/libs/installer/component.h b/src/libs/installer/component.h
index 1c8712145..343e1a3af 100644
--- a/src/libs/installer/component.h
+++ b/src/libs/installer/component.h
@@ -85,6 +85,12 @@ class INSTALLER_EXPORT Component : public QObject, public QScriptable, public Co
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled)
public:
+ enum Kind
+ {
+ Descendants = 0x1000, // all descendants of the current component (children, grandchildren, etc.)
+ DirectChildrenOnly = 0x2000 // all child components of the current component
+ };
+
explicit Component(PackageManagerCore *core);
~Component();
@@ -117,7 +123,7 @@ public:
Component *parentComponent() const;
void appendComponent(Component *component);
void removeComponent(Component *component);
- QList<Component*> childComponents(bool recursive, RunMode runMode) const;
+ QList<Component*> childComponents(Component::Kind kind) const;
void loadComponentScript();
diff --git a/src/libs/installer/component_p.cpp b/src/libs/installer/component_p.cpp
index 162b62c54..51455c27f 100644
--- a/src/libs/installer/component_p.cpp
+++ b/src/libs/installer/component_p.cpp
@@ -218,8 +218,10 @@ int ComponentModelHelper::childCount() const
int ComponentModelHelper::indexInParent() const
{
int index = 0;
- if (Component *parent = m_componentPrivate->m_parentComponent->parentComponent())
- index = parent->childComponents(false, AllMode).indexOf(m_componentPrivate->m_parentComponent);
+ if (Component *parent = m_componentPrivate->m_parentComponent->parentComponent()) {
+ index = parent->childComponents(Component::DirectChildrenOnly)
+ .indexOf(m_componentPrivate->m_parentComponent);
+ }
return (index >= 0 ? index : 0);
}
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index a87f59c00..264f69650 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -373,7 +373,7 @@ void ComponentModel::appendRootComponents(QList<QInstaller::Component*> rootComp
void ComponentModel::slotModelReset()
{
QList<QInstaller::Component*> components = m_rootComponentList;
- if (m_core->runMode() == QInstaller::AllMode) {
+ if (!m_core->isUpdater()) {
for (int i = m_rootIndex; i < m_rootComponentList.count(); ++i)
components.append(m_rootComponentList.at(i)->childs());
}
@@ -384,7 +384,7 @@ void ComponentModel::slotModelReset()
}
m_currentCheckedSet += m_initialCheckedSet;
- if (m_core->runMode() == QInstaller::AllMode)
+ if (!m_core->isUpdater())
select(Qt::Unchecked);
foreach (const QString &name, m_currentCheckedSet)
diff --git a/src/libs/installer/constants.h b/src/libs/installer/constants.h
index 3929681a7..7ea73bbb9 100644
--- a/src/libs/installer/constants.h
+++ b/src/libs/installer/constants.h
@@ -80,6 +80,7 @@ static const QLatin1String scSortingPriority("SortingPriority");
static const QLatin1String scTitle("Title");
static const QLatin1String scPublisher("Publisher");
static const QLatin1String scRunProgram("RunProgram");
+static const QLatin1String scRunProgramArguments("RunProgramArguments");
static const QLatin1String scStartMenuDir("StartMenuDir");
static const QLatin1String scRemoveTargetDir("RemoveTargetDir");
static const QLatin1String scRunProgramDescription("RunProgramDescription");
diff --git a/src/libs/installer/createshortcutoperation.cpp b/src/libs/installer/createshortcutoperation.cpp
index 62f7cfa82..2f2696fcd 100644
--- a/src/libs/installer/createshortcutoperation.cpp
+++ b/src/libs/installer/createshortcutoperation.cpp
@@ -107,8 +107,9 @@ static QString takeWorkingDirArgument(QStringList &args)
static bool createLink(const QString &fileName, const QString &linkName, QString workingDir,
QString arguments = QString())
{
- bool success = QFile::link(fileName, linkName);
#ifdef Q_OS_WIN
+ bool success = QFile::link(fileName, linkName);
+
if (!success)
return success;
@@ -131,7 +132,7 @@ static bool createLink(const QString &fileName, const QString &linkName, QString
IPersistFile *ppf = NULL;
if (SUCCEEDED(psl->QueryInterface(IID_IPersistFile, (void **)&ppf))) {
- ppf->Save((wchar_t*)QDir::toNativeSeparators(linkName).utf16(), TRUE);
+ ppf->Save((wchar_t*)QDir::toNativeSeparators(linkName).utf16(), true);
ppf->Release();
}
psl->Release();
@@ -145,11 +146,16 @@ static bool createLink(const QString &fileName, const QString &linkName, QString
SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_IDLIST, pidl, 0);
CoTaskMemFree(pidl);
}
+
+ return success;
#else
Q_UNUSED(arguments)
Q_UNUSED(workingDir)
+ Q_UNUSED(fileName)
+ Q_UNUSED(linkName)
+
+ return true;
#endif
- return success;
}
diff --git a/src/libs/installer/fsengineclient.cpp b/src/libs/installer/fsengineclient.cpp
index c9aff560f..7822ed65b 100644
--- a/src/libs/installer/fsengineclient.cpp
+++ b/src/libs/installer/fsengineclient.cpp
@@ -753,7 +753,7 @@ void FSEngineClientHandler::setActive(bool active)
}
/*!
- Returns, wheter this FSEngineClientHandler is active or not.
+ Returns true when this FSEngineClientHandler is active.
*/
bool FSEngineClientHandler::isActive() const
{
diff --git a/src/libs/installer/fsengineserver.cpp b/src/libs/installer/fsengineserver.cpp
index 991681b95..76992c241 100644
--- a/src/libs/installer/fsengineserver.cpp
+++ b/src/libs/installer/fsengineserver.cpp
@@ -75,7 +75,7 @@ bool startDetached(const QString &program, const QStringList &args, const QStrin
const QString arguments = QInstaller::createCommandline(program, args);
const bool success = CreateProcess(0, (wchar_t*)arguments.utf16(),
- 0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE,
+ 0, 0, false, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE,
0, (wchar_t*)workingDirectory.utf16(),
&startupInfo, &pinfo);
diff --git a/src/libs/installer/getrepositoriesmetainfojob.cpp b/src/libs/installer/getrepositoriesmetainfojob.cpp
index 996bf4692..7604bcf06 100644
--- a/src/libs/installer/getrepositoriesmetainfojob.cpp
+++ b/src/libs/installer/getrepositoriesmetainfojob.cpp
@@ -43,7 +43,6 @@
#include "getrepositorymetainfojob.h"
#include "packagemanagercore_p.h"
-#include "qinstallerglobal.h"
#include <QtCore/QDebug>
diff --git a/src/libs/installer/getrepositorymetainfojob.cpp b/src/libs/installer/getrepositorymetainfojob.cpp
index 6fa21e32c..34441b02b 100644
--- a/src/libs/installer/getrepositorymetainfojob.cpp
+++ b/src/libs/installer/getrepositorymetainfojob.cpp
@@ -44,22 +44,13 @@
#include "lib7z_facade.h"
#include "messageboxhandler.h"
#include "packagemanagercore_p.h"
-#include "qinstallerglobal.h"
#include "utils.h"
#include "kdupdaterfiledownloader.h"
#include "kdupdaterfiledownloaderfactory.h"
-#include <QtCore/QFile>
-#include <QtCore/QTimer>
-#include <QtCore/QUrl>
+#include <QTimer>
-#include <QMessageBox>
-
-#include <QtNetwork/QAuthenticator>
-
-#include <QtXml/QDomDocument>
-#include <QtXml/QDomElement>
using namespace KDUpdater;
using namespace QInstaller;
diff --git a/src/libs/installer/init.cpp b/src/libs/installer/init.cpp
index e0c51a2f3..579446ebf 100644
--- a/src/libs/installer/init.cpp
+++ b/src/libs/installer/init.cpp
@@ -67,7 +67,7 @@
#include "setpluginpathonqtcoreoperation.h"
#include "setimportspathonqtcoreoperation.h"
#include "setpathonqtcoreoperation.h"
-#include "registerqtvqnxoperation.h"
+#include "registerqtincreatorqnxoperation.h"
#include "setqtcreatorvalueoperation.h"
#include "addqtcreatorarrayvalueoperation.h"
#include "registertoolchainoperation.h"
diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro
index 3308876fb..3b0b10813 100644
--- a/src/libs/installer/installer.pro
+++ b/src/libs/installer/installer.pro
@@ -24,15 +24,10 @@ DLLDESTDIR = $$IFW_APP_PATH
DEFINES += BUILD_LIB_INSTALLER
-QT += \
- script \
+QT += script \
network \
xml
-isEqual(QT_MAJOR_VERSION, 5) {
- QT += concurrent widgets core-private
-}
-
HEADERS += packagemanagercore.h \
packagemanagercore_p.h \
packagemanagergui.h \
@@ -58,7 +53,6 @@ HEADERS += packagemanagercore.h \
replaceoperation.h \
linereplaceoperation.h \
registertoolchainoperation.h \
- registerqtvqnxoperation.h \
setqtcreatorvalueoperation.h \
addqtcreatorarrayvalueoperation.h \
copydirectoryoperation.h \
@@ -104,6 +98,7 @@ HEADERS += packagemanagercore.h \
link.h \
createlinkoperation.h \
packagemanagercoredata.h \
+ registerqtincreatorqnxoperation.h \
applyproductkeyoperation.h
SOURCES += packagemanagercore.cpp \
@@ -129,7 +124,6 @@ HEADERS += packagemanagercore.h \
replaceoperation.cpp \
linereplaceoperation.cpp \
registertoolchainoperation.cpp \
- registerqtvqnxoperation.cpp \
setqtcreatorvalueoperation.cpp \
addqtcreatorarrayvalueoperation.cpp \
copydirectoryoperation.cpp \
@@ -173,6 +167,7 @@ HEADERS += packagemanagercore.h \
link.cpp \
createlinkoperation.cpp \
packagemanagercoredata.cpp \
+ registerqtincreatorqnxoperation.cpp \
applyproductkeyoperation.cpp
RESOURCES += resources/patch_file_lists.qrc \
diff --git a/src/libs/installer/lib7z_facade.cpp b/src/libs/installer/lib7z_facade.cpp
index 0c02890e2..fbec5e644 100644
--- a/src/libs/installer/lib7z_facade.cpp
+++ b/src/libs/installer/lib7z_facade.cpp
@@ -17,12 +17,12 @@
#include "Windows/PropVariant.h"
#include "Windows/PropVariantConversions.h"
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtCore/QIODevice>
+#include <QDir>
+#include <QFileInfo>
+#include <QIODevice>
#include <QtCore/QMutexLocker>
-#include <QtCore/QPointer>
-#include <QtCore/QTemporaryFile>
+#include <QPointer>
+#include <QTemporaryFile>
#ifdef _MSC_VER
#pragma warning(disable:4297)
diff --git a/src/libs/installer/lib7z_facade.h b/src/libs/installer/lib7z_facade.h
index e61cce6ac..88185375e 100644
--- a/src/libs/installer/lib7z_facade.h
+++ b/src/libs/installer/lib7z_facade.h
@@ -3,14 +3,14 @@
#include "installer_global.h"
+#include <QCoreApplication>
#include <QDateTime>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QFile>
-#include <QtCore/QPoint>
-#include <QtCore/QRunnable>
-#include <QtCore/QString>
-#include <QtCore/QVector>
-#include <QtCore/QVariant>
+#include <QFile>
+#include <QPoint>
+#include <QRunnable>
+#include <QString>
+#include <QVariant>
+#include <QVector>
#include "Common/MyWindows.h"
diff --git a/src/libs/installer/link.h b/src/libs/installer/link.h
index fc8d8fee3..e359c8f91 100644
--- a/src/libs/installer/link.h
+++ b/src/libs/installer/link.h
@@ -47,7 +47,7 @@
class Link
{
public:
- Link(const QString &path);
+ explicit Link(const QString &path);
static Link create(const QString &link, const QString &targetPath);
QString targetPath() const;
bool targetExists();
diff --git a/src/libs/installer/macreplaceinstallnamesoperation.h b/src/libs/installer/macreplaceinstallnamesoperation.h
index 635f60054..f4b76de6d 100644
--- a/src/libs/installer/macreplaceinstallnamesoperation.h
+++ b/src/libs/installer/macreplaceinstallnamesoperation.h
@@ -39,8 +39,8 @@
**
**************************************************************************/
-#ifndef MACREPLACEINSTALLNAMEOPERATION_H
-#define MACREPLACEINSTALLNAMEOPERATION_H
+#ifndef MACREPLACEINSTALLNAMESOPERATION_H
+#define MACREPLACEINSTALLNAMESOPERATION_H
#include "qinstallerglobal.h"
@@ -85,4 +85,4 @@ private:
} // namespace QInstaller
-#endif // MACREPLACEINSTALLNAMEOPERATION_H
+#endif // MACREPLACEINSTALLNAMESOPERATION_H
diff --git a/src/libs/installer/messageboxhandler.cpp b/src/libs/installer/messageboxhandler.cpp
index cb9a845ff..219bc8057 100644
--- a/src/libs/installer/messageboxhandler.cpp
+++ b/src/libs/installer/messageboxhandler.cpp
@@ -47,8 +47,8 @@
#include <QDialogButtonBox>
#include <QPushButton>
-#include <QtScript/QScriptEngine>
-#include <QtScript/QScriptValue>
+#include <QScriptEngine>
+#include <QScriptValue>
QScriptValue QInstaller::registerMessageBox(QScriptEngine *scriptEngine)
{
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index cb957f9aa..63f4eb45a 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -39,6 +39,7 @@
**
**************************************************************************/
#include "packagemanagercore.h"
+#include "packagemanagercore_p.h"
#include "adminauthorization.h"
#include "binaryformat.h"
@@ -49,10 +50,8 @@
#include "fsengineclient.h"
#include "getrepositoriesmetainfojob.h"
#include "messageboxhandler.h"
-#include "packagemanagercore_p.h"
#include "packagemanagerproxyfactory.h"
#include "progresscoordinator.h"
-#include "qinstallerglobal.h"
#include "qprocesswrapper.h"
#include "qsettingswrapper.h"
#include "settings.h"
@@ -131,12 +130,12 @@ Component *PackageManagerCore::subComponentByName(const QInstaller::PackageManag
if (check != 0 && componentMatches(check, name, version))
return check;
- if (installer->runMode() == AllMode) {
+ if (!installer->isUpdater()) {
QList<Component*> rootComponents;
if (check == 0)
rootComponents = installer->rootComponents();
else
- rootComponents = check->childComponents(false, AllMode);
+ rootComponents = check->childComponents(Component::DirectChildrenOnly);
foreach (QInstaller::Component *component, rootComponents) {
Component *const result = subComponentByName(installer, name, version, component);
@@ -487,7 +486,7 @@ void PackageManagerCore::rollBackInstallation()
if (!componentName.isEmpty()) {
Component *component = componentByName(componentName);
if (!component)
- component = d->componentsToReplace(runMode()).value(componentName).second;
+ component = d->componentsToReplace().value(componentName).second;
if (component) {
component->setUninstalled();
packages.removePackage(component->name());
@@ -606,11 +605,6 @@ void PackageManagerCore::setCreateLocalRepositoryFromBinary(bool create)
sCreateLocalRepositoryFromBinary = create;
}
-RunMode PackageManagerCore::runMode() const
-{
- return isUpdater() ? UpdaterMode : AllMode;
-}
-
bool PackageManagerCore::fetchLocalPackagesTree()
{
d->setStatus(Running);
@@ -725,7 +719,7 @@ bool PackageManagerCore::fetchRemotePackagesTree()
return false;
bool success = false;
- if (runMode() == AllMode)
+ if (!isUpdater())
success = fetchAllPackages(packages, installedPackages);
else {
success = fetchUpdaterPackages(packages, installedPackages);
@@ -934,7 +928,7 @@ QList<Component*> PackageManagerCore::availableComponents() const
QList<Component*> result = d->m_rootComponents;
foreach (QInstaller::Component *component, d->m_rootComponents)
- result += component->childComponents(true, AllMode);
+ result += component->childComponents(Component::Descendants);
return result + d->m_rootDependencyReplacements;
}
@@ -968,21 +962,23 @@ bool PackageManagerCore::calculateComponentsToInstall() const
if (!d->m_componentsToInstallCalculated) {
d->clearComponentsToInstall();
QList<Component*> components;
- if (runMode() == UpdaterMode) {
+ if (isUpdater()) {
foreach (Component *component, updaterComponents()) {
if (component->updateRequested())
components.append(component);
}
- } else if (runMode() == AllMode) {
+ } else if (!isUpdater()) {
// relevant means all components which are not replaced
QList<Component*> relevantComponents = rootComponents();
foreach (QInstaller::Component *component, rootComponents())
- relevantComponents += component->childComponents(true, AllMode);
+ relevantComponents += component->childComponents(Component::Descendants);
foreach (Component *component, relevantComponents) {
// ask for all components which will be installed to get all dependencies
- // even dependencies wich are changed without an increased version
- if (component->installationRequested() || (component->isInstalled() && !component->uninstallationRequested()))
- components.append(component);
+ // even dependencies which are changed without an increased version
+ if (component->installationRequested() || (component->isInstalled()
+ && !component->uninstallationRequested())) {
+ components.append(component);
+ }
}
}
@@ -1005,10 +1001,10 @@ QList<Component*> PackageManagerCore::orderedComponentsToInstall() const
*/
bool PackageManagerCore::calculateComponentsToUninstall() const
{
- if (runMode() == UpdaterMode)
+ if (isUpdater())
return true;
- // hack to avoid removeing needed dependencies
+ // hack to avoid removing needed dependencies
QSet<Component*> componentsToInstall = d->m_orderedComponentsToInstall.toSet();
QList<Component*> components;
@@ -1046,7 +1042,7 @@ QString PackageManagerCore::installReason(Component *component) const
}
/*!
- Returns a list of components that dependend on \a component. The list can be empty. Note: Auto
+ Returns a list of components that depend on \a component. The list can be empty. Note: Auto
installed dependencies are not resolved.
*/
QList<Component*> PackageManagerCore::dependees(const Component *_component) const
@@ -1281,8 +1277,9 @@ QString PackageManagerCore::environmentVariable(const QString &name) const
}
return value;
#else
- const char *pPath = name.isEmpty() ? 0 : getenv(name.toLatin1());
- return pPath ? QLatin1String(pPath) : QString();
+ if (name.isEmpty())
+ return QString();
+ return QString::fromUtf8(qgetenv(name.toLatin1()));
#endif
}
@@ -1711,14 +1708,14 @@ void PackageManagerCore::storeReplacedComponents(QHash<QString, Component *> &co
qWarning() << componentName << "- Does not exist in the repositories anymore.";
continue;
}
- if (!component && !d->componentsToReplace(data.runMode).contains(componentName)) {
+ if (!component && !d->componentsToReplace().contains(componentName)) {
component = new Component(this);
component->setValue(scName, componentName);
} else {
component->loadComponentScript();
- d->replacementDependencyComponents(data.runMode).append(component);
+ d->replacementDependencyComponents().append(component);
}
- d->componentsToReplace(data.runMode).insert(componentName, qMakePair(it.key(), component));
+ d->componentsToReplace().insert(componentName, qMakePair(it.key(), component));
}
}
}
@@ -1731,7 +1728,6 @@ bool PackageManagerCore::fetchAllPackages(const PackagesList &remotes, const Loc
QHash<QString, QInstaller::Component*> components;
Data data;
- data.runMode = AllMode;
data.components = &components;
data.installedPackages = &locals;
@@ -1775,7 +1771,6 @@ bool PackageManagerCore::fetchUpdaterPackages(const PackagesList &remotes, const
QHash<QString, QInstaller::Component *> components;
Data data;
- data.runMode = UpdaterMode;
data.components = &components;
data.installedPackages = &locals;
diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h
index 50eb63184..df77cd115 100644
--- a/src/libs/installer/packagemanagercore.h
+++ b/src/libs/installer/packagemanagercore.h
@@ -121,7 +121,6 @@ public:
bool fetchRemotePackagesTree();
bool run();
- RunMode runMode() const;
void reset(const QHash<QString, QString> &params);
Q_INVOKABLE void setDependsOnLocalInstallerBinary();
@@ -297,7 +296,6 @@ Q_SIGNALS:
private:
struct Data {
- RunMode runMode;
Package *package;
QHash<QString, Component*> *components;
const LocalPackagesHash *installedPackages;
diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp
index e5fd39eaf..35603eab3 100644
--- a/src/libs/installer/packagemanagercore_p.cpp
+++ b/src/libs/installer/packagemanagercore_p.cpp
@@ -422,14 +422,14 @@ void PackageManagerCorePrivate::clearUpdaterComponentLists()
m_componentsToInstallCalculated = false;
}
-QList<Component *> &PackageManagerCorePrivate::replacementDependencyComponents(RunMode mode)
+QList<Component *> &PackageManagerCorePrivate::replacementDependencyComponents()
{
- return mode == AllMode ? m_rootDependencyReplacements : m_updaterDependencyReplacements;
+ return (!isUpdater()) ? m_rootDependencyReplacements : m_updaterDependencyReplacements;
}
-QHash<QString, QPair<Component*, Component*> > &PackageManagerCorePrivate::componentsToReplace(RunMode mode)
+QHash<QString, QPair<Component*, Component*> > &PackageManagerCorePrivate::componentsToReplace()
{
- return mode == AllMode ? m_componentsToReplaceAllMode : m_componentsToReplaceUpdaterMode;
+ return (!isUpdater()) ? m_componentsToReplaceAllMode : m_componentsToReplaceUpdaterMode;
}
void PackageManagerCorePrivate::clearComponentsToInstall()
@@ -453,7 +453,7 @@ bool PackageManagerCorePrivate::appendComponentsToInstall(const QList<Component
relevantComponentForAutoDependOn = m_updaterComponents + m_updaterComponentsDeps;
else {
foreach (QInstaller::Component *component, m_rootComponents)
- relevantComponentForAutoDependOn += component->childComponents(true, AllMode);
+ relevantComponentForAutoDependOn += component->childComponents(Component::Descendants);
}
QList<Component*> notAppendedComponents; // for example components with unresolved dependencies
@@ -773,7 +773,7 @@ void PackageManagerCorePrivate::writeMaintenanceConfigFiles()
QVariantHash variables;
QSettingsWrapper cfg(iniPath, QSettingsWrapper::IniFormat);
foreach (const QString &key, m_data.keys()) {
- if (key != scRunProgramDescription && key != scRunProgram)
+ if (key != scRunProgramDescription && key != scRunProgram && key != scRunProgramArguments)
variables.insert(key, m_data.value(key));
}
cfg.setValue(QLatin1String("Variables"), variables);
@@ -2006,7 +2006,7 @@ void PackageManagerCorePrivate::runUndoOperations(const OperationList &undoOpera
if (!componentName.isEmpty()) {
Component *component = m_core->componentByName(componentName);
if (!component)
- component = componentsToReplace(m_core->runMode()).value(componentName).second;
+ component = componentsToReplace().value(componentName).second;
if (component) {
component->setUninstalled();
packages.removePackage(component->name());
diff --git a/src/libs/installer/packagemanagercore_p.h b/src/libs/installer/packagemanagercore_p.h
index 9d4a6abab..e77bff18f 100644
--- a/src/libs/installer/packagemanagercore_p.h
+++ b/src/libs/installer/packagemanagercore_p.h
@@ -43,18 +43,15 @@
#define PACKAGEMANAGERCORE_P_H
#include "getrepositoriesmetainfojob.h"
-#include "settings.h"
#include "packagemanagercore.h"
#include "packagemanagercoredata.h"
+#include "qinstallerglobal.h"
-#include <kdsysinfo.h>
-#include <kdupdaterapplication.h>
-#include <kdupdaterupdatefinder.h>
+#include "kdsysinfo.h"
+#include "kdupdaterapplication.h"
+#include "kdupdaterfiledownloaderfactory.h"
-#include <QtCore/QHash>
-#include <QtCore/QObject>
-#include <QtCore/QPair>
-#include <QtCore/QPointer>
+#include <QObject>
class FSEngineClientHandler;
class KDJob;
@@ -117,8 +114,8 @@ public:
void clearAllComponentLists();
void clearUpdaterComponentLists();
- QList<Component*> &replacementDependencyComponents(RunMode mode);
- QHash<QString, QPair<Component*, Component*> > &componentsToReplace(RunMode mode);
+ QList<Component*> &replacementDependencyComponents();
+ QHash<QString, QPair<Component*, Component*> > &componentsToReplace();
void clearComponentsToInstall();
bool appendComponentsToInstall(const QList<Component*> &components);
diff --git a/src/libs/installer/packagemanagercoredata.cpp b/src/libs/installer/packagemanagercoredata.cpp
index 4c848f13e..b15b2796c 100644
--- a/src/libs/installer/packagemanagercoredata.cpp
+++ b/src/libs/installer/packagemanagercoredata.cpp
@@ -99,6 +99,7 @@ PackageManagerCoreData::PackageManagerCoreData(const QHash<QString, QString> &va
m_variables.insert(scTargetDir, replaceVariables(m_settings.targetDir()));
m_variables.insert(scRunProgram, replaceVariables(m_settings.runProgram()));
+ m_variables.insert(scRunProgramArguments, replaceVariables(m_settings.runProgramArguments()));
m_variables.insert(scRemoveTargetDir, replaceVariables(m_settings.removeTargetDir()));
}
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 1e01e69ff..c68891145 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -46,7 +46,6 @@
#include "fileutils.h"
#include "messageboxhandler.h"
#include "packagemanagercore.h"
-#include "qinstallerglobal.h"
#include "progresscoordinator.h"
#include "performinstallationform.h"
#include "settings.h"
@@ -2012,11 +2011,13 @@ void FinishedPage::leaving()
void FinishedPage::handleFinishClicked()
{
const QString program = packageManagerCore()->replaceVariables(packageManagerCore()->value(scRunProgram));
+ const QStringList args = packageManagerCore()->replaceVariables(
+ packageManagerCore()->value(scRunProgramArguments)).split(QLatin1Char(' '));
if (!m_runItCheckBox->isChecked() || program.isEmpty())
return;
- qDebug() << "starting" << program;
- QProcess::startDetached(program);
+ qDebug() << "starting" << program << args;
+ QProcess::startDetached(program, args);
}
diff --git a/src/libs/installer/packagemanagerproxyfactory.h b/src/libs/installer/packagemanagerproxyfactory.h
index 2ddfe7a18..a50605232 100644
--- a/src/libs/installer/packagemanagerproxyfactory.h
+++ b/src/libs/installer/packagemanagerproxyfactory.h
@@ -51,7 +51,7 @@ class PackageManagerCore;
class PackageManagerProxyFactory : public KDUpdater::FileDownloaderProxyFactory
{
public:
- PackageManagerProxyFactory(const PackageManagerCore *const core);
+ explicit PackageManagerProxyFactory(const PackageManagerCore *const core);
PackageManagerProxyFactory *clone() const;
QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery());
diff --git a/src/libs/installer/performinstallationform.h b/src/libs/installer/performinstallationform.h
index f3471ebe2..209afc42d 100644
--- a/src/libs/installer/performinstallationform.h
+++ b/src/libs/installer/performinstallationform.h
@@ -61,7 +61,7 @@ class PerformInstallationForm : public QObject
Q_OBJECT
public:
- PerformInstallationForm(QObject *parent);
+ explicit PerformInstallationForm(QObject *parent);
void setupUi(QWidget *widget);
void setDetailsWidgetVisible(bool visible);
diff --git a/src/libs/installer/progresscoordinator.h b/src/libs/installer/progresscoordinator.h
index b1fa0ab67..263b25695 100644
--- a/src/libs/installer/progresscoordinator.h
+++ b/src/libs/installer/progresscoordinator.h
@@ -39,8 +39,8 @@
**
**************************************************************************/
-#ifndef PROGRESSCOORDNINATOR_H
-#define PROGRESSCOORDNINATOR_H
+#ifndef PROGRESSCOORDINATOR_H
+#define PROGRESSCOORDINATOR_H
#include <QtCore/QHash>
#include <QtCore/QObject>
@@ -102,4 +102,4 @@ private:
} //namespace QInstaller
-#endif //PROGRESSCOORDNINATOR_H
+#endif //PROGRESSCOORDINATOR_H
diff --git a/src/libs/installer/qinstallerglobal.h b/src/libs/installer/qinstallerglobal.h
index b7d5d3f3d..81635830b 100644
--- a/src/libs/installer/qinstallerglobal.h
+++ b/src/libs/installer/qinstallerglobal.h
@@ -59,12 +59,6 @@ namespace QInstaller {
static QRegExp scCommaRegExp(QLatin1String("\\b(,|, )\\b"));
-enum INSTALLER_EXPORT RunMode
-{
- AllMode,
- UpdaterMode
-};
-
enum INSTALLER_EXPORT JobError
{
InvalidUrl = 0x24B04,
diff --git a/src/libs/installer/registerqtvqnxoperation.cpp b/src/libs/installer/registerqtincreatorqnxoperation.cpp
index b52558145..be99de4c7 100644
--- a/src/libs/installer/registerqtvqnxoperation.cpp
+++ b/src/libs/installer/registerqtincreatorqnxoperation.cpp
@@ -39,7 +39,7 @@
**
**************************************************************************/
-#include "registerqtvqnxoperation.h"
+#include "registerqtincreatorqnxoperation.h"
#include "packagemanagercore.h"
#include "qtcreator_constants.h"
diff --git a/src/libs/installer/registerqtvqnxoperation.h b/src/libs/installer/registerqtincreatorqnxoperation.h
index a5e49656a..5b6a3c9b1 100644
--- a/src/libs/installer/registerqtvqnxoperation.h
+++ b/src/libs/installer/registerqtincreatorqnxoperation.h
@@ -39,8 +39,8 @@
**
**************************************************************************/
-#ifndef REGISTERQTINCREATORVQNXOPERATION_H
-#define REGISTERQTINCREATORVQNXOPERATION_H
+#ifndef REGISTERQTINCREATORQNXOPERATION_H
+#define REGISTERQTINCREATORQNXOPERATION_H
#include "qinstallerglobal.h"
@@ -60,4 +60,4 @@ public:
} // namespace QInstaller
-#endif // REGISTERQTINCREATORVQNXOPERATION_H
+#endif // REGISTERQTINCREATORQNXOPERATION_H
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp
index a01836253..6503b8778 100644
--- a/src/libs/installer/settings.cpp
+++ b/src/libs/installer/settings.cpp
@@ -41,7 +41,6 @@
#include "settings.h"
#include "errors.h"
-#include "qinstallerglobal.h"
#include "repository.h"
#include <QtCore/QFileInfo>
@@ -218,7 +217,7 @@ Settings Settings::fromFileAndPrefix(const QString &path, const QString &prefix)
<< scTargetDir << scAdminTargetDir
<< scIcon << scLogo << scLogoSmall << scWatermark << scBackground
<< scStartMenuDir << scUninstallerName << scUninstallerIniFile << scRemoveTargetDir
- << scRunProgram << scRunProgramDescription
+ << scRunProgram << scRunProgramArguments << scRunProgramDescription
<< scDependsOnLocalInstallerBinary
<< scAllowSpaceInPath << scAllowNonAsciiCharacters
<< scRepositorySettingsPageVisible << scTargetConfigurationFile
@@ -361,6 +360,11 @@ QString Settings::runProgram() const
return d->m_data.value(scRunProgram).toString();
}
+QString Settings::runProgramArguments() const
+{
+ return d->m_data.value(scRunProgramArguments).toString();
+}
+
QString Settings::runProgramDescription() const
{
return d->m_data.value(scRunProgramDescription).toString();
diff --git a/src/libs/installer/settings.h b/src/libs/installer/settings.h
index 51355d038..db7212b1e 100644
--- a/src/libs/installer/settings.h
+++ b/src/libs/installer/settings.h
@@ -95,6 +95,7 @@ public:
QString applicationVersion() const;
QString runProgram() const;
+ QString runProgramArguments() const;
QString runProgramDescription() const;
QString startMenuDir() const;
QString targetDir() const;
diff --git a/src/libs/installer/utils.h b/src/libs/installer/utils.h
index 0d21adbee..e6aca456d 100644
--- a/src/libs/installer/utils.h
+++ b/src/libs/installer/utils.h
@@ -81,7 +81,7 @@ namespace QInstaller {
{
Q_OBJECT
public:
- VerboseWriter(QObject *parent = 0);
+ explicit VerboseWriter(QObject *parent = 0);
~VerboseWriter();
static VerboseWriter *instance();
diff --git a/src/libs/kdtools/kdsysinfo_win.cpp b/src/libs/kdtools/kdsysinfo_win.cpp
index 10666c8e0..0fa605ef9 100644
--- a/src/libs/kdtools/kdsysinfo_win.cpp
+++ b/src/libs/kdtools/kdsysinfo_win.cpp
@@ -247,7 +247,7 @@ bool killProcess(const ProcessInfo &process, int msecs)
// If we can't open the process with PROCESS_TERMINATE rights,
// then we give up immediately.
- HANDLE hProc = OpenProcess(SYNCHRONIZE | PROCESS_TERMINATE, FALSE, process.id);
+ HANDLE hProc = OpenProcess(SYNCHRONIZE | PROCESS_TERMINATE, false, process.id);
if (hProc == 0)
return false;
diff --git a/src/libs/kdtools/kdupdaterupdateoperation.cpp b/src/libs/kdtools/kdupdaterupdateoperation.cpp
index 40d2e5ada..6f09bc825 100644
--- a/src/libs/kdtools/kdupdaterupdateoperation.cpp
+++ b/src/libs/kdtools/kdupdaterupdateoperation.cpp
@@ -38,7 +38,7 @@
update operations. Concrete implementations of this class must perform a single update
operation like copy, move, delete etc.
- \note Two seperate threads cannot be using a single instance of KDUpdater::UpdateOperation
+ \note Two separate threads cannot be using a single instance of KDUpdater::UpdateOperation
at the same time.
*/
diff --git a/src/libs/kdtools/kdupdaterupdateoperations.cpp b/src/libs/kdtools/kdupdaterupdateoperations.cpp
index 8270bba03..51fcaf7b1 100644
--- a/src/libs/kdtools/kdupdaterupdateoperations.cpp
+++ b/src/libs/kdtools/kdupdaterupdateoperations.cpp
@@ -886,7 +886,7 @@ bool ExecuteOperation::performOperation()
0, 0, 0, STARTF_USESHOWWINDOW, SW_HIDE, 0, 0, 0, 0, 0
};
success = CreateProcess(0, (wchar_t*)arguments.utf16(),
- 0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
+ 0, 0, false, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
0,
&startupInfo, &pinfo);
diff --git a/src/sdk/installerbase_p.h b/src/sdk/installerbase_p.h
index bea4c862f..cd6ed0142 100644
--- a/src/sdk/installerbase_p.h
+++ b/src/sdk/installerbase_p.h
@@ -66,7 +66,7 @@ class InstallerBase : public QObject
Q_OBJECT
public:
- InstallerBase(QObject *parent = 0);
+ explicit InstallerBase(QObject *parent = 0);
~InstallerBase();
int replaceMaintenanceToolBinary(QStringList arguments);
diff --git a/src/sdk/settingsdialog.cpp b/src/sdk/settingsdialog.cpp
index 5773d65c5..b9bfba617 100644
--- a/src/sdk/settingsdialog.cpp
+++ b/src/sdk/settingsdialog.cpp
@@ -54,6 +54,8 @@
#include <QtXml/QDomDocument>
+using namespace QInstaller;
+
// -- TestRepositoryJob
@@ -72,12 +74,12 @@ TestRepository::~TestRepository()
m_downloader->deleteLater();
}
-QInstaller::Repository TestRepository::repository() const
+Repository TestRepository::repository() const
{
return m_repository;
}
-void TestRepository::setRepository(const QInstaller::Repository &repository)
+void TestRepository::setRepository(const Repository &repository)
{
cancel();
@@ -93,13 +95,13 @@ void TestRepository::doStart()
const QUrl url = m_repository.url();
if (url.isEmpty()) {
- emitFinishedWithError(QInstaller::InvalidUrl, tr("Empty repository URL."));
+ emitFinishedWithError(InvalidUrl, tr("Empty repository URL."));
return;
}
m_downloader = KDUpdater::FileDownloaderFactory::instance().create(url.scheme(), this);
if (!m_downloader) {
- emitFinishedWithError(QInstaller::InvalidUrl, tr("URL scheme not supported: %1 (%2).")
+ emitFinishedWithError(InvalidUrl, tr("URL scheme not supported: %1 (%2).")
.arg(url.scheme(), url.toString()));
return;
}
@@ -132,7 +134,7 @@ void TestRepository::doCancel()
void TestRepository::downloadCompleted()
{
QString errorMsg;
- int error = QInstaller::DownloadError;
+ int error = DownloadError;
if (m_downloader->isDownloaded()) {
QFile file(m_downloader->downloadedFileName());
@@ -140,7 +142,7 @@ void TestRepository::downloadCompleted()
QDomDocument doc;
QString errorMsg;
if (!doc.setContent(&file, &errorMsg)) {
- error = QInstaller::InvalidUpdatesXml;
+ error = InvalidUpdatesXml;
errorMsg = tr("Could not parse Updates.xml! Error: %1.");
} else {
error = NoError;
@@ -163,7 +165,7 @@ void TestRepository::downloadCompleted()
void TestRepository::downloadAborted(const QString &reason)
{
- emitFinishedWithError(QInstaller::DownloadError, reason);
+ emitFinishedWithError(DownloadError, reason);
}
void TestRepository::onAuthenticatorChanged(const QAuthenticator &authenticator)
@@ -214,7 +216,7 @@ RepositoryItem::RepositoryItem(const QString &label)
m_repo = QInstaller::Repository(QUrl(), true);
}
-RepositoryItem::RepositoryItem(const QInstaller::Repository &repo)
+RepositoryItem::RepositoryItem(const Repository &repo)
: QTreeWidgetItem(QTreeWidgetItem::UserType)
, m_repo(repo)
{
@@ -302,9 +304,9 @@ void RepositoryItem::setData(int column, int role, const QVariant &value)
QTreeWidgetItem::setData(column, role, value);
}
-QSet<QInstaller::Repository> RepositoryItem::repositories() const
+QSet<Repository> RepositoryItem::repositories() const
{
- QSet<QInstaller::Repository> set;
+ QSet<Repository> set;
for (int i = 0; i < childCount(); ++i) {
if (QTreeWidgetItem *item = child(i)) {
if (item->type() == QTreeWidgetItem::UserType) {
@@ -319,7 +321,7 @@ QSet<QInstaller::Repository> RepositoryItem::repositories() const
// -- SettingsDialog
-SettingsDialog::SettingsDialog(QInstaller::PackageManagerCore *core, QWidget *parent)
+SettingsDialog::SettingsDialog(PackageManagerCore *core, QWidget *parent)
: QDialog(parent)
, m_ui(new Ui::SettingsDialog)
, m_core(core)
@@ -328,15 +330,15 @@ SettingsDialog::SettingsDialog(QInstaller::PackageManagerCore *core, QWidget *pa
m_ui->setupUi(this);
setupRepositoriesTreeWidget();
- const QInstaller::Settings &settings = m_core->settings();
+ const Settings &settings = m_core->settings();
switch (settings.proxyType()) {
- case QInstaller::Settings::NoProxy:
+ case Settings::NoProxy:
m_ui->m_noProxySettings->setChecked(true);
break;
- case QInstaller::Settings::SystemProxy:
+ case Settings::SystemProxy:
m_ui->m_systemProxySettings->setChecked(true);
break;
- case QInstaller::Settings::UserDefinedProxy:
+ case Settings::UserDefinedProxy:
m_ui->m_manualProxySettings->setChecked(true);
break;
default:
@@ -381,8 +383,8 @@ SettingsDialog::SettingsDialog(QInstaller::PackageManagerCore *core, QWidget *pa
void SettingsDialog::accept()
{
bool settingsChanged = false;
- QInstaller::Settings newSettings;
- const QInstaller::Settings &settings = m_core->settings();
+ Settings newSettings;
+ const Settings &settings = m_core->settings();
// set possible updated default repositories
newSettings.setDefaultRepositories((dynamic_cast<RepositoryItem*> (m_rootItems.at(0)))->repositories());
@@ -399,14 +401,14 @@ void SettingsDialog::accept()
settingsChanged |= (settings.userRepositories() != newSettings.userRepositories());
// update proxy type
- newSettings.setProxyType(QInstaller::Settings::NoProxy);
+ newSettings.setProxyType(Settings::NoProxy);
if (m_ui->m_systemProxySettings->isChecked())
- newSettings.setProxyType(QInstaller::Settings::SystemProxy);
+ newSettings.setProxyType(Settings::SystemProxy);
else if (m_ui->m_manualProxySettings->isChecked())
- newSettings.setProxyType(QInstaller::Settings::UserDefinedProxy);
+ newSettings.setProxyType(Settings::UserDefinedProxy);
settingsChanged |= settings.proxyType() != newSettings.proxyType();
- if (newSettings.proxyType() == QInstaller::Settings::UserDefinedProxy) {
+ if (newSettings.proxyType() == Settings::UserDefinedProxy) {
// update ftp proxy settings
newSettings.setFtpProxy(QNetworkProxy(QNetworkProxy::HttpProxy, m_ui->m_ftpProxy->text(),
m_ui->m_ftpProxyPort->value(), m_ui->m_ftpProxyUser->text(), m_ui->m_ftpProxyPass->text()));
@@ -436,7 +438,7 @@ void SettingsDialog::addRepository()
}
if (parent) {
- QInstaller::Repository repository;
+ Repository repository;
repository.setEnabled(true);
RepositoryItem *item = new RepositoryItem(repository);
parent->insertChild(index, item);
@@ -537,7 +539,7 @@ void SettingsDialog::setupRepositoriesTreeWidget()
m_rootItems.append(new RepositoryItem(tr("User defined repositories")));
treeWidget->addTopLevelItems(m_rootItems);
- const QInstaller::Settings &settings = m_core->settings();
+ const Settings &settings = m_core->settings();
insertRepositories(settings.userRepositories(), m_rootItems.at(2));
insertRepositories(settings.defaultRepositories(), m_rootItems.at(0));
insertRepositories(settings.temporaryRepositories(), m_rootItems.at(1));
@@ -562,9 +564,9 @@ void SettingsDialog::setupRepositoriesTreeWidget()
m_delegate->disableEditing(false);
}
-void SettingsDialog::insertRepositories(const QSet<QInstaller::Repository> repos, QTreeWidgetItem *rootItem)
+void SettingsDialog::insertRepositories(const QSet<Repository> repos, QTreeWidgetItem *rootItem)
{
rootItem->setFirstColumnSpanned(true);
- foreach (const QInstaller::Repository &repo, repos)
+ foreach (const Repository &repo, repos)
rootItem->addChild(new RepositoryItem(repo));
}
diff --git a/src/sdk/settingsdialog.h b/src/sdk/settingsdialog.h
index f0d068a78..1a6633c67 100644
--- a/src/sdk/settingsdialog.h
+++ b/src/sdk/settingsdialog.h
@@ -77,7 +77,7 @@ class TestRepository : public KDJob
public:
- TestRepository(QObject *parent = 0);
+ explicit TestRepository(QObject *parent = 0);
~TestRepository();
QInstaller::Repository repository() const;
@@ -105,7 +105,7 @@ class PasswordDelegate : public QStyledItemDelegate
Q_OBJECT
public:
- PasswordDelegate(QWidget *parent = 0)
+ explicit PasswordDelegate(QWidget *parent = 0)
: QStyledItemDelegate(parent)
, m_showPasswords(true)
, m_disabledEditor(true)
@@ -129,8 +129,8 @@ private:
class RepositoryItem : public QTreeWidgetItem
{
public:
- RepositoryItem(const QString &label);
- RepositoryItem(const QInstaller::Repository &repo);
+ explicit RepositoryItem(const QString &label);
+ explicit RepositoryItem(const QInstaller::Repository &repo);
QVariant data(int column, int role) const;
void setData(int column, int role, const QVariant &value);
@@ -151,7 +151,7 @@ class SettingsDialog : public QDialog
Q_OBJECT
public:
- SettingsDialog(QInstaller::PackageManagerCore *core, QWidget *parent = 0);
+ explicit SettingsDialog(QInstaller::PackageManagerCore *core, QWidget *parent = 0);
public slots:
void accept();
diff --git a/tests/auto/installer/settings/data/full_config.xml b/tests/auto/installer/settings/data/full_config.xml
index 9f06703b0..d52514642 100644
--- a/tests/auto/installer/settings/data/full_config.xml
+++ b/tests/auto/installer/settings/data/full_config.xml
@@ -27,6 +27,7 @@ File should contain all elements we allow in a config.xml
<RemoveTargetDir>true</RemoveTargetDir>
<RunProgram>myapp</RunProgram>
+ <RunProgramArguments>foo bar</RunProgramArguments>
<RunProgramDescription>Launch MyApp</RunProgramDescription>
<DependsOnLocalInstallerBinary>true</DependsOnLocalInstallerBinary>
diff --git a/tests/auto/installer/settings/tst_settings.cpp b/tests/auto/installer/settings/tst_settings.cpp
index 073d7b7d1..a578ea37e 100644
--- a/tests/auto/installer/settings/tst_settings.cpp
+++ b/tests/auto/installer/settings/tst_settings.cpp
@@ -47,6 +47,7 @@ void tst_Settings::loadTutorialConfig()
QCOMPARE(settings.icon(), QLatin1String(":/installer.png"));
#endif
QCOMPARE(settings.runProgram(), QString());
+ QCOMPARE(settings.runProgramArguments(), QString());
QCOMPARE(settings.runProgramDescription(), QString());
QCOMPARE(settings.adminTargetDir(), QString());
QCOMPARE(settings.removeTargetDir(), QLatin1String("true"));
diff --git a/tools/common/repositorygen.cpp b/tools/common/repositorygen.cpp
index dcf6b6133..9f5a4d654 100644
--- a/tools/common/repositorygen.cpp
+++ b/tools/common/repositorygen.cpp
@@ -189,7 +189,7 @@ void QInstallerTools::generateMetaDataDirectory(const QString &outDir, const QSt
const QString value = node.toElement().text();
QDomElement element = doc.createElement(key);
- for (int i = 0; i < node.attributes().size(); i++) {
+ for (int i = 0; i < node.attributes().size(); ++i) {
element.setAttribute(node.attributes().item(i).toAttr().name(),
node.attributes().item(i).toAttr().value());
}
diff --git a/tools/repogenfromonlinerepo/downloadmanager.h b/tools/repogenfromonlinerepo/downloadmanager.h
index 13cce7163..29aebec45 100644
--- a/tools/repogenfromonlinerepo/downloadmanager.h
+++ b/tools/repogenfromonlinerepo/downloadmanager.h
@@ -54,7 +54,7 @@ class DownloadManager: public QObject
{
Q_OBJECT
public:
- DownloadManager(QObject *parent = 0);
+ explicit DownloadManager(QObject *parent = 0);
void append(const QUrl &url);
void append(const QStringList &urlList);
diff --git a/tools/repogenfromonlinerepo/main.cpp b/tools/repogenfromonlinerepo/main.cpp
index 12023d495..d9c331fa2 100644
--- a/tools/repogenfromonlinerepo/main.cpp
+++ b/tools/repogenfromonlinerepo/main.cpp
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
// get Updates.xml to get to know what we can download
downloadManager.append(QUrl(repoUrl + QLatin1String("/Updates.xml")));
- QObject::connect( &downloadManager, SIGNAL( finished() ), &downloadEventLoop, SLOT( quit() ) );
+ QObject::connect(&downloadManager, SIGNAL(finished()), &downloadEventLoop, SLOT(quit()));
downloadEventLoop.exec();
// END - get Updates.xml to get to know what we can download
@@ -192,7 +192,7 @@ int main(int argc, char *argv[])
// get Updates.xml to get to know what we can download
downloadManager.append(QUrl(repoUrl + QLatin1String("/") + packageName + QLatin1String("/")
+ packageScript));
- QObject::connect( &downloadManager, SIGNAL( finished() ), &downloadEventLoop, SLOT( quit() ) );
+ QObject::connect(&downloadManager, SIGNAL(finished()), &downloadEventLoop, SLOT(quit()));
downloadEventLoop.exec();
// END - get Updates.xml to get to know what we can download