summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocketbase_p.h
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2019-07-04 16:13:44 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2019-07-15 11:22:23 +0200
commitc1286c3a344593c79feced5c782ff85bca80bfff (patch)
treeee8e20e7971a2ab4453d3cac15f3a01d5c29ce82 /src/bluetooth/qbluetoothsocketbase_p.h
parentde3e8e85cc5a442dbae966c6956c84ee434ad108 (diff)
QBluetoothSocket - deduplicate the code (macOS)
Implement the proper interface from QBluetoothSocketBasePrivate, remove a dummy base class. Remove all public API from qbluetoothsocket_osx.mm and re-use the code in qbluetoothsocket.cpp. The code generally is the same, a bit of re-hashin/deletion. Task-number: QTBUG-75348 Change-Id: I0034dfd283daf9d51775d8f9551b85d2d436aa85 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothsocketbase_p.h')
-rw-r--r--src/bluetooth/qbluetoothsocketbase_p.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/bluetooth/qbluetoothsocketbase_p.h b/src/bluetooth/qbluetoothsocketbase_p.h
index 410dcbbd..d1894e96 100644
--- a/src/bluetooth/qbluetoothsocketbase_p.h
+++ b/src/bluetooth/qbluetoothsocketbase_p.h
@@ -89,7 +89,6 @@ QT_FORWARD_DECLARE_CLASS(QBluetoothServiceDiscoveryAgent)
QT_BEGIN_NAMESPACE
-#ifndef QT_OSX_BLUETOOTH
class QBluetoothSocketBasePrivate : public QObject
{
Q_OBJECT
@@ -198,26 +197,6 @@ static inline quint64 convertAddress(const quint8 (&from)[6], quint64 *to = null
return result;
}
-#else // QT_OSX_BLUETOOTH
-
-// QBluetoothSocketPrivate on macOS can not contain
-// Q_OBJECT (moc does not parse Objective-C syntax).
-// But QBluetoothSocket still requires QMetaObject::invokeMethod
-// to work. Here's the trick:
-class QBluetoothSocketBasePrivate : public QObject
-{
-// The most important part of it:
- Q_OBJECT
-public slots:
- virtual void _q_writeNotify() = 0;
-
-protected:
- Q_DECLARE_PUBLIC(QBluetoothSocket)
- QBluetoothSocket *q_ptr;
-};
-
-#endif // QT_OSX_BLUETOOTH
-
QT_END_NAMESPACE
#endif // QBLUETOOTHSOCKETBASE_P_H