summaryrefslogtreecommitdiffstats
path: root/src/sdk/installerbasecommons.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdk/installerbasecommons.cpp')
-rw-r--r--src/sdk/installerbasecommons.cpp25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/sdk/installerbasecommons.cpp b/src/sdk/installerbasecommons.cpp
index 9c2784b5a..a4e5047d0 100644
--- a/src/sdk/installerbasecommons.cpp
+++ b/src/sdk/installerbasecommons.cpp
@@ -75,16 +75,19 @@ IntroductionPageImpl::IntroductionPageImpl(QInstaller::PackageManagerCore *core)
QVBoxLayout *layout = new QVBoxLayout(widget);
m_packageManager = new QRadioButton(tr("Package manager"), this);
+ m_packageManager->setObjectName(QLatin1String("PackageManagerRadioButton"));
layout->addWidget(m_packageManager);
m_packageManager->setChecked(core->isPackageManager());
connect(m_packageManager, SIGNAL(toggled(bool)), this, SLOT(setPackageManager(bool)));
m_updateComponents = new QRadioButton(tr("Update components"), this);
+ m_updateComponents->setObjectName(QLatin1String("UpdaterRadioButton"));
layout->addWidget(m_updateComponents);
m_updateComponents->setChecked(core->isUpdater());
connect(m_updateComponents, SIGNAL(toggled(bool)), this, SLOT(setUpdater(bool)));
m_removeAllComponents = new QRadioButton(tr("Remove all components"), this);
+ m_removeAllComponents->setObjectName(QLatin1String("UninstallerRadioButton"));
layout->addWidget(m_removeAllComponents);
m_removeAllComponents->setChecked(core->isUninstaller());
connect(m_removeAllComponents, SIGNAL(toggled(bool)), this, SLOT(setUninstaller(bool)));
@@ -177,7 +180,7 @@ bool IntroductionPageImpl::validatePage()
m_allPackagesFetched = core->fetchRemotePackagesTree();
if (!m_allPackagesFetched) {
QString error = core->error();
- if (core->isPackageManager()) {
+ if (core->isPackageManager() && core->status() != PackageManagerCore::ForceUpdate) {
// if that fails and we're in maintenance mode, try to fetch local installed tree
localPackagesTreeFetched = core->fetchLocalPackagesTree();
if (localPackagesTreeFetched) {
@@ -317,10 +320,6 @@ void IntroductionPageImpl::setPackageManager(bool value)
void IntroductionPageImpl::onCoreNetworkSettingsChanged()
{
- // force a repaint of the ui as after the settings dialog has been closed and the wizard has been
- // restarted, the "Next" button looks still disabled. TODO: figure out why this happens at all!
- gui()->repaint();
-
m_updatesFetched = false;
m_allPackagesFetched = false;
}
@@ -344,8 +343,6 @@ void IntroductionPageImpl::entering()
void IntroductionPageImpl::leaving()
{
- // TODO: force repaint on next page, keeps unpainted after fetch
- QTimer::singleShot(100, gui()->page(nextId()), SLOT(repaint()));
setButtonText(QWizard::CancelButton, gui()->defaultButtonText(QWizard::CancelButton));
}
@@ -372,6 +369,7 @@ TargetDirectoryPageImpl::TargetDirectoryPageImpl(PackageManagerCore *core)
m_warningLabel = new QLabel(this);
m_warningLabel->setPalette(palette);
+ m_warningLabel->setWordWrap(true);
insertWidget(m_warningLabel, QLatin1String("MessageLabel"), 2);
}
@@ -406,7 +404,7 @@ QString TargetDirectoryPageImpl::targetDirWarning() const
dir = dir.mid(2);
#endif
- QString ambiguousChars = QLatin1String("[<>|?*!@#$%^&:,; ]");
+ QString ambiguousChars = QLatin1String("[~<>|?*!@#$%^&:,; ]");
if (packageManagerCore()->settings().allowSpaceInPath())
ambiguousChars.remove(QLatin1Char(' '));
@@ -441,9 +439,6 @@ bool TargetDirectoryPageImpl::askQuestion(const QString &identifier, const QStri
QMessageBox::StandardButton bt =
MessageBoxHandler::warning(MessageBoxHandler::currentBestSuitParent(), identifier,
TargetDirectoryPageImpl::tr("Warning"), message, QMessageBox::Yes | QMessageBox::No);
-#ifndef Q_OS_MAC
- QTimer::singleShot(100, wizard()->page(nextId()), SLOT(repaint()));
-#endif
return bt == QMessageBox::Yes;
}
@@ -451,9 +446,6 @@ bool TargetDirectoryPageImpl::failWithError(const QString &identifier, const QSt
{
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(), identifier,
TargetDirectoryPageImpl::tr("Error"), message);
-#ifndef Q_OS_MAC
- QTimer::singleShot(100, wizard()->page(nextId()), SLOT(repaint()));
-#endif
return false;
}
@@ -520,11 +512,6 @@ InstallerGui::InstallerGui(PackageManagerCore *core)
setPage(PackageManagerCore::ReadyForInstallation, new ReadyForInstallationPage(core));
setPage(PackageManagerCore::PerformInstallation, new PerformInstallationPage(core));
setPage(PackageManagerCore::InstallationFinished, new FinishedPage(core));
-
- bool ok = false;
- const int startPage = core->value(QLatin1String("GuiStartPage")).toInt(&ok);
- if(ok)
- setStartId(startPage);
}
void InstallerGui::init()