From 6b2fd04b7be4494767b6092a030607010d91310c Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Thu, 5 Mar 2015 12:22:22 +0100 Subject: Shift all OSX & iOS translations into C++ file 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 --- src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm') diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm b/src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm index 1bce6400..85c9f0da 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm @@ -36,6 +36,7 @@ #include "qbluetoothlocaldevice.h" #include "qbluetoothdeviceinfo.h" #include "osx/osxbtutility_p.h" +#include "osx/uistrings_p.h" #include "qbluetoothuuid.h" #include @@ -156,8 +157,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start() // We can be here only if we have some kind of // resource allocation error. setError(QBluetoothDeviceDiscoveryAgent::UnknownError, - QObject::tr("device discovery agent, failed to start: " - "resource allocation error")); + QCoreApplication::translate(DEV_DISCOVERY, DD_NOT_STARTED); emit q_ptr->error(lastError); } } @@ -270,20 +270,20 @@ void QBluetoothDeviceDiscoveryAgentPrivate::setError(QBluetoothDeviceDiscoveryAg errorString = QString(); break; case QBluetoothDeviceDiscoveryAgent::PoweredOffError: - errorString = QObject::tr("device discovery agent: adapter is powered off"); + errorString = QCoreApplication::translate(DEV_DISCOVERY, DD_POWERED_OFF); break; case QBluetoothDeviceDiscoveryAgent::InvalidBluetoothAdapterError: - errorString = QObject::tr("device discovery agent: invalid bluetooth adapter"); + errorString = QCoreApplication::translate(DEV_DISCOVERY, DD_INVALID_ADAPTER); break; case QBluetoothDeviceDiscoveryAgent::InputOutputError: - errorString = QObject::tr("device discovery agent: input output error"); + errorString = QCoreApplication::translate(DEV_DISCOVERY, DD_IO); break; case QBluetoothDeviceDiscoveryAgent::UnsupportedPlatformError: - errorString = QObject::tr("Bluetooth LE is not supported"); + errorString = QCoreApplication::translate(DEV_DISCOVERY, DD_NOTSUPPORTED); break; case QBluetoothDeviceDiscoveryAgent::UnknownError: default: - errorString = QObject::tr("device discovery agent: unknown error"); + errorString = QCoreApplication::translate(DEV_DISCOVERY, DD_UNKNOWN_ERROR); } } } -- cgit v1.2.3