diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-10-31 00:13:21 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-10-31 00:14:22 +0900 |
commit | e8933e99b4600d91e9eab7d1ad3a2d35813028a9 (patch) | |
tree | b2899fd1ef651a1bff56918ace94625a4bc14aa0 /gui | |
parent | e8494e60efeb94c67c813d1c1c038031915e8c17 (diff) | |
download | polkit-tqt-e8933e99b4600d91e9eab7d1ad3a2d35813028a9.tar.gz polkit-tqt-e8933e99b4600d91e9eab7d1ad3a2d35813028a9.zip |
More Qt->TQt conversion and some clean up.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'gui')
-rw-r--r-- | gui/CMakeLists.txt | 28 | ||||
-rw-r--r-- | gui/polkittqt1-gui-action.cpp (renamed from gui/polkitqt1-gui-action.cpp) | 22 | ||||
-rw-r--r-- | gui/polkittqt1-gui-action.h (renamed from gui/polkitqt1-gui-action.h) | 20 | ||||
-rw-r--r-- | gui/polkittqt1-gui-actionbutton.cpp (renamed from gui/polkitqt1-gui-actionbutton.cpp) | 32 | ||||
-rw-r--r-- | gui/polkittqt1-gui-actionbutton.h (renamed from gui/polkitqt1-gui-actionbutton.h) | 16 | ||||
-rw-r--r-- | gui/polkittqt1-gui-actionbutton_p.h (renamed from gui/polkitqt1-gui-actionbutton_p.h) | 10 | ||||
-rw-r--r-- | gui/polkittqt1-gui-actionbuttons.cpp (renamed from gui/polkitqt1-gui-actionbuttons.cpp) | 16 | ||||
-rw-r--r-- | gui/polkittqt1-gui-actionbuttons.h (renamed from gui/polkitqt1-gui-actionbuttons.h) | 12 | ||||
-rw-r--r-- | gui/polkittqt1-gui-actionbuttons_p.h (renamed from gui/polkitqt1-gui-actionbuttons_p.h) | 8 |
9 files changed, 82 insertions, 82 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 44abb7582..ca420fb79 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -3,24 +3,24 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) -set(polkit_qt_gui_SRCS - polkitqt1-gui-action.cpp - polkitqt1-gui-actionbutton.cpp - polkitqt1-gui-actionbuttons.cpp +set(polkit_tqt_gui_SRCS + polkittqt1-gui-action.cpp + polkittqt1-gui-actionbutton.cpp + polkittqt1-gui-actionbuttons.cpp ) -automoc4_add_library(polkit-qt-gui-1 SHARED ${polkit_qt_gui_SRCS}) +automoc4_add_library(polkit-tqt-gui-1 SHARED ${polkit_tqt_gui_SRCS}) -target_link_libraries(polkit-qt-gui-1 - ${QT_QTCORE_LIBRARY} - ${QT_QTGUI_LIBRARY} - ${QT_QTDBUS_LIBRARY} +target_link_libraries(polkit-tqt-gui-1 + ${TQT_TQTCORE_LIBRARY} + ${TQT_TQTGUI_LIBRARY} + ${TQT_TQTDBUS_LIBRARY} ${POLKIT_LIBRARIES} - polkit-qt-core-1 + polkit-tqt-core-1 ) -set_target_properties(polkit-qt-gui-1 PROPERTIES VERSION ${POLKITQT-1_LIBRARY_VERSION} - SOVERSION ${POLKITQT-1_ABI_VERSION} - DEFINE_SYMBOL MAKE_POLKITQT1_LIB) +set_target_properties(polkit-tqt-gui-1 PROPERTIES VERSION ${POLKITTQT-1_LIBRARY_VERSION} + SOVERSION ${POLKITTQT-1_ABI_VERSION} + DEFINE_SYMBOL MAKE_POLKITTQT1_LIB) -install(TARGETS polkit-qt-gui-1 ${INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS polkit-tqt-gui-1 ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/gui/polkitqt1-gui-action.cpp b/gui/polkittqt1-gui-action.cpp index d591c7b52..31f01cfb7 100644 --- a/gui/polkitqt1-gui-action.cpp +++ b/gui/polkittqt1-gui-action.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the Polkit-qt project + * This file is part of the Polkit-tqt project * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br> * Copyright (C) 2009 Dario Freddi <drf@kde.org> * Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com> @@ -20,9 +20,9 @@ * Boston, MA 02110-1301, USA. */ -#include "polkitqt1-gui-action.h" -#include "polkitqt1-authority.h" -#include "polkitqt1-subject.h" +#include "polkittqt1-gui-action.h" +#include "polkittqt1-authority.h" +#include "polkittqt1-subject.h" #include <TQtCore/TQCoreApplication> @@ -44,7 +44,7 @@ public: TQString actionId; Authority::Result pkResult; - qint64 targetPID; + tqint64 targetPID; void updateAction(); bool computePkResult(); @@ -128,7 +128,7 @@ bool Action::activate() case Authority::Yes: case Authority::Challenge: // just Q_EMIT the 'activated' signal - Q_EMIT authorized(); + TQ_EMIT authorized(); return true; break; default: @@ -141,7 +141,7 @@ bool Action::activate() * Hence, they probably have a good reason for doing * this so do let the 'activate' signal propagate.. */ - Q_EMIT authorized(); + TQ_EMIT authorized(); return true; } break; @@ -207,7 +207,7 @@ void Action::Private::updateAction() } break; } - Q_EMIT parent->dataChanged(); + TQ_EMIT parent->dataChanged(); } void Action::Private::configChanged() @@ -232,7 +232,7 @@ bool Action::Private::computePkResult() return old_result != pkResult; } -qint64 Action::targetPID() const +tqint64 Action::targetPID() const { if (d->targetPID != 0) { return d->targetPID; @@ -241,7 +241,7 @@ qint64 Action::targetPID() const } } -void Action::setTargetPID(qint64 pid) +void Action::setTargetPID(tqint64 pid) { d->targetPID = pid; @@ -512,4 +512,4 @@ TQString Action::actionId() const } -#include "polkitqt1-gui-action.moc" +#include "polkittqt1-gui-action.moc" diff --git a/gui/polkitqt1-gui-action.h b/gui/polkittqt1-gui-action.h index 0b8763e8d..6ee42179c 100644 --- a/gui/polkitqt1-gui-action.h +++ b/gui/polkittqt1-gui-action.h @@ -1,5 +1,5 @@ /* - * This file is part of the Polkit-qt project + * This file is part of the Polkit-tqt project * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br> * Copyright (C) 2009 Dario Freddi <drf@kde.org> * @@ -19,10 +19,10 @@ * Boston, MA 02110-1301, USA. */ -#ifndef POLKITQT1_GUI_ACTION_H -#define POLKITQT1_GUI_ACTION_H +#ifndef POLKITTQT1_GUI_ACTION_H +#define POLKITTQT1_GUI_ACTION_H -#include "polkitqt1-export.h" +#include "polkittqt1-export.h" #include <TQtGui/TQAction> @@ -33,7 +33,7 @@ namespace Gui { /** - * \class Action polkitqt1-gui-action.h Action + * \class Action polkittqt1-gui-action.h Action * \author Daniel Nicoletti <dantti85-pk@yahoo.com.br> * \author Dario Freddi <drf@kde.org> * @@ -50,7 +50,7 @@ namespace Gui * * \see ActionButton */ -class POLKITQT1_EXPORT Action : public TQAction +class POLKITTQT1_EXPORT Action : public TQAction { Q_OBJECT TQ_DISABLE_COPY(Action) @@ -69,7 +69,7 @@ public: // Future usage = 256, All = 512 }; - Q_DECLARE_FLAGS(States, State) + TQ_DECLARE_FLAGS(States, State) /** * Constructs a new Action item @@ -207,7 +207,7 @@ public: * * \param pid The target process id; 0 if it is the current process */ - void setTargetPID(qint64 pid); + void setTargetPID(tqint64 pid); /** * Gets the text of the action when it is in the specified state @@ -265,7 +265,7 @@ public: /** * \see setTargetPID */ - qint64 targetPID() const; + tqint64 targetPID() const; /** * This method can be used to check the if the current action @@ -299,6 +299,6 @@ private: } -Q_DECLARE_OPERATORS_FOR_FLAGS(PolkitTQt1::Gui::Action::States) +TQ_DECLARE_OPERATORS_FOR_FLAGS(PolkitTQt1::Gui::Action::States) #endif diff --git a/gui/polkitqt1-gui-actionbutton.cpp b/gui/polkittqt1-gui-actionbutton.cpp index fefb831cf..f817088c1 100644 --- a/gui/polkitqt1-gui-actionbutton.cpp +++ b/gui/polkittqt1-gui-actionbutton.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the Polkit-qt project + * This file is part of the Polkit-tqt project * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br> * Copyright (C) 2009 Dario Freddi <drf@kde.org> * @@ -19,9 +19,9 @@ * Boston, MA 02110-1301, USA. */ -#include "polkitqt1-gui-actionbutton.h" +#include "polkittqt1-gui-actionbutton.h" -#include "polkitqt1-gui-actionbutton_p.h" +#include "polkittqt1-gui-actionbutton_p.h" namespace PolkitTQt1 { @@ -55,9 +55,9 @@ ActionButton::~ActionButton() void ActionButtonPrivate::updateButton() { - Q_Q(ActionButton); + TQ_Q(ActionButton); - Q_FOREACH(TQAbstractButton *ent, buttons) { + TQ_FOREACH(TQAbstractButton *ent, buttons) { ent->setVisible(q->isVisible()); ent->setEnabled(q->isEnabled()); ent->setText(q->text()); @@ -78,10 +78,10 @@ void ActionButtonPrivate::updateButton() bool ActionButton::activate() { - Q_D(ActionButton); + TQ_D(ActionButton); bool tg = false; - Q_FOREACH(TQAbstractButton *ent, d->buttons) { + TQ_FOREACH(TQAbstractButton *ent, d->buttons) { if (ent->isCheckable()) { // we set the the current Action state ent->setChecked(isChecked()); @@ -99,10 +99,10 @@ bool ActionButton::activate() void ActionButton::setButton(TQAbstractButton *button) { - Q_D(ActionButton); + TQ_D(ActionButton); // First, let's clear the list - Q_FOREACH(TQAbstractButton *ent, d->buttons) { + TQ_FOREACH(TQAbstractButton *ent, d->buttons) { d->removeButton(ent); } @@ -112,7 +112,7 @@ void ActionButton::setButton(TQAbstractButton *button) void ActionButtonPrivate::addButton(TQAbstractButton *button) { - Q_Q(ActionButton); + TQ_Q(ActionButton); buttons.append(button); TQObject::connect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool))); @@ -124,7 +124,7 @@ void ActionButtonPrivate::addButton(TQAbstractButton *button) // if we are not checkable BUT the button // is (eg a TQCheckBox) we should set all buttons to // checkable. - Q_FOREACH(TQAbstractButton *ent, buttons) { + TQ_FOREACH(TQAbstractButton *ent, buttons) { ent->setCheckable(true); } // set the checkable state of Action to store the initial state @@ -136,7 +136,7 @@ void ActionButtonPrivate::addButton(TQAbstractButton *button) void ActionButtonPrivate::removeButton(TQAbstractButton *button) { - Q_Q(ActionButton); + TQ_Q(ActionButton); if (buttons.contains(button)) { TQObject::disconnect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool))); @@ -147,20 +147,20 @@ void ActionButtonPrivate::removeButton(TQAbstractButton *button) TQAbstractButton *ActionButton::button() const { - Q_D(const ActionButton); + TQ_D(const ActionButton); return d->buttons.first(); } void ActionButtonPrivate::streamClicked(bool c) { - Q_Q(ActionButton); + TQ_Q(ActionButton); - Q_EMIT q->clicked(qobject_cast<TQAbstractButton *>(q->sender()), c); + TQ_EMIT q->clicked(qobject_cast<TQAbstractButton *>(q->sender()), c); } } } -#include "polkitqt1-gui-actionbutton.moc" +#include "polkittqt1-gui-actionbutton.moc" diff --git a/gui/polkitqt1-gui-actionbutton.h b/gui/polkittqt1-gui-actionbutton.h index 67fdba347..c47a9bcc0 100644 --- a/gui/polkitqt1-gui-actionbutton.h +++ b/gui/polkittqt1-gui-actionbutton.h @@ -1,5 +1,5 @@ /* - * This file is part of the Polkit-qt project + * This file is part of the Polkit-tqt project * Copyright (C) 2009 Daniel Nicoletti <dantti85-pk@yahoo.com.br> * Copyright (C) 2009 Dario Freddi <drf@kde.org> * @@ -19,11 +19,11 @@ * Boston, MA 02110-1301, USA. */ -#ifndef POLKITQT1_GUI_ACTIONBUTTON_H -#define POLKITQT1_GUI_ACTIONBUTTON_H +#ifndef POLKITTQT1_GUI_ACTIONBUTTON_H +#define POLKITTQT1_GUI_ACTIONBUTTON_H -#include "polkitqt1-export.h" -#include "polkitqt1-gui-action.h" +#include "polkittqt1-export.h" +#include "polkittqt1-gui-action.h" class TQAbstractButton; @@ -35,7 +35,7 @@ namespace Gui class ActionButtonPrivate; /** - * \class ActionButton polkitqt1-gui-actionbutton.h ActionButton + * \class ActionButton polkittqt1-gui-actionbutton.h ActionButton * \author Daniel Nicoletti <dantti85-pk@yahoo.com.br> * \author Dario Freddi <drf@kde.org> * @@ -50,10 +50,10 @@ class ActionButtonPrivate; * permission to perform the given action. If you set 'noEnabled' * to \c true it will be emitted when PolKitResult is NO. */ -class POLKITQT1_EXPORT ActionButton : public Action +class POLKITTQT1_EXPORT ActionButton : public Action { Q_OBJECT - Q_DECLARE_PRIVATE(ActionButton) + TQ_DECLARE_PRIVATE(ActionButton) TQ_DISABLE_COPY(ActionButton) public: diff --git a/gui/polkitqt1-gui-actionbutton_p.h b/gui/polkittqt1-gui-actionbutton_p.h index fce14de64..5d4154ef1 100644 --- a/gui/polkitqt1-gui-actionbutton_p.h +++ b/gui/polkittqt1-gui-actionbutton_p.h @@ -1,5 +1,5 @@ /* - * This file is part of the Polkit-qt project + * This file is part of the Polkit-tqt project * Copyright (C) 2009 Dario Freddi <drf@kde.org> * * This library is free software; you can redistribute it and/or @@ -18,10 +18,10 @@ * Boston, MA 02110-1301, USA. */ -#ifndef POLKITQT1_GUI_ACTIONBUTTON_P_H -#define POLKITQT1_GUI_ACTIONBUTTON_P_H +#ifndef POLKITTQT1_GUI_ACTIONBUTTON_P_H +#define POLKITTQT1_GUI_ACTIONBUTTON_P_H -#include <polkitqt1-gui-actionbutton.h> +#include <polkittqt1-gui-actionbutton.h> #include <TQtCore/TQList> #include <TQtGui/TQAbstractButton> @@ -41,7 +41,7 @@ public: void updateButton(); void streamClicked(bool); - Q_DECLARE_PUBLIC(ActionButton) + TQ_DECLARE_PUBLIC(ActionButton) ActionButton *q_ptr; TQList<TQAbstractButton *> buttons; diff --git a/gui/polkitqt1-gui-actionbuttons.cpp b/gui/polkittqt1-gui-actionbuttons.cpp index 125c0959f..4a3def78b 100644 --- a/gui/polkitqt1-gui-actionbuttons.cpp +++ b/gui/polkittqt1-gui-actionbuttons.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the Polkit-qt project + * This file is part of the Polkit-tqt project * Copyright (C) 2009 Dario Freddi <drf@kde.org> * * This library is free software; you can redistribute it and/or @@ -18,9 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include "polkitqt1-gui-actionbuttons.h" +#include "polkittqt1-gui-actionbuttons.h" -#include "polkitqt1-gui-actionbuttons_p.h" +#include "polkittqt1-gui-actionbuttons_p.h" namespace PolkitTQt1 { @@ -40,28 +40,28 @@ ActionButtons::~ActionButtons() void ActionButtons::setButtons(const TQList<TQAbstractButton *> &buttons) { - Q_FOREACH(TQAbstractButton *ent, buttons) { + TQ_FOREACH(TQAbstractButton *ent, buttons) { addButton(ent); } } TQList<TQAbstractButton *> ActionButtons::buttons() const { - Q_D(const ActionButtons); + TQ_D(const ActionButtons); return d->buttons; } void ActionButtons::addButton(TQAbstractButton *button) { - Q_D(ActionButtons); + TQ_D(ActionButtons); d->addButton(button); } void ActionButtons::removeButton(TQAbstractButton *button) { - Q_D(ActionButtons); + TQ_D(ActionButtons); d->removeButton(button); } @@ -70,4 +70,4 @@ void ActionButtons::removeButton(TQAbstractButton *button) } -#include "polkitqt1-gui-actionbuttons.moc" +#include "polkittqt1-gui-actionbuttons.moc" diff --git a/gui/polkitqt1-gui-actionbuttons.h b/gui/polkittqt1-gui-actionbuttons.h index 4e5988fd0..753a5e5c4 100644 --- a/gui/polkitqt1-gui-actionbuttons.h +++ b/gui/polkittqt1-gui-actionbuttons.h @@ -1,5 +1,5 @@ /* - * This file is part of the Polkit-qt project + * This file is part of the Polkit-tqt project * Copyright (C) 2009 Dario Freddi <drf@kde.org> * * This library is free software; you can redistribute it and/or @@ -18,10 +18,10 @@ * Boston, MA 02110-1301, USA. */ -#ifndef POLKITQT1_GUI_ACTIONBUTTONS_H -#define POLKITQT1_GUI_ACTIONBUTTONS_H +#ifndef POLKITTQT1_GUI_ACTIONBUTTONS_H +#define POLKITTQT1_GUI_ACTIONBUTTONS_H -#include "polkitqt1-gui-actionbutton.h" +#include "polkittqt1-gui-actionbutton.h" namespace PolkitTQt1 { @@ -31,7 +31,7 @@ namespace Gui class ActionButtonsPrivate; /** - * \class ActionButtons polkitqt1-gui-actionbuttons.h ActionButtons + * \class ActionButtons polkittqt1-gui-actionbuttons.h ActionButtons * \author Dario Freddi <drf@kde.org> * * \brief Class used to hold and update a list of TQAbstractButtons @@ -46,7 +46,7 @@ class ActionButtonsPrivate; class ActionButtons : public ActionButton { Q_OBJECT - Q_DECLARE_PRIVATE(ActionButtons) + TQ_DECLARE_PRIVATE(ActionButtons) TQ_DISABLE_COPY(ActionButtons) public: diff --git a/gui/polkitqt1-gui-actionbuttons_p.h b/gui/polkittqt1-gui-actionbuttons_p.h index b6b8518f4..433fb3a57 100644 --- a/gui/polkitqt1-gui-actionbuttons_p.h +++ b/gui/polkittqt1-gui-actionbuttons_p.h @@ -1,5 +1,5 @@ /* - * This file is part of the Polkit-qt project + * This file is part of the Polkit-tqt project * Copyright (C) 2009 Dario Freddi <drf@kde.org> * * This library is free software; you can redistribute it and/or @@ -18,10 +18,10 @@ * Boston, MA 02110-1301, USA. */ -#ifndef POLKITQT1_GUI_ACTIONBUTTONS_P_H -#define POLKITQT1_GUI_ACTIONBUTTONS_P_H +#ifndef POLKITTQT1_GUI_ACTIONBUTTONS_P_H +#define POLKITTQT1_GUI_ACTIONBUTTONS_P_H -#include "polkitqt1-gui-actionbutton_p.h" +#include "polkittqt1-gui-actionbutton_p.h" /** * \internal |