summaryrefslogtreecommitdiffstats
path: root/installerbuilder/installerbase/tabcontroller.cpp
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-03-11 15:06:06 +0100
committerkh1 <qt-info@nokia.com>2011-03-11 15:06:06 +0100
commit3ae44d8b3aa8d2973b7c69f1fec98220c29d21b1 (patch)
tree28abe85eedec47aa439876e17f3189a266388b13 /installerbuilder/installerbase/tabcontroller.cpp
parent8e51814274d369e08de7c50438f99c0fd4b9aaed (diff)
Make use of the new fetch all packages function.
Diffstat (limited to 'installerbuilder/installerbase/tabcontroller.cpp')
-rw-r--r--installerbuilder/installerbase/tabcontroller.cpp42
1 files changed, 29 insertions, 13 deletions
diff --git a/installerbuilder/installerbase/tabcontroller.cpp b/installerbuilder/installerbase/tabcontroller.cpp
index 7710b4c3a..25dea8a21 100644
--- a/installerbuilder/installerbase/tabcontroller.cpp
+++ b/installerbuilder/installerbase/tabcontroller.cpp
@@ -481,12 +481,17 @@ int TabController::initUninstaller()
int TabController::initPackageManager()
{
+ using namespace QInstaller;
+
if (d->m_packageManagerInitialized)
return QInstaller::Installer::Success;
+ d->m_packageManagerInitialized = true;
+
// this should called as early as possible, to handle checkRepositories error messageboxes for
// example
if (!d->m_controlScript.isEmpty()) {
+ // TODO: Check if we really need from this, or what parts of it.
QInstaller::verbose() << "Non-interactive installation using script: "
<< qPrintable(d->m_controlScript) << std::endl;
d->m_gui->loadControlScript(d->m_controlScript);
@@ -512,26 +517,37 @@ int TabController::initPackageManager()
}
}
- if (d->m_repoUpdateNeeded) {
- int result = checkRepositories();
- if (result != QInstaller::Installer::Success && d->m_repoReached)
- return result;
- }
- d->m_packageManagerInitialized = true;
+ IntroductionPageImpl *introPage =
+ qobject_cast<IntroductionPageImpl*>(d->m_gui->page(Installer::Introduction));
+ introPage->showMetaInfoUdate();
+ if (d->m_installer->isPackageManager())
+ introPage->showAll();
+ introPage->setComplete(false);
- // Initialize the gui. Needs to be done after check repositories as only then the ui can handle
- // hide of pages depenging on the components.
- d->m_gui->init();
+ connect(d->m_installer, SIGNAL(allComponentsInfoMessage(KDJob*,QString)), introPage,
+ SLOT(message(KDJob*, QString)));
+ d->m_gui->connect(d->m_gui, SIGNAL(rejected()), d->m_installer, SIGNAL(cancelAllComponentsInfoJob()),
+ Qt::QueuedConnection);
- if (d->m_installer->isPackageManager())
- d->preselectInstalledPackages();
+ d->m_gui->setWindowModality(Qt::WindowModal);
+ d->m_gui->show();
- using namespace QInstaller;
- qobject_cast<IntroductionPage*>(d->m_gui->page(Installer::Introduction))->setComplete(true);
+ if (!d->m_installer->fetchAllPackages())
+ return QInstaller::Installer::Failure;
+ // Initialize the gui. Needs to be done after check repositories as only then the ui can handle
+ // hide of pages depenging on the components.
+ d->m_gui->init();
d->m_gui->callControlScriptMethod(QLatin1String("PackageManagerSelectedCallback"));
d->m_gui->triggerControlScriptForCurrentPage();
+ introPage->setComplete(true);
+
+ if (d->m_installer->isPackageManager())
+ introPage->showMaintenanceTools();
+ else
+ introPage->hideAll();
+
return QInstaller::Installer::Success;
}