From a5033c8b195aa7a3befc6301748ebecb37097140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 10 Dec 2016 01:18:31 +0100 Subject: [PATCH] Fixed QOpenGLWidget usage (wrong minimal QT version) --- gpxsee.pro | 2 +- src/app.cpp | 4 ++-- src/graphview.cpp | 4 ++-- src/pathview.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gpxsee.pro b/gpxsee.pro index b7782540..0b25c74f 100644 --- a/gpxsee.pro +++ b/gpxsee.pro @@ -5,7 +5,7 @@ QT += core \ network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport -lessThan(QT_MAJOR_VERSION, 5) : QT += opengl +lessThan(QT_VERSION, 5.4) : QT += opengl HEADERS += src/config.h \ src/icons.h \ src/gui.h \ diff --git a/src/app.cpp b/src/app.cpp index 8fb90e1d..b29988fd 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -4,7 +4,7 @@ #include #include #include -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) #include #else // QT 5 #include @@ -27,7 +27,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv), QNetworkProxyFactory::setUseSystemConfiguration(true); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) QGLFormat fmt; fmt.setSamples(10); QGLFormat::setDefaultFormat(fmt); diff --git a/src/graphview.cpp b/src/graphview.cpp index 39f0dc9e..cdd71747 100644 --- a/src/graphview.cpp +++ b/src/graphview.cpp @@ -3,7 +3,7 @@ #include #include #include -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) #include #else // QT 5 #include @@ -466,7 +466,7 @@ void GraphView::useOpenGL(bool use) #ifdef Q_OS_WIN32 if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA) #endif // Q_OS_WIN32 -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) setViewport(new QGLWidget); #else // QT 5 setViewport(new QOpenGLWidget); diff --git a/src/pathview.cpp b/src/pathview.cpp index 02512d0e..d9b99a8b 100644 --- a/src/pathview.cpp +++ b/src/pathview.cpp @@ -1,7 +1,7 @@ #include #include #include -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) #include #else // QT 5 #include @@ -716,7 +716,7 @@ void PathView::useOpenGL(bool use) #ifdef Q_OS_WIN32 if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA) #endif // Q_OS_WIN32 -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) setViewport(new QGLWidget); #else // QT 5 setViewport(new QOpenGLWidget);