From 42194295cc381c4c465a43eca40d26c9b41c6792 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Sat, 9 Aug 2014 20:55:14 +0400 Subject: [PATCH] rename CONTROL to CTRL --- sources/gui/src/mainactions.cpp | 20 ++++++++++---------- sources/gui/src/mainwindow.cpp | 4 ++-- sources/gui/src/messages.cpp | 2 +- sources/gui/src/netctlautowindow.cpp | 14 +++++++------- sources/helper/src/main.cpp | 2 +- sources/helper/src/messages.cpp | 2 +- sources/helper/src/netctlhelper.cpp | 4 ++-- sources/version.h.in | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sources/gui/src/mainactions.cpp b/sources/gui/src/mainactions.cpp index ed0858d..d715ee8 100644 --- a/sources/gui/src/mainactions.cpp +++ b/sources/gui/src/mainactions.cpp @@ -141,7 +141,7 @@ bool MainWindow::forceStopHelper() { if (debug) qDebug() << "[MainWindow]" << "[forceStartHelper]"; - QList responce = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + QList responce = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Close"), QList(), true, debug); @@ -226,12 +226,12 @@ void MainWindow::connectToUnknownEssid(const QString passwd) QList args; args.append(profile); args.append(settingsList); - sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Create"), args, true, debug); args.clear(); args.append(profile); - sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Start"), args, true, debug); status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH, @@ -373,7 +373,7 @@ void MainWindow::mainTabEnableProfile() if (useHelper) { QList args; args.append(profile); - sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Enable"), args, true, debug); current = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH, @@ -404,7 +404,7 @@ void MainWindow::mainTabRemoveProfile() if (useHelper) { QList args; args.append(profile); - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Remove"), args, true, debug)[0].toBool(); } @@ -433,7 +433,7 @@ void MainWindow::mainTabRestartProfile() if (useHelper) { QList args; args.append(profile); - sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Restart"), args, true, debug)[0].toBool(); status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH, @@ -468,7 +468,7 @@ void MainWindow::mainTabStartProfile() if (useHelper) { QList args; args.append(profile); - sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Start"), args, true, debug); current = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH, @@ -856,7 +856,7 @@ void MainWindow::profileTabCreateProfile() QList args; args.append(profile); args.append(settingsList); - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Create"), args, true, debug)[0].toBool(); } @@ -956,7 +956,7 @@ void MainWindow::profileTabRemoveProfile() if (useHelper) { QList args; args.append(profile); - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Remove"), args, true, debug)[0].toBool(); } @@ -1071,7 +1071,7 @@ void MainWindow::wifiTabStart() args, true, debug)[0].toString(); args.clear(); args.append(profileName); - sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Start"), args, true, debug); current = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH, diff --git a/sources/gui/src/mainwindow.cpp b/sources/gui/src/mainwindow.cpp index 96a04cd..24ba30b 100644 --- a/sources/gui/src/mainwindow.cpp +++ b/sources/gui/src/mainwindow.cpp @@ -163,7 +163,7 @@ bool MainWindow::isHelperActive() { if (debug) qDebug() << "[MainWindow]" << "[isHelperActive]"; - QList responce = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + QList responce = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Active"), QList(), true, debug); @@ -698,7 +698,7 @@ void MainWindow::updateWifiTab() ui->tabWidget->setDisabled(true); QList scanResults; if (useHelper) - scanResults = parseOutputWifi(sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + scanResults = parseOutputWifi(sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("WiFi"), QList(), true, debug), debug); else diff --git a/sources/gui/src/messages.cpp b/sources/gui/src/messages.cpp index 54adb29..451c72d 100644 --- a/sources/gui/src/messages.cpp +++ b/sources/gui/src/messages.cpp @@ -134,7 +134,7 @@ QString infoMessage() infoMessage += QString("\tDBUS_OBJECT_PATH=%1\n").arg(QString(DBUS_OBJECT_PATH)); infoMessage += QString("\tDBUS_HELPER_SERVICE=%1\n").arg(QString(DBUS_HELPER_SERVICE)); infoMessage += QString("\tDBUS_HELPER_INTERFACE=%1\n").arg(QString(DBUS_HELPER_INTERFACE)); - infoMessage += QString("\tDBUS_CONTROL_PATH=%1\n").arg(QString(DBUS_CONTROL_PATH)); + infoMessage += QString("\tDBUS_CTRL_PATH=%1\n").arg(QString(DBUS_CTRL_PATH)); infoMessage += QString("\tDBUS_LIB_PATH=%1\n").arg(QString(DBUS_LIB_PATH)); return infoMessage; diff --git a/sources/gui/src/netctlautowindow.cpp b/sources/gui/src/netctlautowindow.cpp index 06a9339..041c8b4 100644 --- a/sources/gui/src/netctlautowindow.cpp +++ b/sources/gui/src/netctlautowindow.cpp @@ -279,7 +279,7 @@ void NetctlAutoWindow::netctlAutoDisableAllProfiles() ui->tableWidget->setDisabled(true); bool status = false; if (useHelper) - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("autoDisableAll"), QList(), true, debug)[0].toBool(); else @@ -305,7 +305,7 @@ void NetctlAutoWindow::netctlAutoEnableProfile() if (useHelper) { QList args; args.append(profile); - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("autoEnable"), args, true, debug)[0].toBool(); } @@ -327,7 +327,7 @@ void NetctlAutoWindow::netctlAutoEnableAllProfiles() ui->tableWidget->setDisabled(true); bool status = false; if (useHelper) - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("autoEnableAll"), QList(), true, debug)[0].toBool(); else @@ -353,7 +353,7 @@ void NetctlAutoWindow::netctlAutoStartProfile() if (useHelper) { QList args; args.append(profile); - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("autoStart"), args, true, debug)[0].toBool(); } @@ -374,7 +374,7 @@ void NetctlAutoWindow::netctlAutoEnableService() bool status = false; if (useHelper) - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("autoServiceEnable"), QList(), true, debug)[0].toBool(); else @@ -394,7 +394,7 @@ void NetctlAutoWindow::netctlAutoRestartService() bool status = false; if (useHelper) - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("autoServiceRestart"), QList(), true, debug)[0].toBool(); else @@ -414,7 +414,7 @@ void NetctlAutoWindow::netctlAutoStartService() bool status = false; if (useHelper) - status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CONTROL_PATH, + status = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("autoServiceStart"), QList(), true, debug)[0].toBool(); else diff --git a/sources/helper/src/main.cpp b/sources/helper/src/main.cpp index 21a4275..8de5495 100644 --- a/sources/helper/src/main.cpp +++ b/sources/helper/src/main.cpp @@ -36,7 +36,7 @@ bool checkExistSession() { QDBusConnection bus = QDBusConnection::systemBus(); QDBusMessage request = QDBusMessage::createMethodCall(DBUS_HELPER_SERVICE, - DBUS_CONTROL_PATH, + DBUS_CTRL_PATH, DBUS_HELPER_INTERFACE, QString("Active")); QDBusMessage response = bus.call(request); diff --git a/sources/helper/src/messages.cpp b/sources/helper/src/messages.cpp index a3aff88..48c6622 100644 --- a/sources/helper/src/messages.cpp +++ b/sources/helper/src/messages.cpp @@ -93,7 +93,7 @@ QString infoMessage() infoMessage += QString("\tDBUS_OBJECT_PATH=%1\n").arg(QString(DBUS_OBJECT_PATH)); infoMessage += QString("\tDBUS_HELPER_SERVICE=%1\n").arg(QString(DBUS_HELPER_SERVICE)); infoMessage += QString("\tDBUS_HELPER_INTERFACE=%1\n").arg(QString(DBUS_HELPER_INTERFACE)); - infoMessage += QString("\tDBUS_CONTROL_PATH=%1\n").arg(QString(DBUS_CONTROL_PATH)); + infoMessage += QString("\tDBUS_CTRL_PATH=%1\n").arg(QString(DBUS_CTRL_PATH)); infoMessage += QString("\tDBUS_LIB_PATH=%1\n").arg(QString(DBUS_LIB_PATH)); return infoMessage; diff --git a/sources/helper/src/netctlhelper.cpp b/sources/helper/src/netctlhelper.cpp index 7cea90c..e6261ab 100644 --- a/sources/helper/src/netctlhelper.cpp +++ b/sources/helper/src/netctlhelper.cpp @@ -135,7 +135,7 @@ void NetctlHelper::createInterface() if (debug) qDebug() << "[NetctlHelper]" << "[createInterface]" << ":" << bus.lastError().message(); return quitHelper(); } - if (!bus.registerObject(DBUS_CONTROL_PATH, + if (!bus.registerObject(DBUS_CTRL_PATH, new ControlAdaptor(this, configuration), QDBusConnection::ExportAllContents)) { if (debug) qDebug() << "[NetctlHelper]" << "[createInterface]" << ":" << "Could not register control object"; @@ -150,7 +150,7 @@ void NetctlHelper::deleteInterface() if (debug) qDebug() << "[NetctlHelper]" << "[deleteInterface]"; QDBusConnection::systemBus().unregisterObject(DBUS_LIB_PATH); - QDBusConnection::systemBus().unregisterObject(DBUS_CONTROL_PATH); + QDBusConnection::systemBus().unregisterObject(DBUS_CTRL_PATH); QDBusConnection::systemBus().unregisterService(DBUS_HELPER_SERVICE); } diff --git a/sources/version.h.in b/sources/version.h.in index ffce9c9..7cc2e89 100644 --- a/sources/version.h.in +++ b/sources/version.h.in @@ -32,7 +32,7 @@ #define DBUS_OBJECT_PATH "/netctlgui" #define DBUS_HELPER_SERVICE "org.netctlgui.helper" #define DBUS_HELPER_INTERFACE "org.netctlgui.helper" -#define DBUS_CONTROL_PATH "/ctrl" +#define DBUS_CTRL_PATH "/ctrl" #define DBUS_LIB_PATH "/netctl" #endif /* VERSION_H */