Merge pull request #127 from Scrumplex/refactor-bump-qt5.12

This commit is contained in:
Sefa Eyeoglu 2022-05-18 15:47:17 +02:00 committed by GitHub
commit b883ce5c51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 26 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9.4)
cmake_minimum_required(VERSION 3.15) # minimum version required by QuaZip
if(WIN32)
# 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
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)
if(ENABLE_LTO)

View File

@ -223,9 +223,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
setApplicationName(BuildConfig.LAUNCHER_NAME);
setApplicationDisplayName(BuildConfig.LAUNCHER_DISPLAYNAME);
setApplicationVersion(BuildConfig.printableVersionString());
#if (QT_VERSION >= QT_VERSION_CHECK(5,7,0))
setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPFILENAME);
#endif
setDesktopFileName(BuildConfig.LAUNCHER_DESKTOPFILENAME);
startTime = QDateTime::currentDateTime();
// Don't quit on hiding the last window

View File

@ -138,20 +138,6 @@ void UpdateController::installUpdates()
}
#endif
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())
{
QString backupName = op.destination;

View File

@ -24,10 +24,8 @@ int main(int argc, char *argv[])
return 42;
#endif
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);

View File

@ -117,7 +117,7 @@ public:
flags |= Qt::ItemIsUserCheckable;
if (sourceIndex.model()->hasChildren(sourceIndex))
{
flags |= Qt::ItemIsTristate;
flags |= Qt::ItemIsAutoTristate;
}
}
@ -210,7 +210,7 @@ public:
QStack<QModelIndex> todo;
while (1)
{
auto node = doing.child(row, 0);
auto node = fsm->index(row, 0, doing);
if (!node.isValid())
{
if (!todo.size())
@ -259,7 +259,7 @@ public:
QStack<QModelIndex> todo;
while (1)
{
auto node = doing.child(row, 0);
auto node = this->index(row, 0, doing);
if (!node.isValid())
{
if (!todo.size())
@ -460,7 +460,7 @@ void ExportInstanceDialog::rowsInserted(QModelIndex parent, int top, int bottom)
//WARNING: possible off-by-one?
for(int i = top; i < bottom; i++)
{
auto node = parent.child(i, 0);
auto node = proxyModel->index(i, 0, parent);
if(proxyModel->shouldExpand(node))
{
auto expNode = node.parent();

View File

@ -54,9 +54,7 @@ ExternalToolsPage::ExternalToolsPage(QWidget *parent) :
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
ui->jsonEditorTextBox->setClearButtonEnabled(true);
#endif
ui->mceditLink->setOpenExternalLinks(true);
ui->jvisualvmLink->setOpenExternalLinks(true);