QDBusConnectionInterface *bus = connection.interface();
if (args.isEmpty()) {
printAllServices(bus);
- exit(0);
+ return 0;
}
QString service = args.takeFirst();
return 0;
}
fprintf(stderr, "Service '%s' is not a valid name.\n", qPrintable(service));
- exit(1);
+ return 1;
}
if (args.isEmpty()) {
listObjects(service, QString());
- exit(0);
+ return 0;
}
QString path = args.takeFirst();
if (!QDBusUtil::isValidObjectPath(path)) {
fprintf(stderr, "Path '%s' is not a valid path name.\n", qPrintable(path));
- exit(1);
+ return 1;
}
if (args.isEmpty()) {
listAllInterfaces(service, path);
- exit(0);
+ return 0;
}
QString interface = args.takeFirst();
}
if (!QDBusUtil::isValidMemberName(member)) {
fprintf(stderr, "Method name '%s' is not a valid member name.\n", qPrintable(member));
- exit(1);
+ return 1;
}
int ret = placeCall(service, path, interface, member, args);
- exit(ret);
+ return ret;
}