summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/qdbus/qdbus/qdbus.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/qdbus/qdbus/qdbus.cpp b/tools/qdbus/qdbus/qdbus.cpp
index 14b4b9e..4e90418 100644
--- a/tools/qdbus/qdbus/qdbus.cpp
+++ b/tools/qdbus/qdbus/qdbus.cpp
@@ -59,7 +59,7 @@ static bool printArgumentsLiterally = false;
static void showUsage()
{
- printf("Usage: qdbus [--system] [--literal] [servicename] [path] [method] [args]\n"
+ printf("Usage: qdbus [--system | --address ADDRESS] [--literal] [servicename] [path] [method] [args]\n"
"\n"
" servicename the service to connect to (e.g., org.freedesktop.DBus)\n"
" path the path to the object (e.g., /)\n"
@@ -71,6 +71,7 @@ static void showUsage()
"\n"
"Options:\n"
" --system connect to the system bus\n"
+ " --address ADDRESS connect to the given bus\n"
" --literal print replies literally\n");
}
@@ -454,6 +455,10 @@ int main(int argc, char **argv)
if (arg == QLatin1String("--system")) {
connection = QDBusConnection::systemBus();
connectionOpened = true;
+ } else
+ if (arg == QLatin1String("--address")) {
+ connection = QDBusConnection::connectToBus(args.takeFirst(), "bus");
+ connectionOpened = true;
} else if (arg == QLatin1String("--literal")) {
printArgumentsLiterally = true;
} else if (arg == QLatin1String("--help")) {