aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/btdeviceselectiondialog.cpp
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 /qt-ui/btdeviceselectiondialog.cpp
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>
Diffstat (limited to 'qt-ui/btdeviceselectiondialog.cpp')
-rw-r--r--qt-ui/btdeviceselectiondialog.cpp7
1 files changed, 7 insertions, 0 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),