Commit c516fcda authored by Tobias Hunger's avatar Tobias Hunger
Browse files

QtSupport: Add history completer to path choosers



Change-Id: Ia3b26c60193b994571cd3b7fbbf8346ddeca46ea
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 0cb39c61
...@@ -55,6 +55,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE ...@@ -55,6 +55,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
layout->setMargin(0); layout->setMargin(0);
m_executableChooser = new Utils::PathChooser(this); m_executableChooser = new Utils::PathChooser(this);
m_executableChooser->setHistoryCompleter(QLatin1String("Qt.CustomExecutable.History"));
m_executableChooser->setExpectedKind(Utils::PathChooser::Command); m_executableChooser->setExpectedKind(Utils::PathChooser::Command);
layout->addRow(tr("Executable:"), m_executableChooser); layout->addRow(tr("Executable:"), m_executableChooser);
...@@ -63,6 +64,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE ...@@ -63,6 +64,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
layout->addRow(tr("Arguments:"), m_commandLineArgumentsLineEdit); layout->addRow(tr("Arguments:"), m_commandLineArgumentsLineEdit);
m_workingDirectory = new Utils::PathChooser(this); m_workingDirectory = new Utils::PathChooser(this);
m_workingDirectory->setHistoryCompleter(QLatin1String("WorkingDir.History"));
m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory); m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory);
m_workingDirectory->setBaseDirectory(rc->target()->project()->projectDirectory()); m_workingDirectory->setBaseDirectory(rc->target()->project()->projectDirectory());
......
...@@ -321,6 +321,7 @@ QString ExamplesWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileI ...@@ -321,6 +321,7 @@ QString ExamplesWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileI
PathChooser *chooser = new PathChooser; PathChooser *chooser = new PathChooser;
txt->setBuddy(chooser); txt->setBuddy(chooser);
chooser->setExpectedKind(PathChooser::ExistingDirectory); chooser->setExpectedKind(PathChooser::ExistingDirectory);
chooser->setHistoryCompleter(QLatin1String("Qt.WritableExamplesDir.History"));
QSettings *settings = Core::ICore::settings(); QSettings *settings = Core::ICore::settings();
chooser->setPath(settings->value(QString::fromLatin1(C_FALLBACK_ROOT), chooser->setPath(settings->value(QString::fromLatin1(C_FALLBACK_ROOT),
Core::DocumentManager::projectsDirectory()).toString()); Core::DocumentManager::projectsDirectory()).toString());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment