citybuilding-tools
citybuilding-tools copied to clipboard
sgreader dosn't build on Linux using qt5
I got it to build using the following changes. I have no idea what I am doing, but in case someone else wants to get it to work they can try this:
diff --git a/sgreader/aboutdialog.cpp b/sgreader/aboutdialog.cpp
index dbc367a..c71adca 100644
--- a/sgreader/aboutdialog.cpp
+++ b/sgreader/aboutdialog.cpp
@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "aboutdialog.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QGridLayout>
AboutDialog::AboutDialog(QWidget *parent,
diff --git a/sgreader/gui/extractwizard.cpp b/sgreader/gui/extractwizard.cpp
index 282cdf1..885fcdc 100644
--- a/sgreader/gui/extractwizard.cpp
+++ b/sgreader/gui/extractwizard.cpp
@@ -5,7 +5,7 @@
#include "outputdirpage.h"
#include "progresspage.h"
-#include <QtGui> // TODO: specify
+#include <QtWidgets>
ExtractWizard::ExtractWizard(QWidget *parent)
: QWizard(parent)
diff --git a/sgreader/gui/filelistpage.cpp b/sgreader/gui/filelistpage.cpp
index c5452cd..bfb1925 100644
--- a/sgreader/gui/filelistpage.cpp
+++ b/sgreader/gui/filelistpage.cpp
@@ -1,6 +1,6 @@
#include "filelistpage.h"
-#include <QtGui> // TODO: optimize
+#include <QtWidgets> // TODO: specify
FileListPage::FileListPage(QWidget *parent)
: QWizardPage(parent)
diff --git a/sgreader/gui/inputdirpage.cpp b/sgreader/gui/inputdirpage.cpp
index f2cc63a..0acf844 100644
--- a/sgreader/gui/inputdirpage.cpp
+++ b/sgreader/gui/inputdirpage.cpp
@@ -1,6 +1,6 @@
#include "inputdirpage.h"
-#include <QtGui> // TODO: specify
+#include <QtWidgets> // TODO: specify
InputDirPage::InputDirPage(QWidget *parent)
: QWizardPage(parent)
diff --git a/sgreader/gui/outputdirpage.cpp b/sgreader/gui/outputdirpage.cpp
index 7188049..09472b3 100644
--- a/sgreader/gui/outputdirpage.cpp
+++ b/sgreader/gui/outputdirpage.cpp
@@ -1,6 +1,6 @@
#include "outputdirpage.h"
-#include <QtGui> // todo: optimize
+#include <QtWidgets> // TODO: specify
OutputDirPage::OutputDirPage(QWidget *parent)
: QWizardPage(parent)
diff --git a/sgreader/mainwindow.h b/sgreader/mainwindow.h
index 4001be7..2d08914 100644
--- a/sgreader/mainwindow.h
+++ b/sgreader/mainwindow.h
@@ -2,7 +2,7 @@
#define MAINWINDOW_H
#include <QMainWindow>
-#include <QtGui> // TODO: specify
+#include <QtWidgets> // TODO: specify
#include "sgfile.h"
#include "sgimage.h"
diff --git a/sgreader/sgreader.pro b/sgreader/sgreader.pro
index ae2b91a..1400dc7 100644
--- a/sgreader/sgreader.pro
+++ b/sgreader/sgreader.pro
@@ -1,11 +1,15 @@
TEMPLATE = app
-TARGET =
+TARGET = sgreader
DEPENDPATH += . gui
INCLUDEPATH += . gui
OBJECTS_DIR = build/obj
MOC_DIR = build/moc
RCC_DIR = build/rcc
+QT += widgets
+QT += core
+DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000
+
# Input
HEADERS += aboutdialog.h \
imagetreeitem.h \
Alternatively, fill in TARGET = sgreader and use qmake-qt4.
I can confirm the diff works.
@bvschaik Maybe update the qt version using the diff and add some simple install instructions?