summaryrefslogtreecommitdiffstats
path: root/src/libtdebluez/adapterImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtdebluez/adapterImpl.cpp')
-rw-r--r--src/libtdebluez/adapterImpl.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/libtdebluez/adapterImpl.cpp b/src/libtdebluez/adapterImpl.cpp
index 703f06f..adf4388 100644
--- a/src/libtdebluez/adapterImpl.cpp
+++ b/src/libtdebluez/adapterImpl.cpp
@@ -32,6 +32,7 @@
#include <tqdbusproxy.h>
#include <tqmessagebox.h>
+#include <tdelocale.h>
#include "adapterImpl.h"
@@ -90,7 +91,7 @@ void AdapterImpl::powerOn(bool state)
if (hcidx < 0)
{
// error handling
- tqDebug("Index for the device %s not found", device.local8Bit().data());
+ tqDebug(i18n("Index for the device %1 not found").arg(device));
return;
}
@@ -99,7 +100,7 @@ void AdapterImpl::powerOn(bool state)
TQFile file("/dev/rfkill");
if (!file.open(IO_ReadWrite))
{
- tqDebug("Failed to open %s", file.name().utf8().data());
+ tqDebug(i18n("Failed to open %1").arg(file.name()));
return;
}
@@ -110,10 +111,10 @@ void AdapterImpl::powerOn(bool state)
else
event.soft = 1;
- tqDebug("Bluetooth device %s switches: idx(%i), soft(%d).", device.local8Bit().data(), event.idx, event.soft);
+ tqDebug(i18n("Bluetooth device %1 switches: idx(%2), soft(%3).").arg(device).arg(event.idx).arg(event.soft));
if (write(file.handle(), &event, sizeof(event)) < 0)
- tqDebug("Failed to write to %s", file.name().utf8().data());
+ tqDebug(i18n("Failed to write to %1").arg(file.name()));
file.close();
}
@@ -124,18 +125,18 @@ TQString AdapterImpl::getPath()
void AdapterImpl::slotSetAlias(const TQString& alias)
{
- TQT_DBusError error;
- setAlias(alias, error);
- if (error.isValid())
- tqDebug("AdapterImpl::slotSetAlias(%s) failed: %s", alias.utf8().data(), error.message().utf8().data());
+ TQT_DBusError dbuserror;
+ setAlias(alias, dbuserror);
+ if (dbuserror.isValid())
+ tqDebug(i18n("AdapterImpl::slotSetAlias(%1) failed: %2").arg(alias).arg(dbuserror.message()));
}
void AdapterImpl::slotSetTimeout(int timeout)
{
- TQT_DBusError error;
- setDiscoverableTimeout(timeout, error);
- if (error.isValid())
- tqDebug("AdapterImpl::slotSetTimeout(%i) failed: %s", timeout, error.message().utf8().data());
+ TQT_DBusError dbuserror;
+ setDiscoverableTimeout(timeout, dbuserror);
+ if (dbuserror.isValid())
+ tqDebug(i18n("AdapterImpl::slotSetTimeout(%1) failed: %2").arg(timeout).arg(dbuserror.message()));
}
} // namespace TDEBluetooth