More PolkitTQt1 -> PolkitTQt renaming.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 3 years ago
parent 4606c91f4c
commit 8f1d08da58
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -30,7 +30,7 @@ install( FILES
##### polkit-tqt-agent (shared) #########################
tde_add_library( polkit-tqt-agent SHARED AUTOMOC
SOURCES ${polkit_tqt_MOCS}
SOURCES ${polkit_tqt_agent_MOCS}
dummy-agent.cpp
VERSION 0.0.0
LINK ${TQT_LIBRARIES}
@ -53,6 +53,6 @@ tde_add_library( polkit-tqt-agent SHARED AUTOMOC
##
## set_target_properties(polkit-tqt-agent-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION}
## SOVERSION ${POLKITTQT-1_ABI_VERSION}
## DEFINE_SYMBOL MAKE_POLKITTQT1_LIB)
## DEFINE_SYMBOL MAKE_POLKIT_TQT_LIB)
##
## install(TARGETS polkit-tqt-agent-1 ${INSTALL_TARGETS_DEFAULT_ARGS})

@ -28,7 +28,7 @@
/**
* \namespace PolkitTQt1 PolkitTQt
* \namespace PolkitTQt PolkitTQt
*
* \brief Namespace wrapping Polkit-TQt classes
*

@ -23,7 +23,7 @@
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
#include <polkitagent/polkitagent.h>
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Agent
@ -84,13 +84,13 @@ void ListenerAdapter::polkit_tqt_listener_initiate_authentication(PolkitAgentLis
{
tqDebug() << "polkit_tqt_listener_initiate_authentication callback for " << listener;
PolkitTQt1::Identity::List idents;
PolkitTQt1::Details dets(details);
PolkitTQt::Identity::List idents;
PolkitTQt::Details dets(details);
Listener *list = findListener(listener);
for (GList *identity = g_list_first(identities); identity != NULL; identity = g_list_next(identity)) {
idents.append(PolkitTQt1::Identity((PolkitIdentity *)identity->data));
idents.append(PolkitTQt::Identity((PolkitIdentity *)identity->data));
}
list->initiateAuthentication(TQString::fromUtf8(action_id),

@ -35,7 +35,7 @@ typedef struct _GError GError;
typedef int gboolean;
typedef char gchar;
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Agent

@ -29,7 +29,7 @@
#include "polkittqt1-identity.h"
#include "polkittqt1-details.h"
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Agent
@ -79,7 +79,7 @@ Listener::~Listener()
}
}
bool Listener::registerListener(const PolkitTQt1::Subject &subject, const TQString &objectPath)
bool Listener::registerListener(const PolkitTQt::Subject &subject, const TQString &objectPath)
{
GError *error = NULL;

@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef POLKITTQT1_AGENT_LISTENER_H
#define POLKITTQT1_AGENT_LISTENER_H
#ifndef POLKIT_TQT_AGENT_LISTENER_H
#define POLKIT_TQT_AGENT_LISTENER_H
#include "polkit-tqt-export.h"
@ -31,14 +31,14 @@
typedef struct _PolkitAgentListener PolkitAgentListener;
namespace PolkitTQt1
namespace PolkitTQt
{
class Subject;
class Identity;
class Details;
}
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Agent
@ -58,7 +58,7 @@ class ListenerPrivate;
* You can also use Session class to authenticate users however it isn't required.
* \sa Session
*/
class POLKITTQT1_EXPORT Listener : public TQObject
class POLKIT_TQT_EXPORT Listener : public TQObject
{
Q_OBJECT
TQ_DISABLE_COPY(Listener)
@ -93,7 +93,7 @@ public:
* \param objectPath DBus object path
* \return \c True if the polkittqt1-agent-listener.has been registered, \c False otherwise
*/
bool registerListener(const PolkitTQt1::Subject &subject, const TQString &objectPath);
bool registerListener(const PolkitTQt::Subject &subject, const TQString &objectPath);
/**
* \brief Returns pointer to the PolkitAgentListener.
@ -126,9 +126,9 @@ public Q_SLOTS:
virtual void initiateAuthentication(const TQString &actionId,
const TQString &message,
const TQString &iconName,
const PolkitTQt1::Details &details,
const PolkitTQt::Details &details,
const TQString &cookie,
const PolkitTQt1::Identity::List &identities,
const PolkitTQt::Identity::List &identities,
AsyncResult *result) = 0;
/**

@ -27,7 +27,7 @@
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
#include <polkitagent/polkitagent.h>
using namespace PolkitTQt1::Agent;
using namespace PolkitTQt::Agent;
class Session::Private
{
@ -49,7 +49,7 @@ Session::Private::~Private()
// polkitAgentSession is freed in Session d'tor
}
Session::Session(const PolkitTQt1::Identity &identity, const TQString &cookie, AsyncResult *result, TQObject *parent)
Session::Session(const PolkitTQt::Identity &identity, const TQString &cookie, AsyncResult *result, TQObject *parent)
: TQObject(parent)
, d(new Private)
{

@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef POLKITTQT1_AGENT_SESSION_H
#define POLKITTQT1_AGENT_SESSION_H
#ifndef POLKIT_TQT_AGENT_SESSION_H
#define POLKIT_TQT_AGENT_SESSION_H
#include <TQtCore/TQObject>
#include "polkittqt1-identity.h"
@ -27,7 +27,7 @@
typedef struct _GSimpleAsyncResult GSimpleAsyncResult;
typedef struct _PolkitAgentSession PolkitAgentSession;
namespace PolkitTQt1
namespace PolkitTQt
{
/**
@ -45,7 +45,7 @@ namespace Agent
* \internal
* \brief Encapsulation of GSimpleAsyncResult to TQObject class
*/
class POLKITTQT1_EXPORT AsyncResult
class POLKIT_TQT_EXPORT AsyncResult
{
public:
explicit AsyncResult(GSimpleAsyncResult *result);
@ -77,7 +77,7 @@ private:
* authentication system for obtaining authorizations.
*
*/
class POLKITTQT1_EXPORT Session : public TQObject
class POLKIT_TQT_EXPORT Session : public TQObject
{
Q_OBJECT
TQ_DISABLE_COPY(Session)
@ -90,7 +90,7 @@ public:
* \param result Result of the authentication action. Must be finished using complete() method.
* \param parent
*/
Session(const PolkitTQt1::Identity& identity, const TQString &cookie, AsyncResult *result = 0, TQObject *parent = 0);
Session(const PolkitTQt::Identity& identity, const TQString &cookie, AsyncResult *result = 0, TQObject *parent = 0);
/**
* Create a new authentication session from PolkitAgentSession object

@ -28,7 +28,7 @@
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
using namespace PolkitTQt1::Agent;
using namespace PolkitTQt::Agent;
/**
* \internal

@ -11,8 +11,8 @@
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${TQT_INCLUDE_DIRS}
${POLKIT_INCLUDE_DIRS}
)
@ -24,20 +24,22 @@ link_directories(
##### install headers ###########################
install( FILES
install(
FILES
polkit-tqt-actiondescription.h
polkit-tqt-authority.h
polkit-tqt-details.h
polkit-tqt-identity.h
polkit-tqt-subject.h
polkit-tqt-temporaryauthorization.h
DESTINATION ${INCLUDE_INSTALL_DIR} )
DESTINATION ${INCLUDE_INSTALL_DIR}
)
##### polkit-tqt-core (shared) #########################
tde_add_library( polkit-tqt-core SHARED AUTOMOC
SOURCES ${polkit_tqt_MOCS}
SOURCES ${polkit_tqt_core_MOCS}
polkit-tqt-actiondescription.cpp
polkit-tqt-authority.cpp
polkit-tqt-details.cpp
@ -53,4 +55,4 @@ tde_add_library( polkit-tqt-core SHARED AUTOMOC
##
## set_target_properties(polkit-tqt-core-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION}
## SOVERSION ${POLKITTQT-1_ABI_VERSION}
## DEFINE_SYMBOL MAKE_POLKITTQT1_LIB)
## DEFINE_SYMBOL MAKE_POLKIT_TQT_LIB)

@ -112,7 +112,7 @@ class POLKIT_TQT_EXPORT Authority : public TQObject
E_RegisterFailed = 0x06,
/** Unregistration of authentication agent failed **/
E_UnregisterFailed = 0x07,
/** Cookie or polkittqt1-identity.handled to the action is empty **/
/** Cookie or polkit-tqt-identity.handled to the action is empty **/
E_CookieOrIdentityEmpty = 0x08,
/** Response of auth agent failed **/
E_AgentResponseFailed = 0x09,

@ -29,8 +29,8 @@
#include <TQtDBus/TQDBusMessage>
#include <TQtDBus/TQDBusConnection>
using namespace PolkitTQt1;
using namespace PolkitTQt1::Gui;
using namespace PolkitTQt;
using namespace PolkitTQt::Gui;
PkExample::PkExample(TQMainWindow *parent)
: TQMainWindow(parent)

@ -31,7 +31,7 @@
#define MINUTE 60000
using namespace PolkitTQt1;
using namespace PolkitTQt;
PkExampleHelper::PkExampleHelper(int &argc, char **argv)
: TQCoreApplication(argc, argv)

@ -24,7 +24,7 @@
#include "klistener.h"
#include "agent/polkittqt1-agent-session.h"
using namespace PolkitTQt1::Agent;
using namespace PolkitTQt::Agent;
KListener::KListener(TQObject *parent)
: Listener(parent)
@ -37,9 +37,9 @@ KListener::KListener(TQObject *parent)
void KListener::initiateAuthentication(const TQString &actionId,
const TQString &message,
const TQString &iconName,
const PolkitTQt1::Details &details,
const PolkitTQt::Details &details,
const TQString &cookie,
const PolkitTQt1::Identity::List &identities,
const PolkitTQt::Identity::List &identities,
AsyncResult *result)
{
tqDebug() << "initiateAuthentication for " << actionId << " with message " << message;
@ -47,7 +47,7 @@ void KListener::initiateAuthentication(const TQString &actionId,
tqDebug() << details.keys();
tqDebug() << "cookie" << cookie;
TQ_FOREACH (const PolkitTQt1::Identity &identity, identities) {
TQ_FOREACH (const PolkitTQt::Identity &identity, identities) {
tqDebug() << identity.toString();
Session *session;
session = new Session(identity, cookie, result);

@ -29,7 +29,7 @@
#include "core/polkittqt1-details.h"
#include "agent/polkittqt1-agent-session.h"
class KListener : public PolkitTQt1::Agent::Listener
class KListener : public PolkitTQt::Agent::Listener
{
Q_OBJECT
TQ_DISABLE_COPY(KListener)
@ -40,10 +40,10 @@ public Q_SLOTS:
void initiateAuthentication(const TQString &actionId,
const TQString &message,
const TQString &iconName,
const PolkitTQt1::Details &details,
const PolkitTQt::Details &details,
const TQString &cookie,
const PolkitTQt1::Identity::List &identities,
PolkitTQt1::Agent::AsyncResult *result);
const PolkitTQt::Identity::List &identities,
PolkitTQt::Agent::AsyncResult *result);
bool initiateAuthenticationFinish();
void cancelAuthentication();

@ -11,7 +11,7 @@ PkAgentExample::PkAgentExample(int &argc, char **argv)
{
g_type_init();
PolkitTQt1::UnixSessionSubject session(getpid());
PolkitTQt::UnixSessionSubject session(getpid());
m_listener.registerListener(session, "/org/kde/PolicyKit1/AuthenticationAgent");
}

@ -20,13 +20,14 @@
* Boston, MA 02110-1301, USA.
*/
#include "polkittqt1-gui-action.h"
#include "polkittqt1-authority.h"
#include "polkittqt1-subject.h"
#include "polkit-tqt-gui-action.h"
#include "polkit-tqt-authority.h"
#include "polkit-tqt-subject.h"
#include <TQtCore/TQCoreApplication>
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Gui
@ -512,4 +513,5 @@ TQString Action::actionId() const
}
#include "polkittqt1-gui-action.moc"
#include "polkit-tqt-gui-action.moc"

@ -19,21 +19,22 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef POLKITTQT1_GUI_ACTION_H
#define POLKITTQT1_GUI_ACTION_H
#ifndef POLKIT_TQT_GUI_ACTION_H
#define POLKIT_TQT_GUI_ACTION_H
#include "polkit-tqt-export.h"
#include <TQtGui/TQAction>
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Gui
{
/**
* \class Action polkittqt1-gui-action.h Action
* \class Action polkit-tqt-gui-action.h Action
* \author Daniel Nicoletti <dantti85-pk@yahoo.com.br>
* \author Dario Freddi <drf@kde.org>
*

@ -19,11 +19,11 @@
* Boston, MA 02110-1301, USA.
*/
#include "polkittqt1-gui-actionbutton.h"
#include "polkit-tqt-gui-actionbutton.h"
#include "polkittqt1-gui-actionbutton_p.h"
#include "polkit-tqt-gui-actionbutton_p.h"
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Gui
@ -163,4 +163,4 @@ void ActionButtonPrivate::streamClicked(bool c)
}
#include "polkittqt1-gui-actionbutton.moc"
#include "polkit-tqt-gui-actionbutton.moc"

@ -19,15 +19,15 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef POLKITTQT1_GUI_ACTIONBUTTON_H
#define POLKITTQT1_GUI_ACTIONBUTTON_H
#ifndef POLKIT_TQT_GUI_ACTIONBUTTON_H
#define POLKIT_TQT_GUI_ACTIONBUTTON_H
#include "polkit-tqt-export.h"
#include "polkittqt1-gui-action.h"
#include "polkit-tqt-gui-action.h"
class TQAbstractButton;
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Gui
@ -35,7 +35,7 @@ namespace Gui
class ActionButtonPrivate;
/**
* \class ActionButton polkittqt1-gui-actionbutton.h ActionButton
* \class ActionButton polkit-tqt-gui-actionbutton.h ActionButton
* \author Daniel Nicoletti <dantti85-pk@yahoo.com.br>
* \author Dario Freddi <drf@kde.org>
*
@ -50,7 +50,7 @@ class ActionButtonPrivate;
* permission to perform the given action. If you set 'noEnabled'
* to \c true it will be emitted when PolKitResult is NO.
*/
class POLKITTQT1_EXPORT ActionButton : public Action
class POLKIT_TQT_EXPORT ActionButton : public Action
{
Q_OBJECT
TQ_DECLARE_PRIVATE(ActionButton)

@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef POLKITTQT1_GUI_ACTIONBUTTON_P_H
#define POLKITTQT1_GUI_ACTIONBUTTON_P_H
#ifndef POLKIT_TQT_GUI_ACTIONBUTTON_P_H
#define POLKIT_TQT_GUI_ACTIONBUTTON_P_H
#include <polkittqt1-gui-actionbutton.h>
#include <polkit-tqt-gui-actionbutton.h>
#include <TQtCore/TQList>
#include <TQtGui/TQAbstractButton>
@ -29,7 +29,7 @@
/**
* \internal
*/
class PolkitTQt1::Gui::ActionButtonPrivate
class PolkitTQt::Gui::ActionButtonPrivate
{
public:
ActionButtonPrivate(const TQList<TQAbstractButton *> &b)

@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
#include "polkittqt1-gui-actionbuttons.h"
#include "polkit-tqt-gui-actionbuttons.h"
#include "polkittqt1-gui-actionbuttons_p.h"
#include "polkit-tqt-gui-actionbuttons_p.h"
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Gui
@ -70,4 +70,4 @@ void ActionButtons::removeButton(TQAbstractButton *button)
}
#include "polkittqt1-gui-actionbuttons.moc"
#include "polkit-tqt-gui-actionbuttons.moc"

@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef POLKITTQT1_GUI_ACTIONBUTTONS_H
#define POLKITTQT1_GUI_ACTIONBUTTONS_H
#ifndef POLKIT_TQT_GUI_ACTIONBUTTONS_H
#define POLKIT_TQT_GUI_ACTIONBUTTONS_H
#include "polkittqt1-gui-actionbutton.h"
#include "polkit-tqt-gui-actionbutton.h"
namespace PolkitTQt1
namespace PolkitTQt
{
namespace Gui
@ -31,7 +31,7 @@ namespace Gui
class ActionButtonsPrivate;
/**
* \class ActionButtons polkittqt1-gui-actionbuttons.h ActionButtons
* \class ActionButtons polkit-tqt-gui-actionbuttons.h ActionButtons
* \author Dario Freddi <drf@kde.org>
*
* \brief Class used to hold and update a list of TQAbstractButtons

@ -18,15 +18,15 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef POLKITTQT1_GUI_ACTIONBUTTONS_P_H
#define POLKITTQT1_GUI_ACTIONBUTTONS_P_H
#ifndef POLKIT_TQT_GUI_ACTIONBUTTONS_P_H
#define POLKIT_TQT_GUI_ACTIONBUTTONS_P_H
#include "polkittqt1-gui-actionbutton_p.h"
#include "polkit-tqt-gui-actionbutton_p.h"
/**
* \internal
*/
class PolkitTQt1::Gui::ActionButtonsPrivate : public ActionButtonPrivate
class PolkitTQt::Gui::ActionButtonsPrivate : public ActionButtonPrivate
{
public:
ActionButtonsPrivate(const TQList<TQAbstractButton *> &b)

@ -1 +1 @@
#include "../../polkittqt1-gui-action.h"
#include "../../polkit-tqt-gui-action.h"

@ -1 +1 @@
#include "../../polkittqt1-gui-actionbutton.h"
#include "../../polkit-tqt-gui-actionbutton.h"

@ -1 +1 @@
#include "../../polkittqt1-gui-actionbuttons.h"
#include "../../polkit-tqt-gui-actionbuttons.h"

@ -18,22 +18,22 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _POLKITTQT1_VERSION_H_
#define _POLKITTQT1_VERSION_H_
#ifndef _POLKIT_TQT_VERSION_H_
#define _POLKIT_TQT_VERSION_H_
#include "polkit-tqt-export.h"
/// @brief PolkitTQt-1 version as string at compile time.
#define POLKITTQT1_VERSION_STRING "${POLKITTQT-1_VERSION_STRING}"
#define POLKIT_TQT_VERSION_STRING "${POLKITTQT-1_VERSION_STRING}"
/// @brief The major PolkitTQt-1 version number at compile time
#define POLKITTQT1_VERSION_MAJOR ${POLKITTQT-1_VERSION_MAJOR}
#define POLKIT_TQT_VERSION_MAJOR ${POLKITTQT-1_VERSION_MAJOR}
/// @brief The minor PolkitTQt-1 version number at compile time
#define POLKITTQT1_VERSION_MINOR ${POLKITTQT-1_VERSION_MINOR}
#define POLKIT_TQT_VERSION_MINOR ${POLKITTQT-1_VERSION_MINOR}
/// @brief The PolkitTQt-1 patch version number at compile time
#define POLKITTQT1_VERSION_PATCH ${POLKITTQT-1_VERSION_PATCH}
#define POLKIT_TQT_VERSION_PATCH ${POLKITTQT-1_VERSION_PATCH}
/**
* \brief Create a unique number from the major, minor and release number of a %PolkitTQt-1 version
@ -41,24 +41,24 @@
* This function can be used for preprocessing. For version information at runtime
* use the version methods in the PolkitTQt-1 namespace.
*/
#define POLKITTQT1_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
#define POLKIT_TQT_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
/**
* \brief %PolkitTQt-1 Version as a unique number at compile time
*
* This macro calculates the %PolkitTQt-1 version into a number. It is mainly used
* through POLKITTQT1_IS_VERSION in preprocessing. For version information at runtime
* through POLKIT_TQT_IS_VERSION in preprocessing. For version information at runtime
* use the version methods in the PolkitTQt-1 namespace.
*/
#define POLKITTQT1_VERSION \
POLKITTQT1_MAKE_VERSION(POLKITTQT1_VERSION_MAJOR,POLKITTQT1_VERSION_MINOR,POLKITTQT1_VERSION_PATCH)
#define POLKIT_TQT_VERSION \
POLKIT_TQT_MAKE_VERSION(POLKIT_TQT_VERSION_MAJOR,POLKIT_TQT_VERSION_MINOR,POLKIT_TQT_VERSION_PATCH)
/**
* \brief Check if the %PolkitTQt-1 version matches a certain version or is higher
*
* This macro is typically used to compile conditionally a part of code:
* \code
* #if POLKITTQT1_IS_VERSION(2,1)
* #if POLKIT_TQT_IS_VERSION(2,1)
* // Code for PolkitTQt-1 2.1
* #else
* // Code for PolkitTQt-1 2.0
@ -68,39 +68,39 @@
* For version information at runtime
* use the version methods in the PolkitTQt-1 namespace.
*/
#define POLKITTQT1_IS_VERSION(a,b,c) ( POLKITTQT1_VERSION >= POLKITTQT1_MAKE_VERSION(a,b,c) )
#define POLKIT_TQT_IS_VERSION(a,b,c) ( POLKIT_TQT_VERSION >= POLKIT_TQT_MAKE_VERSION(a,b,c) )
namespace PolkitTQt1 {
namespace PolkitTQt {
/**
* @brief Returns the major number of PolkitTQt-1's version, e.g.
* 1 for %PolkitTQt-1 1.0.2.
* @return the major version number at runtime.
*/
POLKITTQT1_EXPORT unsigned int versionMajor();
POLKIT_TQT_EXPORT unsigned int versionMajor();
/**
* @brief Returns the minor number of PolkitTQt-1's version, e.g.
* 0 for %PolkitTQt-1 1.0.2.
* @return the minor version number at runtime.
*/
POLKITTQT1_EXPORT unsigned int versionMinor();
POLKIT_TQT_EXPORT unsigned int versionMinor();
/**
* @brief Returns the patch number of PolkitTQt-1's version, e.g.
* 2 for %PolkitTQt-1 1.0.2.
* @return the release number at runtime.
*/
POLKITTQT1_EXPORT unsigned int versionPatch();
POLKIT_TQT_EXPORT unsigned int versionPatch();
/**
* @brief Returns the %PolkitTQt-1 version as string, e.g. "1.0.2".
*
* On contrary to the macro POLKITTQT1_VERSION_STRING this function returns
* On contrary to the macro POLKIT_TQT_VERSION_STRING this function returns
* the version number of PolkitTQt-1 at runtime.
* @return the %PolkitTQt-1 version. You can keep the string forever
*/
POLKITTQT1_EXPORT const char* versionString();
POLKIT_TQT_EXPORT const char* versionString();
}
#endif

@ -9,8 +9,8 @@
#include <pwd.h>
#include <TQtDBus/TQDBusMessage>
#include <TQtDBus/TQDBusConnection>
using namespace PolkitTQt1;
using namespace PolkitTQt1::Agent;
using namespace PolkitTQt;
using namespace PolkitTQt::Agent;
void wait()
{
@ -38,7 +38,7 @@ void TestAuth::test_Auth_checkAuthorization()
TQVERIFY(!authority->hasError());
// Now we try async methods
TQSignalSpy spy(authority, SIGNAL(checkAuthorizationFinished(PolkitTQt1::Authority::Result)));
TQSignalSpy spy(authority, SIGNAL(checkAuthorizationFinished(PolkitTQt::Authority::Result)));
// Call asynchronous checkAuthorization
authority->checkAuthorization("org.tqt.policykit.examples.kick", process, Authority::None);
// Give the polkit time to obtain the result and emit the signal with it
@ -46,7 +46,7 @@ void TestAuth::test_Auth_checkAuthorization()
// Test if the signal was emitted
TQCOMPARE(spy.count(), 1);
// Test the result
result = qVariantValue<PolkitTQt1::Authority::Result> (spy.takeFirst()[0]);
result = qVariantValue<PolkitTQt::Authority::Result> (spy.takeFirst()[0]);
TQCOMPARE(result, Authority::No);
TQVERIFY(!authority->hasError());
spy.clear();
@ -88,11 +88,11 @@ void TestAuth::test_Auth_enumerateActions()
// Test asynchronous version as well
list.clear();
count = 0;
TQSignalSpy spy(Authority::instance(), SIGNAL(enumerateActionsFinished(PolkitTQt1::ActionDescription::List)));
TQSignalSpy spy(Authority::instance(), SIGNAL(enumerateActionsFinished(PolkitTQt::ActionDescription::List)));
Authority::instance()->enumerateActions();
wait();
TQCOMPARE(spy.count(), 1);
list = qVariantValue<PolkitTQt1::ActionDescription::List> (spy.takeFirst()[0]);
list = qVariantValue<PolkitTQt::ActionDescription::List> (spy.takeFirst()[0]);
TQVERIFY(!Authority::instance()->hasError());
Q_FOREACH(const ActionDescription &ad, list) {
if ((ad.actionId() == "org.tqt.policykit.examples.kick") ||

Loading…
Cancel
Save