summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-04-07 14:12:32 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-04-11 15:21:46 +0200
commit4d975c3ffc47e4d67609bf3dd9eb487ba7fdf376 (patch)
tree390bb5fdfe76657ce19feb5d85d5cb9e7bedef27 /examples
parent831e364b580eb8412573ddce55acd7481754779a (diff)
Port simple cases of count() to size()
The count() methods on QByteArray and QString are deprecated. The ones on other Qt containers will likely follow soon, so port them all to size(). The changes which also require int -> qsizetype will come in a follow-up patch. Pick-to: 6.3 Change-Id: I23e364019b9cfc457d93f4a3bb4660fe8d790da8 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/bluetooth/btchat/chat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/bluetooth/btchat/chat.cpp b/examples/bluetooth/btchat/chat.cpp
index c3846319..7fb84ca0 100644
--- a/examples/bluetooth/btchat/chat.cpp
+++ b/examples/bluetooth/btchat/chat.cpp
@@ -77,7 +77,7 @@ Chat::Chat(QWidget *parent)
//! [Construct UI]
localAdapters = QBluetoothLocalDevice::allDevices();
- if (localAdapters.count() < 2) {
+ if (localAdapters.size() < 2) {
ui->localAdapterBox->setVisible(false);
} else {
//we ignore more than two adapters