diff options
-rw-r--r-- | src/AuthDialog.cpp | 110 | ||||
-rw-r--r-- | src/AuthDialog.h | 48 | ||||
-rw-r--r-- | src/AuthDialog.ui | 26 | ||||
-rw-r--r-- | src/authdetails.ui | 16 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/policykitkde.cpp | 4 | ||||
-rw-r--r-- | src/policykitlistener.cpp | 50 | ||||
-rw-r--r-- | src/policykitlistener.h | 50 |
8 files changed, 153 insertions, 153 deletions
diff --git a/src/AuthDialog.cpp b/src/AuthDialog.cpp index f2c4886..7363ae9 100644 --- a/src/AuthDialog.cpp +++ b/src/AuthDialog.cpp @@ -23,25 +23,25 @@ #include "AuthDialog.h" -#include <QtCore/QProcess> -#include <QtGui/QPainter> -#include <QtGui/QStandardItemModel> +#include <TQtCore/TQProcess> +#include <TQtGui/TQPainter> +#include <TQtGui/TQStandardItemModel> #include <KDebug> #include <KToolInvocation> #include <KUser> -#include <PolkitQt1/Authority> -#include <PolkitQt1/Details> +#include <PolkitTQt1/Authority> +#include <PolkitTQt1/Details> #include <KWindowSystem> #include <KNotification> -AuthDialog::AuthDialog(const QString &actionId, - const QString &message, - const QString &iconName, - const PolkitQt1::Details &details, - const PolkitQt1::Identity::List &identities, +AuthDialog::AuthDialog(const TQString &actionId, + const TQString &message, + const TQString &iconName, + const PolkitTQt1::Details &details, + const PolkitTQt1::Identity::List &identities, WId parent) : KDialog(0) { @@ -71,29 +71,29 @@ AuthDialog::AuthDialog(const QString &actionId, } // loads the standard key icon - QPixmap icon = KIconLoader::global()->loadIcon("dialog-password", + TQPixmap icon = KIconLoader::global()->loadIcon("dialog-password", KIconLoader::NoGroup, KIconLoader::SizeHuge, KIconLoader::DefaultState); // create a painter to paint the action icon over the key icon - QPainter painter(&icon); + TQPainter painter(&icon); const int iconSize = icon.size().width(); // the the emblem icon to size 32 int overlaySize = 32; // try to load the action icon - const QPixmap pixmap = KIconLoader::global()->loadIcon(iconName, + const TQPixmap pixmap = KIconLoader::global()->loadIcon(iconName, KIconLoader::NoGroup, overlaySize, KIconLoader::DefaultState, - QStringList(), + TQStringList(), 0, true); // if we're able to load the action icon paint it over the // key icon. if (!pixmap.isNull()) { - QPoint startPoint; + TQPoint startPoint; // bottom right corner - startPoint = QPoint(iconSize - overlaySize - 2, + startPoint = TQPoint(iconSize - overlaySize - 2, iconSize - overlaySize - 2); painter.drawPixmap(startPoint, pixmap); } @@ -102,7 +102,7 @@ AuthDialog::AuthDialog(const QString &actionId, lblPixmap->setPixmap(icon); // find action description for actionId - foreach(const PolkitQt1::ActionDescription &desc, PolkitQt1::Authority::instance()->enumerateActionsSync()) { + foreach(const PolkitTQt1::ActionDescription &desc, PolkitTQt1::Authority::instance()->enumerateActionsSync()) { if (actionId == desc.actionId()) { m_actionDescription = desc; kDebug() << "Action description has been found" ; @@ -125,7 +125,7 @@ AuthDialog::AuthDialog(const QString &actionId, createUserCB(identities); } else { - userCB->addItem("", QVariant(identities[0].toString())); + userCB->addItem("", TQVariant(identities[0].toString())); userCB->setCurrentIndex(0); } } @@ -141,11 +141,11 @@ void AuthDialog::accept() return; } -void AuthDialog::setRequest(const QString &request, bool requiresAdmin) +void AuthDialog::setRequest(const TQString &request, bool requiresAdmin) { kDebug() << request; - PolkitQt1::Identity identity = adminUserSelected(); - if (request.startsWith(QLatin1String("password:"), Qt::CaseInsensitive)) { + PolkitTQt1::Identity identity = adminUserSelected(); + if (request.startsWith(TQLatin1String("password:"), TQt::CaseInsensitive)) { if (requiresAdmin) { if (!identity.isValid()) { lblPassword->setText(i18n("Password for root:")); @@ -156,8 +156,8 @@ void AuthDialog::setRequest(const QString &request, bool requiresAdmin) } else { lblPassword->setText(i18n("Password:")); } - } else if (request.startsWith(QLatin1String("password or swipe finger:"), - Qt::CaseInsensitive)) { + } else if (request.startsWith(TQLatin1String("password or swipe finger:"), + TQt::CaseInsensitive)) { if (requiresAdmin) { if (!identity.isValid()) { lblPassword->setText(i18n("Password or swipe finger for root:")); @@ -180,7 +180,7 @@ void AuthDialog::setOptions() " Authentication is required to perform this action.")); } -void AuthDialog::createUserCB(const PolkitQt1::Identity::List &identities) +void AuthDialog::createUserCB(const PolkitTQt1::Identity::List &identities) { /* if we've already built the list of admin users once, then avoid * doing it again.. (this is mainly used when the user entered the @@ -191,14 +191,14 @@ void AuthDialog::createUserCB(const PolkitQt1::Identity::List &identities) userCB->clear(); // Adds a Dummy user - userCB->addItem(i18n("Select User"), qVariantFromValue<QString> (QString())); - qobject_cast<QStandardItemModel *>(userCB->model())->item(userCB->count()-1)->setEnabled(false); + userCB->addItem(i18n("Select User"), qVariantFromValue<TQString> (TQString())); + qobject_cast<TQStandardItemModel *>(userCB->model())->item(userCB->count()-1)->setEnabled(false); // For each user int index = 1; // Start at 1 because of the "Select User" entry int currentUserIndex = -1; const KUser currentUser; - foreach(const PolkitQt1::Identity &identity, identities) { + foreach(const PolkitTQt1::Identity &identity, identities) { // First check to see if the user is valid kDebug() << "User: " << identity.toString(); const KUser user(identity.toString().remove("unix-user:")); @@ -208,7 +208,7 @@ void AuthDialog::createUserCB(const PolkitQt1::Identity::List &identities) } // Display user Full Name IF available - QString display; + TQString display; if (!user.property(KUser::FullName).toString().isEmpty()) { display = i18nc("%1 is the full user name, %2 is the user login name", "%1 (%2)", user.property(KUser::FullName).toString(), user.loginName()); } else { @@ -223,7 +223,7 @@ void AuthDialog::createUserCB(const PolkitQt1::Identity::List &identities) icon = KIcon("user-identity"); } // appends the user item - userCB->addItem(icon, display, qVariantFromValue<QString> (identity.toString())); + userCB->addItem(icon, display, qVariantFromValue<TQString> (identity.toString())); if (user == currentUser) { currentUserIndex = index; @@ -239,20 +239,20 @@ void AuthDialog::createUserCB(const PolkitQt1::Identity::List &identities) } } -PolkitQt1::Identity AuthDialog::adminUserSelected() const +PolkitTQt1::Identity AuthDialog::adminUserSelected() const { if (userCB->currentIndex() == -1) - return PolkitQt1::Identity(); + return PolkitTQt1::Identity(); - QString id = userCB->itemData(userCB->currentIndex()).toString(); + TQString id = userCB->itemData(userCB->currentIndex()).toString(); if (id.isEmpty()) - return PolkitQt1::Identity(); - return PolkitQt1::Identity::fromString(id); + return PolkitTQt1::Identity(); + return PolkitTQt1::Identity::fromString(id); } void AuthDialog::on_userCB_currentIndexChanged(int /*index*/) { - PolkitQt1::Identity identity = adminUserSelected(); + PolkitTQt1::Identity identity = adminUserSelected(); // itemData is Null when "Select user" is selected if (!identity.isValid()) { lePassword->setEnabled(false); @@ -269,7 +269,7 @@ void AuthDialog::on_userCB_currentIndexChanged(int /*index*/) } } -QString AuthDialog::password() const +TQString AuthDialog::password() const { return lePassword->text(); } @@ -277,7 +277,7 @@ QString AuthDialog::password() const void AuthDialog::authenticationFailure() { errorMessageKTW->setText(i18n("Authentication failure, please try again."), KTitleWidget::ErrorMessage); - QFont bold = font(); + TQFont bold = font(); bold.setBold(true); lblPassword->setFont(bold); lePassword->setEnabled(true); @@ -285,7 +285,7 @@ void AuthDialog::authenticationFailure() lePassword->setFocus(); } -void AuthDialog::showEvent(QShowEvent *event) +void AuthDialog::showEvent(TQShowEvent *event) { KDialog::showEvent(event); if (winId() != KWindowSystem::activeWindow()) @@ -294,12 +294,12 @@ void AuthDialog::showEvent(QShowEvent *event) KNotification::Persistent | KNotification::CloseWhenWidgetActivated); kDebug() << "Notificate: " << notification->eventId(); notification->setText(m_message); - QPixmap icon = KIconLoader::global()->loadIcon("dialog-password", + TQPixmap icon = KIconLoader::global()->loadIcon("dialog-password", KIconLoader::NoGroup, KIconLoader::SizeHuge, KIconLoader::DefaultState); notification->setPixmap(icon); - notification->setActions(QStringList() << i18n("Switch to dialog") << i18n("Cancel")); + notification->setActions(TQStringList() << i18n("Switch to dialog") << i18n("Cancel")); connect(notification, SIGNAL(activated(uint)), this, SLOT(notificationActivated(uint))); notification->sendEvent(); @@ -316,25 +316,25 @@ void AuthDialog::notificationActivated(unsigned int action) } } -AuthDetails::AuthDetails(const PolkitQt1::Details &details, - const PolkitQt1::ActionDescription &actionDescription, - const QString &appname, - QWidget *parent) - : QWidget(parent) +AuthDetails::AuthDetails(const PolkitTQt1::Details &details, + const PolkitTQt1::ActionDescription &actionDescription, + const TQString &appname, + TQWidget *parent) + : TQWidget(parent) { setupUi(this); app_label->setText(appname); - foreach(const QString &key, details.keys()) { //krazy:exclude=foreach (Details is not a map/hash, but rather a method) + foreach(const TQString &key, details.keys()) { //krazy:exclude=foreach (Details is not a map/hash, but rather a method) int row = gridLayout->rowCount() + 1; - QLabel *keyLabel = new QLabel(this); + TQLabel *keyLabel = new TQLabel(this); keyLabel->setText(i18nc("%1 is the name of a detail about the current action " "provided by polkit", "%1:", key)); gridLayout->addWidget(keyLabel, row, 0); - QLabel *valueLabel = new QLabel(this); + TQLabel *valueLabel = new TQLabel(this); valueLabel->setText(details.lookup(key)); gridLayout->addWidget(valueLabel, row, 1); } @@ -344,8 +344,8 @@ AuthDetails::AuthDetails(const PolkitQt1::Details &details, action_label->setTipText(i18n("Click to edit %1", actionDescription.actionId())); action_label->setUrl(actionDescription.actionId()); - QString vendor = actionDescription.vendorName(); - QString vendorUrl = actionDescription.vendorUrl(); + TQString vendor = actionDescription.vendorName(); + TQString vendorUrl = actionDescription.vendorUrl(); if (!vendor.isEmpty()) { vendorUL->setText(vendor); @@ -360,18 +360,18 @@ AuthDetails::AuthDetails(const PolkitQt1::Details &details, vendorUL->hide(); } - connect(vendorUL, SIGNAL(leftClickedUrl(QString)), SLOT(openUrl(QString))); - connect(action_label, SIGNAL(leftClickedUrl(QString)), SLOT(openAction(QString))); + connect(vendorUL, SIGNAL(leftClickedUrl(TQString)), SLOT(openUrl(TQString))); + connect(action_label, SIGNAL(leftClickedUrl(TQString)), SLOT(openAction(TQString))); } -void AuthDetails::openUrl(const QString& url) +void AuthDetails::openUrl(const TQString& url) { KToolInvocation::invokeBrowser(url); } -void AuthDetails::openAction(const QString &url) +void AuthDetails::openAction(const TQString &url) { - QProcess::startDetached("polkit-kde-authorization", QStringList() << url); + TQProcess::startDetached("polkit-kde-authorization", TQStringList() << url); } #include "AuthDialog.moc" diff --git a/src/AuthDialog.h b/src/AuthDialog.h index 620145d..7aa42eb 100644 --- a/src/AuthDialog.h +++ b/src/AuthDialog.h @@ -26,10 +26,10 @@ #include "ui_AuthDialog.h" #include "ui_authdetails.h" -#include <PolkitQt1/Identity> -#include <PolkitQt1/ActionDescription> +#include <PolkitTQt1/Identity> +#include <PolkitTQt1/ActionDescription> -namespace PolkitQt1 +namespace PolkitTQt1 { class Details; } @@ -38,25 +38,25 @@ class AuthDialog : public KDialog, private Ui::AuthDialog { Q_OBJECT public: - AuthDialog(const QString &actionId, - const QString &message, - const QString &iconName, - const PolkitQt1::Details &details, - const PolkitQt1::Identity::List &identities, + AuthDialog(const TQString &actionId, + const TQString &message, + const TQString &iconName, + const PolkitTQt1::Details &details, + const PolkitTQt1::Identity::List &identities, WId parent); ~AuthDialog(); - void setRequest(const QString &request, bool requiresAdmin); + void setRequest(const TQString &request, bool requiresAdmin); void setOptions(); - QString password() const; + TQString password() const; void authenticationFailure(); - PolkitQt1::Identity adminUserSelected() const; + PolkitTQt1::Identity adminUserSelected() const; - PolkitQt1::ActionDescription m_actionDescription; + PolkitTQt1::ActionDescription m_actionDescription; signals: - void adminUserSelected(PolkitQt1::Identity); + void adminUserSelected(PolkitTQt1::Identity); public slots: virtual void accept(); @@ -66,25 +66,25 @@ private slots: void notificationActivated(unsigned int action); private: - QString m_appname; - QString m_message; + TQString m_appname; + TQString m_message; - void createUserCB(const PolkitQt1::Identity::List &identities); - void showEvent(QShowEvent *); + void createUserCB(const PolkitTQt1::Identity::List &identities); + void showEvent(TQShowEvent *); }; -class AuthDetails : public QWidget, private Ui::AuthDetails +class AuthDetails : public TQWidget, private Ui::AuthDetails { Q_OBJECT public: - AuthDetails(const PolkitQt1::Details &details, - const PolkitQt1::ActionDescription &actionDescription, - const QString &appname, - QWidget *parent); + AuthDetails(const PolkitTQt1::Details &details, + const PolkitTQt1::ActionDescription &actionDescription, + const TQString &appname, + TQWidget *parent); private slots: - void openUrl(const QString&); - void openAction(const QString&); + void openUrl(const TQString&); + void openAction(const TQString&); }; #endif // AUTHDIALOG_H diff --git a/src/AuthDialog.ui b/src/AuthDialog.ui index 3b9bbc6..43282f1 100644 --- a/src/AuthDialog.ui +++ b/src/AuthDialog.ui @@ -1,6 +1,6 @@ <ui version="4.0" > <class>AuthDialog</class> - <widget class="QWidget" name="AuthDialog" > + <widget class="TQWidget" name="AuthDialog" > <property name="geometry" > <rect> <x>0</x> @@ -15,11 +15,11 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <layout class="QGridLayout" name="gridLayout" > + <layout class="TQGridLayout" name="gridLayout" > <item rowspan="6" row="0" column="0" > - <layout class="QVBoxLayout" name="verticalLayout" > + <layout class="TQVBoxLayout" name="verticalLayout" > <item> - <widget class="QLabel" name="lblPixmap" > + <widget class="TQLabel" name="lblPixmap" > <property name="sizePolicy" > <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > <horstretch>0</horstretch> @@ -40,7 +40,7 @@ <item> <spacer name="verticalSpacer" > <property name="orientation" > - <enum>Qt::Vertical</enum> + <enum>TQt::Vertical</enum> </property> <property name="sizeHint" stdset="0" > <size> @@ -53,9 +53,9 @@ </layout> </item> <item row="0" column="1" colspan="3" > - <layout class="QVBoxLayout" name="verticalLayout_2" > + <layout class="TQVBoxLayout" name="verticalLayout_2" > <item> - <widget class="QLabel" name="lblHeader" > + <widget class="TQLabel" name="lblHeader" > <property name="sizePolicy" > <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" > <horstretch>0</horstretch> @@ -74,7 +74,7 @@ </widget> </item> <item> - <widget class="QLabel" name="lblContent" > + <widget class="TQLabel" name="lblContent" > <property name="sizePolicy" > <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" > <horstretch>0</horstretch> @@ -95,7 +95,7 @@ <widget class="KTitleWidget" name="errorMessageKTW" /> </item> <item row="3" column="1" colspan="2" > - <widget class="QLabel" name="lblPassword" > + <widget class="TQLabel" name="lblPassword" > <property name="text" > <string>Password:</string> </property> @@ -107,7 +107,7 @@ <item row="3" column="3" > <widget class="KLineEdit" name="lePassword" > <property name="echoMode" > - <enum>QLineEdit::Password</enum> + <enum>TQLineEdit::Password</enum> </property> <property name="passwordMode" > <bool>true</bool> @@ -129,17 +129,17 @@ <customwidgets> <customwidget> <class>KComboBox</class> - <extends>QComboBox</extends> + <extends>TQComboBox</extends> <header>kcombobox.h</header> </customwidget> <customwidget> <class>KLineEdit</class> - <extends>QLineEdit</extends> + <extends>TQLineEdit</extends> <header>klineedit.h</header> </customwidget> <customwidget> <class>KTitleWidget</class> - <extends>QWidget</extends> + <extends>TQWidget</extends> <header>ktitlewidget.h</header> </customwidget> </customwidgets> diff --git a/src/authdetails.ui b/src/authdetails.ui index 6dda5da..04a2957 100644 --- a/src/authdetails.ui +++ b/src/authdetails.ui @@ -1,6 +1,6 @@ <ui version="4.0" > <class>AuthDetails</class> - <widget class="QWidget" name="AuthDetails" > + <widget class="TQWidget" name="AuthDetails" > <property name="geometry" > <rect> <x>0</x> @@ -15,23 +15,23 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <layout class="QGridLayout" name="gridLayout" > + <layout class="TQGridLayout" name="gridLayout" > <item row="1" column="0" > - <widget class="QLabel" name="label" > + <widget class="TQLabel" name="label" > <property name="text" > <string>Application:</string> </property> </widget> </item> <item row="2" column="0" > - <widget class="QLabel" name="label_3" > + <widget class="TQLabel" name="label_3" > <property name="text" > <string>Action:</string> </property> </widget> </item> <item row="3" column="0" > - <widget class="QLabel" name="vendorL" > + <widget class="TQLabel" name="vendorL" > <property name="text" > <string>Vendor:</string> </property> @@ -66,12 +66,12 @@ <item row="0" column="0" colspan="4" > <widget class="Line" name="line" > <property name="orientation" > - <enum>Qt::Horizontal</enum> + <enum>TQt::Horizontal</enum> </property> </widget> </item> <item row="1" column="1" colspan="3" > - <widget class="QLabel" name="app_label" > + <widget class="TQLabel" name="app_label" > <property name="text" > <string>Application:</string> </property> @@ -82,7 +82,7 @@ <customwidgets> <customwidget> <class>KUrlLabel</class> - <extends>QLabel</extends> + <extends>TQLabel</extends> <header>kurllabel.h</header> </customwidget> </customwidgets> diff --git a/src/main.cpp b/src/main.cpp index 33ef236..ec9ca54 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) KCmdLineArgs::init(argc, argv, &aboutData); if (!PolicyKitKDE::start()) { - qWarning("PolicyKitKDE is already running!\n"); + tqWarning("PolicyKitKDE is already running!\n"); return 0; } diff --git a/src/policykitkde.cpp b/src/policykitkde.cpp index 55f979b..a6727c8 100644 --- a/src/policykitkde.cpp +++ b/src/policykitkde.cpp @@ -21,14 +21,14 @@ #include "policykitkde.h" #include <KDebug> -#include <PolkitQt1/Subject> +#include <PolkitTQt1/Subject> PolicyKitKDE::PolicyKitKDE() : m_listener(new PolicyKitListener(this)) { setQuitOnLastWindowClosed(false); - PolkitQt1::UnixSessionSubject session(getpid()); + PolkitTQt1::UnixSessionSubject session(getpid()); bool result = m_listener->registerListener(session, "/org/kde/PolicyKit1/AuthenticationAgent"); diff --git a/src/policykitlistener.cpp b/src/policykitlistener.cpp index 6da9461..c2ea924 100644 --- a/src/policykitlistener.cpp +++ b/src/policykitlistener.cpp @@ -24,26 +24,26 @@ #include <KDebug> #include <KWindowSystem> -#include <PolkitQt1/Agent/Listener> -#include <PolkitQt1/Agent/Session> -#include <PolkitQt1/Subject> -#include <PolkitQt1/Identity> -#include <PolkitQt1/Details> -#include <QtDBus/QDBusConnection> +#include <PolkitTQt1/Agent/Listener> +#include <PolkitTQt1/Agent/Session> +#include <PolkitTQt1/Subject> +#include <PolkitTQt1/Identity> +#include <PolkitTQt1/Details> +#include <TQtDBus/TQDBusConnection> #include "polkit1authagentadaptor.h" -PolicyKitListener::PolicyKitListener(QObject *parent) +PolicyKitListener::PolicyKitListener(TQObject *parent) : Listener(parent) , m_inProgress(false) , m_selectedUser(0) { (void) new Polkit1AuthAgentAdaptor(this); - if (!QDBusConnection::sessionBus().registerObject("/org/kde/Polkit1AuthAgent", this, - QDBusConnection::ExportScriptableSlots | - QDBusConnection::ExportScriptableProperties | - QDBusConnection::ExportAdaptors)) { + if (!TQDBusConnection::sessionBus().registerObject("/org/kde/Polkit1AuthAgent", this, + TQDBusConnection::ExportScriptableSlots | + TQDBusConnection::ExportScriptableProperties | + TQDBusConnection::ExportAdaptors)) { kWarning() << "Could not initiate DBus helper!"; } @@ -54,19 +54,19 @@ PolicyKitListener::~PolicyKitListener() { } -void PolicyKitListener::setWIdForAction(const QString& action, qulonglong wID) +void PolicyKitListener::setWIdForAction(const TQString& action, qulonglong wID) { kDebug() << "On to the handshake"; m_actionsToWID[action] = wID; } -void PolicyKitListener::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 PolicyKitListener::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) { kDebug() << "Initiating authentication"; @@ -93,7 +93,7 @@ void PolicyKitListener::initiateAuthentication(const QString &actionId, m_dialog = new AuthDialog(actionId, message, iconName, details, identities, parentId); connect(m_dialog.data(), SIGNAL(okClicked()), SLOT(dialogAccepted())); connect(m_dialog.data(), SIGNAL(cancelClicked()), SLOT(dialogCanceled())); - connect(m_dialog.data(), SIGNAL(adminUserSelected(PolkitQt1::Identity)), SLOT(userSelected(PolkitQt1::Identity))); + connect(m_dialog.data(), SIGNAL(adminUserSelected(PolkitTQt1::Identity)), SLOT(userSelected(PolkitTQt1::Identity))); kDebug() << "WinId of the dialog is " << m_dialog.data()->winId() << m_dialog.data()->effectiveWinId(); m_dialog.data()->setOptions(); @@ -120,9 +120,9 @@ void PolicyKitListener::tryAgain() // We will create new session only when some user is selected if (m_selectedUser.isValid()) { m_session = new Session(m_selectedUser, m_cookie, m_result); - connect(m_session.data(), SIGNAL(request(QString,bool)), this, SLOT(request(QString,bool))); + connect(m_session.data(), SIGNAL(request(TQString,bool)), this, SLOT(request(TQString,bool))); connect(m_session.data(), SIGNAL(completed(bool)), this, SLOT(completed(bool))); - connect(m_session.data(), SIGNAL(showError(QString)), this, SLOT(showError(QString))); + connect(m_session.data(), SIGNAL(showError(TQString)), this, SLOT(showError(TQString))); m_session.data()->initiate(); } @@ -180,7 +180,7 @@ void PolicyKitListener::cancelAuthentication() finishObtainPrivilege(); } -void PolicyKitListener::request(const QString &request, bool echo) +void PolicyKitListener::request(const TQString &request, bool echo) { Q_UNUSED(echo); kDebug() << "Request: " << request; @@ -200,7 +200,7 @@ void PolicyKitListener::completed(bool gainedAuthorization) finishObtainPrivilege(); } -void PolicyKitListener::showError(const QString &text) +void PolicyKitListener::showError(const TQString &text) { kDebug() << "Error: " << text; } @@ -226,7 +226,7 @@ void PolicyKitListener::dialogCanceled() finishObtainPrivilege(); } -void PolicyKitListener::userSelected(const PolkitQt1::Identity &identity) +void PolicyKitListener::userSelected(const PolkitTQt1::Identity &identity) { m_selectedUser = identity; // If some user is selected we must destroy existing session diff --git a/src/policykitlistener.h b/src/policykitlistener.h index 21286fc..f7906e4 100644 --- a/src/policykitlistener.h +++ b/src/policykitlistener.h @@ -21,60 +21,60 @@ */ -#include <PolkitQt1/Agent/Listener> +#include <PolkitTQt1/Agent/Listener> -#include <QtCore/QWeakPointer> -#include <QtCore/QHash> +#include <TQtCore/TQWeakPointer> +#include <TQtCore/TQHash> class AuthDialog; -using namespace PolkitQt1::Agent; +using namespace PolkitTQt1::Agent; class PolicyKitListener : public Listener { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.kde.Polkit1AuthAgent") + TQ_CLASSINFO("D-Bus Interface", "org.kde.Polkit1AuthAgent") public: - PolicyKitListener(QObject *parent = 0); + PolicyKitListener(TQObject *parent = 0); virtual ~PolicyKitListener(); public 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 tryAgain(); void finishObtainPrivilege(); - void request(const QString &request, bool echo); + void request(const TQString &request, bool echo); void completed(bool gainedAuthorization); - void showError(const QString &text); + void showError(const TQString &text); - void setWIdForAction(const QString &action, qulonglong wID); - /* void showInfo(const QString &text); */ + void setWIdForAction(const TQString &action, qulonglong wID); + /* void showInfo(const TQString &text); */ private: - QWeakPointer<AuthDialog> m_dialog; - QWeakPointer<Session> m_session; + TQWeakPointer<AuthDialog> m_dialog; + TQWeakPointer<Session> m_session; bool m_inProgress; bool m_gainedAuthorization; bool m_wasCancelled; int m_numTries; - PolkitQt1::Identity::List m_identities; - PolkitQt1::Agent::AsyncResult* m_result; - QString m_cookie; - PolkitQt1::Identity m_selectedUser; - QHash< QString, qulonglong > m_actionsToWID; + PolkitTQt1::Identity::List m_identities; + PolkitTQt1::Agent::AsyncResult* m_result; + TQString m_cookie; + PolkitTQt1::Identity m_selectedUser; + TQHash< TQString, qulonglong > m_actionsToWID; private slots: void dialogAccepted(); void dialogCanceled(); - void userSelected(const PolkitQt1::Identity &identity); + void userSelected(const PolkitTQt1::Identity &identity); }; #endif |