Handle no selected themes properly.

When installing themes without any themes selected show a notice in the log and
continue instead of stopping.

Change-Id: Ieeb03e4656b041ce1dda25b2c44b6b6f0aa0ca80
This commit is contained in:
Dominik Riebeling 2012-07-01 14:58:39 +02:00
parent d0f7a8181b
commit b7931594f9
2 changed files with 3 additions and 2 deletions

View file

@ -465,10 +465,10 @@ void SelectiveInstallWidget::installThemes(void)
if(m_themesinstaller == NULL)
m_themesinstaller = new ThemesInstallWindow(this);
connect(m_themesinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
m_themesinstaller->setLogger(m_logger);
m_themesinstaller->setModal(true);
m_themesinstaller->install();
connect(m_themesinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
}
else {
qDebug() << "[SelectiveInstallWidget] Themes install disabled.";

View file

@ -321,7 +321,8 @@ void ThemesInstallWindow::accept(void)
void ThemesInstallWindow::install()
{
if(ui.listThemes->selectedItems().size() == 0) {
this->close();
logger->addItem(tr("No themes selected, skipping"), LOGINFO);
emit done(false);
return;
}
QStringList themes;