diff options
author | Tuomo Pelkonen <[email protected]> | 2022-06-17 07:50:31 +0300 |
---|---|---|
committer | Tuomo Pelkonen <[email protected]> | 2022-06-20 06:52:11 +0000 |
commit | 584f3ebaa9c8cd0439b2776cf737b5ed729f3463 (patch) | |
tree | 385169b0e43bdda4be8c428a8f58a1bef9f6d2d4 /main.cpp | |
parent | bd6ab1986539ba2ba92eb2081758d35af2b75bc4 (diff) |
Change-Id: I0b80905187e87980db22b1db43a0307e1b5a71f3
Reviewed-by: Alessandro Portale <[email protected]>
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -224,9 +224,7 @@ void parseQmlprojectFile(const QString &fileName, QString *mainFile, QStringList *mainFile = basePath + mainFileMatch.captured(1); if (mainFile->startsWith(QLatin1String(":/"))) -#if QT_VERSION_MAJOR < 6 - *mainFile = "qrc:" + mainFile->midRef(1); -#else + *mainFile = "qrc:" + mainFile->mid(1); const QRegularExpression qt6ProjectRegExp("qt6Project:\\s*true"); @@ -234,7 +232,6 @@ void parseQmlprojectFile(const QString &fileName, QString *mainFile, QStringList if (!qt6ProjectMatch.hasMatch()) { printWarning("This is not a Qt6 project.\nQt5 projects might work, but they are not officially supported."); } -#endif const QRegularExpression importPathsRegExp("importPaths:\\s*\\[\\s*(.*)\\s*\\]"); const QRegularExpressionMatch importPathsMatch = importPathsRegExp.match(text); @@ -244,11 +241,7 @@ void parseQmlprojectFile(const QString &fileName, QString *mainFile, QStringList cleanedPath = basePath + cleanedPath.mid(1, cleanedPath.length() - 2); if (QFileInfo::exists(cleanedPath)) { if (cleanedPath.startsWith(QLatin1String(":/"))) -#if QT_VERSION_MAJOR < 6 - cleanedPath = "qrc:" + cleanedPath.midRef(1); -#else cleanedPath = "qrc:" + cleanedPath.mid(1); -#endif importPaths->append(cleanedPath); } } @@ -284,9 +277,6 @@ int main(int argc, char *argv[]) return showFatalMessageAndDie({QString("Qml project to show has not been defined.")}); } #endif -#if QT_VERSION_MAJOR < 6 - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -#endif QSurfaceFormat format = QSurfaceFormat::defaultFormat(); format.setVersion(3,0); QSurfaceFormat::setDefaultFormat(format); |