From c4bfee0089512e37a84742cf3981545bc0072413 Mon Sep 17 00:00:00 2001 From: Silarn Date: Tue, 10 Apr 2018 23:28:33 -0500 Subject: Prep for Qt 5.11 (backward-compatible) --- src/CMakeLists.txt | 8 ++++---- src/downloadmanager.cpp | 2 +- src/mainwindow.cpp | 1 + src/queryoverwritedialog.cpp | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ef009e03..fef640b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED (VERSION 2.8) +CMAKE_MINIMUM_REQUIRED (VERSION 2.8.11) CMAKE_POLICY(SET CMP0020 NEW) #CMAKE_POLICY(SET CMP0043 NEW) @@ -249,6 +249,8 @@ FIND_PACKAGE(Qt5Quick REQUIRED) FIND_PACKAGE(Qt5Network REQUIRED) FIND_PACKAGE(Qt5WinExtras REQUIRED) FIND_PACKAGE(Qt5WebEngineWidgets REQUIRED) +FIND_PACKAGE(Qt5Script REQUIRED) +FIND_PACKAGE(Qt5Qml REQUIRED) FIND_PACKAGE(Qt5LinguistTools) QT5_WRAP_UI(organizer_UIHDRS ${organizer_UIS}) QT5_ADD_RESOURCES(organizer_RCCPPS ${organizer_QRCS}) @@ -314,6 +316,7 @@ ENDIF() ADD_EXECUTABLE(ModOrganizer WIN32 ${organizer_HDRS} ${organizer_SRCS} ${organizer_UIHDRS} ${organizer_RCS} ${organizer_RCCPPS} ${organizer_translations_qm}) TARGET_LINK_LIBRARIES(ModOrganizer Qt5::Widgets Qt5::WinExtras Qt5::WebEngineWidgets Qt5::Quick + Qt5::Script Qt5::Qml Qt5::QuickWidgets Qt5::Network ${Boost_LIBRARIES} zlibstatic uibase esptk bsatk githubpp @@ -327,9 +330,6 @@ SET_TARGET_PROPERTIES(ModOrganizer PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/LARGEADDRESSAWARE ${OPTIMIZE_LINK_FLAGS}") -QT5_USE_MODULES(ModOrganizer Widgets Script Qml QuickWidgets Quick Network WebEngineWidgets) - - ############### ## Installation diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 8977492c..c935d20b 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -462,7 +462,7 @@ void DownloadManager::addNXMDownload(const QString &url) for (auto pair : m_PendingDownloads) { if (pair.first == nxmInfo.modId() && pair.second == nxmInfo.fileId()) { - qDebug("download requested is already started (mod id: %s, file id: %s)", qPrintable(nxmInfo.modId()), qPrintable(nxmInfo.fileId())); + qDebug("download requested is already started (mod id: %s, file id: %s)", qPrintable(QString(nxmInfo.modId())), qPrintable(QString(nxmInfo.fileId()))); QMessageBox::information(nullptr, tr("Already Started"), tr("A download for this mod file has already been queued."), QMessageBox::Ok); return; } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1e2ec68b..0f66e505 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -89,6 +89,7 @@ along with Mod Organizer. If not, see . #include #include #include +#include #include #include #include diff --git a/src/queryoverwritedialog.cpp b/src/queryoverwritedialog.cpp index 932b2637..eb67719d 100644 --- a/src/queryoverwritedialog.cpp +++ b/src/queryoverwritedialog.cpp @@ -20,6 +20,8 @@ along with Mod Organizer. If not, see . #include "queryoverwritedialog.h" #include "ui_queryoverwritedialog.h" +#include + QueryOverwriteDialog::QueryOverwriteDialog(QWidget *parent, Backup b) : QDialog(parent), ui(new Ui::QueryOverwriteDialog), m_Action(ACT_NONE) -- cgit v1.3.1