From c95a42982628b4b06ceed0c01cada10806c9b53c Mon Sep 17 00:00:00 2001 From: Emanoil Kotsev Date: Mon, 13 Mar 2023 20:31:19 +0000 Subject: i18n and some minor corrections Signed-off-by: Emanoil Kotsev --- src/libtdebluez/objectmanagerImpl.cpp | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/libtdebluez/objectmanagerImpl.cpp') diff --git a/src/libtdebluez/objectmanagerImpl.cpp b/src/libtdebluez/objectmanagerImpl.cpp index 789e221..96cb83e 100644 --- a/src/libtdebluez/objectmanagerImpl.cpp +++ b/src/libtdebluez/objectmanagerImpl.cpp @@ -191,12 +191,12 @@ bool ObjectManagerImpl::registerAgent() { if (!agentRegisteredStatus) { - TQT_DBusError error; + TQT_DBusError dbuserror; agentManager->RegisterAgent( - TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), DEVICE_PIN_CAPABILITY, error); - if (error.isValid()) + TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), DEVICE_PIN_CAPABILITY, dbuserror); + if (dbuserror.isValid()) { - tqDebug("Could not register agent: %s", error.message().local8Bit().data()); + tqDebug(i18n("Could not register agent: %1").arg(dbuserror.message())); return false; } agentRegisteredStatus = true; @@ -209,12 +209,12 @@ bool ObjectManagerImpl::unregisterAgent() kdDebug() << k_funcinfo << endl; if (agentRegisteredStatus) { - TQT_DBusError error; + TQT_DBusError dbuserror; getAgentManager()->UnregisterAgent( - TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), error); - if (error.isValid()) + TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), dbuserror); + if (dbuserror.isValid()) { - tqDebug("Could not unregister agent"); + tqDebug(i18n("Could not unregister agent")); return false; } agentRegisteredStatus = false; @@ -225,12 +225,12 @@ bool ObjectManagerImpl::unregisterAgent() bool ObjectManagerImpl::requestDefaultAgent() { - TQT_DBusError error; + TQT_DBusError dbuserror; agentManager->RequestDefaultAgent( - TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), error); - if (error.isValid()) + TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), dbuserror); + if (dbuserror.isValid()) { - tqDebug("Could not request default agent: %s", error.message().local8Bit().data()); + tqDebug(i18n("Could not request default agent: %1").arg(dbuserror.message())); return false; } agentIsDefaultAgent = true; @@ -258,17 +258,17 @@ bool ObjectManagerImpl::initDBUS() dBusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus, DBUS_CONN_NAME); if (!dBusConn.isConnected()) { - tqDebug("Failed to open connection to system message bus: %s", dBusConn.lastError().message().local8Bit().data()); + tqDebug(i18n("Failed to open connection to system message bus: %1").arg(dBusConn.lastError().message())); TQTimer::singleShot(4000, this, TQT_SLOT(reconnect())); return false; } setConnection(dBusConn); TQT_DBusDataMap objects; - TQT_DBusError error; - if (!GetManagedObjects(objects, error)) + TQT_DBusError dbuserror; + if (!GetManagedObjects(objects, dbuserror)) { - tqDebug("GetManagedObjects(objects,error) FAILED:\n%s\n", error.message().latin1()); + tqDebug(i18n("GetManagedObjects(objects,error) failed: %1").arg(dbuserror.message())); return false; } @@ -278,7 +278,7 @@ bool ObjectManagerImpl::initDBUS() bool ok = false; slotInterfacesAdded(it.key(), it.data().toStringKeyMap(&ok)); if (!ok) - tqWarning("Failed to convert dbus data to string map: %s", it.key().latin1()); + tqWarning(i18n("Failed to convert dbus data to string map: %1").arg(it.key())); } connect(this, SIGNAL(InterfacesAdded(const TQT_DBusObjectPath&, const TQT_DBusDataMap< TQString >&)), @@ -313,7 +313,7 @@ void ObjectManagerImpl::adapterPropertiesChanged(TQString path, const TQMap< else continue; if (!ok) - tqDebug("ObjectManagerImpl::adapterPropertiesChanged conversion failed"); + tqDebug(i18n("ObjectManagerImpl::adapterPropertiesChanged conversion failed")); } } @@ -367,7 +367,7 @@ void ObjectManagerImpl::devicePropertiesChanged(TQString path, const TQMap