Removed the USE_QT5 macro now that we're Qt5 only.

Tue, 15 Nov 2016 17:42:42 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 15 Nov 2016 17:42:42 +0200
changeset 1049
71946fed475a
parent 1048
7b778aa2eff2
child 1050
848ad1516e4d

Removed the USE_QT5 macro now that we're Qt5 only.

src/glRenderer.cpp file | annotate | diff | comparison | revisions
src/glShared.h file | annotate | diff | comparison | revisions
src/macros.h file | annotate | diff | comparison | revisions
src/partdownloader.cpp file | annotate | diff | comparison | revisions
--- a/src/glRenderer.cpp	Tue Nov 15 17:40:51 2016 +0200
+++ b/src/glRenderer.cpp	Tue Nov 15 17:42:42 2016 +0200
@@ -256,9 +256,7 @@
 //
 void GLRenderer::initializeGL()
 {
-#ifdef USE_QT5
 	initializeOpenGLFunctions();
-#endif
 	setBackground();
 	glLineWidth (m_config->lineThickness());
 	glLineStipple (1, 0x6666);
@@ -847,12 +845,7 @@
 	// Update 2d position
 	m_mousePosition = ev->pos();
 	m_globalpos = ev->globalPos();
-
-#ifndef USE_QT5
-	m_mousePositionF = ev->posF();
-#else
 	m_mousePositionF = ev->localPos();
-#endif
 
 	// Calculate 3d position of the cursor
 	m_position3D = (camera() != FreeCamera) ? convert2dTo3d (m_mousePosition, true) : Origin;
--- a/src/glShared.h	Tue Nov 15 17:40:51 2016 +0200
+++ b/src/glShared.h	Tue Nov 15 17:42:42 2016 +0200
@@ -18,10 +18,8 @@
 
 #pragma once
 
+#include <QOpenGLFunctions>
 #include "basics.h"
-#ifdef USE_QT5
-# include <QOpenGLFunctions>
-#endif
 
 class LDObject;
 
@@ -65,15 +63,6 @@
 	NumVbos = EnumLimits<SurfaceVboType>::Count * EnumLimits<ComplementVboType>::Count
 };
 
-#ifndef USE_QT5
-// Placeholder QOpenGLFunctions for Qt 4.x support
-struct QOpenGLFunctions
-{
-	void initializeOpenGLFunctions() {}
-};
-
-#endif
-
 // KDevelop doesn't seem to understand some VBO stuff
 #ifdef IN_IDE_PARSER
 using GLint = int;
--- a/src/macros.h	Tue Nov 15 17:40:51 2016 +0200
+++ b/src/macros.h	Tue Nov 15 17:42:42 2016 +0200
@@ -57,10 +57,6 @@
 template<typename T>
 struct EnumLimits {};
 
-#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
-# define USE_QT5
-#endif
-
 #define ConfigOption(...)
 
 #define DEFINE_FLAG_ACCESS_METHODS \
--- a/src/partdownloader.cpp	Tue Nov 15 17:40:51 2016 +0200
+++ b/src/partdownloader.cpp	Tue Nov 15 17:42:42 2016 +0200
@@ -43,13 +43,7 @@
     , _source(SourceType{})
 {
 	_ui.setupUi(this);
-
-#ifdef USE_QT5
 	_ui.progressTable->horizontalHeader()->setSectionResizeMode (QHeaderView::Stretch);
-#else
-	_ui.progressTable->horizontalHeader()->setResizeMode (PartLabelColumn, QHeaderView::Stretch);
-#endif
-
 	_downloadButton = new QPushButton {tr("Download")};
 	_ui.buttonBox->addButton(_downloadButton, QDialogButtonBox::ActionRole);
 	button(Abort)->setEnabled(false);

mercurial