QML project executable file to default to lowercase .qml file

Use a lowercase .qml file found in project tree if no current file is
selected. This way we don't have to disable run controls if there are
some files to execute.

Reviewed-by: kkoehne
This commit is contained in:
Lasse Holmstedt
2010-03-08 14:36:44 +01:00
parent c5d6c139c1
commit 61ca001e67
3 changed files with 26 additions and 1 deletions

View File

@@ -31,6 +31,7 @@
#include "qmlprojectfile.h"
#include "qmlprojectmanagerconstants.h"
#include "fileformat/qmlprojectitem.h"
#include "qmlprojectrunconfiguration.h"
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
@@ -255,6 +256,10 @@ bool QmlProject::fromMap(const QVariantMap &map)
}
refresh(Everything);
// FIXME workaround to guarantee that run/debug actions are enabled if a valid file exists
QmlProjectRunConfiguration *runConfig = static_cast<QmlProjectRunConfiguration*>(activeTarget()->activeRunConfiguration());
runConfig->changeCurrentFile(0);
return true;
}