diff options
author | kh1 <qt-info@nokia.com> | 2011-06-01 11:32:37 +0200 |
---|---|---|
committer | kh1 <qt-info@nokia.com> | 2011-06-01 11:32:37 +0200 |
commit | feba978e1a5f07b295ea4c3aefc650d1b1f920c8 (patch) | |
tree | b2b0856e37c76a2ea1b4a548eba04fe42bfa6107 /examples/testapp | |
parent | 5b7ae078e7763cd5a103556b02da40d4e49cf062 (diff) |
Remove some superfluous includes. Style changes.
Diffstat (limited to 'examples/testapp')
-rw-r--r-- | examples/testapp/mainwindow.cpp | 46 | ||||
-rw-r--r-- | examples/testapp/mainwindow.h | 14 |
2 files changed, 25 insertions, 35 deletions
diff --git a/examples/testapp/mainwindow.cpp b/examples/testapp/mainwindow.cpp index 1076b2b2c..6af20bce6 100644 --- a/examples/testapp/mainwindow.cpp +++ b/examples/testapp/mainwindow.cpp @@ -32,36 +32,22 @@ **************************************************************************/ #include "mainwindow.h" -#include <memory> - -#include <QAbstractButton> -#include <QApplication> -#include <QLabel> -#include <QMenu> -#include <QMenuBar> -#include <QMessageBox> -#include <QProgressDialog> -#include <QStringList> - -#include <KDToolsCore/KDAutoPointer> -#include <KDToolsCore/KDSelfRestarter> - -#include <KDUpdater/Application> -#include <KDUpdater/PackagesInfo> -#include <KDUpdater/UpdateFinder> -#include <KDUpdater/UpdateSourcesInfo> +#include "componentselectiondialog.h" +#include "updateagent.h" +#include "updatesettingsdialog.h" -#include <common/binaryformatenginehandler.h> #include <common/binaryformat.h> -#include "componentselectiondialog.h" -#include <getrepositorymetainfojob.h> #include <common/errors.h> -#include <common/fileutils.h> #include <init.h> -#include "updateagent.h" - #include <updatesettings.h> -#include "updatesettingsdialog.h" + +#include <KDToolsCore/KDSelfRestarter> + +#include <QtGui/QAbstractButton> +#include <QtGui/QApplication> +#include <QtGui/QLabel> +#include <QtGui/QMenuBar> +#include <QtGui/QProgressDialog> using namespace QInstaller; using namespace QInstallerCreator; @@ -80,7 +66,7 @@ MainWindow::MainWindow(const QStringList &args, QWidget *parent) fm->addAction(QObject::tr("Quit"), QApplication::instance(), SLOT(quit()), QKeySequence(QLatin1String("Ctrl+Q"))); - QLabel* label = new QLabel(this); + QLabel *label = new QLabel(this); label->setWordWrap(true); label->setAlignment(Qt::AlignCenter); setCentralWidget(label); @@ -90,7 +76,7 @@ MainWindow::MainWindow(const QStringList &args, QWidget *parent) updaterapp.packagesInfo()->setApplicationName(m_settings.applicationName()); updaterapp.packagesInfo()->setApplicationVersion(m_settings.applicationVersion()); - UpdateAgent* const agent = new UpdateAgent(this); + UpdateAgent *const agent = new UpdateAgent(this); connect(agent, SIGNAL(updatesAvailable()), this, SLOT(updatesAvailable())); } @@ -107,8 +93,7 @@ void MainWindow::checkForUpdates() handler->setComponentIndex(QInstallerCreator::ComponentIndex()); UpdateSettings settings; - try - { + try { m_installer->setTemporaryRepositories(settings.repositories()); settings.setLastCheck(QDateTime::currentDateTime()); @@ -134,7 +119,8 @@ void MainWindow::checkForUpdates() dialog.setRange(0, 100); dialog.show(); connect(&dialog, SIGNAL(canceled()), m_installer, SLOT(interrupt())); - connect(m_installer, SIGNAL(installationProgressTextChanged(QString)), &dialog, SLOT(setLabelText(QString))); + connect(m_installer, SIGNAL(installationProgressTextChanged(QString)), &dialog, + SLOT(setLabelText(QString))); connect(m_installer, SIGNAL(installationProgressChanged(int)), &dialog, SLOT(setValue(int))); m_installer->installSelectedComponents(); updatesInstalled(); diff --git a/examples/testapp/mainwindow.h b/examples/testapp/mainwindow.h index 27af19c97..274b4e223 100644 --- a/examples/testapp/mainwindow.h +++ b/examples/testapp/mainwindow.h @@ -23,17 +23,21 @@ ** (qt-info@nokia.com). ** **************************************************************************/ -#include <QMainWindow> + +#include <qinstaller.h> +#include <common/installersettings.h> #include <KDUpdater/Application> -#include "qinstaller.h" -#include "common/installersettings.h" +#include <QtGui/QMainWindow> + -class MainWindow : public QMainWindow { +class MainWindow : public QMainWindow +{ Q_OBJECT + public: - explicit MainWindow( const QStringList& args, QWidget* parent=0 ); + explicit MainWindow(const QStringList &args, QWidget *parent = 0); ~MainWindow() { delete m_installer; } private Q_SLOTS: |