summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-03-05 12:22:22 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-03-06 11:32:30 +0000
commit6b2fd04b7be4494767b6092a030607010d91310c (patch)
tree229f5faf260ddb52c6129806956496c82eebbb00 /src/bluetooth/qbluetoothservicediscoveryagent_osx.mm
parent0c626f290111a0dfed2e0faae98afb1b0ad9943c (diff)
Shift all OSX & iOS translations into C++ filev5.5.0-alpha1
lupdate cannot parse .mm files. Therefore tr markup must be inside of C++ files. Some error strings where slightly modified to make use of already existing translations for other backends such as Bluez and QNX. Change-Id: I97fe6cfe2227e32fdbc61edd253080a1cd68edc9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent_osx.mm')
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_osx.mm11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm
index faceabac..572e445e 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm
@@ -37,6 +37,7 @@
#include "osx/osxbtsdpinquiry_p.h"
#include "qbluetoothhostinfo.h"
#include "osx/osxbtutility_p.h"
+#include "osx/uistrings_p.h"
#include <QtCore/qloggingcategory.h>
#include <QtCore/qscopedpointer.h>
@@ -176,7 +177,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::startServiceDiscovery()
discoveredDevices.clear();
if (singleDevice) {
error = QBluetoothServiceDiscoveryAgent::PoweredOffError;
- errorString = QBluetoothServiceDiscoveryAgent::tr("Local device is powered off");
+ errorString = QCoreApplication::translate(SERVICE_DISCOVERY, SD_LOCAL_DEV_OFF);
emit q_ptr->error(error);
}
@@ -250,7 +251,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::_q_deviceDiscoveryError(QBluetoothD
Q_ASSERT_X(q_ptr, Q_FUNC_INFO, "invalid q_ptr (null)");
error = QBluetoothServiceDiscoveryAgent::UnknownError;
- errorString = tr("Unknown error while scanning for devices");
+ errorString = QCoreApplication::translate(DEV_DISCOVERY, DD_UNKNOWN_ERROR);
deviceDiscoveryAgent->stop();
deviceDiscoveryAgent.reset(Q_NULLPTR);
@@ -326,7 +327,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::SDPInquiryError(IOBluetoothDevice *
// TODO: find a better mapping from IOReturn to QBluetoothServiceDiscoveryAgent::Error.
if (singleDevice) {
error = QBluetoothServiceDiscoveryAgent::UnknownError;
- errorString = QObject::tr("service discovery agent: unknown error");
+ errorString = QCoreApplication::translate(DEV_DISCOVERY, DD_UNKNOWN_ERROR);
emit q_ptr->error(error);
}
@@ -344,7 +345,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::performMinimalServiceDiscovery(cons
if (!device || !device.services) {
if (singleDevice) {
error = QBluetoothServiceDiscoveryAgent::UnknownError;
- errorString = tr("service discovery agent: minimal service discovery failed");
+ errorString = QCoreApplication::translate(SERVICE_DISCOVERY, SD_MINIMAL_FAILED);
emit q_ptr->error(error);
}
} else {
@@ -431,7 +432,7 @@ QBluetoothServiceDiscoveryAgent::QBluetoothServiceDiscoveryAgent(const QBluetoot
return;
}
d_ptr->error = InvalidBluetoothAdapterError;
- d_ptr->errorString = tr("Invalid Bluetooth adapter address");
+ d_ptr->errorString = QCoreApplication::translate(SERVICE_DISCOVERY, SD_INVALID_ADDRESS);
}
}