forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.5'
This commit is contained in:
@@ -434,7 +434,7 @@ QString BaseFileWizard::descriptionImage() const
|
||||
return d->m_parameters.descriptionImage();
|
||||
}
|
||||
|
||||
void BaseFileWizard::runWizard(const QString &path, QWidget *parent, const QString &platform)
|
||||
void BaseFileWizard::runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues)
|
||||
{
|
||||
QTC_ASSERT(!path.isEmpty(), return);
|
||||
|
||||
@@ -500,7 +500,7 @@ void BaseFileWizard::runWizard(const QString &path, QWidget *parent, const QStri
|
||||
}
|
||||
if (firstExtensionPageHit)
|
||||
foreach (IFileWizardExtension *ex, extensions)
|
||||
ex->firstExtensionPageShown(files);
|
||||
ex->firstExtensionPageShown(files, extraValues);
|
||||
if (accepted)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
|
||||
virtual QString descriptionImage() const;
|
||||
|
||||
virtual void runWizard(const QString &path, QWidget *parent, const QString &platform);
|
||||
virtual void runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues);
|
||||
virtual Core::FeatureSet requiredFeatures() const;
|
||||
virtual WizardFlags flags() const;
|
||||
|
||||
|
||||
@@ -5,10 +5,9 @@ QtcPlugin {
|
||||
name: "Core"
|
||||
|
||||
Depends { name: "qt"; submodules: ['core', 'gui', 'xml', 'network', 'script', 'sql', 'help'] }
|
||||
Depends { name: "utils" }
|
||||
Depends { name: "extensionsystem" }
|
||||
Depends { name: "aggregation" }
|
||||
Depends { name: "pluginspec" }
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "ExtensionSystem" }
|
||||
Depends { name: "Aggregation" }
|
||||
|
||||
cpp.includePaths: [
|
||||
".",
|
||||
@@ -240,9 +239,9 @@ QtcPlugin {
|
||||
}
|
||||
|
||||
ProductModule {
|
||||
Depends { name: "aggregation" }
|
||||
Depends { name: "extensionsystem" }
|
||||
Depends { name: "utils" }
|
||||
Depends { name: "Aggregation" }
|
||||
Depends { name: "ExtensionSystem" }
|
||||
Depends { name: "Utils" }
|
||||
cpp.includePaths: [
|
||||
"../..",
|
||||
"../../libs",
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <coreplugin/featureprovider.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QIcon;
|
||||
@@ -78,7 +79,7 @@ public:
|
||||
virtual FeatureSet requiredFeatures() const = 0;
|
||||
virtual WizardFlags flags() const = 0;
|
||||
|
||||
virtual void runWizard(const QString &path, QWidget *parent, const QString &platform) = 0;
|
||||
virtual void runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &variables) = 0;
|
||||
|
||||
bool isAvailable(const QString &platformName) const;
|
||||
QStringList supportedPlatforms() const;
|
||||
|
||||
@@ -385,9 +385,10 @@ ICore::~ICore()
|
||||
|
||||
void ICore::showNewItemDialog(const QString &title,
|
||||
const QList<IWizard *> &wizards,
|
||||
const QString &defaultLocation)
|
||||
const QString &defaultLocation,
|
||||
const QVariantMap &extraVariables)
|
||||
{
|
||||
m_mainwindow->showNewItemDialog(title, wizards, defaultLocation);
|
||||
m_mainwindow->showNewItemDialog(title, wizards, defaultLocation, extraVariables);
|
||||
}
|
||||
|
||||
bool ICore::showOptionsDialog(const QString &group, const QString &page, QWidget *parent)
|
||||
|
||||
@@ -81,7 +81,8 @@ public:
|
||||
|
||||
static void showNewItemDialog(const QString &title,
|
||||
const QList<IWizard *> &wizards,
|
||||
const QString &defaultLocation = QString());
|
||||
const QString &defaultLocation = QString(),
|
||||
const QVariantMap &extraVariables = QVariantMap());
|
||||
|
||||
static bool showOptionsDialog(const QString &group = QString(),
|
||||
const QString &page = QString(),
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <QVariantMap>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QWizardPage;
|
||||
@@ -71,8 +72,9 @@ public:
|
||||
|
||||
public slots:
|
||||
/* Notification about the first extension page being shown. */
|
||||
virtual void firstExtensionPageShown(const QList<GeneratedFile> &files) {
|
||||
virtual void firstExtensionPageShown(const QList<GeneratedFile> &files, const QVariantMap &extraValues) {
|
||||
Q_UNUSED(files)
|
||||
Q_UNUSED(extraValues)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -966,7 +966,8 @@ void MainWindow::setFocusToEditor()
|
||||
|
||||
void MainWindow::showNewItemDialog(const QString &title,
|
||||
const QList<IWizard *> &wizards,
|
||||
const QString &defaultLocation)
|
||||
const QString &defaultLocation,
|
||||
const QVariantMap &extraVariables)
|
||||
{
|
||||
// Scan for wizards matching the filter and pick one. Don't show
|
||||
// dialog if there is only one.
|
||||
@@ -1007,7 +1008,7 @@ void MainWindow::showNewItemDialog(const QString &title,
|
||||
break;
|
||||
}
|
||||
}
|
||||
wizard->runWizard(path, this, selectedPlatform);
|
||||
wizard->runWizard(path, this, selectedPlatform, extraVariables);
|
||||
}
|
||||
|
||||
bool MainWindow::showOptionsDialog(const QString &category,
|
||||
|
||||
@@ -141,7 +141,8 @@ public slots:
|
||||
|
||||
void showNewItemDialog(const QString &title,
|
||||
const QList<IWizard *> &wizards,
|
||||
const QString &defaultLocation = QString());
|
||||
const QString &defaultLocation = QString(),
|
||||
const QVariantMap &extraVariables = QVariantMap());
|
||||
|
||||
bool showOptionsDialog(const QString &category = QString(),
|
||||
const QString &page = QString(),
|
||||
|
||||
Reference in New Issue
Block a user