forked from qt-creator/qt-creator
Rename IWizard::Kind --> IWizard::WizardKind, add some logic for which wizard kinds to collapse/expand.
This commit is contained in:
@@ -56,7 +56,6 @@
|
||||
#include "statusbarmanager.h"
|
||||
#include "uniqueidmanager.h"
|
||||
#include "manhattanstyle.h"
|
||||
#include "dialogs/iwizard.h"
|
||||
#include "navigationwidget.h"
|
||||
#include "rightpane.h"
|
||||
#include "editormanager/ieditorfactory.h"
|
||||
@@ -744,7 +743,8 @@ void MainWindow::registerDefaultActions()
|
||||
|
||||
void MainWindow::newFile()
|
||||
{
|
||||
showNewItemDialog(tr("New...", "Title of dialog"), IWizard::allWizards());
|
||||
showNewItemDialog(tr("New...", "Title of dialog"), IWizard::allWizards(),
|
||||
QString(), m_coreImpl->newItemDialogPreferredWizardKinds());
|
||||
}
|
||||
|
||||
void MainWindow::openFile()
|
||||
@@ -836,7 +836,8 @@ void MainWindow::setFocusToEditor()
|
||||
|
||||
QStringList MainWindow::showNewItemDialog(const QString &title,
|
||||
const QList<IWizard *> &wizards,
|
||||
const QString &defaultLocation)
|
||||
const QString &defaultLocation,
|
||||
IWizard::WizardKinds preferredWizardKinds)
|
||||
{
|
||||
// Scan for wizards matching the filter and pick one. Don't show
|
||||
// dialog if there is only one.
|
||||
@@ -851,6 +852,7 @@ QStringList MainWindow::showNewItemDialog(const QString &title,
|
||||
NewDialog dlg(this);
|
||||
dlg.setWizards(wizards);
|
||||
dlg.setWindowTitle(title);
|
||||
dlg.setPreferredWizardKinds(preferredWizardKinds);
|
||||
wizard = dlg.showDialog();
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user