QmlProject: use qobject_cast instead of static_cast

Change-Id: I0a75c18eec64404b8689ad27ad35a8d65d69711f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tim Jenssen
2019-12-08 05:58:27 +01:00
parent 5675169e56
commit f265257d55

View File

@@ -382,7 +382,7 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
const Utils::OsType osType = device ? device->osType() : Utils::HostOsInfo::hostOs();
// arguments from .qmlproject file
const QmlProject *project = static_cast<QmlProject *>(currentTarget->project());
const QmlProject *project = qobject_cast<QmlProject *>(currentTarget->project());
foreach (const QString &importPath,
QmlProject::makeAbsolute(project->targetDirectory(currentTarget), project->customImportPaths())) {
Utils::QtcProcess::addArg(&args, QLatin1String("-I"), osType);