summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2021-10-30 13:47:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2021-10-30 13:47:29 +0900
commite8494e60efeb94c67c813d1c1c038031915e8c17 (patch)
tree3238b3e8ceeb577a8eda00da66704c7e5fc6f9f5
parent28de2ff84f59ac0b173670aa9c5331bc77c1e63f (diff)
downloadpolkit-tqt-e8494e60.tar.gz
polkit-tqt-e8494e60.zip
Raw Qt->TQt conversion using tde/scripts/conversions/qt3-tqt3/convert_existing_qt3_app_to_tqt3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--PolkitQt-1Config.cmake.in4
-rw-r--r--agent/listeneradapter.cpp32
-rw-r--r--agent/listeneradapter_p.h12
-rw-r--r--agent/polkitqt1-agent-listener.cpp22
-rw-r--r--agent/polkitqt1-agent-listener.h28
-rw-r--r--agent/polkitqt1-agent-session.cpp30
-rw-r--r--agent/polkitqt1-agent-session.h28
-rw-r--r--agent/polkitqtlistener.cpp24
-rw-r--r--agent/polkitqtlistener_p.h14
-rw-r--r--cmake/modules/FindPolkit.cmake2
-rw-r--r--cmake/modules/FindPolkitQt-1.cmake20
-rw-r--r--core/polkitqt1-actiondescription.cpp48
-rw-r--r--core/polkitqt1-actiondescription.h30
-rw-r--r--core/polkitqt1-authority.cpp94
-rw-r--r--core/polkitqt1-authority.h64
-rw-r--r--core/polkitqt1-details.cpp24
-rw-r--r--core/polkitqt1-details.h22
-rw-r--r--core/polkitqt1-identity.cpp28
-rw-r--r--core/polkitqt1-identity.h24
-rw-r--r--core/polkitqt1-subject.cpp42
-rw-r--r--core/polkitqt1-subject.h32
-rw-r--r--core/polkitqt1-temporaryauthorization.cpp36
-rw-r--r--core/polkitqt1-temporaryauthorization.h30
-rw-r--r--debian/source/format2
-rw-r--r--examples/PkExample.cpp114
-rw-r--r--examples/PkExample.h4
-rw-r--r--examples/PkExample.ui52
-rw-r--r--examples/PkExampleHelper.cpp54
-rw-r--r--examples/PkExampleHelper.h12
-rw-r--r--examples/agent/klistener.cpp58
-rw-r--r--examples/agent/klistener.h30
-rw-r--r--examples/agent/main.cpp2
-rw-r--r--examples/agent/pkagentexample.cpp6
-rw-r--r--examples/agent/pkagentexample.h6
-rw-r--r--examples/main.cpp4
-rw-r--r--gui/polkitqt1-gui-action.cpp126
-rw-r--r--gui/polkitqt1-gui-action.h38
-rw-r--r--gui/polkitqt1-gui-actionbutton.cpp36
-rw-r--r--gui/polkitqt1-gui-actionbutton.h28
-rw-r--r--gui/polkitqt1-gui-actionbutton_p.h14
-rw-r--r--gui/polkitqt1-gui-actionbuttons.cpp14
-rw-r--r--gui/polkitqt1-gui-actionbuttons.h26
-rw-r--r--gui/polkitqt1-gui-actionbuttons_p.h4
-rw-r--r--polkit-qt-1.pc.cmake2
-rw-r--r--polkit-qt-agent-1.pc.cmake4
-rw-r--r--polkit-qt-core-1.pc.cmake4
-rw-r--r--polkit-qt-gui-1.pc.cmake4
-rw-r--r--polkitqt1-export.h2
-rw-r--r--polkitqt1-version.h.cmake46
-rw-r--r--test/test.cpp142
-rw-r--r--test/test.h6
51 files changed, 765 insertions, 765 deletions
diff --git a/PolkitQt-1Config.cmake.in b/PolkitQt-1Config.cmake.in
index 1356de7af..f24e35f4b 100644
--- a/PolkitQt-1Config.cmake.in
+++ b/PolkitQt-1Config.cmake.in
@@ -1,7 +1,7 @@
-# PolkitQt-1Config.cmake is generated by CMake from PolkitQt-1Config.cmake.in.
+# PolkitTQt-1Config.cmake is generated by CMake from PolkitTQt-1Config.cmake.in.
# Any changed value in this file will be overwritten by CMake.
-# set the PolkitQt-1 version number
+# set the PolkitTQt-1 version number
set(POLKITQT-1_VERSION_MAJOR @POLKITQT-1_VERSION_MAJOR@)
set(POLKITQT-1_VERSION_MINOR @POLKITQT-1_VERSION_MINOR@)
set(POLKITQT-1_VERSION_PATCH @POLKITQT-1_VERSION_PATCH@)
diff --git a/agent/listeneradapter.cpp b/agent/listeneradapter.cpp
index b25449009..231d7d752 100644
--- a/agent/listeneradapter.cpp
+++ b/agent/listeneradapter.cpp
@@ -19,11 +19,11 @@
*/
#include "listeneradapter_p.h"
-#include <QtCore/QDebug>
+#include <TQtCore/TQDebug>
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
#include <polkitagent/polkitagent.h>
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Agent
@@ -50,8 +50,8 @@ ListenerAdapter *ListenerAdapter::instance()
return s_globalListenerAdapter()->q;
}
-ListenerAdapter::ListenerAdapter(QObject *parent)
- : QObject(parent)
+ListenerAdapter::ListenerAdapter(TQObject *parent)
+ : TQObject(parent)
{
Q_ASSERT(!s_globalListenerAdapter()->q);
s_globalListenerAdapter()->q = this;
@@ -82,22 +82,22 @@ void ListenerAdapter::polkit_qt_listener_initiate_authentication(PolkitAgentList
GCancellable *cancellable,
GSimpleAsyncResult *result)
{
- qDebug() << "polkit_qt_listener_initiate_authentication callback for " << listener;
+ tqDebug() << "polkit_qt_listener_initiate_authentication callback for " << listener;
- PolkitQt1::Identity::List idents;
- PolkitQt1::Details dets(details);
+ PolkitTQt1::Identity::List idents;
+ PolkitTQt1::Details dets(details);
Listener *list = findListener(listener);
for (GList *identity = g_list_first(identities); identity != NULL; identity = g_list_next(identity)) {
- idents.append(PolkitQt1::Identity((PolkitIdentity *)identity->data));
+ idents.append(PolkitTQt1::Identity((PolkitIdentity *)identity->data));
}
- list->initiateAuthentication(QString::fromUtf8(action_id),
- QString::fromUtf8(message),
- QString::fromUtf8(icon_name),
+ list->initiateAuthentication(TQString::fromUtf8(action_id),
+ TQString::fromUtf8(message),
+ TQString::fromUtf8(icon_name),
dets,
- QString::fromUtf8(cookie),
+ TQString::fromUtf8(cookie),
idents,
new AsyncResult(result));
}
@@ -106,7 +106,7 @@ gboolean ListenerAdapter::polkit_qt_listener_initiate_authentication_finish(Polk
GAsyncResult *res,
GError **error)
{
- qDebug() << "polkit_qt_listener_initiate_authentication_finish callback for " << listener;
+ tqDebug() << "polkit_qt_listener_initiate_authentication_finish callback for " << listener;
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT(res);
if (g_simple_async_result_propagate_error(simple, error)) {
@@ -117,7 +117,7 @@ gboolean ListenerAdapter::polkit_qt_listener_initiate_authentication_finish(Polk
void ListenerAdapter::cancelled_cb(PolkitAgentListener *listener)
{
- qDebug() << "cancelled_cb for " << listener;
+ tqDebug() << "cancelled_cb for " << listener;
Listener *list = findListener(listener);
@@ -126,14 +126,14 @@ void ListenerAdapter::cancelled_cb(PolkitAgentListener *listener)
void ListenerAdapter::addListener(Listener *listener)
{
- qDebug() << "Adding new listener " << listener << "for " << listener->listener();
+ tqDebug() << "Adding new listener " << listener << "for " << listener->listener();
m_listeners.append(listener);
}
void ListenerAdapter::removeListener(Listener *listener)
{
- qDebug() << "Removing listener " << listener;
+ tqDebug() << "Removing listener " << listener;
// should be safe as we don't have more than one same listener registered in one time
m_listeners.removeOne(listener);
diff --git a/agent/listeneradapter_p.h b/agent/listeneradapter_p.h
index 126cd134c..4bf754694 100644
--- a/agent/listeneradapter_p.h
+++ b/agent/listeneradapter_p.h
@@ -21,7 +21,7 @@
#ifndef LISTENER_ADAPTER_P_H
#define LISTENER_ADAPTER_P_H
-#include <QtCore/QObject>
+#include <TQtCore/TQObject>
#include "polkitqt1-agent-listener.h"
#include "polkitqt1-identity.h"
@@ -35,7 +35,7 @@ typedef struct _GError GError;
typedef int gboolean;
typedef char gchar;
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Agent
@@ -43,10 +43,10 @@ namespace Agent
class AsyncResult;
class Listener;
-class ListenerAdapter : public QObject
+class ListenerAdapter : public TQObject
{
Q_OBJECT
- Q_DISABLE_COPY(ListenerAdapter)
+ TQ_DISABLE_COPY(ListenerAdapter)
public:
static ListenerAdapter* instance();
~ListenerAdapter() {}
@@ -70,8 +70,8 @@ private:
void removeListener(Listener *listener);
Listener* findListener(PolkitAgentListener *listener);
- explicit ListenerAdapter(QObject *parent = 0);
- QList<Listener *> m_listeners;
+ explicit ListenerAdapter(TQObject *parent = 0);
+ TQList<Listener *> m_listeners;
friend class Listener;
};
diff --git a/agent/polkitqt1-agent-listener.cpp b/agent/polkitqt1-agent-listener.cpp
index 369dd7540..c6bf63cba 100644
--- a/agent/polkitqt1-agent-listener.cpp
+++ b/agent/polkitqt1-agent-listener.cpp
@@ -20,7 +20,7 @@
#include "polkitqt1-agent-listener.h"
-#include <QtCore/QDebug>
+#include <TQtCore/TQDebug>
#include "polkitqtlistener_p.h"
@@ -29,7 +29,7 @@
#include "polkitqt1-identity.h"
#include "polkitqt1-details.h"
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Agent
@@ -44,20 +44,20 @@ public:
#endif
};
-Listener::Listener(QObject *parent)
- : QObject(parent), d(new ListenerPrivate)
+Listener::Listener(TQObject *parent)
+ : TQObject(parent), d(new ListenerPrivate)
{
g_type_init();
d->listener = polkit_qt_listener_new();
- qDebug() << "New PolkitAgentListener " << d->listener;
+ tqDebug() << "New PolkitAgentListener " << d->listener;
ListenerAdapter::instance()->addListener(this);
}
-Listener::Listener(PolkitAgentListener *listener, QObject *parent)
- : QObject(parent), d(new ListenerPrivate)
+Listener::Listener(PolkitAgentListener *listener, TQObject *parent)
+ : TQObject(parent), d(new ListenerPrivate)
{
g_type_init();
@@ -66,7 +66,7 @@ Listener::Listener(PolkitAgentListener *listener, QObject *parent)
Listener::~Listener()
{
- qDebug("Destroying listener");
+ tqDebug("Destroying listener");
ListenerAdapter::instance()->removeListener(this);
#ifndef POLKIT_QT_1_COMPATIBILITY_MODE
@@ -79,7 +79,7 @@ Listener::~Listener()
}
}
-bool Listener::registerListener(const PolkitQt1::Subject &subject, const QString &objectPath)
+bool Listener::registerListener(const PolkitTQt1::Subject &subject, const TQString &objectPath)
{
GError *error = NULL;
@@ -97,13 +97,13 @@ bool Listener::registerListener(const PolkitQt1::Subject &subject, const QString
&error);
if (error != NULL) {
- qWarning() << QString("Cannot register authentication agent: %1").arg(error->message);
+ tqWarning() << TQString("Cannot register authentication agent: %1").arg(error->message);
g_error_free(error);
return false;
}
#ifndef POLKIT_QT_1_COMPATIBILITY_MODE
if (d->registeredHandle == NULL) {
- qWarning() << QString("Cannot register authentication agent!");
+ tqWarning() << TQString("Cannot register authentication agent!");
return false;
}
return true;
diff --git a/agent/polkitqt1-agent-listener.h b/agent/polkitqt1-agent-listener.h
index 38c2ae46f..ed48509e1 100644
--- a/agent/polkitqt1-agent-listener.h
+++ b/agent/polkitqt1-agent-listener.h
@@ -23,7 +23,7 @@
#include "polkitqt1-export.h"
-#include <QtCore/QObject>
+#include <TQtCore/TQObject>
#include "polkitqt1-agent-session.h"
@@ -31,14 +31,14 @@
typedef struct _PolkitAgentListener PolkitAgentListener;
-namespace PolkitQt1
+namespace PolkitTQt1
{
class Subject;
class Identity;
class Details;
}
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Agent
@@ -58,15 +58,15 @@ class ListenerPrivate;
* You can also use Session class to authenticate users however it isn't required.
* \sa Session
*/
-class POLKITQT1_EXPORT Listener : public QObject
+class POLKITQT1_EXPORT Listener : public TQObject
{
Q_OBJECT
- Q_DISABLE_COPY(Listener)
+ TQ_DISABLE_COPY(Listener)
public:
/**
* \brief Constructor of Listener class
*/
- Listener(QObject *parent = 0);
+ Listener(TQObject *parent = 0);
/**
* \brief Constructor of Listener class from PolkitAgentListener
@@ -76,7 +76,7 @@ public:
* \param listener Pointer to the PolkitAgentListener
* \param parent
*/
- explicit Listener(PolkitAgentListener *listener, QObject *parent = 0);
+ explicit Listener(PolkitAgentListener *listener, TQObject *parent = 0);
virtual ~Listener();
@@ -93,7 +93,7 @@ public:
* \param objectPath DBus object path
* \return \c True if the polkitqt1-agent-listener.has been registered, \c False otherwise
*/
- bool registerListener(const PolkitQt1::Subject &subject, const QString &objectPath);
+ bool registerListener(const PolkitTQt1::Subject &subject, const TQString &objectPath);
/**
* \brief Returns pointer to the PolkitAgentListener.
@@ -123,12 +123,12 @@ public Q_SLOTS:
* authentication is done. You can pass it to the constructor of the Session class
* and then call session->result()->complete() to mark the action as done.
*/
- virtual void initiateAuthentication(const QString &actionId,
- const QString &message,
- const QString &iconName,
- const PolkitQt1::Details &details,
- const QString &cookie,
- const PolkitQt1::Identity::List &identities,
+ virtual void initiateAuthentication(const TQString &actionId,
+ const TQString &message,
+ const TQString &iconName,
+ const PolkitTQt1::Details &details,
+ const TQString &cookie,
+ const PolkitTQt1::Identity::List &identities,
AsyncResult *result) = 0;
/**
diff --git a/agent/polkitqt1-agent-session.cpp b/agent/polkitqt1-agent-session.cpp
index 52ddacf5e..add3d95b1 100644
--- a/agent/polkitqt1-agent-session.cpp
+++ b/agent/polkitqt1-agent-session.cpp
@@ -20,14 +20,14 @@
#include "polkitqt1-agent-session.h"
-#include <QtCore/QDebug>
+#include <TQtCore/TQDebug>
#include "polkitqt1-identity.h"
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
#include <polkitagent/polkitagent.h>
-using namespace PolkitQt1::Agent;
+using namespace PolkitTQt1::Agent;
class Session::Private
{
@@ -49,8 +49,8 @@ Session::Private::~Private()
// polkitAgentSession is freed in Session d'tor
}
-Session::Session(const PolkitQt1::Identity &identity, const QString &cookie, AsyncResult *result, QObject *parent)
- : QObject(parent)
+Session::Session(const PolkitTQt1::Identity &identity, const TQString &cookie, AsyncResult *result, TQObject *parent)
+ : TQObject(parent)
, d(new Private)
{
d->result = result;
@@ -61,8 +61,8 @@ Session::Session(const PolkitQt1::Identity &identity, const QString &cookie, Asy
g_signal_connect(G_OBJECT(d->polkitAgentSession), "show-info", G_CALLBACK(Private::showInfo), this);
}
-Session::Session(PolkitAgentSession *pkAgentSession, QObject *parent)
- : QObject(parent)
+Session::Session(PolkitAgentSession *pkAgentSession, TQObject *parent)
+ : TQObject(parent)
, d(new Private)
{
d->polkitAgentSession = pkAgentSession;
@@ -85,7 +85,7 @@ void Session::initiate()
polkit_agent_session_initiate(d->polkitAgentSession);
}
-void Session::setResponse(const QString &response)
+void Session::setResponse(const TQString &response)
{
polkit_agent_session_response(d->polkitAgentSession, response.toUtf8().data());
}
@@ -102,7 +102,7 @@ AsyncResult *Session::result()
void Session::Private::completed(PolkitAgentSession *s, gboolean gained_authorization, gpointer user_data)
{
- qDebug() << "COMPLETED";
+ tqDebug() << "COMPLETED";
Session *session = (Session *)user_data;
Q_EMIT(session)->completed(gained_authorization);
@@ -113,20 +113,20 @@ void Session::Private::completed(PolkitAgentSession *s, gboolean gained_authoriz
void Session::Private::request(PolkitAgentSession *s, gchar *request, gboolean echo_on, gpointer user_data)
{
- qDebug() << "REQUEST";
- Q_EMIT((Session *)user_data)->request(QString::fromUtf8(request), echo_on);
+ tqDebug() << "REQUEST";
+ Q_EMIT((Session *)user_data)->request(TQString::fromUtf8(request), echo_on);
}
void Session::Private::showError(PolkitAgentSession *s, gchar *text, gpointer user_data)
{
- qDebug() << "showError";
- Q_EMIT((Session *)user_data)->showError(QString::fromUtf8(text));
+ tqDebug() << "showError";
+ Q_EMIT((Session *)user_data)->showError(TQString::fromUtf8(text));
}
void Session::Private::showInfo(PolkitAgentSession *s, gchar *text, gpointer user_data)
{
- qDebug() << "showInfo";
- Q_EMIT((Session *)user_data)->showInfo(QString::fromUtf8(text));
+ tqDebug() << "showInfo";
+ Q_EMIT((Session *)user_data)->showInfo(TQString::fromUtf8(text));
}
//
@@ -160,7 +160,7 @@ void AsyncResult::setCompleted()
d->result = NULL;
}
-void AsyncResult::setError(const QString &text)
+void AsyncResult::setError(const TQString &text)
{
Q_ASSERT(d->result);
g_simple_async_result_set_error(d->result, POLKIT_ERROR, POLKIT_ERROR_FAILED, "%s", text.toUtf8().data());
diff --git a/agent/polkitqt1-agent-session.h b/agent/polkitqt1-agent-session.h
index 0f763e83d..f4f4ff49c 100644
--- a/agent/polkitqt1-agent-session.h
+++ b/agent/polkitqt1-agent-session.h
@@ -21,21 +21,21 @@
#ifndef POLKITQT1_AGENT_SESSION_H
#define POLKITQT1_AGENT_SESSION_H
-#include <QtCore/QObject>
+#include <TQtCore/TQObject>
#include "polkitqt1-identity.h"
typedef struct _GSimpleAsyncResult GSimpleAsyncResult;
typedef struct _PolkitAgentSession PolkitAgentSession;
-namespace PolkitQt1
+namespace PolkitTQt1
{
/**
* \namespace Agent Agent
*
- * \brief Namespace wrapping Polkit-Qt Agent classes
+ * \brief Namespace wrapping Polkit-TQt Agent classes
*
- * This namespace wraps all Polkit-Qt Agent classes.
+ * This namespace wraps all Polkit-TQt Agent classes.
*/
namespace Agent
@@ -43,7 +43,7 @@ namespace Agent
/**
* \internal
- * \brief Encapsulation of GSimpleAsyncResult to QObject class
+ * \brief Encapsulation of GSimpleAsyncResult to TQObject class
*/
class POLKITQT1_EXPORT AsyncResult
{
@@ -62,7 +62,7 @@ public:
*
* \param text text of the error message
*/
- void setError(const QString &text);
+ void setError(const TQString &text);
private:
class Private;
@@ -77,10 +77,10 @@ private:
* authentication system for obtaining authorizations.
*
*/
-class POLKITQT1_EXPORT Session : public QObject
+class POLKITQT1_EXPORT Session : public TQObject
{
Q_OBJECT
- Q_DISABLE_COPY(Session)
+ TQ_DISABLE_COPY(Session)
public:
/**
* Create a new authentication session.
@@ -90,7 +90,7 @@ public:
* \param result Result of the authentication action. Must be finished using complete() method.
* \param parent
*/
- Session(const PolkitQt1::Identity& identity, const QString &cookie, AsyncResult *result = 0, QObject *parent = 0);
+ Session(const PolkitTQt1::Identity& identity, const TQString &cookie, AsyncResult *result = 0, TQObject *parent = 0);
/**
* Create a new authentication session from PolkitAgentSession object
@@ -100,7 +100,7 @@ public:
* \param pkAgentSession PolkitAgentSession object
* \param parent
*/
- explicit Session(PolkitAgentSession *pkAgentSession, QObject *parent = 0);
+ explicit Session(PolkitAgentSession *pkAgentSession, TQObject *parent = 0);
/**
* Destroy authentication session.
@@ -119,7 +119,7 @@ public:
*
* \param response Response from the user, typically a password
*/
- void setResponse(const QString &response);
+ void setResponse(const TQString &response);
/**
* Cancel the authentication session.
@@ -150,7 +150,7 @@ Q_SIGNALS:
* \param echo \c True if the response to the request SHOULD be echoed on the screen,
* \c False if the response MUST NOT be echoed to the screen.
*/
- void request(const QString &request, bool echo);
+ void request(const TQString &request, bool echo);
/**
* This signal will be emitted when there is information
@@ -158,7 +158,7 @@ Q_SIGNALS:
*
* \param text An error string to display to the user.
*/
- void showError(const QString &text);
+ void showError(const TQString &text);
/**
* This signal will be emitted when there is information
@@ -166,7 +166,7 @@ Q_SIGNALS:
*
* \param text A string to be displayed to the user.
*/
- void showInfo(const QString &text);
+ void showInfo(const TQString &text);
private:
class Private;
diff --git a/agent/polkitqtlistener.cpp b/agent/polkitqtlistener.cpp
index a9a93aad1..ea0ad2dbf 100644
--- a/agent/polkitqtlistener.cpp
+++ b/agent/polkitqtlistener.cpp
@@ -24,23 +24,23 @@
#include "polkitqtlistener_p.h"
#include <stdio.h>
-#include <QtCore/QDebug>
+#include <TQtCore/TQDebug>
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
-using namespace PolkitQt1::Agent;
+using namespace PolkitTQt1::Agent;
/**
* \internal
*/
-struct _PolkitQtListener {
+struct _PolkitTQtListener {
PolkitAgentListener parent_instance;
};
/**
* \internal
*/
-struct _PolkitQtListenerClass {
+struct _PolkitTQtListenerClass {
PolkitAgentListenerClass parent_class;
};
@@ -59,16 +59,16 @@ static gboolean polkit_qt_listener_initiate_authentication_finish(PolkitAgentLis
GAsyncResult *res,
GError **error);
-G_DEFINE_TYPE(PolkitQtListener, polkit_qt_listener, POLKIT_AGENT_TYPE_LISTENER);
+G_DEFINE_TYPE(PolkitTQtListener, polkit_qt_listener, POLKIT_AGENT_TYPE_LISTENER);
-static void polkit_qt_listener_init(PolkitQtListener *listener)
+static void polkit_qt_listener_init(PolkitTQtListener *listener)
{
g_type_init();
}
static void polkit_qt_listener_finalize(GObject *object)
{
- PolkitQtListener *listener;
+ PolkitTQtListener *listener;
listener = POLKIT_QT_LISTENER(object);
@@ -77,7 +77,7 @@ static void polkit_qt_listener_finalize(GObject *object)
}
}
-static void polkit_qt_listener_class_init(PolkitQtListenerClass *klass)
+static void polkit_qt_listener_class_init(PolkitTQtListenerClass *klass)
{
GObjectClass *gobject_class;
PolkitAgentListenerClass *listener_class;
@@ -112,12 +112,12 @@ static void polkit_qt_listener_initiate_authentication(PolkitAgentListener *age
GAsyncReadyCallback callback,
gpointer user_data)
{
- qDebug() << "Listener adapter polkit_qt_listener_initiate_authentication";
- PolkitQtListener *listener = POLKIT_QT_LISTENER(agent_listener);
+ tqDebug() << "Listener adapter polkit_qt_listener_initiate_authentication";
+ PolkitTQtListener *listener = POLKIT_QT_LISTENER(agent_listener);
// The result of asynchronous method will be created here and it will be pushed to the listener.
GSimpleAsyncResult *result = g_simple_async_result_new((GObject *) listener, callback, user_data, agent_listener);
- qDebug() << "GSimpleAsyncResult:" << result;
+ tqDebug() << "GSimpleAsyncResult:" << result;
ListenerAdapter::instance()->polkit_qt_listener_initiate_authentication(agent_listener,
action_id,
@@ -142,7 +142,7 @@ static gboolean polkit_qt_listener_initiate_authentication_finish(PolkitAgentLis
GAsyncResult *res,
GError **error)
{
- qDebug() << "Listener adapter polkit_qt_listener_initiate_authentication_finish";
+ tqDebug() << "Listener adapter polkit_qt_listener_initiate_authentication_finish";
return ListenerAdapter::instance()->polkit_qt_listener_initiate_authentication_finish(listener,
res,
error);
diff --git a/agent/polkitqtlistener_p.h b/agent/polkitqtlistener_p.h
index 1447691d2..c289b3973 100644
--- a/agent/polkitqtlistener_p.h
+++ b/agent/polkitqtlistener_p.h
@@ -20,8 +20,8 @@
* polkit-qt-listener based on code by David Zeuthen <davidz@redhat.com>
*/
-#ifndef POLKITQT_LISTENER_P_H
-#define POLKITQT_LISTENER_P_H
+#ifndef POLKIQT_LISTENER_P_H
+#define POLKIQT_LISTENER_P_H
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
@@ -32,14 +32,14 @@
G_BEGIN_DECLS
#define POLKIT_QT_TYPE_LISTENER (polkit_qt_listener_get_type())
-#define POLKIT_QT_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), POLKIT_QT_TYPE_LISTENER, PolkitQtListener))
-#define POLKIT_QT_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), POLKIT_QT_TYPE_LISTENER, PolkitQtListenerClass))
-#define POLKIT_QT_LISTENER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), POLKIT_QT_TYPE_LISTENER, PolkitQtListenerClass))
+#define POLKIT_QT_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), POLKIT_QT_TYPE_LISTENER, PolkitTQtListener))
+#define POLKIT_QT_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), POLKIT_QT_TYPE_LISTENER, PolkitTQtListenerClass))
+#define POLKIT_QT_LISTENER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), POLKIT_QT_TYPE_LISTENER, PolkitTQtListenerClass))
#define POLKIT_QT_IS_LISTENER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), POLKIT_QT_TYPE_LISTENER))
#define POLKIT_QT_IS_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), POLKIT_QT_TYPE_LISTENER))
-typedef struct _PolkitQtListener PolkitQtListener;
-typedef struct _PolkitQtListenerClass PolkitQtListenerClass;
+typedef struct _PolkitTQtListener PolkitTQtListener;
+typedef struct _PolkitTQtListenerClass PolkitTQtListenerClass;
GType polkit_qt_listener_get_type(void) G_GNUC_CONST;
PolkitAgentListener *polkit_qt_listener_new(void);
diff --git a/cmake/modules/FindPolkit.cmake b/cmake/modules/FindPolkit.cmake
index 35fc86e15..083829364 100644
--- a/cmake/modules/FindPolkit.cmake
+++ b/cmake/modules/FindPolkit.cmake
@@ -65,7 +65,7 @@ find_library( POLKIT_AGENT_LIBRARY
include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set POLKIT_FOUND to TRUE if
+# handle the TQUIETLY and REQUIRED arguments and set POLKIT_FOUND to TRUE if
# all listed variables are TRUE
find_package_handle_standard_args(Polkit DEFAULT_MSG POLKIT_LIBRARIES POLKIT_AGENT_LIBRARY
POLKIT_INCLUDE_DIR POLKIT_AGENT_INCLUDE_DIR GLIB2_FOUND)
diff --git a/cmake/modules/FindPolkitQt-1.cmake b/cmake/modules/FindPolkitQt-1.cmake
index 30d27de15..f28c494e4 100644
--- a/cmake/modules/FindPolkitQt-1.cmake
+++ b/cmake/modules/FindPolkitQt-1.cmake
@@ -1,4 +1,4 @@
-# - Try to find PolkitQt-1
+# - Try to find PolkitTQt-1
# Once done this will define
#
# POLKITQT-1_FOUND - system has Polkit-qt
@@ -9,8 +9,8 @@
# POLKITQT-1_AGENT_LIBRARY - Link this to use the agent wrapper in polkit-qt
# POLKITQT-1_DEFINITIONS - Compiler switches required for using Polkit-qt
#
-# The minimum required version of PolkitQt-1 can be specified using the
-# standard syntax, e.g. find_package(PolkitQt-1 1.0)
+# The minimum required version of PolkitTQt-1 can be specified using the
+# standard syntax, e.g. find_package(PolkitTQt-1 1.0)
# Copyright (c) 2010, Dario Freddi, <drf@kde.org>
#
@@ -18,16 +18,16 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Support POLKITQT-1_MIN_VERSION for compatibility:
-if ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION )
- set ( PolkitQt-1_FIND_VERSION ${POLKITQT-1_MIN_VERSION} )
-endif ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION )
+if ( NOT PolkitTQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION )
+ set ( PolkitTQt-1_FIND_VERSION ${POLKITQT-1_MIN_VERSION} )
+endif ( NOT PolkitTQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION )
-set( _PolkitQt-1_FIND_QUIETLY ${PolkitQt-1_FIND_QUIETLY} )
-find_package( PolkitQt-1 ${PolkitQt-1_FIND_VERSION} QUIET NO_MODULE PATHS ${LIB_INSTALL_DIR}/PolkitQt-1/cmake )
-set( PolkitQt-1_FIND_QUIETLY ${_PolkitQt-1_FIND_QUIETLY} )
+set( _PolkitTQt-1_FIND_QUIETLY ${PolkitTQt-1_FIND_QUIETLY} )
+find_package( PolkitTQt-1 ${PolkitTQt-1_FIND_VERSION} TQUIET NO_MODULE PATHS ${LIB_INSTALL_DIR}/PolkitTQt-1/cmake )
+set( PolkitTQt-1_FIND_QUIETLY ${_PolkitTQt-1_FIND_QUIETLY} )
include( FindPackageHandleStandardArgs )
-find_package_handle_standard_args( PolkitQt-1 DEFAULT_MSG PolkitQt-1_CONFIG )
+find_package_handle_standard_args( PolkitTQt-1 DEFAULT_MSG PolkitTQt-1_CONFIG )
if (POLKITQT-1_FOUND)
if (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX)
diff --git a/core/polkitqt1-actiondescription.cpp b/core/polkitqt1-actiondescription.cpp
index dbe1aa894..764510668 100644
--- a/core/polkitqt1-actiondescription.cpp
+++ b/core/polkitqt1-actiondescription.cpp
@@ -21,19 +21,19 @@
#include "polkitqt1-actiondescription.h"
-#include <QtCore/QString>
+#include <TQtCore/TQString>
#include <polkit/polkit.h>
-namespace PolkitQt1
+namespace PolkitTQt1
{
-class ActionDescription::Data : public QSharedData
+class ActionDescription::Data : public TQSharedData
{
public:
Data() {}
Data(const Data& other)
- : QSharedData(other)
+ : TQSharedData(other)
, actionId(other.actionId)
, description(other.description)
, message(other.message)
@@ -47,12 +47,12 @@ public:
}
virtual ~Data() {}
- QString actionId;
- QString description;
- QString message;
- QString vendorName;
- QString vendorUrl;
- QString iconName;
+ TQString actionId;
+ TQString description;
+ TQString message;
+ TQString vendorName;
+ TQString vendorUrl;
+ TQString iconName;
ActionDescription::ImplicitAuthorization implicitAny;
ActionDescription::ImplicitAuthorization implicitInactive;
@@ -70,12 +70,12 @@ ActionDescription::ActionDescription(PolkitActionDescription *polkitActionDescri
{
g_type_init();
- d->actionId = QString::fromUtf8(polkit_action_description_get_action_id(polkitActionDescription));
- d->description = QString::fromUtf8(polkit_action_description_get_description(polkitActionDescription));
- d->message = QString::fromUtf8(polkit_action_description_get_message(polkitActionDescription));
- d->vendorName = QString::fromUtf8(polkit_action_description_get_vendor_name(polkitActionDescription));
- d->vendorUrl = QString::fromUtf8(polkit_action_description_get_vendor_url(polkitActionDescription));
- d->iconName = QString::fromUtf8(polkit_action_description_get_icon_name(polkitActionDescription));
+ d->actionId = TQString::fromUtf8(polkit_action_description_get_action_id(polkitActionDescription));
+ d->description = TQString::fromUtf8(polkit_action_description_get_description(polkitActionDescription));
+ d->message = TQString::fromUtf8(polkit_action_description_get_message(polkitActionDescription));
+ d->vendorName = TQString::fromUtf8(polkit_action_description_get_vendor_name(polkitActionDescription));
+ d->vendorUrl = TQString::fromUtf8(polkit_action_description_get_vendor_url(polkitActionDescription));
+ d->iconName = TQString::fromUtf8(polkit_action_description_get_icon_name(polkitActionDescription));
d->implicitAny = static_cast<ActionDescription::ImplicitAuthorization>(polkit_action_description_get_implicit_any(
polkitActionDescription));
@@ -85,12 +85,12 @@ ActionDescription::ActionDescription(PolkitActionDescription *polkitActionDescri
polkitActionDescription));
}
-ActionDescription::ActionDescription(const PolkitQt1::ActionDescription& other)
+ActionDescription::ActionDescription(const PolkitTQt1::ActionDescription& other)
: d(other.d)
{
}
-ActionDescription& ActionDescription::operator=(const PolkitQt1::ActionDescription& other)
+ActionDescription& ActionDescription::operator=(const PolkitTQt1::ActionDescription& other)
{
d = other.d;
return *this;
@@ -100,32 +100,32 @@ ActionDescription::~ActionDescription()
{
}
-QString ActionDescription::actionId() const
+TQString ActionDescription::actionId() const
{
return d->actionId;
}
-QString ActionDescription::description() const
+TQString ActionDescription::description() const
{
return d->description;
}
-QString ActionDescription::message() const
+TQString ActionDescription::message() const
{
return d->message;
}
-QString ActionDescription::vendorName() const
+TQString ActionDescription::vendorName() const
{
return d->vendorName;
}
-QString ActionDescription::vendorUrl() const
+TQString ActionDescription::vendorUrl() const
{
return d->vendorUrl;
}
-QString ActionDescription::iconName() const
+TQString ActionDescription::iconName() const
{
return d->iconName;
}
diff --git a/core/polkitqt1-actiondescription.h b/core/polkitqt1-actiondescription.h
index deed65d6e..fac4812fb 100644
--- a/core/polkitqt1-actiondescription.h
+++ b/core/polkitqt1-actiondescription.h
@@ -24,13 +24,13 @@
#include "polkitqt1-export.h"
-#include <QtCore/QList>
-#include <QtCore/QMetaType>
-#include <QtCore/QSharedData>
+#include <TQtCore/TQList>
+#include <TQtCore/TQMetaType>
+#include <TQtCore/TQSharedData>
typedef struct _PolkitActionDescription PolkitActionDescription;
-namespace PolkitQt1
+namespace PolkitTQt1
{
/**
* \class ActionDescription polkitqt1-actiondescription.h ActionDescription
@@ -59,7 +59,7 @@ public:
Authorized = 5
};
- typedef QList< ActionDescription > List;
+ typedef TQList< ActionDescription > List;
ActionDescription();
/**
@@ -80,42 +80,42 @@ public:
*
* \return id of the action
*/
- QString actionId() const;
+ TQString actionId() const;
/**
* \brief Gets the description used of ActionDescription
*
* \return description of the action
*/
- QString description() const;
+ TQString description() const;
/**
* \brief Gets the message user for ActionDescription
*
* \return action message
*/
- QString message() const;
+ TQString message() const;
/**
* \brief Gets the vendor name for ActionDescription, if any
*
* \return vendor name
*/
- QString vendorName() const;
+ TQString vendorName() const;
/**
* \brief Gets the vendor URL for ActionDescription, if any
*
- * \return vendor URL or empty QString if there is no vendor URL
+ * \return vendor URL or empty TQString if there is no vendor URL
*/
- QString vendorUrl() const;
+ TQString vendorUrl() const;
/**
* \brief Gets the icon name for ActionDescription, if any
*
- * \return icon name or empty QString if there is no icon
+ * \return icon name or empty TQString if there is no icon
*/
- QString iconName() const;
+ TQString iconName() const;
/**
* \brief Gets the implicit authorization for ActionDescription used for any subject
@@ -140,10 +140,10 @@ public:
private:
class Data;
- QSharedDataPointer< Data > d;
+ TQSharedDataPointer< Data > d;
};
}
-Q_DECLARE_METATYPE(PolkitQt1::ActionDescription::List)
+Q_DECLARE_METATYPE(PolkitTQt1::ActionDescription::List)
#endif //POLKIT_QT_ACTION_DESCRIPTION_H
diff --git a/core/polkitqt1-authority.cpp b/core/polkitqt1-authority.cpp
index 0951d97b5..d7cf300b8 100644
--- a/core/polkitqt1-authority.cpp
+++ b/core/polkitqt1-authority.cpp
@@ -23,12 +23,12 @@
#include "polkitqt1-authority.h"
-#include <QtDBus/QDBusInterface>
-#include <QtDBus/QDBusReply>
+#include <TQtDBus/TQDBusInterface>
+#include <TQtDBus/TQDBusReply>
#include <polkit/polkit.h>
-namespace PolkitQt1
+namespace PolkitTQt1
{
class AuthorityHelper
@@ -91,18 +91,18 @@ public:
/** Use this method to set the error message to \p message. Set recover to \c true
* to try to reinitialize this object with init() method
*/
- void setError(Authority::ErrorCode code, const QString &details = QString(), bool recover = false);
+ void setError(Authority::ErrorCode code, const TQString &details = TQString(), bool recover = false);
- void dbusFilter(const QDBusMessage &message);
- void dbusSignalAdd(const QString &service, const QString &path, const QString &interface, const QString &name);
- void seatSignalsConnect(const QString &seat);
+ void dbusFilter(const TQDBusMessage &message);
+ void dbusSignalAdd(const TQString &service, const TQString &path, const TQString &interface, const TQString &name);
+ void seatSignalsConnect(const TQString &seat);
Authority *q;
PolkitAuthority *pkAuthority;
bool m_hasError;
Authority::ErrorCode m_lastError;
- QString m_errorDetails;
- QDBusConnection *m_systemBus;
+ TQString m_errorDetails;
+ TQDBusConnection *m_systemBus;
GCancellable *m_checkAuthorizationCancellable,
*m_enumerateActionsCancellable,
*m_registerAuthenticationAgentCancellable,
@@ -136,12 +136,12 @@ Authority::Private::~Private()
g_object_unref(m_revokeTemporaryAuthorizationCancellable);
}
-Authority::Authority(PolkitAuthority *authority, QObject *parent)
- : QObject(parent)
+Authority::Authority(PolkitAuthority *authority, TQObject *parent)
+ : TQObject(parent)
, d(new Private(this))
{
- qRegisterMetaType<PolkitQt1::Authority::Result> ();
- qRegisterMetaType<PolkitQt1::ActionDescription::List>();
+ qRegisterMetaType<PolkitTQt1::Authority::Result> ();
+ qRegisterMetaType<PolkitTQt1::ActionDescription::List>();
Q_ASSERT(!s_globalAuthority()->q);
s_globalAuthority()->q = this;
@@ -164,8 +164,8 @@ Authority::~Authority()
void Authority::Private::init()
{
- QDBusError error;
- QDBusError dbus_error;
+ TQDBusError error;
+ TQDBusError dbus_error;
g_type_init();
@@ -207,30 +207,30 @@ void Authority::Private::init()
// need to listen to NameOwnerChanged
dbusSignalAdd("org.freedesktop.DBus", "/", "org.freedesktop.DBus", "NameOwnerChanged");
- QString consoleKitService("org.freedesktop.ConsoleKit");
- QString consoleKitManagerPath("/org/freedesktop/ConsoleKit/Manager");
- QString consoleKitManagerInterface("org.freedesktop.ConsoleKit.Manager");
- QString consoleKitSeatInterface("org.freedesktop.ConsoleKit.Seat");
+ TQString consoleKitService("org.freedesktop.ConsoleKit");
+ TQString consoleKitManagerPath("/org/freedesktop/ConsoleKit/Manager");
+ TQString consoleKitManagerInterface("org.freedesktop.ConsoleKit.Manager");
+ TQString consoleKitSeatInterface("org.freedesktop.ConsoleKit.Seat");
// first, add signals SeadAdded and SeatRemoved from ConsoleKit Manager
dbusSignalAdd(consoleKitService, consoleKitManagerPath, consoleKitManagerInterface, "SeatAdded");
dbusSignalAdd(consoleKitService, consoleKitManagerPath, consoleKitManagerInterface, "SeatRemoved");
// then we need to extract all seats from ConsoleKit
- QDBusMessage msg = QDBusMessage::createMethodCall(consoleKitService, consoleKitManagerPath, consoleKitManagerInterface, "GetSeats");
- msg = QDBusConnection::systemBus().call(msg);
+ TQDBusMessage msg = TQDBusMessage::createMethodCall(consoleKitService, consoleKitManagerPath, consoleKitManagerInterface, "GetSeats");
+ msg = TQDBusConnection::systemBus().call(msg);
if (!msg.arguments().isEmpty()) {
// this method returns a list with present seats
- QList<QString> seats;
- qVariantValue<QDBusArgument> (msg.arguments()[0]) >> seats;
+ TQList<TQString> seats;
+ qVariantValue<TQDBusArgument> (msg.arguments()[0]) >> seats;
// it can be multiple seats present so connect all their signals
- Q_FOREACH(const QString &seat, seats) {
+ Q_FOREACH(const TQString &seat, seats) {
seatSignalsConnect(seat);
}
}
}
-void Authority::Private::setError(Authority::ErrorCode code, const QString &details, bool recover)
+void Authority::Private::setError(Authority::ErrorCode code, const TQString &details, bool recover)
{
if (recover) {
init();
@@ -240,10 +240,10 @@ void Authority::Private::setError(Authority::ErrorCode code, const QString &deta
m_hasError = true;
}
-void Authority::Private::seatSignalsConnect(const QString &seat)
+void Authority::Private::seatSignalsConnect(const TQString &seat)
{
- QString consoleKitService("org.freedesktop.ConsoleKit");
- QString consoleKitSeatInterface("org.freedesktop.ConsoleKit.Seat");
+ TQString consoleKitService("org.freedesktop.ConsoleKit");
+ TQString consoleKitSeatInterface("org.freedesktop.ConsoleKit.Seat");
// we want to connect to all slots of the seat
dbusSignalAdd(consoleKitService, seat, consoleKitSeatInterface, "DeviceAdded");
dbusSignalAdd(consoleKitService, seat, consoleKitSeatInterface, "DeviceRemoved");
@@ -252,21 +252,21 @@ void Authority::Private::seatSignalsConnect(const QString &seat)
dbusSignalAdd(consoleKitService, seat, consoleKitSeatInterface, "ActiveSessionChanged");
}
-void Authority::Private::dbusSignalAdd(const QString &service, const QString &path, const QString &interface, const QString &name)
+void Authority::Private::dbusSignalAdd(const TQString &service, const TQString &path, const TQString &interface, const TQString &name)
{
- // FIXME: This code seems to be nonfunctional - it needs to be fixed somewhere (is it Qt BUG?)
- QDBusConnection::systemBus().connect(service, path, interface, name,
- q, SLOT(dbusFilter(const QDBusMessage &)));
+ // FIXME: This code seems to be nonfunctional - it needs to be fixed somewhere (is it TQt BUG?)
+ TQDBusConnection::systemBus().connect(service, path, interface, name,
+ q, SLOT(dbusFilter(const TQDBusMessage &)));
}
-void Authority::Private::dbusFilter(const QDBusMessage &message)
+void Authority::Private::dbusFilter(const TQDBusMessage &message)
{
- if (message.type() == QDBusMessage::SignalMessage) {
+ if (message.type() == TQDBusMessage::SignalMessage) {
Q_EMIT q->consoleKitDBChanged();
// TODO: Test this with the multiseat support
if (message.member() == "SeatAdded") {
- seatSignalsConnect(qVariantValue<QDBusObjectPath> (message.arguments()[0]).path());
+ seatSignalsConnect(qVariantValue<TQDBusObjectPath> (message.arguments()[0]).path());
}
}
}
@@ -281,10 +281,10 @@ Authority::ErrorCode Authority::lastError() const
return d->m_lastError;
}
-const QString Authority::errorDetails() const
+const TQString Authority::errorDetails() const
{
if (d->m_lastError == E_None) {
- return QString();
+ return TQString();
} else {
return d->m_errorDetails;
}
@@ -306,7 +306,7 @@ PolkitAuthority *Authority::polkitAuthority() const
return d->pkAuthority;
}
-Authority::Result Authority::checkAuthorizationSync(const QString &actionId, const Subject &subject, AuthorizationFlags flags)
+Authority::Result Authority::checkAuthorizationSync(const TQString &actionId, const Subject &subject, AuthorizationFlags flags)
{
PolkitAuthorizationResult *pk_result;
GError *error = NULL;
@@ -344,7 +344,7 @@ Authority::Result Authority::checkAuthorizationSync(const QString &actionId, con
}
}
-void Authority::checkAuthorization(const QString &actionId, const Subject &subject, AuthorizationFlags flags)
+void Authority::checkAuthorization(const TQString &actionId, const Subject &subject, AuthorizationFlags flags)
{
if (Authority::instance()->hasError()) {
return;
@@ -454,7 +454,7 @@ void Authority::enumerateActionsCancel()
}
}
-bool Authority::registerAuthenticationAgentSync(const Subject &subject, const QString &locale, const QString &objectPath)
+bool Authority::registerAuthenticationAgentSync(const Subject &subject, const TQString &locale, const TQString &objectPath)
{
if (Authority::instance()->hasError()) {
return false;
@@ -481,7 +481,7 @@ bool Authority::registerAuthenticationAgentSync(const Subject &subject, const QS
return result;
}
-void Authority::registerAuthenticationAgent(const Subject &subject, const QString &locale, const QString &objectPath)
+void Authority::registerAuthenticationAgent(const Subject &subject, const TQString &locale, const TQString &objectPath)
{
if (Authority::instance()->hasError()) {
return;
@@ -526,7 +526,7 @@ void Authority::registerAuthenticationAgentCancel()
}
}
-bool Authority::unregisterAuthenticationAgentSync(const Subject &subject, const QString &objectPath)
+bool Authority::unregisterAuthenticationAgentSync(const Subject &subject, const TQString &objectPath)
{
if (d->pkAuthority) {
return false;
@@ -554,7 +554,7 @@ bool Authority::unregisterAuthenticationAgentSync(const Subject &subject, const
return result;
}
-void Authority::unregisterAuthenticationAgent(const Subject &subject, const QString &objectPath)
+void Authority::unregisterAuthenticationAgent(const Subject &subject, const TQString &objectPath)
{
if (Authority::instance()->hasError()) {
return;
@@ -598,7 +598,7 @@ void Authority::unregisterAuthenticationAgentCancel()
}
}
-bool Authority::authenticationAgentResponseSync(const QString &cookie, const Identity &identity)
+bool Authority::authenticationAgentResponseSync(const TQString &cookie, const Identity &identity)
{
if (Authority::instance()->hasError()) {
return false;
@@ -625,7 +625,7 @@ bool Authority::authenticationAgentResponseSync(const QString &cookie, const Ide
return result;
}
-void Authority::authenticationAgentResponse(const QString &cookie, const Identity &identity)
+void Authority::authenticationAgentResponse(const TQString &cookie, const Identity &identity)
{
if (Authority::instance()->hasError()) {
return;
@@ -790,7 +790,7 @@ void Authority::revokeTemporaryAuthorizationsCancel()
}
}
-bool Authority::revokeTemporaryAuthorizationSync(const QString &id)
+bool Authority::revokeTemporaryAuthorizationSync(const TQString &id)
{
bool result;
if (Authority::instance()->hasError()) {
@@ -810,7 +810,7 @@ bool Authority::revokeTemporaryAuthorizationSync(const QString &id)
return result;
}
-void Authority::revokeTemporaryAuthorization(const QString &id)
+void Authority::revokeTemporaryAuthorization(const TQString &id)
{
if (Authority::instance()->hasError()) {
return;
diff --git a/core/polkitqt1-authority.h b/core/polkitqt1-authority.h
index 64ebb8f13..6a0bb1f8e 100644
--- a/core/polkitqt1-authority.h
+++ b/core/polkitqt1-authority.h
@@ -30,20 +30,20 @@
#include "polkitqt1-temporaryauthorization.h"
#include "polkitqt1-actiondescription.h"
-#include <QtCore/QObject>
-#include <QtCore/QMetaType>
+#include <TQtCore/TQObject>
+#include <TQtCore/TQMetaType>
typedef struct _PolkitAuthority PolkitAuthority;
-class QStringList;
+class TQStringList;
/**
- * \namespace PolkitQt1 PolkitQt
+ * \namespace PolkitTQt1 PolkitTQt
*
- * \brief Namespace wrapping Polkit-Qt classes
+ * \brief Namespace wrapping Polkit-TQt classes
*
- * This namespace wraps all Polkit-Qt classes.
+ * This namespace wraps all Polkit-TQt classes.
*/
-namespace PolkitQt1
+namespace PolkitTQt1
{
/**
@@ -52,7 +52,7 @@ namespace PolkitQt1
* \author Dario Freddi <drf@kde.org>
* \author Jaroslav Reznik <jreznik@redhat.com>
*
- * \brief Convenience class for Qt/KDE applications
+ * \brief Convenience class for TQt/KDE applications
*
* This class is a singleton that provides makes easy the usage
* of PolKitAuthority. It emits configChanged()
@@ -63,12 +63,12 @@ namespace PolkitQt1
* Call Authority::instance() to get an instance of the Authority object.
* Do not delete Authority::instance(), cleanup will be done automatically.
*/
-class POLKITQT1_EXPORT Authority : public QObject
+class POLKITQT1_EXPORT Authority : public TQObject
{
Q_OBJECT
- Q_DISABLE_COPY(Authority)
- Q_ENUMS(Result)
- Q_ENUMS(ErrorCode)
+ TQ_DISABLE_COPY(Authority)
+ TQ_ENUMS(Result)
+ TQ_ENUMS(ErrorCode)
public:
enum Result {
/** Result unknown */
@@ -161,7 +161,7 @@ public:
*
* \return detail message
*/
- const QString errorDetails() const;
+ const TQString errorDetails() const;
/**
* Use this method to clear the error message.
@@ -207,7 +207,7 @@ public:
* or an error has occurred
*
*/
- void checkAuthorization(const QString &actionId, const Subject &subject,
+ void checkAuthorization(const TQString &actionId, const Subject &subject,
AuthorizationFlags flags);
/**
@@ -219,7 +219,7 @@ public:
*
* \see checkAuthorization Asynchronous version of this method.
*/
- Result checkAuthorizationSync(const QString &actionId, const Subject &subject,
+ Result checkAuthorizationSync(const TQString &actionId, const Subject &subject,
AuthorizationFlags flags);
/**
@@ -264,8 +264,8 @@ public:
* \param locale the locale of the authentication agent
* \param objectPath the object path for the authentication agent
*/
- void registerAuthenticationAgent(const Subject &subject, const QString &locale,
- const QString &objectPath);
+ void registerAuthenticationAgent(const Subject &subject, const TQString &locale,
+ const TQString &objectPath);
/**
* Registers an authentication agent.
@@ -279,8 +279,8 @@ public:
* \return \c true if the Authentication agent has been successfully registered
* \c false if the Authentication agent registration failed
*/
- bool registerAuthenticationAgentSync(const Subject &subject, const QString &locale,
- const QString &objectPath);
+ bool registerAuthenticationAgentSync(const Subject &subject, const TQString &locale,
+ const TQString &objectPath);
/**
* This method can be used to cancel the registration of the authentication agent.
@@ -300,7 +300,7 @@ public:
* \return \c true if the Authentication agent has been successfully unregistered
* \c false if the Authentication agent unregistration failed
*/
- void unregisterAuthenticationAgent(const Subject &subject, const QString &objectPath);
+ void unregisterAuthenticationAgent(const Subject &subject, const TQString &objectPath);
/**
* Unregisters an Authentication agent.
@@ -313,7 +313,7 @@ public:
* \return \c true if the Authentication agent has been successfully unregistered
* \c false if the Authentication agent unregistration failed
*/
- bool unregisterAuthenticationAgentSync(const Subject &subject, const QString &objectPath);
+ bool unregisterAuthenticationAgentSync(const Subject &subject, const TQString &objectPath);
/**
* This method can be used to cancel the unregistration of the authentication agent.
@@ -330,7 +330,7 @@ public:
* \param cookie The cookie passed to the authentication agent from the authority.
* \param identity The identity that was authenticated.
*/
- void authenticationAgentResponse(const QString &cookie, const Identity &identity);
+ void authenticationAgentResponse(const TQString &cookie, const Identity &identity);
/**
* Provide response that \p identity successfully authenticated for the authentication request identified by \p cookie.
@@ -343,7 +343,7 @@ public:
* \return \c true if authority acknowledged the call, \c false if error is set.
*
*/
- bool authenticationAgentResponseSync(const QString& cookie, const PolkitQt1::Identity& identity);
+ bool authenticationAgentResponseSync(const TQString& cookie, const PolkitTQt1::Identity& identity);
/**
* This method can be used to cancel the authenticationAgentResponseAsync method.
@@ -417,7 +417,7 @@ public:
*
* \param id the identifier of the temporary authorization
*/
- void revokeTemporaryAuthorization(const QString &id);
+ void revokeTemporaryAuthorization(const TQString &id);
/**
* Revokes temporary authorization by \p id
@@ -429,7 +429,7 @@ public:
* \return \c true if the temporary authorization was revoked
* \c false if the revoking failed
*/
- bool revokeTemporaryAuthorizationSync(const QString &id);
+ bool revokeTemporaryAuthorizationSync(const TQString &id);
/**
* This method can be used to cancel the method revokeTemporaryAuthorizationAsync.
@@ -465,14 +465,14 @@ Q_SIGNALS:
*
* The argument is the result of authorization.
*/
- void checkAuthorizationFinished(PolkitQt1::Authority::Result);
+ void checkAuthorizationFinished(PolkitTQt1::Authority::Result);
/**
* This signal is emitted when asynchronous method enumerateActions finishes.
*
* The argument is the list of all Action IDs.
*/
- void enumerateActionsFinished(PolkitQt1::ActionDescription::List);
+ void enumerateActionsFinished(PolkitTQt1::ActionDescription::List);
/**
* This signal is emitted when asynchronous method registerAuthenticationAgent finishes.
@@ -504,7 +504,7 @@ Q_SIGNALS:
*
* \note Free all TemporaryAuthorization objects using \p delete operator.
*/
- void enumerateTemporaryAuthorizationsFinished(PolkitQt1::TemporaryAuthorization::List);
+ void enumerateTemporaryAuthorizationsFinished(PolkitTQt1::TemporaryAuthorization::List);
/**
* This signal is emmited when asynchronous method revokeTemporaryAuthorizations finishes.
@@ -522,18 +522,18 @@ Q_SIGNALS:
void revokeTemporaryAuthorizationFinished(bool);
private:
- explicit Authority(PolkitAuthority *context, QObject *parent = 0);
+ explicit Authority(PolkitAuthority *context, TQObject *parent = 0);
class Private;
friend class Private;
Private * const d;
- Q_PRIVATE_SLOT(d, void dbusFilter(const QDBusMessage &message))
+ Q_PRIVATE_SLOT(d, void dbusFilter(const TQDBusMessage &message))
};
}
-Q_DECLARE_OPERATORS_FOR_FLAGS(PolkitQt1::Authority::AuthorizationFlags)
-Q_DECLARE_METATYPE(PolkitQt1::Authority::Result)
+Q_DECLARE_OPERATORS_FOR_FLAGS(PolkitTQt1::Authority::AuthorizationFlags)
+Q_DECLARE_METATYPE(PolkitTQt1::Authority::Result)
#endif
diff --git a/core/polkitqt1-details.cpp b/core/polkitqt1-details.cpp
index e1d0f315d..65d028b26 100644
--- a/core/polkitqt1-details.cpp
+++ b/core/polkitqt1-details.cpp
@@ -20,19 +20,19 @@
#include "polkitqt1-details.h"
-#include <QtCore/QStringList>
+#include <TQtCore/TQStringList>
#include <polkit/polkit.h>
-namespace PolkitQt1
+namespace PolkitTQt1
{
-class Details::Data : public QSharedData
+class Details::Data : public TQSharedData
{
public:
Data() {}
Data(const Data &other)
- : QSharedData(other)
+ : TQSharedData(other)
, polkitDetails(other.polkitDetails)
{
g_object_ref(polkitDetails);
@@ -63,34 +63,34 @@ Details::~Details()
{
}
-Details& Details::operator=(const PolkitQt1::Details& other)
+Details& Details::operator=(const PolkitTQt1::Details& other)
{
d = other.d;
return *this;
}
-QString Details::lookup(const QString &key) const
+TQString Details::lookup(const TQString &key) const
{
const gchar *result = polkit_details_lookup(d->polkitDetails, key.toUtf8().data());
if (result != NULL) {
- return QString::fromUtf8(result);
+ return TQString::fromUtf8(result);
} else {
- return QString();
+ return TQString();
}
}
-void Details::insert(const QString &key, const QString &value)
+void Details::insert(const TQString &key, const TQString &value)
{
polkit_details_insert(d->polkitDetails, key.toUtf8().data(), value.toUtf8().data());
}
-QStringList Details::keys() const
+TQStringList Details::keys() const
{
gchar **result = polkit_details_get_keys(d->polkitDetails);
- QStringList list;
+ TQStringList list;
int len = g_strv_length(result);
for (int i = 0; i < len; i++) {
- list.append(QString::fromUtf8(result[i]));
+ list.append(TQString::fromUtf8(result[i]));
}
g_strfreev(result);
return list;
diff --git a/core/polkitqt1-details.h b/core/polkitqt1-details.h
index dc55f854c..2cb18163c 100644
--- a/core/polkitqt1-details.h
+++ b/core/polkitqt1-details.h
@@ -23,19 +23,19 @@
#include "polkitqt1-export.h"
-#include <QtCore/QObject>
-#include <QtCore/QSharedData>
+#include <TQtCore/TQObject>
+#include <TQtCore/TQSharedData>
typedef struct _PolkitDetails PolkitDetails;
/**
- * \namespace PolkitQt1 PolkitQt
+ * \namespace PolkitTQt1 PolkitTQt
*
- * \brief Namespace wrapping Polkit-Qt classes
+ * \brief Namespace wrapping Polkit-TQt classes
*
- * This namespace wraps all Polkit-Qt classes.
+ * This namespace wraps all Polkit-TQt classes.
*/
-namespace PolkitQt1
+namespace PolkitTQt1
{
/**
@@ -69,9 +69,9 @@ public:
* Get the value for \p key
*
* \param key A key
- * \return Value of the key \p key, otherwise empty QString.
+ * \return Value of the key \p key, otherwise empty TQString.
*/
- QString lookup(const QString &key) const;
+ TQString lookup(const TQString &key) const;
/**
* Inserts key \p key with value \p value.
@@ -79,17 +79,17 @@ public:
* \param key A key.
* \param value A value.
*/
- void insert(const QString &key, const QString &value);
+ void insert(const TQString &key, const TQString &value);
/**
* Gets a list of all keys.
*
* \return List of all keys.
*/
- QStringList keys() const;
+ TQStringList keys() const;
private:
class Data;
- QExplicitlySharedDataPointer< Data > d;
+ TQExplicitlySharedDataPointer< Data > d;
};
}
diff --git a/core/polkitqt1-identity.cpp b/core/polkitqt1-identity.cpp
index 354107213..1e03dda9a 100644
--- a/core/polkitqt1-identity.cpp
+++ b/core/polkitqt1-identity.cpp
@@ -22,17 +22,17 @@
#include <polkit/polkit.h>
-#include <QtCore/QDebug>
+#include <TQtCore/TQDebug>
-namespace PolkitQt1
+namespace PolkitTQt1
{
-class Identity::Data : public QSharedData
+class Identity::Data : public TQSharedData
{
public:
Data() : identity(0) {}
Data(const Data& other)
- : QSharedData(other)
+ : TQSharedData(other)
, identity(other.identity)
{
if (identity) {
@@ -66,7 +66,7 @@ Identity::Identity(PolkitIdentity *polkitIdentity)
}
}
-Identity::Identity(const PolkitQt1::Identity& other)
+Identity::Identity(const PolkitTQt1::Identity& other)
: d(other.d)
{
@@ -76,7 +76,7 @@ Identity::~Identity()
{
}
-Identity& Identity::operator=(const PolkitQt1::Identity& other)
+Identity& Identity::operator=(const PolkitTQt1::Identity& other)
{
d = other.d;
return *this;
@@ -109,18 +109,18 @@ void Identity::setIdentity(PolkitIdentity *identity)
}
}
-QString Identity::toString() const
+TQString Identity::toString() const
{
Q_ASSERT(d->identity);
- return QString::fromUtf8(polkit_identity_to_string(d->identity));
+ return TQString::fromUtf8(polkit_identity_to_string(d->identity));
}
-Identity Identity::fromString(const QString &string)
+Identity Identity::fromString(const TQString &string)
{
GError *error = NULL;
PolkitIdentity *pkIdentity = polkit_identity_from_string(string.toUtf8().data(), &error);
if (error != NULL) {
- qWarning() << QString("Cannot create Identity from string: %1").arg(error->message);
+ tqWarning() << TQString("Cannot create Identity from string: %1").arg(error->message);
return Identity();
}
return Identity(pkIdentity);
@@ -146,13 +146,13 @@ UnixUserIdentity Identity::toUnixUserIdentity()
return *uuid;
}
-UnixUserIdentity::UnixUserIdentity(const QString &name)
+UnixUserIdentity::UnixUserIdentity(const TQString &name)
: Identity()
{
GError *error = NULL;
setIdentity(polkit_unix_user_new_for_name(name.toUtf8().data(), &error));
if (error != NULL) {
- qWarning() << QString("Cannot create UnixUserIdentity: %1").arg(error->message);
+ tqWarning() << TQString("Cannot create UnixUserIdentity: %1").arg(error->message);
setIdentity(NULL);
}
}
@@ -185,13 +185,13 @@ void UnixUserIdentity::setUid(uid_t uid)
polkit_unix_user_set_uid((PolkitUnixUser *) identity(), uid);
}
-UnixGroupIdentity::UnixGroupIdentity(const QString &name)
+UnixGroupIdentity::UnixGroupIdentity(const TQString &name)
: Identity()
{
GError *error = NULL;
setIdentity(polkit_unix_group_new_for_name(name.toUtf8().data(), &error));
if (error != NULL) {
- qWarning() << QString("Cannot create UnixGroupIdentity: %1").arg(error->message);
+ tqWarning() << TQString("Cannot create UnixGroupIdentity: %1").arg(error->message);
setIdentity(NULL);
}
}
diff --git a/core/polkitqt1-identity.h b/core/polkitqt1-identity.h
index faed3a332..e1f4dde90 100644
--- a/core/polkitqt1-identity.h
+++ b/core/polkitqt1-identity.h
@@ -25,21 +25,21 @@
#include <unistd.h>
-#include <QtCore/QObject>
-#include <QtCore/QSharedData>
+#include <TQtCore/TQObject>
+#include <TQtCore/TQSharedData>
typedef struct _PolkitIdentity PolkitIdentity;
typedef struct _PolkitUnixUser PolkitUnixUser;
typedef struct _PolkitUnixGroup PolkitUnixGroup;
/**
- * \namespace PolkitQt1 PolkitQt
+ * \namespace PolkitTQt1 PolkitTQt
*
- * \brief Namespace wrapping Polkit-Qt classes
+ * \brief Namespace wrapping Polkit-TQt classes
*
- * This namespace wraps all Polkit-Qt classes.
+ * This namespace wraps all Polkit-TQt classes.
*/
-namespace PolkitQt1
+namespace PolkitTQt1
{
class UnixUserIdentity;
@@ -59,7 +59,7 @@ class UnixGroupIdentity;
class POLKITQT1_EXPORT Identity
{
public:
- typedef QList< Identity > List;
+ typedef TQList< Identity > List;
Identity();
explicit Identity(PolkitIdentity *polkitIdentity);
@@ -76,7 +76,7 @@ public:
*
* \return Serialized Identity object
*/
- QString toString() const;
+ TQString toString() const;
/**
* Creates the Identity object from string representation
@@ -85,7 +85,7 @@ public:
*
* \return Pointer to new Identity instance
*/
- static Identity fromString(const QString &string);
+ static Identity fromString(const TQString &string);
UnixUserIdentity toUnixUserIdentity();
UnixGroupIdentity toUnixGroupIdentity();
@@ -103,7 +103,7 @@ protected:
private:
class Data;
- QExplicitlySharedDataPointer< Data > d;
+ TQExplicitlySharedDataPointer< Data > d;
};
/**
@@ -130,7 +130,7 @@ public:
*
* \param name Unix name
*/
- explicit UnixUserIdentity(const QString &name);
+ explicit UnixUserIdentity(const TQString &name);
/**
* Creates UnixUser object from PolkitUnixUser object
@@ -180,7 +180,7 @@ public:
*
* \param name group name
*/
- explicit UnixGroupIdentity(const QString &name);
+ explicit UnixGroupIdentity(const TQString &name);
/**
* Creates UnixGroup object from PolkitUnixGroup object
diff --git a/core/polkitqt1-subject.cpp b/core/polkitqt1-subject.cpp
index dfc969711..dea13d9f2 100644
--- a/core/polkitqt1-subject.cpp
+++ b/core/polkitqt1-subject.cpp
@@ -20,21 +20,21 @@
#include "polkitqt1-subject.h"
-#include <QtCore/QDebug>
+#include <TQtCore/TQDebug>
#include <polkit/polkit.h>
-namespace PolkitQt1
+namespace PolkitTQt1
{
-class Subject::Data : public QSharedData
+class Subject::Data : public TQSharedData
{
public:
Data()
- : QSharedData()
+ : TQSharedData()
, subject(0)
{}
Data(const Data& other)
- : QSharedData(other)
+ : TQSharedData(other)
, subject(other.subject)
{
g_object_ref(subject);
@@ -60,13 +60,13 @@ Subject::Subject(PolkitSubject *subject)
d->subject = subject;
}
-Subject::Subject(const PolkitQt1::Subject& other)
+Subject::Subject(const PolkitTQt1::Subject& other)
: d(other.d)
{
}
-Subject& Subject::operator=(const PolkitQt1::Subject& other)
+Subject& Subject::operator=(const PolkitTQt1::Subject& other)
{
d = other.d;
return *this;
@@ -91,13 +91,13 @@ void Subject::setSubject(PolkitSubject *subject)
d->subject = subject;
}
-QString Subject::toString() const
+TQString Subject::toString() const
{
Q_ASSERT(d->subject);
- return QString::fromUtf8(polkit_subject_to_string(d->subject));
+ return TQString::fromUtf8(polkit_subject_to_string(d->subject));
}
-Subject Subject::fromString(const QString &string)
+Subject Subject::fromString(const TQString &string)
{
// should be in polkit library!!! but for strange reason it's necessary to have it here
g_type_init();
@@ -106,7 +106,7 @@ Subject Subject::fromString(const QString &string)
GError *error = NULL;
subject.d->subject = polkit_subject_from_string(string.toUtf8().data(), &error);
if (error != NULL) {
- qWarning() << QString("Cannot create Subject from string: %1").arg(error->message);
+ tqWarning() << TQString("Cannot create Subject from string: %1").arg(error->message);
return NULL;
}
return subject;
@@ -118,7 +118,7 @@ UnixProcessSubject::UnixProcessSubject(qint64 pid)
setSubject(polkit_unix_process_new(pid));
}
-UnixProcessSubject::UnixProcessSubject(qint64 pid, quint64 startTime)
+UnixProcessSubject::UnixProcessSubject(qint64 pid, tquint64 startTime)
: Subject()
{
setSubject(polkit_unix_process_new_full(pid, startTime));
@@ -146,7 +146,7 @@ void UnixProcessSubject::setPid(qint64 pid)
}
// ----- SystemBusName
-SystemBusNameSubject::SystemBusNameSubject(const QString &name)
+SystemBusNameSubject::SystemBusNameSubject(const TQString &name)
: Subject()
{
setSubject(polkit_system_bus_name_new(name.toUtf8().data()));
@@ -158,18 +158,18 @@ SystemBusNameSubject::SystemBusNameSubject(PolkitSystemBusName *pkSystemBusName)
}
-QString SystemBusNameSubject::name() const
+TQString SystemBusNameSubject::name() const
{
- return QString::fromUtf8(polkit_system_bus_name_get_name((PolkitSystemBusName *) subject()));
+ return TQString::fromUtf8(polkit_system_bus_name_get_name((PolkitSystemBusName *) subject()));
}
-void SystemBusNameSubject::setName(const QString &name)
+void SystemBusNameSubject::setName(const TQString &name)
{
polkit_system_bus_name_set_name((PolkitSystemBusName *) subject(), name.toUtf8().data());
}
// ----- SystemSession
-UnixSessionSubject::UnixSessionSubject(const QString &sessionId)
+UnixSessionSubject::UnixSessionSubject(const TQString &sessionId)
: Subject()
{
setSubject(polkit_unix_session_new(sessionId.toUtf8().data()));
@@ -181,7 +181,7 @@ UnixSessionSubject::UnixSessionSubject(qint64 pid)
GError *error = NULL;
setSubject(polkit_unix_session_new_for_process_sync(pid, NULL, &error));
if (error != NULL) {
- qWarning() << QString("Cannot create unix session: %1").arg(error->message);
+ tqWarning() << TQString("Cannot create unix session: %1").arg(error->message);
setSubject(NULL);
}
}
@@ -192,12 +192,12 @@ UnixSessionSubject::UnixSessionSubject(PolkitSystemBusName *pkUnixSession)
}
-QString UnixSessionSubject::sessionId() const
+TQString UnixSessionSubject::sessionId() const
{
- return QString::fromUtf8(polkit_unix_session_get_session_id((PolkitUnixSession *) subject()));
+ return TQString::fromUtf8(polkit_unix_session_get_session_id((PolkitUnixSession *) subject()));
}
-void UnixSessionSubject::setSessionId(const QString &sessionId)
+void UnixSessionSubject::setSessionId(const TQString &sessionId)
{
polkit_unix_session_set_session_id((PolkitUnixSession *) subject(), sessionId.toUtf8().data());
}
diff --git a/core/polkitqt1-subject.h b/core/polkitqt1-subject.h
index 800318dfe..25d986097 100644
--- a/core/polkitqt1-subject.h
+++ b/core/polkitqt1-subject.h
@@ -23,21 +23,21 @@
#include "polkitqt1-export.h"
-#include <QtCore/QObject>
-#include <QtCore/QSharedData>
+#include <TQtCore/TQObject>
+#include <TQtCore/TQSharedData>
typedef struct _PolkitSubject PolkitSubject;
typedef struct _PolkitUnixProcess PolkitUnixProcess;
typedef struct _PolkitSystemBusName PolkitSystemBusName;
/**
- * \namespace PolkitQt1 PolkitQt
+ * \namespace PolkitTQt1 PolkitTQt
*
- * \brief Namespace wrapping PolicyKit-Qt classes
+ * \brief Namespace wrapping PolicyKit-TQt classes
*
- * This namespace wraps all PolicyKit-Qt classes.
+ * This namespace wraps all PolicyKit-TQt classes.
*/
-namespace PolkitQt1
+namespace PolkitTQt1
{
/**
@@ -68,7 +68,7 @@ public:
*
* \return Serialized Subject object
*/
- QString toString() const;
+ TQString toString() const;
/**
* Creates the Subject object from string reprezentation
@@ -77,7 +77,7 @@ public:
*
* \return Pointer to new Subject instance
*/
- static Subject fromString(const QString &string);
+ static Subject fromString(const TQString &string);
/**
* Gets PolkitSubject object.
@@ -95,7 +95,7 @@ protected:
private:
class Data;
- QExplicitlySharedDataPointer< Data > d;
+ TQExplicitlySharedDataPointer< Data > d;
};
/**
@@ -128,7 +128,7 @@ public:
* \param pid An Unix process PID.
* \param startTime An Unix process start time.
*/
- UnixProcessSubject(qint64 pid, quint64 startTime);
+ UnixProcessSubject(qint64 pid, tquint64 startTime);
/**
* Subject constructor, it creates UnixProcess object from PolkitUnixProcess object
@@ -177,7 +177,7 @@ public:
*
* \param name A unique system bus name.
*/
- explicit SystemBusNameSubject(const QString &name);
+ explicit SystemBusNameSubject(const TQString &name);
/**
* Subject constructor, it creates SystemBusName object from PolkitSystemBusName object
@@ -193,14 +193,14 @@ public:
*
* \return A unique system bus name.
*/
- QString name() const;
+ TQString name() const;
/**
* Sets system bus name.
*
* \param name System bus name.
*/
- void setName(const QString &name);
+ void setName(const TQString &name);
};
/**
@@ -222,7 +222,7 @@ public:
*
* \param sessionId The session id.
*/
- explicit UnixSessionSubject(const QString &sessionId);
+ explicit UnixSessionSubject(const TQString &sessionId);
/**
* Subject constructor, takes one parameter - pid of process.
@@ -247,14 +247,14 @@ public:
*
* \return A session id.
*/
- QString sessionId() const;
+ TQString sessionId() const;
/**
* Sets session id.
*
* \param sessionId A session id.
*/
- void setSessionId(const QString &sessionId);
+ void setSessionId(const TQString &sessionId);
};
}
diff --git a/core/polkitqt1-temporaryauthorization.cpp b/core/polkitqt1-temporaryauthorization.cpp
index 5242faf7a..7614089d4 100644
--- a/core/polkitqt1-temporaryauthorization.cpp
+++ b/core/polkitqt1-temporaryauthorization.cpp
@@ -23,15 +23,15 @@
#include <polkit/polkit.h>
-namespace PolkitQt1
+namespace PolkitTQt1
{
-class TemporaryAuthorization::Data : public QSharedData
+class TemporaryAuthorization::Data : public TQSharedData
{
public:
Data() {}
Data(const Data& other)
- : QSharedData(other)
+ : TQSharedData(other)
, id(other.id)
, actionId(other.actionId)
, subject(other.subject)
@@ -41,26 +41,26 @@ public:
}
~Data() {}
- QString id;
- QString actionId;
+ TQString id;
+ TQString actionId;
Subject subject;
- QDateTime timeObtained;
- QDateTime timeExpires;
+ TQDateTime timeObtained;
+ TQDateTime timeExpires;
};
TemporaryAuthorization::TemporaryAuthorization(PolkitTemporaryAuthorization *pkTemporaryAuthorization)
: d(new Data)
{
g_type_init();
- d->id = QString::fromUtf8(polkit_temporary_authorization_get_id(pkTemporaryAuthorization));
- d->actionId = QString::fromUtf8(polkit_temporary_authorization_get_action_id(pkTemporaryAuthorization));
+ d->id = TQString::fromUtf8(polkit_temporary_authorization_get_id(pkTemporaryAuthorization));
+ d->actionId = TQString::fromUtf8(polkit_temporary_authorization_get_action_id(pkTemporaryAuthorization));
d->subject = Subject::fromString(polkit_subject_to_string(polkit_temporary_authorization_get_subject(pkTemporaryAuthorization)));
- d->timeObtained = QDateTime::fromTime_t(polkit_temporary_authorization_get_time_obtained(pkTemporaryAuthorization));
- d->timeExpires = QDateTime::fromTime_t(polkit_temporary_authorization_get_time_expires(pkTemporaryAuthorization));
+ d->timeObtained = TQDateTime::fromTime_t(polkit_temporary_authorization_get_time_obtained(pkTemporaryAuthorization));
+ d->timeExpires = TQDateTime::fromTime_t(polkit_temporary_authorization_get_time_expires(pkTemporaryAuthorization));
g_object_unref(pkTemporaryAuthorization);
}
-TemporaryAuthorization::TemporaryAuthorization(const PolkitQt1::TemporaryAuthorization& other)
+TemporaryAuthorization::TemporaryAuthorization(const PolkitTQt1::TemporaryAuthorization& other)
: d(other.d)
{
@@ -72,7 +72,7 @@ TemporaryAuthorization::TemporaryAuthorization()
}
-TemporaryAuthorization& TemporaryAuthorization::operator=(const PolkitQt1::TemporaryAuthorization& other)
+TemporaryAuthorization& TemporaryAuthorization::operator=(const PolkitTQt1::TemporaryAuthorization& other)
{
d = other.d;
return *this;
@@ -82,28 +82,28 @@ TemporaryAuthorization::~TemporaryAuthorization()
{
}
-QString TemporaryAuthorization::id() const
+TQString TemporaryAuthorization::id() const
{
return d->id;
}
-QString TemporaryAuthorization::actionId() const
+TQString TemporaryAuthorization::actionId() const
{
return d->actionId;
}
Subject TemporaryAuthorization::subject() const
{
- //qFatal(polkit_subject_to_string(polkit_temporary_authorization_get_subject(d->temporaryAuthorization)));
+ //tqFatal(polkit_subject_to_string(polkit_temporary_authorization_get_subject(d->temporaryAuthorization)));
return d->subject;//Subject::fromString(polkit_subject_to_string(d->subject));
}
-QDateTime TemporaryAuthorization::obtainedAt() const
+TQDateTime TemporaryAuthorization::obtainedAt() const
{
return d->timeObtained;
}
-QDateTime TemporaryAuthorization::expirationTime() const
+TQDateTime TemporaryAuthorization::expirationTime() const
{
return d->timeExpires;
}
diff --git a/core/polkitqt1-temporaryauthorization.h b/core/polkitqt1-temporaryauthorization.h
index f8a13ea17..04deabb2c 100644
--- a/core/polkitqt1-temporaryauthorization.h
+++ b/core/polkitqt1-temporaryauthorization.h
@@ -23,21 +23,21 @@
#include "polkitqt1-subject.h"
-#include <QtCore/QObject>
-#include <QtCore/QDateTime>
-#include <QtCore/QMetaType>
-#include <QtCore/QSharedData>
+#include <TQtCore/TQObject>
+#include <TQtCore/TQDateTime>
+#include <TQtCore/TQMetaType>
+#include <TQtCore/TQSharedData>
typedef struct _PolkitTemporaryAuthorization PolkitTemporaryAuthorization;
/**
- * \namespace PolkitQt1 PolkitQt
+ * \namespace PolkitTQt1 PolkitTQt
*
- * \brief Namespace wrapping PolicyKit-Qt classes
+ * \brief Namespace wrapping PolicyKit-TQt classes
*
- * This namespace wraps all PolicyKit-Qt classes.
+ * This namespace wraps all PolicyKit-TQt classes.
*/
-namespace PolkitQt1
+namespace PolkitTQt1
{
/**
@@ -51,7 +51,7 @@ namespace PolkitQt1
class POLKITQT1_EXPORT TemporaryAuthorization
{
public:
- typedef QList< TemporaryAuthorization > List;
+ typedef TQList< TemporaryAuthorization > List;
TemporaryAuthorization();
/**
* Creates TemporaryAuthorization object from PolkitTemporaryAuthorization
@@ -75,14 +75,14 @@ public:
*
* \return Unique identifier for the authorization
*/
- QString id() const;
+ TQString id() const;
/**
* \brief Gets the identifier of the action that authorization is for
*
* \return String that identifies the action
*/
- QString actionId() const;
+ TQString actionId() const;
/**
* \brief Gets the subject that authorization is for
@@ -96,14 +96,14 @@ public:
*
* \return Time of obtaining the authorization
*/
- QDateTime obtainedAt() const;
+ TQDateTime obtainedAt() const;
/**
* \brief Gets the time when authorizaton will expire
*
* \return Time of expiration
*/
- QDateTime expirationTime() const;
+ TQDateTime expirationTime() const;
/**
* \brief Revoke temporary authorization
@@ -115,10 +115,10 @@ public:
private:
class Data;
- QSharedDataPointer< Data > d;
+ TQSharedDataPointer< Data > d;
};
}
-Q_DECLARE_METATYPE(PolkitQt1::TemporaryAuthorization::List)
+Q_DECLARE_METATYPE(PolkitTQt1::TemporaryAuthorization::List)
#endif // TEMPORARYAUTHORIZATION_H
diff --git a/debian/source/format b/debian/source/format
index 163aaf8d8..c0ee9166b 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-3.0 (quilt)
+3.0 (tquilt)
diff --git a/examples/PkExample.cpp b/examples/PkExample.cpp
index 2168a9117..5c0e57d22 100644
--- a/examples/PkExample.cpp
+++ b/examples/PkExample.cpp
@@ -24,29 +24,29 @@
#include "gui/polkitqt1-gui-actionbutton.h"
#include "gui/polkitqt1-gui-actionbuttons.h"
#include "core/polkitqt1-authority.h"
-#include <QtCore/QDebug>
+#include <TQtCore/TQDebug>
-#include <QtDBus/QDBusMessage>
-#include <QtDBus/QDBusConnection>
+#include <TQtDBus/TQDBusMessage>
+#include <TQtDBus/TQDBusConnection>
-using namespace PolkitQt1;
-using namespace PolkitQt1::Gui;
+using namespace PolkitTQt1;
+using namespace PolkitTQt1::Gui;
-PkExample::PkExample(QMainWindow *parent)
- : QMainWindow(parent)
+PkExample::PkExample(TQMainWindow *parent)
+ : TQMainWindow(parent)
{
setupUi(this);
ActionButton *bt;
// Here we create an ActionButton that is a subclass of Action
- // always pass a QAbstractButton pointer and action id
+ // always pass a TQAbstractButton pointer and action id
// You can change the action id later if you want
bt = new ActionButton(kickPB, "org.qt.policykit.examples.kick", this);
// Here we are setting the text and icon to all four states
// an action might have
bt->setText("Kick!");
- bt->setIcon(QPixmap(":/Icons/custom-no.png"));
+ bt->setIcon(TQPixmap(":/Icons/custom-no.png"));
// By using set{Yes|No|Auth}Enabled you can set the states
// when the button is enabled
bt->setEnabled(true, Action::No);
@@ -54,32 +54,32 @@ PkExample::PkExample(QMainWindow *parent)
menuActions->addAction(qobject_cast<Action *>(bt));
toolBar->addAction(qobject_cast<Action *>(bt));
// this signal is emitted when the user click on the action,
- // it will only happen if it was inserted in a QMenu or a QToolBar
+ // it will only happen if it was inserted in a TQMenu or a TQToolBar
connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
- // This signal was propagated from the QAbstractButton just for
+ // This signal was propagated from the TQAbstractButton just for
// convenience in this case we don't have any benefit but the code
// look cleaner
- connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+ connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate()));
// this is the Action activated signal, it is always emmited whenever
// someone click and get authorized to do the action
connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
bt = new ActionButton(cryPB, "org.qt.policykit.examples.cry", this);
bt->setText("Cry!");
- bt->setIcon(QPixmap(":/Icons/custom-yes.png"));
+ bt->setIcon(TQPixmap(":/Icons/custom-yes.png"));
menuActions->addAction(qobject_cast<Action *>(bt));
toolBar->addAction(qobject_cast<Action *>(bt));
connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
- connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+ connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate()));
connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
bt = new ActionButton(bleedPB, "org.qt.policykit.examples.bleed", this);
bt->setText("Bleed!");
- bt->setIcon(QPixmap(":/Icons/action-locked-default.png"));
+ bt->setIcon(TQPixmap(":/Icons/action-locked-default.png"));
menuActions->addAction(qobject_cast<Action *>(bt));
toolBar->addAction(qobject_cast<Action *>(bt));
connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
- connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+ connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate()));
connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
// This action is more customized
@@ -89,67 +89,67 @@ PkExample::PkExample(QMainWindow *parent)
bt->setEnabled(true, Action::No | Action::Auth | Action::Yes);
// here we set the behavior of PolKitResul = No
bt->setText("Can't play!", Action::No);
- bt->setIcon(QPixmap(":/Icons/custom-no.png"), Action::No);
+ bt->setIcon(TQPixmap(":/Icons/custom-no.png"), Action::No);
bt->setToolTip("If your admin wasn't annoying, you could do this", Action::No);
// here we set the behavior of PolKitResul = Auth
bt->setText("Play?", Action::Auth);
- bt->setIcon(QPixmap(":/Icons/action-locked-default.png"), Action::Auth);
+ bt->setIcon(TQPixmap(":/Icons/action-locked-default.png"), Action::Auth);
bt->setToolTip("Only card carrying tweakers can do this!", Action::Auth);
// here we set the behavior of PolKitResul = Yes
bt->setText("Play!", Action::Yes);
- bt->setIcon(QPixmap(":/Icons/custom-yes.png"), Action::Yes);
+ bt->setIcon(TQPixmap(":/Icons/custom-yes.png"), Action::Yes);
bt->setToolTip("Go ahead, play!", Action::Yes);
menuActions->addAction(qobject_cast<Action *>(bt));
toolBar->addAction(qobject_cast<Action *>(bt));
connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
- connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+ connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate()));
connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
bt = new ActionButton(deletePB, "org.qt.policykit.examples.delete", this);
bt->setText("Delete!");
- bt->setIcon(QPixmap(":/Icons/custom-no.png"), Action::No);
- bt->setIcon(QPixmap(":/Icons/action-locked-default.png"), Action::Auth);
- bt->setIcon(QPixmap(":/Icons/custom-yes.png"), Action::Yes);
+ bt->setIcon(TQPixmap(":/Icons/custom-no.png"), Action::No);
+ bt->setIcon(TQPixmap(":/Icons/action-locked-default.png"), Action::Auth);
+ bt->setIcon(TQPixmap(":/Icons/custom-yes.png"), Action::Yes);
menuActions->addAction(qobject_cast<Action *>(bt));
toolBar->addAction(qobject_cast<Action *>(bt));
connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
- connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+ connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate()));
connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
bt = new ActionButton(listenPB, "org.qt.policykit.examples.listen", this);
bt->setText("Listen!");
- bt->setIcon(QPixmap(":/Icons/custom-no.png"), Action::No);
- bt->setIcon(QPixmap(":/Icons/action-locked-default.png"), Action::Auth);
- bt->setIcon(QPixmap(":/Icons/custom-yes.png"), Action::Yes);
+ bt->setIcon(TQPixmap(":/Icons/custom-no.png"), Action::No);
+ bt->setIcon(TQPixmap(":/Icons/action-locked-default.png"), Action::Auth);
+ bt->setIcon(TQPixmap(":/Icons/custom-yes.png"), Action::Yes);
menuActions->addAction(qobject_cast<Action *>(bt));
toolBar->addAction(qobject_cast<Action *>(bt));
connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
- connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+ connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate()));
connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
bt = new ActionButton(setPB, "org.qt.policykit.examples.set", this);
bt->setText("Set!");
- bt->setIcon(QPixmap(":/Icons/custom-no.png"), Action::No);
- bt->setIcon(QPixmap(":/Icons/action-locked-default.png"), Action::Auth);
- bt->setIcon(QPixmap(":/Icons/custom-yes.png"), Action::Yes);
+ bt->setIcon(TQPixmap(":/Icons/custom-no.png"), Action::No);
+ bt->setIcon(TQPixmap(":/Icons/action-locked-default.png"), Action::Auth);
+ bt->setIcon(TQPixmap(":/Icons/custom-yes.png"), Action::Yes);
menuActions->addAction(qobject_cast<Action *>(bt));
toolBar->addAction(qobject_cast<Action *>(bt));
connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
- connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+ connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate()));
connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
bt = new ActionButton(shoutPB, "org.qt.policykit.examples.shout", this);
- bt->setIcon(QPixmap(":/Icons/custom-no.png"), Action::No);
- bt->setIcon(QPixmap(":/Icons/action-locked-default.png"), Action::Auth);
- bt->setIcon(QPixmap(":/Icons/custom-yes.png"), Action::Yes);
+ bt->setIcon(TQPixmap(":/Icons/custom-no.png"), Action::No);
+ bt->setIcon(TQPixmap(":/Icons/action-locked-default.png"), Action::Auth);
+ bt->setIcon(TQPixmap(":/Icons/custom-yes.png"), Action::Yes);
bt->setText("Can't shout!", Action::No);
bt->setText("Shout?", Action::Auth);
bt->setText("Shout!", Action::Yes);
menuActions->addAction(qobject_cast<Action *>(bt));
toolBar->addAction(qobject_cast<Action *>(bt));
connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
- connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+ connect(bt, SIGNAL(clicked(TQAbstractButton *, bool)), bt, SLOT(activate()));
connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
// test configChanged
@@ -183,33 +183,33 @@ void PkExample::actionActivated()
// this is our Special Action that after allowed will call the helper
if (action->is("org.qt.policykit.examples.set")) {
- qDebug() << "toggled for: org.qt.policykit.examples.set";
+ tqDebug() << "toggled for: org.qt.policykit.examples.set";
- QDBusMessage message;
- message = QDBusMessage::createMethodCall("org.qt.policykit.examples",
+ TQDBusMessage message;
+ message = TQDBusMessage::createMethodCall("org.qt.policykit.examples",
"/",
"org.qt.policykit.examples",
- QLatin1String("set"));
- QList<QVariant> argumentList;
+ TQLatin1String("set"));
+ TQList<TQVariant> argumentList;
argumentList << qVariantFromValue(setCB->currentText());
message.setArguments(argumentList);
// notice the systemBus here..
- QDBusMessage reply = QDBusConnection::systemBus().call(message);
- if (reply.type() == QDBusMessage::ReplyMessage
+ TQDBusMessage reply = TQDBusConnection::systemBus().call(message);
+ if (reply.type() == TQDBusMessage::ReplyMessage
&& reply.arguments().size() == 1) {
// the reply can be anything, here we receive a bool
- QListWidgetItem *item;
+ TQListWidgetItem *item;
if (reply.arguments().first().toBool())
- item = new QListWidgetItem(QPixmap(":/Icons/custom-yes.png"),
- QString("Implicit authorization for shout has been set to %0")
+ item = new TQListWidgetItem(TQPixmap(":/Icons/custom-yes.png"),
+ TQString("Implicit authorization for shout has been set to %0")
.arg(setCB->currentText()));
else
- item = new QListWidgetItem(QPixmap(":/Icons/custom-no.png"),
- QString("Can't change the implicit authorization. Denied."));
+ item = new TQListWidgetItem(TQPixmap(":/Icons/custom-no.png"),
+ TQString("Can't change the implicit authorization. Denied."));
actionList->addItem(item);
- qDebug() << reply.arguments().first().toString();
- } else if (reply.type() == QDBusMessage::MethodCallMessage) {
- qWarning() << "Message did not receive a reply (timeout by message bus)";
+ tqDebug() << reply.arguments().first().toString();
+ } else if (reply.type() == TQDBusMessage::MethodCallMessage) {
+ tqWarning() << "Message did not receive a reply (timeout by message bus)";
}
return;
}
@@ -219,22 +219,22 @@ void PkExample::actionActivated()
// will run as root (setuid is not needed, see DBus docs).
// In the helper application you will issue checkAuthorizationSync,
// passing the action id and the caller pid (which DBus will tell you).
- qDebug() << "pretending to be the mechanism for action:" << action->actionId();
+ tqDebug() << "pretending to be the mechanism for action:" << action->actionId();
Authority::Result result;
- UnixProcessSubject subject(static_cast<uint>(QCoreApplication::applicationPid()));
+ UnixProcessSubject subject(static_cast<uint>(TQCoreApplication::applicationPid()));
result = Authority::instance()->checkAuthorizationSync(action->actionId(), subject,
Authority::AllowUserInteraction);
if (result == Authority::Yes) {
// in the helper you will do the action
- qDebug() << "caller is authorized to do:" << action->actionId();
- QListWidgetItem *item = new QListWidgetItem(QPixmap(":/Icons/custom-yes.png"), action->actionId());
+ tqDebug() << "caller is authorized to do:" << action->actionId();
+ TQListWidgetItem *item = new TQListWidgetItem(TQPixmap(":/Icons/custom-yes.png"), action->actionId());
actionList->addItem(item);
} else {
// OR return false to notify the caller that the action is not authorized.
- qDebug() << "caller is NOT authorized to do:" << action->actionId();
- QListWidgetItem *item = new QListWidgetItem(QIcon(":/Icons/custom-no.png"), action->actionId());
+ tqDebug() << "caller is NOT authorized to do:" << action->actionId();
+ TQListWidgetItem *item = new TQListWidgetItem(TQIcon(":/Icons/custom-no.png"), action->actionId());
actionList->addItem(item);
}
}
diff --git a/examples/PkExample.h b/examples/PkExample.h
index 4ede9f630..30958821b 100644
--- a/examples/PkExample.h
+++ b/examples/PkExample.h
@@ -24,12 +24,12 @@
#include "ui_PkExample.h"
-class PkExample : public QMainWindow, Ui::PkExample
+class PkExample : public TQMainWindow, Ui::PkExample
{
Q_OBJECT
public:
- PkExample(QMainWindow *parent = 0);
+ PkExample(TQMainWindow *parent = 0);
~PkExample();
private Q_SLOTS:
diff --git a/examples/PkExample.ui b/examples/PkExample.ui
index 8997e506a..8b49cf205 100644
--- a/examples/PkExample.ui
+++ b/examples/PkExample.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PkExample</class>
- <widget class="QMainWindow" name="PkExample">
+ <widget class="TQMainWindow" name="PkExample">
<property name="geometry">
<rect>
<x>0</x>
@@ -13,12 +13,12 @@
<property name="windowTitle">
<string>PolicyKit-qt example</string>
</property>
- <widget class="QWidget" name="centralwidget">
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <widget class="TQWidget" name="centralwidget">
+ <layout class="TQHBoxLayout" name="horizontalLayout">
<item>
- <layout class="QGridLayout" name="gridLayout" columnstretch="3,1">
+ <layout class="TQGridLayout" name="gridLayout" columnstretch="3,1">
<item row="0" column="0">
- <widget class="QLabel" name="kickL">
+ <widget class="TQLabel" name="kickL">
<property name="text">
<string>Making the helper &lt;b&gt;Kick&lt;/b&gt; is not allowed. Action cannot be triggered.</string>
</property>
@@ -28,14 +28,14 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="QPushButton" name="kickPB">
+ <widget class="TQPushButton" name="kickPB">
<property name="text">
<string>Kick!</string>
</property>
</widget>
</item>
<item row="1" column="0">
- <widget class="QLabel" name="cryL">
+ <widget class="TQLabel" name="cryL">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@@ -49,14 +49,14 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="1" column="1">
- <widget class="QPushButton" name="cryPB">
+ <widget class="TQPushButton" name="cryPB">
<property name="text">
<string>Cry!</string>
</property>
</widget>
</item>
<item row="2" column="0">
- <widget class="QLabel" name="bleedL">
+ <widget class="TQLabel" name="bleedL">
<property name="text">
<string>Making the helper &lt;b&gt;Bleed&lt;/b&gt; requires the user to authenticate. This is a one-shot authorization.</string>
</property>
@@ -66,14 +66,14 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="2" column="1">
- <widget class="QPushButton" name="bleedPB">
+ <widget class="TQPushButton" name="bleedPB">
<property name="text">
<string>Bleed!</string>
</property>
</widget>
</item>
<item row="3" column="0">
- <widget class="QLabel" name="playL">
+ <widget class="TQLabel" name="playL">
<property name="text">
<string>Making the helper &lt;b&gt;Play&lt;/b&gt; requires a system administrator to authenticate. This is a one-shot authorization.</string>
</property>
@@ -83,14 +83,14 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="3" column="1">
- <widget class="QPushButton" name="playPB">
+ <widget class="TQPushButton" name="playPB">
<property name="text">
<string>Play!</string>
</property>
</widget>
</item>
<item row="4" column="0">
- <widget class="QLabel" name="listenL">
+ <widget class="TQLabel" name="listenL">
<property name="text">
<string>Making the helper &lt;b&gt;Listen&lt;/b&gt; requires the user to authenticate. The authorization will be kept for a brief period.</string>
</property>
@@ -100,14 +100,14 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="4" column="1">
- <widget class="QPushButton" name="listenPB">
+ <widget class="TQPushButton" name="listenPB">
<property name="text">
<string>Listen!</string>
</property>
</widget>
</item>
<item row="5" column="0">
- <widget class="QLabel" name="deleteL">
+ <widget class="TQLabel" name="deleteL">
<property name="text">
<string>Making the helper &lt;b&gt;Delete&lt;/b&gt; requires a system administrator to authenticate. The authorization will be kept for a brief period.</string>
</property>
@@ -117,14 +117,14 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="5" column="1">
- <widget class="QPushButton" name="deletePB">
+ <widget class="TQPushButton" name="deletePB">
<property name="text">
<string>Delete!</string>
</property>
</widget>
</item>
<item row="6" column="0" rowspan="2">
- <widget class="QLabel" name="deleteL_2">
+ <widget class="TQLabel" name="deleteL_2">
<property name="text">
<string>&lt;b&gt;Set&lt;/b&gt; is special action. It sets the permissions for the &lt;b&gt;Shout&lt;/b&gt; action by actually using the helper application to change the implicit authorization.</string>
</property>
@@ -134,7 +134,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="6" column="1">
- <widget class="QComboBox" name="setCB">
+ <widget class="TQComboBox" name="setCB">
<item>
<property name="text">
<string>no</string>
@@ -168,14 +168,14 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="7" column="1">
- <widget class="QPushButton" name="setPB">
+ <widget class="TQPushButton" name="setPB">
<property name="text">
<string>Set!</string>
</property>
</widget>
</item>
<item row="8" column="0">
- <widget class="QLabel" name="deleteL_3">
+ <widget class="TQLabel" name="deleteL_3">
<property name="text">
<string>The implicit authorization for the &lt;b&gt;Shout&lt;/b&gt; action is set by the &lt;b&gt;Set&lt;/b&gt; action. You can watch how different options can change behaviour of this action.</string>
</property>
@@ -185,7 +185,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="8" column="1">
- <widget class="QPushButton" name="shoutPB">
+ <widget class="TQPushButton" name="shoutPB">
<property name="text">
<string>Shout!</string>
</property>
@@ -194,11 +194,11 @@ p, li { white-space: pre-wrap; }
</layout>
</item>
<item>
- <widget class="QListWidget" name="actionList"/>
+ <widget class="TQListWidget" name="actionList"/>
</item>
</layout>
</widget>
- <widget class="QMenuBar" name="menubar">
+ <widget class="TQMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
@@ -207,19 +207,19 @@ p, li { white-space: pre-wrap; }
<height>22</height>
</rect>
</property>
- <widget class="QMenu" name="menuActions">
+ <widget class="TQMenu" name="menuActions">
<property name="title">
<string>Actions</string>
</property>
</widget>
<addaction name="menuActions"/>
</widget>
- <widget class="QToolBar" name="toolBar">
+ <widget class="TQToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextUnderIcon</enum>
+ <enum>TQt::ToolButtonTextUnderIcon</enum>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
diff --git a/examples/PkExampleHelper.cpp b/examples/PkExampleHelper.cpp
index 0258e700f..d6ecfdc7f 100644
--- a/examples/PkExampleHelper.cpp
+++ b/examples/PkExampleHelper.cpp
@@ -24,45 +24,45 @@
#include "polkitqt1-authority.h"
-#include <QtDBus/QDBusConnection>
-#include <QtCore/QTimer>
-#include <QtCore/QDebug>
-#include <QtXml/QDomDocument>
+#include <TQtDBus/TQDBusConnection>
+#include <TQtCore/TQTimer>
+#include <TQtCore/TQDebug>
+#include <TQtXml/TQDomDocument>
#define MINUTE 60000
-using namespace PolkitQt1;
+using namespace PolkitTQt1;
PkExampleHelper::PkExampleHelper(int &argc, char **argv)
- : QCoreApplication(argc, argv)
+ : TQCoreApplication(argc, argv)
{
- qDebug() << "Creating Helper";
+ tqDebug() << "Creating Helper";
(void) new ExamplesAdaptor(this);
// Register the DBus service
- if (!QDBusConnection::systemBus().registerService("org.qt.policykit.examples")) {
- qDebug() << QDBusConnection::systemBus().lastError().message();;
- QTimer::singleShot(0, this, SLOT(quit()));
+ if (!TQDBusConnection::systemBus().registerService("org.qt.policykit.examples")) {
+ tqDebug() << TQDBusConnection::systemBus().lastError().message();;
+ TQTimer::singleShot(0, this, SLOT(quit()));
return;
}
- if (!QDBusConnection::systemBus().registerObject("/", this)) {
- qDebug() << "unable to register service interface to dbus";
- QTimer::singleShot(0, this, SLOT(quit()));
+ if (!TQDBusConnection::systemBus().registerObject("/", this)) {
+ tqDebug() << "unable to register service interface to dbus";
+ TQTimer::singleShot(0, this, SLOT(quit()));
return;
}
// Normally you will set a timeout so your application can
// free some resources of the poor client machine ;)
- QTimer::singleShot(MINUTE, this, SLOT(quit()));
+ TQTimer::singleShot(MINUTE, this, SLOT(quit()));
}
PkExampleHelper::~PkExampleHelper()
{
- qDebug() << "Destroying Helper";
+ tqDebug() << "Destroying Helper";
}
-bool PkExampleHelper::set(const QString &action)
+bool PkExampleHelper::set(const TQString &action)
{
- qDebug() << "PkExampleHelper::set" << action;
+ tqDebug() << "PkExampleHelper::set" << action;
// message().service() is the service name of the caller
// We can check if the caller is authorized to the following action
Authority::Result result;
@@ -71,29 +71,29 @@ bool PkExampleHelper::set(const QString &action)
result = Authority::instance()->checkAuthorizationSync("org.qt.policykit.examples.set",
subject , Authority::AllowUserInteraction);
if (result == Authority::Yes) {
- qDebug() << message().service() << QString("Implicit authorization set to") << action;
+ tqDebug() << message().service() << TQString("Implicit authorization set to") << action;
// Caller is authorized so we can perform the action
return setValue(action);
} else {
- qDebug() << message().service() << QString("Can't set the implicit authorization");
+ tqDebug() << message().service() << TQString("Can't set the implicit authorization");
// Caller is not authorized so the action can't be performed
return false;
}
}
-bool PkExampleHelper::setValue(const QString &action)
+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
- QDomDocument doc = QDomDocument("policy");
- QFile file("/usr/share/polkit-1/actions/org.qt.policykit.examples.policy");
- if (!file.open(QIODevice::ReadOnly))
+ TQDomDocument doc = TQDomDocument("policy");
+ TQFile file("/usr/share/polkit-1/actions/org.qt.policykit.examples.policy");
+ if (!file.open(TQIODevice::ReadOnly))
return false;
doc.setContent(&file);
file.close();
- QDomElement el = doc.firstChildElement("policyconfig").
+ TQDomElement el = doc.firstChildElement("policyconfig").
firstChildElement("action");
- while (!el.isNull() && el.attribute("id", QString()) != "org.qt.policykit.examples.shout") {
+ while (!el.isNull() && el.attribute("id", TQString()) != "org.qt.policykit.examples.shout") {
el = el.nextSiblingElement("action");
}
el = el.firstChildElement("defaults");
@@ -101,9 +101,9 @@ bool PkExampleHelper::setValue(const QString &action)
if (el.isNull())
return false;
el.firstChild().toText().setData(action);
- if (!file.open(QIODevice::WriteOnly))
+ if (!file.open(TQIODevice::WriteOnly))
return false;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
doc.save(stream, 2);
file.close();
return true;
diff --git a/examples/PkExampleHelper.h b/examples/PkExampleHelper.h
index bf69e03f7..825a14bf0 100644
--- a/examples/PkExampleHelper.h
+++ b/examples/PkExampleHelper.h
@@ -22,20 +22,20 @@
#ifndef PKEXAMPLE_HELPER_H
#define PKEXAMPLE_HELPER_H
-#include <QtDBus/QDBusContext>
-#include <QtCore/QCoreApplication>
+#include <TQtDBus/TQDBusContext>
+#include <TQtCore/TQCoreApplication>
-class PkExampleHelper : public QCoreApplication, protected QDBusContext
+class PkExampleHelper : public TQCoreApplication, protected TQDBusContext
{
Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "org.qt.policykit.examples")
+ TQ_CLASSINFO("D-Bus Interface", "org.qt.policykit.examples")
public:
PkExampleHelper(int &argc, char **argv);
~PkExampleHelper();
public Q_SLOTS:
- bool set(const QString &action);
- bool setValue(const QString &action);
+ bool set(const TQString &action);
+ bool setValue(const TQString &action);
};
diff --git a/examples/agent/klistener.cpp b/examples/agent/klistener.cpp
index 32bfb981a..147b95a67 100644
--- a/examples/agent/klistener.cpp
+++ b/examples/agent/klistener.cpp
@@ -18,61 +18,61 @@
* Boston, MA 02110-1301, USA.
*/
-#include <QtCore/QDebug>
-#include <QInputDialog>
+#include <TQtCore/TQDebug>
+#include <TQInputDialog>
#include "klistener.h"
#include "agent/polkitqt1-agent-session.h"
-using namespace PolkitQt1::Agent;
+using namespace PolkitTQt1::Agent;
-KListener::KListener(QObject *parent)
+KListener::KListener(TQObject *parent)
: Listener(parent)
{
- qDebug() << "Registering KDE listener";
+ tqDebug() << "Registering KDE listener";
}
// README: this is just testing code...
-void KListener::initiateAuthentication(const QString &actionId,
- const QString &message,
- const QString &iconName,
- const PolkitQt1::Details &details,
- const QString &cookie,
- const PolkitQt1::Identity::List &identities,
+void KListener::initiateAuthentication(const TQString &actionId,
+ const TQString &message,
+ const TQString &iconName,
+ const PolkitTQt1::Details &details,
+ const TQString &cookie,
+ const PolkitTQt1::Identity::List &identities,
AsyncResult *result)
{
- qDebug() << "initiateAuthentication for " << actionId << " with message " << message;
- qDebug() << "iconName " << iconName;
- qDebug() << details.keys();
- qDebug() << "cookie" << cookie;
+ tqDebug() << "initiateAuthentication for " << actionId << " with message " << message;
+ tqDebug() << "iconName " << iconName;
+ tqDebug() << details.keys();
+ tqDebug() << "cookie" << cookie;
- Q_FOREACH (const PolkitQt1::Identity &identity, identities) {
- qDebug() << identity.toString();
+ Q_FOREACH (const PolkitTQt1::Identity &identity, identities) {
+ tqDebug() << identity.toString();
Session *session;
session = new Session(identity, cookie, result);
- connect(session, SIGNAL(request(QString, bool)), this, SLOT(request(QString, bool)));
+ connect(session, SIGNAL(request(TQString, bool)), this, SLOT(request(TQString, bool)));
connect(session, SIGNAL(completed(bool)), this, SLOT(completed(bool)));
- connect(session, SIGNAL(showError(QString)), this, SLOT(showError(QString)));
- connect(session, SIGNAL(showInfo(QString)), this, SLOT(showInfo(QString)));
+ connect(session, SIGNAL(showError(TQString)), this, SLOT(showError(TQString)));
+ connect(session, SIGNAL(showInfo(TQString)), this, SLOT(showInfo(TQString)));
session->initiate();
}
}
bool KListener::initiateAuthenticationFinish()
{
- qDebug() << "initiateAuthenticationFinish()";
+ tqDebug() << "initiateAuthenticationFinish()";
return true;
}
void KListener::cancelAuthentication()
{
- qDebug() << "Cancelling authentication";
+ tqDebug() << "Cancelling authentication";
}
-void KListener::request(const QString &request, bool echo)
+void KListener::request(const TQString &request, bool echo)
{
- qDebug() << "Request: " << request;
+ tqDebug() << "Request: " << request;
Session *session = (Session *)sender();
@@ -81,7 +81,7 @@ void KListener::request(const QString &request, bool echo)
void KListener::completed(bool gainedAuthorization)
{
- qDebug() << "Completed: " << gainedAuthorization;
+ tqDebug() << "Completed: " << gainedAuthorization;
Session *session = (Session *)sender();
session->result()->setCompleted();
@@ -89,12 +89,12 @@ void KListener::completed(bool gainedAuthorization)
delete session;
}
-void KListener::showError(const QString &text)
+void KListener::showError(const TQString &text)
{
- qDebug() << "Error: " << text;
+ tqDebug() << "Error: " << text;
}
-void KListener::showInfo(const QString &text)
+void KListener::showInfo(const TQString &text)
{
- qDebug() << "Info: " << text;
+ tqDebug() << "Info: " << text;
}
diff --git a/examples/agent/klistener.h b/examples/agent/klistener.h
index 2576acdca..d0e45c6ba 100644
--- a/examples/agent/klistener.h
+++ b/examples/agent/klistener.h
@@ -21,36 +21,36 @@
#ifndef POLKIT_QT_AGENT_KDE_LISTENER_H
#define POLKIT_QT_AGENT_KDE_LISTENER_H
-#include <QtCore/QObject>
-#include <QtCore/QString>
+#include <TQtCore/TQObject>
+#include <TQtCore/TQString>
#include "agent/polkitqt1-agent-listener.h"
#include "core/polkitqt1-identity.h"
#include "core/polkitqt1-details.h"
#include "agent/polkitqt1-agent-session.h"
-class KListener : public PolkitQt1::Agent::Listener
+class KListener : public PolkitTQt1::Agent::Listener
{
Q_OBJECT
- Q_DISABLE_COPY(KListener)
+ TQ_DISABLE_COPY(KListener)
public:
- KListener(QObject *parent = 0);
+ KListener(TQObject *parent = 0);
~KListener() {};
public Q_SLOTS:
- void initiateAuthentication(const QString &actionId,
- const QString &message,
- const QString &iconName,
- const PolkitQt1::Details &details,
- const QString &cookie,
- const PolkitQt1::Identity::List &identities,
- PolkitQt1::Agent::AsyncResult *result);
+ void initiateAuthentication(const TQString &actionId,
+ const TQString &message,
+ const TQString &iconName,
+ const PolkitTQt1::Details &details,
+ const TQString &cookie,
+ const PolkitTQt1::Identity::List &identities,
+ PolkitTQt1::Agent::AsyncResult *result);
bool initiateAuthenticationFinish();
void cancelAuthentication();
- void request(const QString &request, bool echo);
+ void request(const TQString &request, bool echo);
void completed(bool gainedAuthorization);
- void showError(const QString &text);
- void showInfo(const QString &text);
+ void showError(const TQString &text);
+ void showInfo(const TQString &text);
};
#endif
diff --git a/examples/agent/main.cpp b/examples/agent/main.cpp
index 682b04747..8e61f7066 100644
--- a/examples/agent/main.cpp
+++ b/examples/agent/main.cpp
@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
-#include <QApplication>
+#include <TQApplication>
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
diff --git a/examples/agent/pkagentexample.cpp b/examples/agent/pkagentexample.cpp
index ed36363ba..858376c22 100644
--- a/examples/agent/pkagentexample.cpp
+++ b/examples/agent/pkagentexample.cpp
@@ -3,15 +3,15 @@
#include <polkitagent/polkitagent.h>
#include "pkagentexample.h"
#include <glib-object.h>
-#include <QtCore/QDebug>
+#include <TQtCore/TQDebug>
#include "polkitqt1-subject.h"
PkAgentExample::PkAgentExample(int &argc, char **argv)
- : QCoreApplication(argc, argv)
+ : TQCoreApplication(argc, argv)
{
g_type_init();
- PolkitQt1::UnixSessionSubject session(getpid());
+ PolkitTQt1::UnixSessionSubject session(getpid());
m_listener.registerListener(session, "/org/kde/PolicyKit1/AuthenticationAgent");
}
diff --git a/examples/agent/pkagentexample.h b/examples/agent/pkagentexample.h
index 62c7035a5..61dfb3dab 100644
--- a/examples/agent/pkagentexample.h
+++ b/examples/agent/pkagentexample.h
@@ -24,11 +24,11 @@
#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE 1
-#include <QtDBus/QDBusContext>
-#include <QCoreApplication>
+#include <TQtDBus/TQDBusContext>
+#include <TQCoreApplication>
#include "klistener.h"
-class PkAgentExample : public QCoreApplication
+class PkAgentExample : public TQCoreApplication
{
Q_OBJECT
public:
diff --git a/examples/main.cpp b/examples/main.cpp
index e81f80409..602721d00 100644
--- a/examples/main.cpp
+++ b/examples/main.cpp
@@ -19,13 +19,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
-#include <QtGui/QApplication>
+#include <TQtGui/TQApplication>
#include "PkExample.h"
int main(int argc, char *argv[])
{
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
PkExample example;
example.show();
return app.exec();
diff --git a/gui/polkitqt1-gui-action.cpp b/gui/polkitqt1-gui-action.cpp
index 82083d134..d591c7b52 100644
--- a/gui/polkitqt1-gui-action.cpp
+++ b/gui/polkitqt1-gui-action.cpp
@@ -24,9 +24,9 @@
#include "polkitqt1-authority.h"
#include "polkitqt1-subject.h"
-#include <QtCore/QCoreApplication>
+#include <TQtCore/TQCoreApplication>
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Gui
@@ -42,7 +42,7 @@ public:
Action *parent;
- QString actionId;
+ TQString actionId;
Authority::Result pkResult;
qint64 targetPID;
@@ -55,31 +55,31 @@ public:
// states data
bool selfBlockedVisible;
bool selfBlockedEnabled;
- QString selfBlockedText;
- QString selfBlockedWhatsThis;
- QString selfBlockedToolTip;
- QIcon selfBlockedIcon;
+ TQString selfBlockedText;
+ TQString selfBlockedWhatsThis;
+ TQString selfBlockedToolTip;
+ TQIcon selfBlockedIcon;
bool noVisible;
bool noEnabled;
- QString noText;
- QString noWhatsThis;
- QString noToolTip;
- QIcon noIcon;
+ TQString noText;
+ TQString noWhatsThis;
+ TQString noToolTip;
+ TQIcon noIcon;
bool authVisible;
bool authEnabled;
- QString authText;
- QString authWhatsThis;
- QString authToolTip;
- QIcon authIcon;
+ TQString authText;
+ TQString authWhatsThis;
+ TQString authToolTip;
+ TQIcon authIcon;
bool yesVisible;
bool yesEnabled;
- QString yesText;
- QString yesWhatsThis;
- QString yesToolTip;
- QIcon yesIcon;
+ TQString yesText;
+ TQString yesWhatsThis;
+ TQString yesToolTip;
+ TQIcon yesIcon;
};
Action::Private::Private(Action *p)
@@ -102,8 +102,8 @@ Action::Private::Private(Action *p)
yesEnabled = true;
}
-Action::Action(const QString &actionId, QObject *parent)
- : QAction(parent)
+Action::Action(const TQString &actionId, TQObject *parent)
+ : TQAction(parent)
, d(new Private(this))
{
// this must be called AFTER the values initialization
@@ -154,7 +154,7 @@ void Action::setChecked(bool checked)
// We store this as initiallyChecked
// to be able to undo changes in case the auth fails
d->initiallyChecked = checked;
- QAction::setChecked(checked);
+ TQAction::setChecked(checked);
}
void Action::Private::updateAction()
@@ -167,43 +167,43 @@ void Action::Private::updateAction()
default:
case Authority::Unknown:
case Authority::No:
- qobject_cast<QAction *>(parent)->setVisible(noVisible);
- qobject_cast<QAction *>(parent)->setEnabled(noEnabled);
- qobject_cast<QAction *>(parent)->setText(noText);
+ qobject_cast<TQAction *>(parent)->setVisible(noVisible);
+ qobject_cast<TQAction *>(parent)->setEnabled(noEnabled);
+ qobject_cast<TQAction *>(parent)->setText(noText);
if (!noWhatsThis.isNull()) {
- qobject_cast<QAction *>(parent)->setWhatsThis(noWhatsThis);
+ qobject_cast<TQAction *>(parent)->setWhatsThis(noWhatsThis);
}
if (!noToolTip.isNull()) {
- qobject_cast<QAction *>(parent)->setToolTip(noToolTip);
+ qobject_cast<TQAction *>(parent)->setToolTip(noToolTip);
}
- qobject_cast<QAction *>(parent)->setIcon(noIcon);
+ qobject_cast<TQAction *>(parent)->setIcon(noIcon);
break;
case Authority::Challenge:
- qobject_cast<QAction *>(parent)->setVisible(authVisible);
- qobject_cast<QAction *>(parent)->setEnabled(authEnabled);
- qobject_cast<QAction *>(parent)->setText(authText);
+ qobject_cast<TQAction *>(parent)->setVisible(authVisible);
+ qobject_cast<TQAction *>(parent)->setEnabled(authEnabled);
+ qobject_cast<TQAction *>(parent)->setText(authText);
if (!authWhatsThis.isNull()) {
- qobject_cast<QAction *>(parent)->setWhatsThis(authWhatsThis);
+ qobject_cast<TQAction *>(parent)->setWhatsThis(authWhatsThis);
}
if (!authToolTip.isNull()) {
- qobject_cast<QAction *>(parent)->setToolTip(authToolTip);
+ qobject_cast<TQAction *>(parent)->setToolTip(authToolTip);
}
- qobject_cast<QAction *>(parent)->setIcon(authIcon);
+ qobject_cast<TQAction *>(parent)->setIcon(authIcon);
break;
case Authority::Yes:
- qobject_cast<QAction *>(parent)->setVisible(yesVisible);
- qobject_cast<QAction *>(parent)->setEnabled(yesEnabled);
- qobject_cast<QAction *>(parent)->setText(yesText);
+ qobject_cast<TQAction *>(parent)->setVisible(yesVisible);
+ qobject_cast<TQAction *>(parent)->setEnabled(yesEnabled);
+ qobject_cast<TQAction *>(parent)->setText(yesText);
if (!yesWhatsThis.isNull()) {
- qobject_cast<QAction *>(parent)->setWhatsThis(yesWhatsThis);
+ qobject_cast<TQAction *>(parent)->setWhatsThis(yesWhatsThis);
}
if (!yesToolTip.isNull()) {
- qobject_cast<QAction *>(parent)->setToolTip(yesToolTip);
+ qobject_cast<TQAction *>(parent)->setToolTip(yesToolTip);
}
- qobject_cast<QAction *>(parent)->setIcon(yesIcon);
+ qobject_cast<TQAction *>(parent)->setIcon(yesIcon);
if (parent->isCheckable()) {
- qobject_cast<QAction *>(parent)->setChecked(!initiallyChecked);
+ qobject_cast<TQAction *>(parent)->setChecked(!initiallyChecked);
}
break;
}
@@ -237,7 +237,7 @@ qint64 Action::targetPID() const
if (d->targetPID != 0) {
return d->targetPID;
} else {
- return QCoreApplication::applicationPid();
+ return TQCoreApplication::applicationPid();
}
}
@@ -254,7 +254,7 @@ bool Action::isAllowed() const
return d->pkResult == Authority::Yes;
}
-bool Action::is(const QString &other) const
+bool Action::is(const TQString &other) const
{
return d->actionId == other;
}
@@ -264,7 +264,7 @@ void Action::revoke()
/*TODO: implement it? no negative authorizations available, no authorization db*/
}
-void Action::setText(const QString &text, States states)
+void Action::setText(const TQString &text, States states)
{
if (states & All) {
d->selfBlockedText = text;
@@ -284,7 +284,7 @@ void Action::setText(const QString &text, States states)
d->updateAction();
}
-QString Action::text(Action::State state) const
+TQString Action::text(Action::State state) const
{
switch (state) {
case Yes:
@@ -296,13 +296,13 @@ QString Action::text(Action::State state) const
case SelfBlocked:
return d->selfBlockedText;
case None:
- return QAction::text();
+ return TQAction::text();
default:
- return QString();
+ return TQString();
}
}
-void Action::setToolTip(const QString &toolTip, States states)
+void Action::setToolTip(const TQString &toolTip, States states)
{
if (states & All) {
d->selfBlockedToolTip = toolTip;
@@ -322,7 +322,7 @@ void Action::setToolTip(const QString &toolTip, States states)
d->updateAction();
}
-QString Action::toolTip(Action::State state) const
+TQString Action::toolTip(Action::State state) const
{
switch (state) {
case Yes:
@@ -334,13 +334,13 @@ QString Action::toolTip(Action::State state) const
case SelfBlocked:
return d->selfBlockedToolTip;
case None:
- return QAction::toolTip();
+ return TQAction::toolTip();
default:
- return QString();
+ return TQString();
}
}
-void Action::setWhatsThis(const QString &whatsThis, States states)
+void Action::setWhatsThis(const TQString &whatsThis, States states)
{
if (states & All) {
d->selfBlockedWhatsThis = whatsThis;
@@ -360,7 +360,7 @@ void Action::setWhatsThis(const QString &whatsThis, States states)
d->updateAction();
}
-QString Action::whatsThis(Action::State state) const
+TQString Action::whatsThis(Action::State state) const
{
switch (state) {
case Yes:
@@ -372,13 +372,13 @@ QString Action::whatsThis(Action::State state) const
case SelfBlocked:
return d->selfBlockedWhatsThis;
case None:
- return QAction::whatsThis();
+ return TQAction::whatsThis();
default:
- return QString();
+ return TQString();
}
}
-void Action::setIcon(const QIcon &icon, States states)
+void Action::setIcon(const TQIcon &icon, States states)
{
if (states & All) {
d->selfBlockedIcon = icon;
@@ -398,7 +398,7 @@ void Action::setIcon(const QIcon &icon, States states)
d->updateAction();
}
-QIcon Action::icon(Action::State state) const
+TQIcon Action::icon(Action::State state) const
{
switch (state) {
case Yes:
@@ -410,9 +410,9 @@ QIcon Action::icon(Action::State state) const
case SelfBlocked:
return d->selfBlockedIcon;
case None:
- return QAction::icon();
+ return TQAction::icon();
default:
- return QIcon();
+ return TQIcon();
}
}
@@ -448,7 +448,7 @@ bool Action::isEnabled(Action::State state) const
case SelfBlocked:
return d->selfBlockedEnabled;
case None:
- return QAction::isEnabled();
+ return TQAction::isEnabled();
default:
return false;
}
@@ -486,13 +486,13 @@ bool Action::isVisible(Action::State state) const
case SelfBlocked:
return d->selfBlockedVisible;
case None:
- return QAction::isVisible();
+ return TQAction::isVisible();
default:
return false;
}
}
-void Action::setPolkitAction(const QString &actionId)
+void Action::setPolkitAction(const TQString &actionId)
{
//TODO:
d->actionId = actionId;
@@ -503,7 +503,7 @@ void Action::setPolkitAction(const QString &actionId)
//--------------------------------------------------
-QString Action::actionId() const
+TQString Action::actionId() const
{
return d->actionId;
}
diff --git a/gui/polkitqt1-gui-action.h b/gui/polkitqt1-gui-action.h
index fed4cdc12..0b8763e8d 100644
--- a/gui/polkitqt1-gui-action.h
+++ b/gui/polkitqt1-gui-action.h
@@ -24,9 +24,9 @@
#include "polkitqt1-export.h"
-#include <QtGui/QAction>
+#include <TQtGui/TQAction>
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Gui
@@ -44,16 +44,16 @@ namespace Gui
* given action.
*
* Most of the times, you would want to use this class combined
- * with a QAbstractButton. In this case, you can use the more
+ * with a TQAbstractButton. In this case, you can use the more
* comfortable ActionButton class that manages button's properties
* update for you.
*
* \see ActionButton
*/
-class POLKITQT1_EXPORT Action : public QAction
+class POLKITQT1_EXPORT Action : public TQAction
{
Q_OBJECT
- Q_DISABLE_COPY(Action)
+ TQ_DISABLE_COPY(Action)
public:
enum State {
@@ -77,7 +77,7 @@ public:
* \param actionId the PolicyKit action Id (e.g.: org.freedesktop.policykit.read)
* \param parent the object parent
*/
- explicit Action(const QString &actionId = QString(), QObject *parent = 0);
+ explicit Action(const TQString &actionId = TQString(), TQObject *parent = 0);
~Action();
Q_SIGNALS:
@@ -134,7 +134,7 @@ public:
*
* \param actionId The new action ID
*/
- void setPolkitAction(const QString &actionId);
+ void setPolkitAction(const TQString &actionId);
/**
* Returns the current action ID.
@@ -142,7 +142,7 @@ public:
* \return The action ID
*
*/
- QString actionId() const;
+ TQString actionId() const;
/**
* Sets the text for the current action. This will
@@ -151,7 +151,7 @@ public:
* \param states the states of the Polkit action on which the setting
* will be applied
*/
- void setText(const QString &text, States states = All);
+ void setText(const TQString &text, States states = All);
/**
* Sets the tooltip for the current action. This will
@@ -160,7 +160,7 @@ public:
* \param states the states of the Polkit action on which the setting
* will be applied
*/
- void setToolTip(const QString &toolTip, States states = All);
+ void setToolTip(const TQString &toolTip, States states = All);
/**
* Sets the whatsthis for the current action. This will
@@ -169,18 +169,18 @@ public:
* \param states the states of the Polkit action on which the setting
* will be applied
*/
- void setWhatsThis(const QString &whatsThis, States states = All);
+ void setWhatsThis(const TQString &whatsThis, States states = All);
/**
* Sets the icon for the current action. This will
* be shown only in the states specified in the \c states parameter.
- * \note You need to pass a QIcon here. You can easily
+ * \note You need to pass a TQIcon here. You can easily
* create one from a Pixmap, or pass a KIcon
* \param icon the new icon for the action
* \param states the states of the Polkit action on which the setting
* will be applied
*/
- void setIcon(const QIcon &icon, States states = All);
+ void setIcon(const TQIcon &icon, States states = All);
/**
* Sets whether the current action is visible or not. This will
@@ -216,7 +216,7 @@ public:
* \param state The state to be checked
* \returns The text shown when the action is in the specified state
*/
- QString text(State state = None) const;
+ TQString text(State state = None) const;
/**
* Gets the tooltip of the action when it is in the specified state
@@ -225,7 +225,7 @@ public:
* \param state The state to be checked
* \returns The tooltip shown when the action is in the specified state
*/
- QString toolTip(State state = None) const;
+ TQString toolTip(State state = None) const;
/**
* Gets the whatsThis of the action when it is in the specified state
@@ -233,7 +233,7 @@ public:
* \param state The state to be checked
* \returns The whatsThis shown when the action is in the specified state
*/
- QString whatsThis(State state = None) const;
+ TQString whatsThis(State state = None) const;
/**
* Gets the icon of the action when it is in the specified state
@@ -242,7 +242,7 @@ public:
* \param state The state to be checked
* \returns The icon shown when the action is in the specified state
*/
- QIcon icon(State state = None) const;
+ TQIcon icon(State state = None) const;
/**
* Gets whether the action is visible or not when it is in the specified state
@@ -286,7 +286,7 @@ public:
*
* \return \c true if the actionId is the same as this object's one
*/
- bool is(const QString &actionId) const;
+ bool is(const TQString &actionId) const;
private:
class Private;
@@ -299,6 +299,6 @@ private:
}
-Q_DECLARE_OPERATORS_FOR_FLAGS(PolkitQt1::Gui::Action::States)
+Q_DECLARE_OPERATORS_FOR_FLAGS(PolkitTQt1::Gui::Action::States)
#endif
diff --git a/gui/polkitqt1-gui-actionbutton.cpp b/gui/polkitqt1-gui-actionbutton.cpp
index a9963dcb9..fefb831cf 100644
--- a/gui/polkitqt1-gui-actionbutton.cpp
+++ b/gui/polkitqt1-gui-actionbutton.cpp
@@ -23,15 +23,15 @@
#include "polkitqt1-gui-actionbutton_p.h"
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Gui
{
-ActionButton::ActionButton(QAbstractButton *button, const QString &actionId, QObject *parent)
+ActionButton::ActionButton(TQAbstractButton *button, const TQString &actionId, TQObject *parent)
: Action(actionId, parent)
- , d_ptr(new ActionButtonPrivate(QList<QAbstractButton *>() << button))
+ , d_ptr(new ActionButtonPrivate(TQList<TQAbstractButton *>() << button))
{
d_ptr->q_ptr = this;
@@ -39,7 +39,7 @@ ActionButton::ActionButton(QAbstractButton *button, const QString &actionId, QOb
connect(this, SIGNAL(dataChanged()), SLOT(updateButton()));
}
-ActionButton::ActionButton(ActionButtonPrivate &dd, const QString &actionId, QObject *parent)
+ActionButton::ActionButton(ActionButtonPrivate &dd, const TQString &actionId, TQObject *parent)
: Action(actionId, parent)
, d_ptr(&dd)
{
@@ -57,7 +57,7 @@ void ActionButtonPrivate::updateButton()
{
Q_Q(ActionButton);
- Q_FOREACH(QAbstractButton *ent, buttons) {
+ Q_FOREACH(TQAbstractButton *ent, buttons) {
ent->setVisible(q->isVisible());
ent->setEnabled(q->isEnabled());
ent->setText(q->text());
@@ -81,7 +81,7 @@ bool ActionButton::activate()
Q_D(ActionButton);
bool tg = false;
- Q_FOREACH(QAbstractButton *ent, d->buttons) {
+ Q_FOREACH(TQAbstractButton *ent, d->buttons) {
if (ent->isCheckable()) {
// we set the the current Action state
ent->setChecked(isChecked());
@@ -97,12 +97,12 @@ bool ActionButton::activate()
return Action::activate();
}
-void ActionButton::setButton(QAbstractButton *button)
+void ActionButton::setButton(TQAbstractButton *button)
{
Q_D(ActionButton);
// First, let's clear the list
- Q_FOREACH(QAbstractButton *ent, d->buttons) {
+ Q_FOREACH(TQAbstractButton *ent, d->buttons) {
d->removeButton(ent);
}
@@ -110,21 +110,21 @@ void ActionButton::setButton(QAbstractButton *button)
d->addButton(button);
}
-void ActionButtonPrivate::addButton(QAbstractButton *button)
+void ActionButtonPrivate::addButton(TQAbstractButton *button)
{
Q_Q(ActionButton);
buttons.append(button);
- QObject::connect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool)));
- QObject::connect(q, SIGNAL(toggled(bool)), button, SLOT(toggle()));
+ TQObject::connect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool)));
+ TQObject::connect(q, SIGNAL(toggled(bool)), button, SLOT(toggle()));
if (q->isCheckable()) {
// the button should follow our first buttons
button->setCheckable(true);
} else if (button->isCheckable()) {
// if we are not checkable BUT the button
- // is (eg a QCheckBox) we should set all buttons to
+ // is (eg a TQCheckBox) we should set all buttons to
// checkable.
- Q_FOREACH(QAbstractButton *ent, buttons) {
+ Q_FOREACH(TQAbstractButton *ent, buttons) {
ent->setCheckable(true);
}
// set the checkable state of Action to store the initial state
@@ -134,18 +134,18 @@ void ActionButtonPrivate::addButton(QAbstractButton *button)
updateButton();
}
-void ActionButtonPrivate::removeButton(QAbstractButton *button)
+void ActionButtonPrivate::removeButton(TQAbstractButton *button)
{
Q_Q(ActionButton);
if (buttons.contains(button)) {
- QObject::disconnect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool)));
- QObject::disconnect(q, SIGNAL(toggled(bool)), button, SLOT(toggle()));
+ TQObject::disconnect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool)));
+ TQObject::disconnect(q, SIGNAL(toggled(bool)), button, SLOT(toggle()));
buttons.removeOne(button);
}
}
-QAbstractButton *ActionButton::button() const
+TQAbstractButton *ActionButton::button() const
{
Q_D(const ActionButton);
@@ -156,7 +156,7 @@ void ActionButtonPrivate::streamClicked(bool c)
{
Q_Q(ActionButton);
- Q_EMIT q->clicked(qobject_cast<QAbstractButton *>(q->sender()), c);
+ Q_EMIT q->clicked(qobject_cast<TQAbstractButton *>(q->sender()), c);
}
}
diff --git a/gui/polkitqt1-gui-actionbutton.h b/gui/polkitqt1-gui-actionbutton.h
index 23f1783b0..67fdba347 100644
--- a/gui/polkitqt1-gui-actionbutton.h
+++ b/gui/polkitqt1-gui-actionbutton.h
@@ -25,9 +25,9 @@
#include "polkitqt1-export.h"
#include "polkitqt1-gui-action.h"
-class QAbstractButton;
+class TQAbstractButton;
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Gui
@@ -39,10 +39,10 @@ class ActionButtonPrivate;
* \author Daniel Nicoletti <dantti85-pk@yahoo.com.br>
* \author Dario Freddi <drf@kde.org>
*
- * \brief Class used to hold and update a QAbstractButton
+ * \brief Class used to hold and update a TQAbstractButton
*
- * This class allows you to associate QAbstractButtons
- * (i.e. QPushButton) to a PolicyKit Action. It will update the
+ * This class allows you to associate TQAbstractButtons
+ * (i.e. TQPushButton) to a PolicyKit Action. It will update the
* button properties according to the PolicyKit Action automatically.
*
* \note You should connect the activated() signal to receive
@@ -54,23 +54,23 @@ class POLKITQT1_EXPORT ActionButton : public Action
{
Q_OBJECT
Q_DECLARE_PRIVATE(ActionButton)
- Q_DISABLE_COPY(ActionButton)
+ TQ_DISABLE_COPY(ActionButton)
public:
/**
* Constructs a new ActionButton. You need to pass this
- * constructor an existing QAbstractButton, whose properties
+ * constructor an existing TQAbstractButton, whose properties
* will be modified according to the underlying Action
* object. As ActionButton inherits from Action, you can
* define your button's behavior right through this wrapper.
*
* \see Action
*
- * \param button the QAbstractButton to associate to this ActionButton
+ * \param button the TQAbstractButton to associate to this ActionButton
* \param actionId the action Id to create the underlying Action
* \param parent the parent object
*/
- explicit ActionButton(QAbstractButton *button, const QString &actionId = QString(), QObject *parent = 0);
+ explicit ActionButton(TQAbstractButton *button, const TQString &actionId = TQString(), TQObject *parent = 0);
virtual ~ActionButton();
/**
@@ -78,7 +78,7 @@ public:
*
* \note If you are calling this function, you're probably
* changing the button the action is referring to. If this
- * is the case, please note that Polkit-Qt does not handle
+ * is the case, please note that Polkit-TQt does not handle
* the previous button's memory, so you should take care of
* deleting it yourself (if needed). You can retrieve it by
* using button()
@@ -87,14 +87,14 @@ public:
*
* \param button the new button associated with the underlying action
*/
- void setButton(QAbstractButton *button);
+ void setButton(TQAbstractButton *button);
/**
* Returns the current button
*
* \return the button currently associated with the underlying action
*/
- QAbstractButton *button() const;
+ TQAbstractButton *button() const;
public Q_SLOTS:
/**
@@ -126,10 +126,10 @@ Q_SIGNALS:
* \param checked the checked state, if applicable. Otherwise \c false
*
*/
- void clicked(QAbstractButton *button, bool checked = false);
+ void clicked(TQAbstractButton *button, bool checked = false);
protected:
- ActionButton(ActionButtonPrivate &dd, const QString &actionId, QObject *parent = 0);
+ ActionButton(ActionButtonPrivate &dd, const TQString &actionId, TQObject *parent = 0);
ActionButtonPrivate * const d_ptr;
diff --git a/gui/polkitqt1-gui-actionbutton_p.h b/gui/polkitqt1-gui-actionbutton_p.h
index 1f072b1e7..fce14de64 100644
--- a/gui/polkitqt1-gui-actionbutton_p.h
+++ b/gui/polkitqt1-gui-actionbutton_p.h
@@ -23,28 +23,28 @@
#include <polkitqt1-gui-actionbutton.h>
-#include <QtCore/QList>
-#include <QtGui/QAbstractButton>
+#include <TQtCore/TQList>
+#include <TQtGui/TQAbstractButton>
/**
* \internal
*/
-class PolkitQt1::Gui::ActionButtonPrivate
+class PolkitTQt1::Gui::ActionButtonPrivate
{
public:
- ActionButtonPrivate(const QList<QAbstractButton *> &b)
+ ActionButtonPrivate(const TQList<TQAbstractButton *> &b)
: buttons(b) {}
virtual ~ActionButtonPrivate() {}
- void addButton(QAbstractButton *button);
- void removeButton(QAbstractButton *button);
+ void addButton(TQAbstractButton *button);
+ void removeButton(TQAbstractButton *button);
void updateButton();
void streamClicked(bool);
Q_DECLARE_PUBLIC(ActionButton)
ActionButton *q_ptr;
- QList<QAbstractButton *> buttons;
+ TQList<TQAbstractButton *> buttons;
};
#endif /* ACTIONBUTTON_P_H */
diff --git a/gui/polkitqt1-gui-actionbuttons.cpp b/gui/polkitqt1-gui-actionbuttons.cpp
index 242d41f71..125c0959f 100644
--- a/gui/polkitqt1-gui-actionbuttons.cpp
+++ b/gui/polkitqt1-gui-actionbuttons.cpp
@@ -22,13 +22,13 @@
#include "polkitqt1-gui-actionbuttons_p.h"
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Gui
{
-ActionButtons::ActionButtons(const QList<QAbstractButton *> &buttons, const QString &actionId, QObject *parent)
+ActionButtons::ActionButtons(const TQList<TQAbstractButton *> &buttons, const TQString &actionId, TQObject *parent)
: ActionButton(*new ActionButtonsPrivate(buttons), actionId, parent)
{
setButtons(buttons);
@@ -38,28 +38,28 @@ ActionButtons::~ActionButtons()
{
}
-void ActionButtons::setButtons(const QList<QAbstractButton *> &buttons)
+void ActionButtons::setButtons(const TQList<TQAbstractButton *> &buttons)
{
- Q_FOREACH(QAbstractButton *ent, buttons) {
+ Q_FOREACH(TQAbstractButton *ent, buttons) {
addButton(ent);
}
}
-QList<QAbstractButton *> ActionButtons::buttons() const
+TQList<TQAbstractButton *> ActionButtons::buttons() const
{
Q_D(const ActionButtons);
return d->buttons;
}
-void ActionButtons::addButton(QAbstractButton *button)
+void ActionButtons::addButton(TQAbstractButton *button)
{
Q_D(ActionButtons);
d->addButton(button);
}
-void ActionButtons::removeButton(QAbstractButton *button)
+void ActionButtons::removeButton(TQAbstractButton *button)
{
Q_D(ActionButtons);
diff --git a/gui/polkitqt1-gui-actionbuttons.h b/gui/polkitqt1-gui-actionbuttons.h
index b02ddb902..4e5988fd0 100644
--- a/gui/polkitqt1-gui-actionbuttons.h
+++ b/gui/polkitqt1-gui-actionbuttons.h
@@ -23,7 +23,7 @@
#include "polkitqt1-gui-actionbutton.h"
-namespace PolkitQt1
+namespace PolkitTQt1
{
namespace Gui
@@ -34,10 +34,10 @@ class ActionButtonsPrivate;
* \class ActionButtons polkitqt1-gui-actionbuttons.h ActionButtons
* \author Dario Freddi <drf@kde.org>
*
- * \brief Class used to hold and update a list of QAbstractButtons
+ * \brief Class used to hold and update a list of TQAbstractButtons
*
* This class is a convenience wrapper around ActionButton that lets
- * you associate an undefined number of QAbstractButtons with a single
+ * you associate an undefined number of TQAbstractButtons with a single
* action. Every button will be updated accordingly upon action's properties
* changes.
*
@@ -47,23 +47,23 @@ class ActionButtons : public ActionButton
{
Q_OBJECT
Q_DECLARE_PRIVATE(ActionButtons)
- Q_DISABLE_COPY(ActionButtons)
+ TQ_DISABLE_COPY(ActionButtons)
public:
/**
* Constructs a new ActionButton. You need to pass this
- * constructor an existing list of QAbstractButtons, whose properties
+ * constructor an existing list of TQAbstractButtons, whose properties
* will be modified according to the underlying Action
* object. As ActionButtons inherits from Action, you can
* define your buttons' behavior right through this wrapper.
*
* \see Action
*
- * \param buttons the QAbstractButton to associate to this ActionButton
+ * \param buttons the TQAbstractButton to associate to this ActionButton
* \param actionId the action Id to create the underlying Action
* \param parent the parent object
*/
- explicit ActionButtons(const QList<QAbstractButton *> &buttons, const QString &actionId = QString(), QObject *parent = 0);
+ explicit ActionButtons(const TQList<TQAbstractButton *> &buttons, const TQString &actionId = TQString(), TQObject *parent = 0);
virtual ~ActionButtons();
/**
@@ -71,7 +71,7 @@ public:
*
* \note If you are calling this function, you're probably
* changing the buttons list the action is referring to. If this
- * is the case, please note that Polkit-Qt does not handle
+ * is the case, please note that Polkit-TQt does not handle
* the previous buttons' memory, so you should take care of
* deleting them yourself (if needed). You can retrieve it by
* using buttons()
@@ -80,14 +80,14 @@ public:
*
* \param buttons the new buttons associated with the underlying action
*/
- void setButtons(const QList<QAbstractButton *> &buttons);
+ void setButtons(const TQList<TQAbstractButton *> &buttons);
/**
* Returns the current buttons list
*
* \return the buttons currently associated with the underlying action
*/
- QList<QAbstractButton *> buttons() const;
+ TQList<TQAbstractButton *> buttons() const;
/**
* Adds a button to the current button list. The button's properties
@@ -95,16 +95,16 @@ public:
*
* \param button the button to add
*/
- void addButton(QAbstractButton *button);
+ void addButton(TQAbstractButton *button);
/**
- * Removes a button from the current list. Please note that Polkit-Qt
+ * Removes a button from the current list. Please note that Polkit-TQt
* does not handle the removed button's memory, so you should take care of
* deleting it yourself (if needed).
*
* \param button the button to remove
*/
- void removeButton(QAbstractButton *button);
+ void removeButton(TQAbstractButton *button);
};
}
diff --git a/gui/polkitqt1-gui-actionbuttons_p.h b/gui/polkitqt1-gui-actionbuttons_p.h
index c334d301c..b6b8518f4 100644
--- a/gui/polkitqt1-gui-actionbuttons_p.h
+++ b/gui/polkitqt1-gui-actionbuttons_p.h
@@ -26,10 +26,10 @@
/**
* \internal
*/
-class PolkitQt1::Gui::ActionButtonsPrivate : public ActionButtonPrivate
+class PolkitTQt1::Gui::ActionButtonsPrivate : public ActionButtonPrivate
{
public:
- ActionButtonsPrivate(const QList<QAbstractButton *> &b)
+ ActionButtonsPrivate(const TQList<TQAbstractButton *> &b)
: ActionButtonPrivate(b) {}
};
diff --git a/polkit-qt-1.pc.cmake b/polkit-qt-1.pc.cmake
index 0d7bd0808..8daa5b193 100644
--- a/polkit-qt-1.pc.cmake
+++ b/polkit-qt-1.pc.cmake
@@ -4,7 +4,7 @@ libdir=@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/include
Name: polkit-qt-1
-Description: Convenience library for using polkit with a Qt-styled API
+Description: Convenience library for using polkit with a TQt-styled API
Version: @POLKITQT-1_VERSION_STRING@
Requires: polkit-qt-core-1 polkit-qt-gui-1 polkit-qt-agent-1
Libs: -L${libdir} -lpolkit-qt-core-1 -lpolkit-qt-gui-1 -lpolkit-qt-agent-1
diff --git a/polkit-qt-agent-1.pc.cmake b/polkit-qt-agent-1.pc.cmake
index 09f932348..5e794b973 100644
--- a/polkit-qt-agent-1.pc.cmake
+++ b/polkit-qt-agent-1.pc.cmake
@@ -4,8 +4,8 @@ libdir=@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/include
Name: polkit-qt-agent-1
-Description: Convenience library for using polkit Agent with a Qt-styled API
+Description: Convenience library for using polkit Agent with a TQt-styled API
Version: @POLKITQT-1_VERSION_STRING@
-Requires: QtCore QtGui
+Requires: TQtCore TQtGui
Libs: -L${libdir} -lpolkit-qt-agent-1
Cflags: -I${includedir}
diff --git a/polkit-qt-core-1.pc.cmake b/polkit-qt-core-1.pc.cmake
index f553b7b69..de469b286 100644
--- a/polkit-qt-core-1.pc.cmake
+++ b/polkit-qt-core-1.pc.cmake
@@ -4,8 +4,8 @@ libdir=@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/include
Name: polkit-qt-core-1
-Description: Convenience library for using polkit with a Qt-styled API, non-GUI classes
+Description: Convenience library for using polkit with a TQt-styled API, non-GUI classes
Version: @POLKITQT-1_VERSION_STRING@
-Requires: QtCore
+Requires: TQtCore
Libs: -L${libdir} -lpolkit-qt-core-1
Cflags: -I${includedir}
diff --git a/polkit-qt-gui-1.pc.cmake b/polkit-qt-gui-1.pc.cmake
index 83d4e9a39..60e0a3f73 100644
--- a/polkit-qt-gui-1.pc.cmake
+++ b/polkit-qt-gui-1.pc.cmake
@@ -4,8 +4,8 @@ libdir=@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/include
Name: polkit-qt-gui-1
-Description: Convenience library for using polkit with a Qt-styled API, GUI classes
+Description: Convenience library for using polkit with a TQt-styled API, GUI classes
Version: @POLKITQT-1_VERSION_STRING@
-Requires: QtCore QtGui polkit-qt-core-1
+Requires: TQtCore TQtGui polkit-qt-core-1
Libs: -L${libdir} -lpolkit-qt-gui-1
Cflags: -I${includedir}
diff --git a/polkitqt1-export.h b/polkitqt1-export.h
index c3d8fc1f2..4885e827b 100644
--- a/polkitqt1-export.h
+++ b/polkitqt1-export.h
@@ -28,7 +28,7 @@
This file contains macros needed for exporting/importing symbols
*/
-#include <QtCore/QtGlobal>
+#include <TQtCore/TQtGlobal>
#ifndef POLKITQT1_EXPORT
# if defined(MAKE_POLKITQT1_LIB)
diff --git a/polkitqt1-version.h.cmake b/polkitqt1-version.h.cmake
index e2ca5d211..eaab33071 100644
--- a/polkitqt1-version.h.cmake
+++ b/polkitqt1-version.h.cmake
@@ -23,82 +23,82 @@
#include "polkitqt1-export.h"
-/// @brief PolkitQt-1 version as string at compile time.
+/// @brief PolkitTQt-1 version as string at compile time.
#define POLKITQT1_VERSION_STRING "${POLKITQT-1_VERSION_STRING}"
-/// @brief The major PolkitQt-1 version number at compile time
+/// @brief The major PolkitTQt-1 version number at compile time
#define POLKITQT1_VERSION_MAJOR ${POLKITQT-1_VERSION_MAJOR}
-/// @brief The minor PolkitQt-1 version number at compile time
+/// @brief The minor PolkitTQt-1 version number at compile time
#define POLKITQT1_VERSION_MINOR ${POLKITQT-1_VERSION_MINOR}
-/// @brief The PolkitQt-1 patch version number at compile time
+/// @brief The PolkitTQt-1 patch version number at compile time
#define POLKITQT1_VERSION_PATCH ${POLKITQT-1_VERSION_PATCH}
/**
- * \brief Create a unique number from the major, minor and release number of a %PolkitQt-1 version
+ * \brief Create a unique number from the major, minor and release number of a %PolkitTQt-1 version
*
* This function can be used for preprocessing. For version information at runtime
- * use the version methods in the PolkitQt-1 namespace.
+ * use the version methods in the PolkitTQt-1 namespace.
*/
#define POLKITQT1_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
/**
- * \brief %PolkitQt-1 Version as a unique number at compile time
+ * \brief %PolkitTQt-1 Version as a unique number at compile time
*
- * This macro calculates the %PolkitQt-1 version into a number. It is mainly used
+ * This macro calculates the %PolkitTQt-1 version into a number. It is mainly used
* through POLKITQT1_IS_VERSION in preprocessing. For version information at runtime
- * use the version methods in the PolkitQt-1 namespace.
+ * use the version methods in the PolkitTQt-1 namespace.
*/
#define POLKITQT1_VERSION \
POLKITQT1_MAKE_VERSION(POLKITQT1_VERSION_MAJOR,POLKITQT1_VERSION_MINOR,POLKITQT1_VERSION_PATCH)
/**
- * \brief Check if the %PolkitQt-1 version matches a certain version or is higher
+ * \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 POLKITQT1_IS_VERSION(2,1)
- * // Code for PolkitQt-1 2.1
+ * // Code for PolkitTQt-1 2.1
* #else
- * // Code for PolkitQt-1 2.0
+ * // Code for PolkitTQt-1 2.0
* #endif
* \endcode
*
* For version information at runtime
- * use the version methods in the PolkitQt-1 namespace.
+ * use the version methods in the PolkitTQt-1 namespace.
*/
#define POLKITQT1_IS_VERSION(a,b,c) ( POLKITQT1_VERSION >= POLKITQT1_MAKE_VERSION(a,b,c) )
-namespace PolkitQt1 {
+namespace PolkitTQt1 {
/**
- * @brief Returns the major number of PolkitQt-1's version, e.g.
- * 1 for %PolkitQt-1 1.0.2.
+ * @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.
*/
POLKITQT1_EXPORT unsigned int versionMajor();
/**
- * @brief Returns the minor number of PolkitQt-1's version, e.g.
- * 0 for %PolkitQt-1 1.0.2.
+ * @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.
*/
POLKITQT1_EXPORT unsigned int versionMinor();
/**
- * @brief Returns the patch number of PolkitQt-1's version, e.g.
- * 2 for %PolkitQt-1 1.0.2.
+ * @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.
*/
POLKITQT1_EXPORT unsigned int versionPatch();
/**
- * @brief Returns the %PolkitQt-1 version as string, e.g. "1.0.2".
+ * @brief Returns the %PolkitTQt-1 version as string, e.g. "1.0.2".
*
* On contrary to the macro POLKITQT1_VERSION_STRING this function returns
- * the version number of PolkitQt-1 at runtime.
- * @return the %PolkitQt-1 version. You can keep the string forever
+ * the version number of PolkitTQt-1 at runtime.
+ * @return the %PolkitTQt-1 version. You can keep the string forever
*/
POLKITQT1_EXPORT const char* versionString();
}
diff --git a/test/test.cpp b/test/test.cpp
index afb7f6433..6112dc4f5 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -7,48 +7,48 @@
#include <stdlib.h>
#include <unistd.h>
#include <pwd.h>
-#include <QtDBus/QDBusMessage>
-#include <QtDBus/QDBusConnection>
-using namespace PolkitQt1;
-using namespace PolkitQt1::Agent;
+#include <TQtDBus/TQDBusMessage>
+#include <TQtDBus/TQDBusConnection>
+using namespace PolkitTQt1;
+using namespace PolkitTQt1::Agent;
void wait()
{
for (int i = 0; i < 100; i++) {
usleep(100);
- QCoreApplication::processEvents();
+ TQCoreApplication::processEvents();
}
}
void TestAuth::test_Auth_checkAuthorization()
{
// This needs the file org.qt.policykit.examples.policy from examples to be installed
- UnixProcessSubject process(QCoreApplication::applicationPid());
+ UnixProcessSubject process(TQCoreApplication::applicationPid());
Authority::Result result;
// Check if this method returns good authorization results
Authority *authority = Authority::instance();
result = authority->checkAuthorizationSync("org.qt.policykit.examples.kick", process, Authority::None);
- QCOMPARE(result, Authority::No);
- QVERIFY(!authority->hasError());
+ TQCOMPARE(result, Authority::No);
+ TQVERIFY(!authority->hasError());
result = authority->checkAuthorizationSync("org.qt.policykit.examples.cry", process, Authority::None);
- QCOMPARE(result, Authority::Yes);
- QVERIFY(!authority->hasError());
+ TQCOMPARE(result, Authority::Yes);
+ TQVERIFY(!authority->hasError());
result = authority->checkAuthorizationSync("org.qt.policykit.examples.bleed", process, Authority::None);
- QCOMPARE(result, Authority::Challenge);
- QVERIFY(!authority->hasError());
+ TQCOMPARE(result, Authority::Challenge);
+ TQVERIFY(!authority->hasError());
// Now we try async methods
- QSignalSpy spy(authority, SIGNAL(checkAuthorizationFinished(PolkitQt1::Authority::Result)));
+ TQSignalSpy spy(authority, SIGNAL(checkAuthorizationFinished(PolkitTQt1::Authority::Result)));
// Call asynchronous checkAuthorization
authority->checkAuthorization("org.qt.policykit.examples.kick", process, Authority::None);
// Give the polkit time to obtain the result and emit the signal with it
wait();
// Test if the signal was emitted
- QCOMPARE(spy.count(), 1);
+ TQCOMPARE(spy.count(), 1);
// Test the result
- result = qVariantValue<PolkitQt1::Authority::Result> (spy.takeFirst()[0]);
- QCOMPARE(result, Authority::No);
- QVERIFY(!authority->hasError());
+ result = qVariantValue<PolkitTQt1::Authority::Result> (spy.takeFirst()[0]);
+ TQCOMPARE(result, Authority::No);
+ TQVERIFY(!authority->hasError());
spy.clear();
// Let's test the cancellability
@@ -56,7 +56,7 @@ void TestAuth::test_Auth_checkAuthorization()
authority->checkAuthorizationCancel();
// Wait and check if the signal arrieved
wait();
- QCOMPARE(spy.count(), 0);
+ TQCOMPARE(spy.count(), 0);
// Check if it can cancel user authentication dialog
authority->checkAuthorization("org.qt.policykit.examples.bleed", process, Authority::AllowUserInteraction);
@@ -64,16 +64,16 @@ void TestAuth::test_Auth_checkAuthorization()
sleep(1);
// And now kill it
authority->checkAuthorizationCancel();
- QVERIFY(!authority->hasError());
+ TQVERIFY(!authority->hasError());
// But how to test if it was successful?
- qWarning() << "You should see an authentication dialog for a short period.";
+ tqWarning() << "You should see an authentication dialog for a short period.";
}
void TestAuth::test_Auth_enumerateActions()
{
// This needs the file org.qt.policykit.examples.policy from examples to be installed
ActionDescription::List list = Authority::instance()->enumerateActionsSync();
- QVERIFY(!Authority::instance()->hasError());
+ TQVERIFY(!Authority::instance()->hasError());
// Check whether enumerateAction returns at least example actions
int count = 0;
Q_FOREACH(const ActionDescription &ad, list) {
@@ -82,91 +82,91 @@ void TestAuth::test_Auth_enumerateActions()
(ad.actionId() == "org.qt.policykit.examples.bleed"))
count++;
}
- QCOMPARE(count, 3);
+ TQCOMPARE(count, 3);
// Test asynchronous version as well
list.clear();
count = 0;
- QSignalSpy spy(Authority::instance(), SIGNAL(enumerateActionsFinished(PolkitQt1::ActionDescription::List)));
+ TQSignalSpy spy(Authority::instance(), SIGNAL(enumerateActionsFinished(PolkitTQt1::ActionDescription::List)));
Authority::instance()->enumerateActions();
wait();
- QCOMPARE(spy.count(), 1);
- list = qVariantValue<PolkitQt1::ActionDescription::List> (spy.takeFirst()[0]);
- QVERIFY(!Authority::instance()->hasError());
+ TQCOMPARE(spy.count(), 1);
+ list = qVariantValue<PolkitTQt1::ActionDescription::List> (spy.takeFirst()[0]);
+ TQVERIFY(!Authority::instance()->hasError());
Q_FOREACH(const ActionDescription &ad, list) {
if ((ad.actionId() == "org.qt.policykit.examples.kick") ||
(ad.actionId() == "org.qt.policykit.examples.cry") ||
(ad.actionId() == "org.qt.policykit.examples.bleed"))
count++;
}
- QCOMPARE(count, 3);
+ TQCOMPARE(count, 3);
// Test cancelling the enumeration
spy.clear();
Authority::instance()->enumerateActions();
Authority::instance()->enumerateActionsCancel();
wait();
- QCOMPARE(spy.count(), 0);
- QVERIFY(!Authority::instance()->hasError());
+ TQCOMPARE(spy.count(), 0);
+ TQVERIFY(!Authority::instance()->hasError());
}
void TestAuth::test_Identity()
{
// Get real name and id of current user and group
struct passwd *userinfo = getpwuid(getuid());
- QString userName = userinfo->pw_name;
+ TQString userName = userinfo->pw_name;
unsigned int userId = userinfo->pw_uid;
unsigned int groupId = userinfo->pw_gid;
// Try to create UnixUser from username
UnixUserIdentity user(userName);
- QVERIFY(user.identity());
+ TQVERIFY(user.identity());
// Create generic Identity from UnixUser via string representation
Identity id = Identity::fromString(user.toString());
// Compare obtained uid with real uid
- QCOMPARE(id.toUnixUserIdentity().uid(), userId);
+ TQCOMPARE(id.toUnixUserIdentity().uid(), userId);
// Create generic Identity from UnixGroup via string representation
UnixGroupIdentity group(groupId);
- QVERIFY(group.identity());
+ TQVERIFY(group.identity());
id = Identity::fromString(group.toString());
- QCOMPARE(id.toUnixGroupIdentity().gid(), groupId);
+ TQCOMPARE(id.toUnixGroupIdentity().gid(), groupId);
// Test setting gid to another value
group.setGid(9999U);
id = Identity::fromString(group.toString());
- QCOMPARE(id.toUnixGroupIdentity().gid(), 9999U);
+ TQCOMPARE(id.toUnixGroupIdentity().gid(), 9999U);
}
void TestAuth::test_Authority()
{
Authority *authority = Authority::instance();
- QVERIFY(authority);
- QVERIFY(!authority->hasError());
+ TQVERIFY(authority);
+ TQVERIFY(!authority->hasError());
// Verify emiting of the signals
- QSignalSpy spy(authority, SIGNAL(consoleKitDBChanged()));
- QDBusMessage msg = QDBusMessage::createMethodCall("org.freedesktop.ConsoleKit",
+ TQSignalSpy spy(authority, SIGNAL(consoleKitDBChanged()));
+ TQDBusMessage msg = TQDBusMessage::createMethodCall("org.freedesktop.ConsoleKit",
"/org/freedesktop/ConsoleKit/Manager",
"org.freedesktop.ConsoleKit.Manager",
"OpenSession");
- QDBusMessage reply = QDBusConnection::systemBus().call(msg);
- QString cookie;
- cookie = qVariantValue<QString> (reply.arguments()[0]);
+ TQDBusMessage reply = TQDBusConnection::systemBus().call(msg);
+ TQString cookie;
+ cookie = qVariantValue<TQString> (reply.arguments()[0]);
- msg = QDBusMessage::createMethodCall("org.freedesktop.ConsoleKit",
+ msg = TQDBusMessage::createMethodCall("org.freedesktop.ConsoleKit",
"/org/freedesktop/ConsoleKit/Manager",
"org.freedesktop.ConsoleKit.Manager",
"CloseSession");
- msg.setArguments(QList<QVariant> () << cookie);
- QDBusConnection::systemBus().call(msg);
+ msg.setArguments(TQList<TQVariant> () << cookie);
+ TQDBusConnection::systemBus().call(msg);
// FIXME: Emitting consoleKitDBChanged is not working now
- qWarning() << "Emitting consoleKitDBChanged is not working now, test will be skipped";
- //QVERIFY(spy.count() > 0);
- QVERIFY(!authority->hasError());
+ tqWarning() << "Emitting consoleKitDBChanged is not working now, test will be skipped";
+ //TQVERIFY(spy.count() > 0);
+ TQVERIFY(!authority->hasError());
// configChanged signal from authority requires changing some policy files
// and it would require user interaction (typing the password)
@@ -176,16 +176,16 @@ void TestAuth::test_Authority()
void TestAuth::test_Subject()
{
// Get pid of this appication
- qint64 pid = QCoreApplication::applicationPid();
+ qint64 pid = TQCoreApplication::applicationPid();
// Create unix process for it
UnixProcessSubject *process = new UnixProcessSubject(pid);
// Test if pid doesn't differ
- QCOMPARE(process->pid(), pid);
+ TQCOMPARE(process->pid(), pid);
// Serialize and deserialize subject
//Subject *subject = Subject::fromString(process->toString());
// and try it
- //QCOMPARE(((UnixProcess *) subject)->pid(), pid);
+ //TQCOMPARE(((UnixProcess *) subject)->pid(), pid);
delete process;
}
@@ -194,23 +194,23 @@ void TestAuth::test_Session()
/*
UnixUser user(getuid());
Session *session = new Session(&user, "/org/freedesktop/ConsoleKit/Session2");
- QSignalSpy spy_completed(session, SIGNAL(completed(bool)));
- QSignalSpy spy_request(session, SIGNAL(request(QString,bool)));
- QSignalSpy spy_error(session, SIGNAL(showError(QString)));
- QSignalSpy spy_info(session, SIGNAL(showInfo(QString)));
+ TQSignalSpy spy_completed(session, SIGNAL(completed(bool)));
+ TQSignalSpy spy_request(session, SIGNAL(request(TQString,bool)));
+ TQSignalSpy spy_error(session, SIGNAL(showError(TQString)));
+ TQSignalSpy spy_info(session, SIGNAL(showInfo(TQString)));
session->initiate();
session->response("aaa");
// Canceling should emit the "completed" signal
session->cancel();
- QCOMPARE(spy_completed.count(), 1);
+ TQCOMPARE(spy_completed.count(), 1);
- //UnixProcess *process = new UnixProcess(QCoreApplication::applicationPid());
+ //UnixProcess *process = new UnixProcess(TQCoreApplication::applicationPid());
//Authority::instance()->checkAuthorization("org.qt.policykit.examples.kick", process, Authority::None);
- qDebug() << "COMPLETED:" << spy_completed.count();
- qDebug() << "REQUEST:" << spy_request.count();
- qDebug() << "ERROR:" << spy_error.count();
- qDebug() << "INFO:" << spy_info.count();
+ tqDebug() << "COMPLETED:" << spy_completed.count();
+ tqDebug() << "REQUEST:" << spy_request.count();
+ tqDebug() << "ERROR:" << spy_error.count();
+ tqDebug() << "INFO:" << spy_info.count();
*/
}
@@ -221,15 +221,15 @@ void TestAuth::test_Details()
details.insert("2", "bbb");
details.insert("3", "ccc");
details.insert("4", "ddd");
- QCOMPARE(details.lookup("1"), QString("aaa"));
- QCOMPARE(details.lookup("2"), QString("bbb"));
- QCOMPARE(details.lookup("3"), QString("ccc"));
- QCOMPARE(details.lookup("4"), QString("ddd"));
- QList<QString> list = details.keys();
- QVERIFY(list.contains("1"));
- QVERIFY(list.contains("2"));
- QVERIFY(list.contains("3"));
- QVERIFY(list.contains("4"));
+ TQCOMPARE(details.lookup("1"), TQString("aaa"));
+ TQCOMPARE(details.lookup("2"), TQString("bbb"));
+ TQCOMPARE(details.lookup("3"), TQString("ccc"));
+ TQCOMPARE(details.lookup("4"), TQString("ddd"));
+ TQList<TQString> list = details.keys();
+ TQVERIFY(list.contains("1"));
+ TQVERIFY(list.contains("2"));
+ TQVERIFY(list.contains("3"));
+ TQVERIFY(list.contains("4"));
}
-QTEST_MAIN(TestAuth)
+TQTEST_MAIN(TestAuth)
diff --git a/test/test.h b/test/test.h
index c9d4dd8ac..4a3579d89 100644
--- a/test/test.h
+++ b/test/test.h
@@ -1,10 +1,10 @@
#ifndef TEST_H
#define TEST_H
-#include <QtCore/QObject>
-#include <QtTest/QtTest>
+#include <TQtCore/TQObject>
+#include <TQtTest/TQtTest>
-class TestAuth : public QObject
+class TestAuth : public TQObject
{
Q_OBJECT
private Q_SLOTS: