From a642553e7ec38905f5f96fa4f7f5e16901d425cf Mon Sep 17 00:00:00 2001 From: reionwong Date: Mon, 30 Aug 2021 23:23:32 +0800 Subject: [PATCH] Fix a compilation error in Qt5.14 --- main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.cpp b/main.cpp index 86ead10..8c64a99 100644 --- a/main.cpp +++ b/main.cpp @@ -71,7 +71,12 @@ int main(int argc, char *argv[]) qmlRegisterType(uri, 1, 0, "DesktopSettings"); qmlRegisterType(uri, 1, 0, "Fm"); qmlRegisterType(uri, 1, 0, "ShortCut"); + +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + qmlRegisterType(); +#else qmlRegisterAnonymousType(uri, 1); +#endif QCommandLineParser parser; parser.setApplicationDescription(QStringLiteral("File Manager"));