Fix a compilation error in Qt5.14

This commit is contained in:
reionwong 2021-08-30 23:23:32 +08:00
parent 4d9ba4c431
commit a642553e7e

View file

@ -71,7 +71,12 @@ int main(int argc, char *argv[])
qmlRegisterType<DesktopSettings>(uri, 1, 0, "DesktopSettings"); qmlRegisterType<DesktopSettings>(uri, 1, 0, "DesktopSettings");
qmlRegisterType<Fm>(uri, 1, 0, "Fm"); qmlRegisterType<Fm>(uri, 1, 0, "Fm");
qmlRegisterType<ShortCut>(uri, 1, 0, "ShortCut"); qmlRegisterType<ShortCut>(uri, 1, 0, "ShortCut");
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
qmlRegisterType<QAction>();
#else
qmlRegisterAnonymousType<QAction>(uri, 1); qmlRegisterAnonymousType<QAction>(uri, 1);
#endif
QCommandLineParser parser; QCommandLineParser parser;
parser.setApplicationDescription(QStringLiteral("File Manager")); parser.setApplicationDescription(QStringLiteral("File Manager"));