diff options
| author | Tannin <devnull@localhost> | 2014-03-18 19:18:17 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-03-18 19:18:17 +0100 |
| commit | 2d0fab4482cea8a3472e2430f4746feeae1784ff (patch) | |
| tree | 6e8aa3ace90a950970a14ba59250efaecbaab9bf /src | |
| parent | c19c4820d87bdf350f0725712c0b5af908fa9580 (diff) | |
| parent | ff272dcbbdf7ae9228bde4b9ddd15a152a109fe1 (diff) | |
Merge
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 4 | ||||
| -rw-r--r-- | src/moapplication.cpp | 8 | ||||
| -rw-r--r-- | src/organizer.pro | 35 | ||||
| -rw-r--r-- | src/pluginlist.h | 2 | ||||
| -rw-r--r-- | src/settings.cpp | 4 | ||||
| -rw-r--r-- | src/shared/leaktrace.cpp | 1 |
6 files changed, 52 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d4826b30..93c1f2f1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -103,7 +103,11 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <TlHelp32.h> #include <QNetworkInterface> #include <QNetworkProxy> +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) +#include <QtConcurrent/QtConcurrentRun> +#else #include <QtConcurrentRun> +#endif #include <QCoreApplication> #include <scopeguard.h> #include <boost/thread.hpp> 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 <http://www.gnu.org/licenses/>. #include <appconfig.h> #include <QFile> #include <QStringList> +#if QT_VERSION < QT_VERSION_CHECK(5,0,0) #include <QPlastiqueStyle> #include <QCleanlooksStyle> +#endif #include <QProxyStyle> #include <QStyleFactory> #include <QPainter> @@ -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)) { diff --git a/src/organizer.pro b/src/organizer.pro index 29cf0434..2f34c1c1 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -4,8 +4,9 @@ #
#-------------------------------------------------
+
contains(QT_VERSION, "^5.*") {
- QT += core gui widgets network declarative script xml sql xmlpatterns
+ QT += core gui widgets network xml sql xmlpatterns qml quick script
} else {
QT += core gui network xml declarative script sql xmlpatterns
}
@@ -311,6 +312,38 @@ OTHER_FILES += \ tutorials/tutorials_installdialog.qml
+load(moc)
+
+# for each Boost header you include...
+QMAKE_MOC += \
+ -DBOOST_MPL_IF_HPP_INCLUDED \
+ -DBOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED \
+ -DBOOST_MPL_VOID_HPP_INCLUDED \
+ -DBOOST_MPL_NOT_HPP_INCLUDED \
+ -DBOOST_MPL_IDENTITY_HPP_INCLUDED \
+ -DBOOST_VARIANT_VARIANT_FWD_HPP \
+ -DBOOST_MPL_NEXT_PRIOR_HPP_INCLUDED \
+ -DBOOST_MPL_O1_SIZE_HPP_INCLUDED \
+ -DBOOST_MPL_DEREF_HPP_INCLUDED \
+ -DBOOST_MPL_PAIR_HPP_INCLUDED \
+ -DBOOST_MPL_ITER_FOLD_HPP_INCLUDED \
+ -DBOOST_MPL_PROTECT_HPP_INCLUDED \
+ -DBOOST_MPL_EVAL_IF_HPP_INCLUDED \
+ -DBOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED \
+ -DBOOST_MPL_EMPTY_HPP_INCLUDED \
+ -DBOOST_MPL_ALWAYS_HPP_INCLUDED \
+ -DBOOST_MPL_TRANSFORM_HPP_INCLUDED \
+ -DBOOST_MPL_CLEAR_HPP_INCLUDED \
+ -DBOOST_MPL_BEGIN_END_HPP_INCLUDED \
+ -DBOOST_MPL_FOLD_HPP_INCLUDED \
+ -DBOOST_MPL_FRONT_HPP_INCLUDED \
+ -DBOOST_MPL_IS_SEQUENCE_HPP_INCLUDED \
+ -DBOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED \
+ -DBOOST_MPL_MAX_ELEMENT_HPP_INCLUDED \
+ -DBOOST_MPL_PUSH_FRONT_HPP_INCLUDED \
+ -DBOOST_RESULT_OF_HPP \
+ -DBOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
+
# leak detection with vld
#INCLUDEPATH += "E:/Visual Leak Detector/include"
#LIBS += -L"E:/Visual Leak Detector/lib/Win32"
diff --git a/src/pluginlist.h b/src/pluginlist.h index 8bf7e508..fff2a595 100644 --- a/src/pluginlist.h +++ b/src/pluginlist.h @@ -29,7 +29,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <boost/signals2.hpp> #include <boost/ptr_container/ptr_vector.hpp> #include <vector> -#include <pdll.h> +#include "pdll.h" #include <BOSS-API.h> diff --git a/src/settings.cpp b/src/settings.cpp index dd3891d4..d9a7e799 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -436,8 +436,12 @@ void Settings::addLanguages(QComboBox *languageBox) void Settings::addStyles(QComboBox *styleBox) { styleBox->addItem("None", ""); +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + styleBox->addItem("Fusion", "Fusion"); +#else styleBox->addItem("Plastique", "Plastique"); styleBox->addItem("Cleanlooks", "Cleanlooks"); +#endif QDirIterator langIter(QCoreApplication::applicationDirPath() + "/" + ToQString(AppConfig::stylesheetsPath()), QStringList("*.qss"), QDir::Files); while (langIter.hasNext()) { diff --git a/src/shared/leaktrace.cpp b/src/shared/leaktrace.cpp index c3721557..68e57609 100644 --- a/src/shared/leaktrace.cpp +++ b/src/shared/leaktrace.cpp @@ -5,6 +5,7 @@ #include <map>
#include <vector>
#include <sstream>
+#include <algorithm>
static const int FRAMES_TO_SKIP = 3; // StackData::StackData(), __TraceData::regTrace(), TraceAlloc()
|
