forked from qt-creator/qt-creator
QmlProject: use qobject_cast instead of static_cast
Change-Id: I0a75c18eec64404b8689ad27ad35a8d65d69711f Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -382,7 +382,7 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
|
|||||||
const Utils::OsType osType = device ? device->osType() : Utils::HostOsInfo::hostOs();
|
const Utils::OsType osType = device ? device->osType() : Utils::HostOsInfo::hostOs();
|
||||||
|
|
||||||
// arguments from .qmlproject file
|
// arguments from .qmlproject file
|
||||||
const QmlProject *project = static_cast<QmlProject *>(currentTarget->project());
|
const QmlProject *project = qobject_cast<QmlProject *>(currentTarget->project());
|
||||||
foreach (const QString &importPath,
|
foreach (const QString &importPath,
|
||||||
QmlProject::makeAbsolute(project->targetDirectory(currentTarget), project->customImportPaths())) {
|
QmlProject::makeAbsolute(project->targetDirectory(currentTarget), project->customImportPaths())) {
|
||||||
Utils::QtcProcess::addArg(&args, QLatin1String("-I"), osType);
|
Utils::QtcProcess::addArg(&args, QLatin1String("-I"), osType);
|
||||||
|
Reference in New Issue
Block a user