// We use the list twice
QList<Qt4ProFileNode *> profiles = qt4Project()->applicationProFiles();
- QSet<QString> paths;
- foreach (Qt4ProFileNode *pro, profiles)
- paths << pro->path();
+ QHash<QString, bool> paths;
+ foreach (Qt4ProFileNode *pro, profiles) {
+ bool isConsole = pro->variableValue(ConfigVar).contains(QLatin1String("console"));
+ paths.insert(pro->path(), isConsole);
+ }
foreach (ProjectExplorer::RunConfiguration *rc, runConfigurations())
if (Qt4RunConfiguration *qt4rc = qobject_cast<Qt4RunConfiguration *>(rc)) {
}
// Only add new runconfigurations if there are none.
- foreach (const QString &path, paths)
- addRunConfiguration(new Qt4RunConfiguration(this, path));
+ QHash<QString, bool>::const_iterator it, end;
+ end = paths.constEnd();
+ for (it = paths.constBegin(); it != end; ++it) {
+ Qt4RunConfiguration *qt4rc = new Qt4RunConfiguration(this, it.key());
+ if (it.value())
+ qt4rc->setRunMode(ProjectExplorer::LocalApplicationRunConfiguration::Console);
+ addRunConfiguration(qt4rc);
+ }
// Oh still none? Add a custom executable runconfiguration
if (runConfigurations().isEmpty()) {
Utils::OutputFormatter *createOutputFormatter() const;
+ void setRunMode(RunMode runMode);
signals:
void commandLineArgumentsChanged(const QString&);
void baseWorkingDirectoryChanged(const QString&);
private:
void handleParseState(bool success);
- void setRunMode(RunMode runMode);
void setBaseWorkingDirectory(const QString &workingDirectory);
QString baseWorkingDirectory() const;
void setCommandLineArguments(const QString &argumentsString);