4
1
mirror of https://github.com/QuasarApp/CQtDeployer.git synced 2025-05-09 16:09:37 +00:00

fix: Qt::SkipEmptyParts was introduced in Qt 5.14

https://doc.qt.io/qt-5/qt.html#SplitBehaviorFlags-enum
This commit is contained in:
Mozi 2021-02-06 22:43:24 +08:00
parent 52bc70e696
commit 881bebfee5
2 changed files with 2 additions and 2 deletions

@ -9,7 +9,7 @@
#define DEFINES_H
#include <QtGlobal>
#if QT_VERSION > QT_VERSION_CHECK(5, 13, 0)
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
#define splitbehavior Qt::SkipEmptyParts
#else
#define splitbehavior QString::SkipEmptyParts

@ -447,7 +447,7 @@ QString FileManager::changeDistanation(const QString& absalutePath,
QString basePath,
int depch) {
#if QT_VERSION > QT_VERSION_CHECK(5, 13, 0)
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
auto prefixes = absalutePath.split(QRegExp("[\\/]"), Qt::SkipEmptyParts);
#else
auto prefixes = absalutePath.split(QRegExp("[\\/]"), QString::SkipEmptyParts);