summaryrefslogtreecommitdiffstats
path: root/tests/bttestui/btlocaldevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bttestui/btlocaldevice.cpp')
-rw-r--r--tests/bttestui/btlocaldevice.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp
index e6aa8a8e..bf8f492e 100644
--- a/tests/bttestui/btlocaldevice.cpp
+++ b/tests/bttestui/btlocaldevice.cpp
@@ -794,6 +794,27 @@ void BtLocalDevice::dumpServerInformation()
}
}
+template <typename T>
+void printError(const QLatin1StringView name, T* ptr)
+{
+ if (!ptr)
+ return;
+ qDebug() << name << "error:" << ptr->error();
+}
+
+void BtLocalDevice::dumpErrors()
+{
+ qDebug() << "###### Errors";
+ printError("Device agent"_L1, deviceAgent);
+ printError("Service agent"_L1, serviceAgent);
+ printError("LE Central"_L1, leCentralController.get());
+ printError("LE Central Service"_L1, leCentralService.get());
+ printError("LE Peripheral"_L1, lePeripheralController.get());
+ printError("LE Peripheral Service"_L1, lePeripheralService.get());
+ printError("Socket"_L1, socket);
+ printError("Server"_L1, server);
+}
+
void BtLocalDevice::dumpInformation()
{
if (!localDevice)