Skip to content

Commit bdc0c5d

Browse files
committed
For some reason, pre-processing should be done after the other includes
(..)
1 parent 062cf2c commit bdc0c5d

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
* along with CLASS. If not, see <http://www.gnu.org/licenses/>.
2323
*/
2424

25-
#if QT_VERSION < 0x050000
25+
#include "mainwindow.h"
26+
27+
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
2628
#include <QtGui/QApplication>
2729
#else
2830
#include <QtWidgets>
2931
#endif
3032

31-
#include "mainwindow.h"
32-
3333
int main(int argc, char *argv[])
3434
{
3535
QApplication a(argc, argv);

mainwindow.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
#ifndef MAINWINDOW_H
2626
#define MAINWINDOW_H
2727

28-
#if QT_VERSION < 0x050000
28+
#include <QModelIndex>
29+
#include "modelrun.h"
30+
#include "landsoil.h"
31+
32+
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
2933
#include <QtGui/QMainWindow>
3034
#else
3135
#include <QtWidgets/QMainWindow>
3236
#endif
3337

34-
#include <QModelIndex>
35-
#include "modelrun.h"
36-
#include "landsoil.h"
37-
3838
class plotwindow;
3939

4040
namespace Ui

plotwindow.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@
2525
#ifndef PLOTWINDOW_H
2626
#define PLOTWINDOW_H
2727

28-
#if QT_VERSION < 0x050000
28+
#include "mainwindow.h"
29+
#include "subplot.h"
30+
#include "QPaintEvent"
31+
#include "QPainter"
32+
#include "QTreeWidget"
33+
34+
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
2935
#include <QtGui/QWidget>
3036
#include <QtGui/QTabWidget>
3137
#else
3238
#include <QtWidgets/QWidget>
3339
#include <QtWidgets/QTabWidget>
3440
#endif
3541

36-
#include "mainwindow.h"
37-
#include "subplot.h"
38-
#include "QPaintEvent"
39-
#include "QPainter"
40-
#include "QTreeWidget"
41-
4242
class modelrun;
4343
class subplot;
4444

subplot.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
#ifndef SUBPLOT_H
2626
#define SUBPLOT_H
2727

28-
#if QT_VERSION < 0x050000
29-
#include <QtGui/QWidget>
30-
#include "QPrinter"
31-
#else
32-
#include <QtWidgets/QWidget>
33-
#include <QtPrintSupport/QPrinter>
34-
#endif
35-
3628
#include "mainwindow.h"
3729
#include <QWidget>
3830
#include "QPaintEvent"
@@ -47,6 +39,14 @@
4739
#include <QPointF>
4840
#include <QRubberBand>
4941

42+
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
43+
#include <QtGui/QWidget>
44+
#include "QPrinter"
45+
#else
46+
#include <QtWidgets/QWidget>
47+
#include <QtPrintSupport/QPrinter>
48+
#endif
49+
5050
class plotarea : public QWidget
5151
{
5252
Q_OBJECT

0 commit comments

Comments
 (0)