summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-20 15:06:32 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-20 15:08:14 -0700
commit04773705e3037900c9389fce6cca1db05cc6db30 (patch)
tree38617f851745081ea3cd87544c8124ecae6ae62c
parentd0fba482b7fe81da1b5fe91b535a2ae7417f5cbb (diff)
downloadsubsurface-04773705e3037900c9389fce6cca1db05cc6db30.tar.gz
Fix build error on Windows with Qt5.5
I'm not quite sure why this works, but it appears to do the trick. Apparently you are supposed not to have the meta type declaration in a shared header file. Also, with Qt5.5 you can't have the declaration for QBluetoothDeviceInfo, not even on Windows. This may need more tweaking to make sure it works on all combinations of OS and Qt version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/btdeviceselectiondialog.cpp7
-rw-r--r--qt-ui/btdeviceselectiondialog.h7
2 files changed, 7 insertions, 7 deletions
diff --git a/qt-ui/btdeviceselectiondialog.cpp b/qt-ui/btdeviceselectiondialog.cpp
index 2fa8ef167..fb2cbc1f3 100644
--- a/qt-ui/btdeviceselectiondialog.cpp
+++ b/qt-ui/btdeviceselectiondialog.cpp
@@ -6,6 +6,13 @@
#include "ui_btdeviceselectiondialog.h"
#include "btdeviceselectiondialog.h"
+#if defined(Q_OS_WIN)
+Q_DECLARE_METATYPE(QBluetoothDeviceDiscoveryAgent::Error)
+#endif
+#if QT_VERSION < 0x050500
+Q_DECLARE_METATYPE(QBluetoothDeviceInfo)
+#endif
+
BtDeviceSelectionDialog::BtDeviceSelectionDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::BtDeviceSelectionDialog),
diff --git a/qt-ui/btdeviceselectiondialog.h b/qt-ui/btdeviceselectiondialog.h
index a99afb80a..7651f164b 100644
--- a/qt-ui/btdeviceselectiondialog.h
+++ b/qt-ui/btdeviceselectiondialog.h
@@ -22,13 +22,6 @@
#undef DC_VERSION // this is already declared in libdivecomputer header
#endif
-#if defined(Q_OS_WIN)
-Q_DECLARE_METATYPE(QBluetoothDeviceInfo)
-Q_DECLARE_METATYPE(QBluetoothDeviceDiscoveryAgent::Error)
-#elif QT_VERSION < 0x050500
-Q_DECLARE_METATYPE(QBluetoothDeviceInfo)
-#endif
-
namespace Ui {
class BtDeviceSelectionDialog;
}