Merge pull request #127 from Scrumplex/refactor-bump-qt5.12
This commit is contained in:
commit
b883ce5c51
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.9.4)
|
cmake_minimum_required(VERSION 3.15) # minimum version required by QuaZip
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# In Qt 5.1+ we have our own main() function, don't autolink to qtmain on Windows
|
# In Qt 5.1+ we have our own main() function, don't autolink to qtmain on Windows
|
||||||
@ -43,6 +43,8 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
|
|||||||
# Fix build with Qt 5.13
|
# Fix build with Qt 5.13
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_DISABLE_DEPRECATED_BEFORE=0x050C00")
|
||||||
|
|
||||||
option(ENABLE_LTO "Enable Link Time Optimization" off)
|
option(ENABLE_LTO "Enable Link Time Optimization" off)
|
||||||
|
|
||||||
if(ENABLE_LTO)
|
if(ENABLE_LTO)
|
||||||
|
@ -223,9 +223,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
setApplicationName(BuildConfig.LAUNCHER_NAME);
|
setApplicationName(BuildConfig.LAUNCHER_NAME);
|
||||||
setApplicationDisplayName(BuildConfig.LAUNCHER_DISPLAYNAME);
|
setApplicationDisplayName(BuildConfig.LAUNCHER_DISPLAYNAME);
|
||||||
setApplicationVersion(BuildConfig.printableVersionString());
|
setApplicationVersion(BuildConfig.printableVersionString());
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,7,0))
|
setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPFILENAME);
|
||||||
setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPFILENAME);
|
|
||||||
#endif
|
|
||||||
startTime = QDateTime::currentDateTime();
|
startTime = QDateTime::currentDateTime();
|
||||||
|
|
||||||
// Don't quit on hiding the last window
|
// Don't quit on hiding the last window
|
||||||
|
@ -138,20 +138,6 @@ void UpdateController::installUpdates()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
QFileInfo destination (FS::PathCombine(m_root, op.destination));
|
QFileInfo destination (FS::PathCombine(m_root, op.destination));
|
||||||
#ifdef Q_OS_WIN32
|
|
||||||
if(QSysInfo::windowsVersion() < QSysInfo::WV_VISTA)
|
|
||||||
{
|
|
||||||
if(destination.fileName() == windowsExeName)
|
|
||||||
{
|
|
||||||
QDir rootDir(m_root);
|
|
||||||
exeOrigin = rootDir.relativeFilePath(op.source);
|
|
||||||
exePath = rootDir.relativeFilePath(op.destination);
|
|
||||||
exeBackup = rootDir.relativeFilePath(FS::PathCombine(backupPath, destination.fileName()));
|
|
||||||
useXPHack = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if(destination.exists())
|
if(destination.exists())
|
||||||
{
|
{
|
||||||
QString backupName = op.destination;
|
QString backupName = op.destination;
|
||||||
|
@ -24,10 +24,8 @@ int main(int argc, char *argv[])
|
|||||||
return 42;
|
return 42;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
|
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
|
@ -117,7 +117,7 @@ public:
|
|||||||
flags |= Qt::ItemIsUserCheckable;
|
flags |= Qt::ItemIsUserCheckable;
|
||||||
if (sourceIndex.model()->hasChildren(sourceIndex))
|
if (sourceIndex.model()->hasChildren(sourceIndex))
|
||||||
{
|
{
|
||||||
flags |= Qt::ItemIsTristate;
|
flags |= Qt::ItemIsAutoTristate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ public:
|
|||||||
QStack<QModelIndex> todo;
|
QStack<QModelIndex> todo;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
auto node = doing.child(row, 0);
|
auto node = fsm->index(row, 0, doing);
|
||||||
if (!node.isValid())
|
if (!node.isValid())
|
||||||
{
|
{
|
||||||
if (!todo.size())
|
if (!todo.size())
|
||||||
@ -259,7 +259,7 @@ public:
|
|||||||
QStack<QModelIndex> todo;
|
QStack<QModelIndex> todo;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
auto node = doing.child(row, 0);
|
auto node = this->index(row, 0, doing);
|
||||||
if (!node.isValid())
|
if (!node.isValid())
|
||||||
{
|
{
|
||||||
if (!todo.size())
|
if (!todo.size())
|
||||||
@ -460,7 +460,7 @@ void ExportInstanceDialog::rowsInserted(QModelIndex parent, int top, int bottom)
|
|||||||
//WARNING: possible off-by-one?
|
//WARNING: possible off-by-one?
|
||||||
for(int i = top; i < bottom; i++)
|
for(int i = top; i < bottom; i++)
|
||||||
{
|
{
|
||||||
auto node = parent.child(i, 0);
|
auto node = proxyModel->index(i, 0, parent);
|
||||||
if(proxyModel->shouldExpand(node))
|
if(proxyModel->shouldExpand(node))
|
||||||
{
|
{
|
||||||
auto expNode = node.parent();
|
auto expNode = node.parent();
|
||||||
|
@ -54,9 +54,7 @@ ExternalToolsPage::ExternalToolsPage(QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->tabWidget->tabBar()->hide();
|
ui->tabWidget->tabBar()->hide();
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
|
||||||
ui->jsonEditorTextBox->setClearButtonEnabled(true);
|
ui->jsonEditorTextBox->setClearButtonEnabled(true);
|
||||||
#endif
|
|
||||||
|
|
||||||
ui->mceditLink->setOpenExternalLinks(true);
|
ui->mceditLink->setOpenExternalLinks(true);
|
||||||
ui->jvisualvmLink->setOpenExternalLinks(true);
|
ui->jvisualvmLink->setOpenExternalLinks(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user