From c4e6f89b0baa7936cd524aa77759e7e0f24f1f8a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 23 May 2013 20:21:47 +0000 Subject: [PATCH] This code now compiles OK in either Qt4 or Qt5. To run in Qt5 we'll need a Qt5-compatible "thermo" widget. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3310 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- logqso.h | 5 ++++- main.cpp | 4 ++++ mainwindow.cpp | 7 +++++-- mainwindow.h | 4 ++++ plotter.h | 4 ++++ wsjtx.pro | 5 +++-- 6 files changed, 24 insertions(+), 5 deletions(-) diff --git a/logqso.h b/logqso.h index a7ea6b4fe..a4edbb00e 100644 --- a/logqso.h +++ b/logqso.h @@ -1,8 +1,11 @@ #ifndef LogQSO_H #define LogQSO_H +#ifdef QT5 +#include +#else #include -//#include +#endif namespace Ui { class LogQSO; diff --git a/main.cpp b/main.cpp index fe90346fc..08bf7eb8c 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,8 @@ +#ifdef QT5 +#include +#else #include +#endif #include #include #include "mainwindow.h" diff --git a/mainwindow.cpp b/mainwindow.cpp index d54c6a445..471655c59 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -9,8 +9,11 @@ #include "getfile.h" #include #include "logqso.h" -//#include -//#include + +#ifdef QT5 +#include +#include +#endif int itone[85]; //Tx audio tones for 85 symbols int icw[250]; //Dits for CW ID diff --git a/mainwindow.h b/mainwindow.h index 913d80ded..0013721ba 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,6 +1,10 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H +#ifdef QT5 +#include +#else #include +#endif #include #include #include "soundin.h" diff --git a/plotter.h b/plotter.h index 2e08d5b26..077853ea8 100644 --- a/plotter.h +++ b/plotter.h @@ -7,7 +7,11 @@ #ifndef PLOTTER_H #define PLOTTER_H +#ifdef QT5 +#include +#else #include +#endif #include #include #include diff --git a/wsjtx.pro b/wsjtx.pro index da247c94f..d3acc2779 100644 --- a/wsjtx.pro +++ b/wsjtx.pro @@ -14,9 +14,10 @@ DESTDIR = ../wsjtx_install #DESTDIR = ../qt5_install VERSION = 0.99 TEMPLATE = app +DEFINES = QT4 win32 { -DEFINES = WIN32 +DEFINES += WIN32 F90 = g95 g95.output = ${QMAKE_FILE_BASE}.o g95.commands = $$F90 -c -O2 -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} @@ -25,7 +26,7 @@ QMAKE_EXTRA_COMPILERS += g95 } unix { -DEFINES = UNIX +DEFINES += UNIX F90 = gfortran gfortran.output = ${QMAKE_FILE_BASE}.o gfortran.commands = $$F90 -c -O2 -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}