Use Core::Id in ICore::showOptionsDialog

Change-Id: I3865fde2347d687a7dee76dd5ca62db69cc4dd04
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-12-29 01:31:08 +01:00
parent 82f9de4af0
commit e833b794b3
27 changed files with 74 additions and 79 deletions

View File

@@ -960,14 +960,12 @@ void MainWindow::showNewItemDialog(const QString &title,
wizard->runWizard(path, this, selectedPlatform, extraVariables);
}
bool MainWindow::showOptionsDialog(const QString &category,
const QString &page,
QWidget *parent)
bool MainWindow::showOptionsDialog(Id category, Id page, QWidget *parent)
{
emit m_coreImpl->optionsDialogRequested();
if (!parent)
parent = this;
SettingsDialog *dialog = SettingsDialog::getSettingsDialog(parent, category, page);
SettingsDialog *dialog = SettingsDialog::getSettingsDialog(parent, category.toString(), page.toString());
return dialog->execDialog();
}
@@ -1349,7 +1347,7 @@ bool MainWindow::showWarningWithOptions(const QString &title,
const QString &text,
const QString &details,
Id settingsCategory,
const QString &settingsId,
Id settingsId,
QWidget *parent)
{
if (parent == 0)
@@ -1359,11 +1357,10 @@ bool MainWindow::showWarningWithOptions(const QString &title,
if (!details.isEmpty())
msgBox.setDetailedText(details);
QAbstractButton *settingsButton = 0;
if (!settingsId.isEmpty() || settingsCategory.isValid())
if (settingsId.isValid() || settingsCategory.isValid())
settingsButton = msgBox.addButton(tr("Settings..."), QMessageBox::AcceptRole);
msgBox.exec();
if (settingsButton && msgBox.clickedButton() == settingsButton) {
return showOptionsDialog(settingsCategory.toString(), settingsId);
}
if (settingsButton && msgBox.clickedButton() == settingsButton)
return showOptionsDialog(settingsCategory, settingsId);
return false;
}