summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-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
33 files changed, 0 insertions, 1943 deletions
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>