forked from qt-creator/qt-creator
FilePath: Remove ::toDir() and deprecation hints
Change-Id: Ib561c019e3fd44cd85504ad4286eb3759ce19516 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -289,9 +289,8 @@ bool QmlBuildSystem::setFileSettingInProjectFile(const QString &setting, const U
|
||||
|
||||
const QString settingQmlCode = setting + ":";
|
||||
|
||||
QDir projectDir = project()->projectFilePath().toDir();
|
||||
projectDir.cdUp();
|
||||
const QString relativePath = projectDir.relativeFilePath(mainFilePath.toString());
|
||||
const Utils::FilePath projectDir = project()->projectFilePath().parentDir();
|
||||
const QString relativePath = mainFilePath.relativeChildPath(projectDir).path();
|
||||
|
||||
if (fileContent.indexOf(settingQmlCode) < 0) {
|
||||
QString addedText = QString("\n %1 \"%2\"\n").arg(settingQmlCode).arg(relativePath);
|
||||
|
Reference in New Issue
Block a user