summaryrefslogtreecommitdiffstats
path: root/examples/agent/tqtlistener.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-12-30 04:29:19 +0100
committerSlávek Banko <slavek.banko@axis.cz>2021-12-30 04:29:19 +0100
commit590a6509163fa784bb6ad9cb43e2978163ea6d76 (patch)
tree7f5a8adcbcdf277b1457703936e14266d5d9777c /examples/agent/tqtlistener.cpp
parent1f66032a83f840889bed67ded4fad8647e29a4bf (diff)
downloadpolkit-tqt-590a6509163fa784bb6ad9cb43e2978163ea6d76.tar.gz
polkit-tqt-590a6509163fa784bb6ad9cb43e2978163ea6d76.zip
Use the formatted strings instead of joining the message.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'examples/agent/tqtlistener.cpp')
-rw-r--r--examples/agent/tqtlistener.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/agent/tqtlistener.cpp b/examples/agent/tqtlistener.cpp
index 59cfd40f2..f227d2aed 100644
--- a/examples/agent/tqtlistener.cpp
+++ b/examples/agent/tqtlistener.cpp
@@ -39,14 +39,14 @@ void TQtListener::initiateAuthentication(const TQString &actionId, const TQStrin
const TQString &iconName, const PolkitTQt::Details &details, const TQString &cookie,
const PolkitTQt::Identity::List &identities, AsyncResult *result)
{
- tqDebug("Initiate authentication for " + actionId + " with message " + message);
- tqDebug(" iconName " + iconName);
+ tqDebug(TQString("Initiate authentication for %1 with message %2").arg(actionId).arg(message));
+ tqDebug(TQString(" iconName %1").arg(iconName));
TQStringList dkeys = details.keys();
for (const TQString &dkey : dkeys)
{
- tqDebug(" key " + dkey);
+ tqDebug(TQString(" key %1").arg(dkey));
}
- tqDebug(" cookie " + cookie);
+ tqDebug(TQString(" cookie %1").arg(cookie));
for (const PolkitTQt::Identity &identity : identities)
{
@@ -76,7 +76,7 @@ void TQtListener::cancelAuthentication()
void TQtListener::request(const TQString &request, bool echo)
{
- tqDebug("Request: " + request);
+ tqDebug(TQString("Request: %1").arg(request));
Session *session = (Session*)sender();
bool ok;
TQString text = TQInputDialog::getText("TQt Agent", "Enter authorization password:",
@@ -93,7 +93,7 @@ void TQtListener::request(const TQString &request, bool echo)
void TQtListener::completed(bool gainedAuthorization)
{
- tqDebug(TQString("Completed: ") + (gainedAuthorization ? "true" : "false"));
+ tqDebug(TQString("Completed: %1").arg(gainedAuthorization ? "true" : "false"));
Session *session = (Session*)sender();
session->result()->setCompleted();
delete session;
@@ -101,12 +101,12 @@ void TQtListener::completed(bool gainedAuthorization)
void TQtListener::showError(const TQString &text)
{
- tqDebug("Error: " + text);
+ tqDebug(TQString("Error: %1").arg(text));
}
void TQtListener::showInfo(const TQString &text)
{
- tqDebug("Info: " + text);
+ tqDebug(TQString("Info: %1").arg(text));
}
#include "tqtlistener.moc"