summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothdevicediscoveryagent_ios.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/qbluetoothdevicediscoveryagent_ios.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/qbluetoothdevicediscoveryagent_ios.mm')
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm14
1 files changed, 7 insertions, 7 deletions
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 <QtCore/qloggingcategory.h>
@@ -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);
}
}
}