diff options
author | Michele Calgaro <[email protected]> | 2021-10-31 00:13:21 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-10-31 00:14:22 +0900 |
commit | e8933e99b4600d91e9eab7d1ad3a2d35813028a9 (patch) | |
tree | b2899fd1ef651a1bff56918ace94625a4bc14aa0 /examples/PkExampleHelper.cpp | |
parent | e8494e60efeb94c67c813d1c1c038031915e8c17 (diff) | |
download | polkit-tqt-e8933e99b4600d91e9eab7d1ad3a2d35813028a9.tar.gz polkit-tqt-e8933e99b4600d91e9eab7d1ad3a2d35813028a9.zip |
More Qt->TQt conversion and some clean up.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'examples/PkExampleHelper.cpp')
-rw-r--r-- | examples/PkExampleHelper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/PkExampleHelper.cpp b/examples/PkExampleHelper.cpp index d6ecfdc7f..97a634411 100644 --- a/examples/PkExampleHelper.cpp +++ b/examples/PkExampleHelper.cpp @@ -22,7 +22,7 @@ #include "PkExampleHelper.h" #include "examplesadaptor.h" -#include "polkitqt1-authority.h" +#include "polkittqt-authority.h" #include <TQtDBus/TQDBusConnection> #include <TQtCore/TQTimer> @@ -39,7 +39,7 @@ PkExampleHelper::PkExampleHelper(int &argc, char **argv) tqDebug() << "Creating Helper"; (void) new ExamplesAdaptor(this); // Register the DBus service - if (!TQDBusConnection::systemBus().registerService("org.qt.policykit.examples")) { + if (!TQDBusConnection::systemBus().registerService("org.tqt.policykit.examples")) { tqDebug() << TQDBusConnection::systemBus().lastError().message();; TQTimer::singleShot(0, this, SLOT(quit())); return; @@ -68,7 +68,7 @@ bool PkExampleHelper::set(const TQString &action) Authority::Result result; SystemBusNameSubject subject(message().service()); - result = Authority::instance()->checkAuthorizationSync("org.qt.policykit.examples.set", + result = Authority::instance()->checkAuthorizationSync("org.tqt.policykit.examples.set", subject , Authority::AllowUserInteraction); if (result == Authority::Yes) { tqDebug() << message().service() << TQString("Implicit authorization set to") << action; @@ -86,14 +86,14 @@ bool PkExampleHelper::setValue(const TQString &action) // This action must be authorized first. It will set the implicit // authorization for the Shout action by editing the .policy file TQDomDocument doc = TQDomDocument("policy"); - TQFile file("/usr/share/polkit-1/actions/org.qt.policykit.examples.policy"); + TQFile file("/usr/share/polkit-1/actions/org.tqt.policykit.examples.policy"); if (!file.open(TQIODevice::ReadOnly)) return false; doc.setContent(&file); file.close(); TQDomElement el = doc.firstChildElement("policyconfig"). firstChildElement("action"); - while (!el.isNull() && el.attribute("id", TQString()) != "org.qt.policykit.examples.shout") { + while (!el.isNull() && el.attribute("id", TQString()) != "org.tqt.policykit.examples.shout") { el = el.nextSiblingElement("action"); } el = el.firstChildElement("defaults"); |