diff options
author | Martin T. H. Sandsmark <martin.sandsmark@nov.com> | 2013-02-19 15:59:04 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-04-17 13:26:10 +0200 |
commit | 23bb4ff631544c15417c030aa2a5bd327265b510 (patch) | |
tree | cadc2622194b2c58a12ecd04d96cc364165be11a /src/plugins/projectexplorer/customwizard/customwizardpage.cpp | |
parent | e255f15ac3776df17bdce61536bf6fbb52a26c8c (diff) | |
download | qt-creator-23bb4ff631544c15417c030aa2a5bd327265b510.tar.gz |
Custom wizard: Add setting for PathChooser's expectedKind.
Change-Id: Iff8955d0db20c5c00f8a1745ab1f4310482254cb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'src/plugins/projectexplorer/customwizard/customwizardpage.cpp')
-rw-r--r-- | src/plugins/projectexplorer/customwizard/customwizardpage.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/customwizard/customwizardpage.cpp b/src/plugins/projectexplorer/customwizard/customwizardpage.cpp index 11da62e991..eac4212c37 100644 --- a/src/plugins/projectexplorer/customwizard/customwizardpage.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizardpage.cpp @@ -315,6 +315,20 @@ QWidget *CustomWizardFieldPage::registerPathChooser(const QString &fieldName, const CustomWizardField &field) { Utils::PathChooser *pathChooser = new Utils::PathChooser; + const QString expectedKind = field.controlAttributes.value(QLatin1String("expectedkind")).toLower(); + if (expectedKind == QLatin1String("existingdirectory")) + pathChooser->setExpectedKind(Utils::PathChooser::ExistingDirectory); + else if (expectedKind == QLatin1String("directory")) + pathChooser->setExpectedKind(Utils::PathChooser::Directory); + else if (expectedKind == QLatin1String("file")) + pathChooser->setExpectedKind(Utils::PathChooser::File); + else if (expectedKind == QLatin1String("existingcommand")) + pathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand); + else if (expectedKind == QLatin1String("command")) + pathChooser->setExpectedKind(Utils::PathChooser::Command); + else if (expectedKind == QLatin1String("any")) + pathChooser->setExpectedKind(Utils::PathChooser::Any); + registerField(fieldName, pathChooser, "path", SIGNAL(changed(QString))); const QString defaultText = field.controlAttributes.value(QLatin1String("defaulttext")); m_pathChoosers.push_back(PathChooserData(pathChooser, defaultText)); |