forked from qt-creator/qt-creator
Use Core::Id in ICore::showOptionsDialog
Change-Id: I3865fde2347d687a7dee76dd5ca62db69cc4dd04 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user