Add a customexecutablerunconfiguration if no others are available

This fixes a crash when creating a new target and then directly
switch into the run settings view.
This commit is contained in:
Tobias Hunger
2010-03-30 18:45:04 +02:00
parent 275f957c48
commit 3c1f3f0b2c

View File

@@ -40,6 +40,7 @@
#include "qt-s60/s60emulatorrunconfiguration.h"
#include "qt-s60/s60createpackagestep.h"
#include <projectexplorer/customexecutablerunconfiguration.h>
#include <projectexplorer/toolchain.h>
#include <coreplugin/coreconstants.h>
#include <symbianutils/symbiandevicemanager.h>
@@ -191,6 +192,9 @@ Qt4Target *Qt4TargetFactory::create(ProjectExplorer::Project *parent, const QStr
foreach (const QString &path, pathes)
t->addRunConfigurationForPath(path);
if (t->runConfigurations().isEmpty())
t->addRunConfiguration(new CustomExecutableRunConfiguration(t));
return t;
}