mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-03-15 03:17:44 +01:00
Fixed QOpenGLWidget usage (wrong minimal QT version)
This commit is contained in:
parent
b0c6176ddd
commit
a5033c8b19
@ -5,7 +5,7 @@ QT += core \
|
|||||||
network
|
network
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
|
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 \
|
HEADERS += src/config.h \
|
||||||
src/icons.h \
|
src/icons.h \
|
||||||
src/gui.h \
|
src/gui.h \
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <QFileOpenEvent>
|
#include <QFileOpenEvent>
|
||||||
#include <QNetworkProxyFactory>
|
#include <QNetworkProxyFactory>
|
||||||
#include <QPixmapCache>
|
#include <QPixmapCache>
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||||
#include <QGLFormat>
|
#include <QGLFormat>
|
||||||
#else // QT 5
|
#else // QT 5
|
||||||
#include <QSurfaceFormat>
|
#include <QSurfaceFormat>
|
||||||
@ -27,7 +27,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
|
|||||||
|
|
||||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||||
QGLFormat fmt;
|
QGLFormat fmt;
|
||||||
fmt.setSamples(10);
|
fmt.setSamples(10);
|
||||||
QGLFormat::setDefaultFormat(fmt);
|
QGLFormat::setDefaultFormat(fmt);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPaintEngine>
|
#include <QPaintEngine>
|
||||||
#include <QPaintDevice>
|
#include <QPaintDevice>
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||||
#include <QGLWidget>
|
#include <QGLWidget>
|
||||||
#else // QT 5
|
#else // QT 5
|
||||||
#include <QOpenGLWidget>
|
#include <QOpenGLWidget>
|
||||||
@ -466,7 +466,7 @@ void GraphView::useOpenGL(bool use)
|
|||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
|
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
|
||||||
#endif // Q_OS_WIN32
|
#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);
|
setViewport(new QGLWidget);
|
||||||
#else // QT 5
|
#else // QT 5
|
||||||
setViewport(new QOpenGLWidget);
|
setViewport(new QOpenGLWidget);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
#include <QWheelEvent>
|
#include <QWheelEvent>
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||||
#include <QGLWidget>
|
#include <QGLWidget>
|
||||||
#else // QT 5
|
#else // QT 5
|
||||||
#include <QOpenGLWidget>
|
#include <QOpenGLWidget>
|
||||||
@ -716,7 +716,7 @@ void PathView::useOpenGL(bool use)
|
|||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
|
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
|
||||||
#endif // Q_OS_WIN32
|
#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);
|
setViewport(new QGLWidget);
|
||||||
#else // QT 5
|
#else // QT 5
|
||||||
setViewport(new QOpenGLWidget);
|
setViewport(new QOpenGLWidget);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user