QmlProject: static_cast not qobject_cast

Change-Id: I8104dab231a183a7768b3c1ac8c34b7ba4e47fdb
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Daniel Teske
2012-07-04 15:50:07 +02:00
parent f9923a30be
commit efe466d08e

View File

@@ -137,9 +137,7 @@ QString QmlProjectRunConfiguration::viewerArguments() const
QString args = m_qmlViewerArgs;
// arguments from .qmlproject file
QmlProject *project = qobject_cast<QmlProject *>(target()->project());
if (!project)
return args;
QmlProject *project = static_cast<QmlProject *>(target()->project());
foreach (const QString &importPath, project->importPaths()) {
Utils::QtcProcess::addArg(&args, "-I");
Utils::QtcProcess::addArg(&args, importPath);
@@ -192,9 +190,7 @@ Utils::OutputFormatter *QmlProjectRunConfiguration::createOutputFormatter() cons
QmlProjectRunConfiguration::MainScriptSource QmlProjectRunConfiguration::mainScriptSource() const
{
QmlProject *project = qobject_cast<QmlProject *>(target()->project());
if (!project)
return FileInEditor;
QmlProject *project = static_cast<QmlProject *>(target()->project());
if (!project->mainFile().isEmpty())
return FileInProjectFile;
if (!m_mainScriptFilename.isEmpty())