From 98354cd1e7f3c6b89f7112bda0791cf8ba191372 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 16 Mar 2014 20:04:57 +0100 Subject: some fixes towards qt5 compatibility --- src/moapplication.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/moapplication.cpp') diff --git a/src/moapplication.cpp b/src/moapplication.cpp index f09b2fd9..12ff713b 100644 --- a/src/moapplication.cpp +++ b/src/moapplication.cpp @@ -23,8 +23,10 @@ along with Mod Organizer. If not, see . #include #include #include +#if QT_VERSION < QT_VERSION_CHECK(5,0,0) #include #include +#endif #include #include #include @@ -123,12 +125,18 @@ bool MOApplication::notify(QObject *receiver, QEvent *event) void MOApplication::updateStyle(const QString &fileName) { +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + if (fileName == "Fusion") { + setStyle(QStyleFactory::create("fusion")); + setStyleSheet(""); +#else if (fileName == "Plastique") { setStyle(new ProxyStyle(new QPlastiqueStyle)); setStyleSheet(""); } else if (fileName == "Cleanlooks") { setStyle(new ProxyStyle(new QCleanlooksStyle)); setStyleSheet(""); +#endif } else { setStyle(new ProxyStyle(QStyleFactory::create(m_DefaultStyle))); if (QFile::exists(fileName)) { -- cgit v1.3.1