diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2023-03-16 18:26:38 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2023-03-20 11:23:38 +0100 |
commit | 30bb6406024831d8f79a0718da170eff7b41ff79 (patch) | |
tree | 51d4ff3dc6888212764e7b88873bf90789c65526 /examples/bluetooth/btchat/main.cpp | |
parent | 411b863cd8f7314a20324b90ad837744f54589ae (diff) | |
download | qtconnectivity-30bb6406024831d8f79a0718da170eff7b41ff79.tar.gz |
BtChat example: improve code
Improve the example code according to guidelines:
* fix CMakeLists.txt by using qt_standard_project_setup() and PRIVATE
linking
* fix memory leak in Chat dialog
* fix includes
* fix forward declarations and do not use QT_USE_NAMESPACE
* use Qt::StringLiterals
* remove outdated warning for Windows platform
* split too long lines
Task-number: QTBUG-111972
Pick-to: 6.5 6.5.0
Change-Id: I81e472cfacf8c6adf97b31e97254797d40b01519
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Diffstat (limited to 'examples/bluetooth/btchat/main.cpp')
-rw-r--r-- | examples/bluetooth/btchat/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/bluetooth/btchat/main.cpp b/examples/bluetooth/btchat/main.cpp index 1af468f0..6347c914 100644 --- a/examples/bluetooth/btchat/main.cpp +++ b/examples/bluetooth/btchat/main.cpp @@ -3,8 +3,8 @@ #include "chat.h" +#include <QtCore/qloggingcategory.h> #include <QtWidgets/qapplication.h> -#include <QtCore/QLoggingCategory> int main(int argc, char *argv[]) { @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) Chat d; QObject::connect(&d, &Chat::accepted, &app, &QApplication::quit); -#ifdef Q_OS_ANDROID +#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) d.showMaximized(); #else d.show(); |