From 7a7d492525191e623be543cb60ca87effbf3c8b3 Mon Sep 17 00:00:00 2001
From: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Date: Tue, 18 Aug 2015 22:39:51 +0300
Subject: [PATCH] Get a pretty print message when a device discovery error
 occured

Try to get a pretty print message when a device discovery error
is raised and it is unknown.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
---
 qt-ui/btdeviceselectiondialog.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qt-ui/btdeviceselectiondialog.cpp b/qt-ui/btdeviceselectiondialog.cpp
index 6595912da..65f42d9ed 100644
--- a/qt-ui/btdeviceselectiondialog.cpp
+++ b/qt-ui/btdeviceselectiondialog.cpp
@@ -379,7 +379,11 @@ void BtDeviceSelectionDialog::deviceDiscoveryError(QBluetoothDeviceDiscoveryAgen
 		errorDescription = QString("Writing or reading from the device resulted in an error.");
 		break;
 	default:
+#if defined(Q_OS_WIN)
+		errorDescription = remoteDeviceDiscoveryAgent->errorToString();
+#else
 		errorDescription = QString("An unknown error has occurred.");
+#endif
 		break;
 	}