Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a3f641a2 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Port to QAction

parent e2c1e05b
......@@ -32,7 +32,7 @@
#include <ktoolbar.h>
#include <kauthorized.h>
#include <kemoticons.h>
#include <KAction>
#include <QAction>
#include <KActionMenu>
#include <KActionCollection>
......
......@@ -106,7 +106,7 @@ The priority is used to determine which contact to use when you click on a metac
</property>
<property name="text">
<string>Add Account
KAction replaces
QAction replaces
these labels!</string>
</property>
</widget>
......
......@@ -17,7 +17,7 @@
#include "contactnotesplugin.h"
#include <kaction.h>
#include <QAction>
#include <kdebug.h>
#include <kgenericfactory.h>
#include <kicon.h>
......@@ -39,7 +39,7 @@ ContactNotesPlugin::ContactNotesPlugin( QObject *parent, const QVariantList & /*
else
pluginStatic_ = this;
KAction *m_actionEdit=new KAction( KIcon("user-identity"), i18n("&Notes"), this );
QAction *m_actionEdit=new QAction( KIcon("user-identity"), i18n("&Notes"), this );
actionCollection()->addAction( "editContactNotes", m_actionEdit );
connect(m_actionEdit, SIGNAL(triggered(bool)), this, SLOT(slotEditInfo()));
......
......@@ -26,7 +26,7 @@
#include "kopeteplugin.h"
class QString;
class KAction;
class QAction;
namespace Kopete { class MetaContact; }
......
......@@ -19,7 +19,7 @@
#include <qvariant.h>
#include <kaction.h>
#include <QAction>
#include <KLocalizedString>
#include <kshortcut.h>
#include <kmessagebox.h>
......@@ -42,9 +42,9 @@ LatexGUIClient::LatexGUIClient( Kopete::ChatSession *parent )
m_manager = parent;
KAction *previewAction = new KAction( KIcon("latex"), i18n( "Preview Latex Images" ), this );
QAction *previewAction = new QAction( KIcon("latex"), i18n( "Preview Latex Images" ), this );
actionCollection()->addAction( "latexPreview", previewAction );
previewAction->setShortcut( KShortcut(Qt::CTRL + Qt::Key_L) );
previewAction->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_L) );
connect(previewAction, SIGNAL(triggered(bool)), this, SLOT(slotPreview()) );
setXMLFile( "latexchatui.rc" );
......
......@@ -20,7 +20,7 @@
#include "kopetecontact.h"
#include "kopetepluginmanager.h"
#include <kaction.h>
#include <QAction>
#include <kstandardaction.h>
#include <KLocalizedString>
#include <kgenericfactory.h>
......@@ -44,10 +44,10 @@ PrivacyGUIClient::PrivacyGUIClient(Kopete::ChatSession *parent)
QList<Kopete::Contact*> mb=m_manager->members();
actionAddToWhiteList = new KAction( KIcon("privacy_whitelist"), i18n("Add to WhiteList" ), this );
actionAddToWhiteList = new QAction( KIcon("privacy_whitelist"), i18n("Add to WhiteList" ), this );
actionCollection()->addAction( "addToWhiteList", actionAddToWhiteList );
connect( actionAddToWhiteList, SIGNAL(triggered(bool)), this, SLOT(slotAddToWhiteList()) );
actionAddToBlackList = new KAction( KIcon("privacy_blacklist"), i18n("Add to BlackList" ), this );
actionAddToBlackList = new QAction( KIcon("privacy_blacklist"), i18n("Add to BlackList" ), this );
actionCollection()->addAction( "addToBlackList", actionAddToBlackList );
connect( actionAddToBlackList, SIGNAL(triggered(bool)), this, SLOT(slotAddToBlackList()) );
actionAddToWhiteList->setEnabled(true);
......
......@@ -20,7 +20,7 @@
#include <kxmlguiclient.h>
namespace Kopete { class ChatSession; }
class KAction;
class QAction;
class PrivacyGUIClient : public QObject , public KXMLGUIClient
{
......@@ -34,8 +34,8 @@ private slots:
private:
Kopete::ChatSession *m_manager;
KAction *actionAddToWhiteList;
KAction *actionAddToBlackList;
QAction *actionAddToWhiteList;
QAction *actionAddToBlackList;
};
#endif
......@@ -18,7 +18,7 @@
#include <kgenericfactory.h>
#include <QIcon>
#include <kaction.h>
#include <QAction>
#include <knotification.h>
#include <kplugininfo.h>
......@@ -50,10 +50,10 @@ PrivacyPlugin::PrivacyPlugin( QObject *parent, const QVariantList & )
if( !pluginStatic_ )
pluginStatic_ = this;
KAction *addToWhiteList = new KAction( QIcon::fromTheme("privacy_whitelist"), i18n("Add to WhiteList" ), this );
QAction *addToWhiteList = new QAction( QIcon::fromTheme("privacy_whitelist"), i18n("Add to WhiteList" ), this );
actionCollection()->addAction( "addToWhiteList", addToWhiteList );
connect(addToWhiteList, SIGNAL(triggered(bool)), this, SLOT(slotAddToWhiteList()));
KAction *addToBlackList = new KAction( QIcon::fromTheme("privacy_blacklist"), i18n("Add to BlackList" ), this );
QAction *addToBlackList = new QAction( QIcon::fromTheme("privacy_blacklist"), i18n("Add to BlackList" ), this );
actionCollection()->addAction( "addToBlackList", addToBlackList );
connect(addToBlackList, SIGNAL(triggered(bool)), this, SLOT(slotAddToBlackList()));
......
......@@ -25,7 +25,7 @@
#include <kgenericfactory.h>
#include <kaboutdata.h>
#include <kaction.h>
#include <QAction>
#include <kactioncollection.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
......@@ -56,7 +56,7 @@ StatisticsPlugin::StatisticsPlugin( QObject *parent, const QVariantList &/*args*
{
m_db = 0L;
KAction *viewMetaContactStatistics = new KAction( QIcon::fromTheme(QStringLiteral("view-statistics")), i18n("View &Statistics" ),
QAction *viewMetaContactStatistics = new QAction( QIcon::fromTheme(QStringLiteral("view-statistics")), i18n("View &Statistics" ),
this );
actionCollection()->addAction ( "viewMetaContactStatistics", viewMetaContactStatistics );
connect(viewMetaContactStatistics, SIGNAL(triggered(bool)), this, SLOT(slotViewStatistics()));
......
......@@ -17,7 +17,7 @@
#include "bonjouraccount.h"
#include <kaction.h>
#include <QAction>
#include <kdebug.h>
#include <KLocalizedString>
#include <kactionmenu.h>
......
......@@ -20,7 +20,7 @@
#include <QList>
#include <QHostAddress>
#include <kaction.h>
#include <QAction>
#include <kdebug.h>
#include <KLocalizedString>
......
......@@ -27,7 +27,7 @@
#include "bonjourcontactconnection.h"
class KAction;
class QAction;
class KActionCollection;
namespace Kopete { class Account; }
namespace Kopete { class ChatSession; }
......
......@@ -354,7 +354,7 @@ private slots:
//void slotIncomingJingleSession(const QString &sessionType, JingleSession *session);
};
/*class JabberMoodAction : public KAction
/*class JabberMoodAction : public QAction
{
Q_OBJECT
public:
......
......@@ -26,7 +26,7 @@
#include <kdebug.h>
#include <KLocalizedString>
#include <kicon.h>
#include <kaction.h>
#include <QAction>
#include <kactioncollection.h>
#include "kopetechatsessionmanager.h"
#include "kopetemessage.h"
......@@ -68,12 +68,12 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas
slotUpdateDisplayName ();
#ifdef JINGLE_SUPPORT
KAction *jingleSessionGui = new KAction(i18n("Show audio calls"), members().first());
QAction *jingleSessionGui = new QAction(i18n("Show audio calls"), members().first());
jingleSessionGui->setIcon(KIcon("voicecall"));
connect(jingleSessionGui, SIGNAL(triggered(bool)), SLOT (slotJingleSessionGui()));
setComponentData(protocol->componentData());
KAction *jingleSession = new KAction(i18n("Start audio call"), members().first());
QAction *jingleSession = new QAction(i18n("Start audio call"), members().first());
jingleSession->setIcon(KIcon("voicecall"));
connect(jingleSession, SIGNAL(triggered(bool)), SLOT (slotJingleSession()));
setComponentData(protocol->componentData());
......@@ -95,12 +95,12 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas
}
/*KAction *jingleaudiocall = new KAction(i18n("Jingle Audio call" ), members().first());
/*QAction *jingleaudiocall = new QAction(i18n("Jingle Audio call" ), members().first());
connect(jingleaudiocall, SIGNAL(triggered(bool)), SLOT (slotJingleAudioCall()));
setComponentData(protocol->componentData());
jingleaudiocall->setEnabled( false );
KAction *jinglevideocall = new KAction(i18n("Jingle Video call" ), members().first());
QAction *jinglevideocall = new QAction(i18n("Jingle Video call" ), members().first());
connect(jinglevideocall, SIGNAL(triggered(bool)), SLOT (slotJingleVideoCall()));
setComponentData(protocol->componentData());
jinglevideocall->setEnabled( false );*/
......
......@@ -182,21 +182,21 @@ QList<QAction *> *JabberContact::customContextMenuActions ()
KActionMenu *actionSetAvailability = new KActionMenu ( KIcon("user-identity", 0, QStringList() << QString() << "user-online"), i18n ("Set Availability"), this );
#define KACTION(status, text, name, slot) \
#define QAction(status, text, name, slot) \
{ QAction *tmp = new QAction(this); \
tmp->setIcon( KIcon(QIcon((status).iconFor(this)))); \
tmp->setText( text ); \
connect(tmp, SIGNAL(triggered(bool)), (slot));\
actionSetAvailability->addAction(tmp); }
KACTION( protocol()->JabberKOSOnline, i18n ("Online"), "actionOnline", SLOT(slotStatusOnline()) );
KACTION( protocol()->JabberKOSChatty, i18n ("Free to Chat"), "actionChatty", SLOT(slotStatusChatty()) );
KACTION( protocol()->JabberKOSAway, i18n ("Away"), "actionAway", SLOT(slotStatusAway()) );
KACTION( protocol()->JabberKOSXA, i18n ("Extended Away"), "actionXA", SLOT(slotStatusXA()) );
KACTION( protocol()->JabberKOSDND, i18n ("Do Not Disturb"), "actionDND", SLOT(slotStatusDND()) );
KACTION( protocol()->JabberKOSInvisible, i18n ("Invisible"), "actionInvisible", SLOT(slotStatusInvisible()) );
QAction( protocol()->JabberKOSOnline, i18n ("Online"), "actionOnline", SLOT(slotStatusOnline()) );
QAction( protocol()->JabberKOSChatty, i18n ("Free to Chat"), "actionChatty", SLOT(slotStatusChatty()) );
QAction( protocol()->JabberKOSAway, i18n ("Away"), "actionAway", SLOT(slotStatusAway()) );
QAction( protocol()->JabberKOSXA, i18n ("Extended Away"), "actionXA", SLOT(slotStatusXA()) );
QAction( protocol()->JabberKOSDND, i18n ("Do Not Disturb"), "actionDND", SLOT(slotStatusDND()) );
QAction( protocol()->JabberKOSInvisible, i18n ("Invisible"), "actionInvisible", SLOT(slotStatusInvisible()) );
#undef KACTION
#undef QAction
KActionMenu *actionSelectResource = new KActionMenu ( i18n ("Select Resource"), this );
......
......@@ -135,7 +135,7 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID)
this, SLOT(slotGotAuthRequest(QString,QString)) );
// Create actions
mEditInfoAction = new KAction( QIcon::fromTheme("user-properties"), i18n( "Edit User Info..." ), this );
mEditInfoAction = new QAction( QIcon::fromTheme("user-properties"), i18n( "Edit User Info..." ), this );
QObject::connect( mEditInfoAction, SIGNAL(triggered(bool)), this, SLOT(slotUserInfo()) );
mActionInvisible = new KToggleAction( i18n( "In&visible" ), this );
......@@ -190,11 +190,11 @@ void ICQAccount::fillActionMenu( KActionMenu *actionMenu )
KActionMenu *xtrazStatusMenu = new KActionMenu( i18n( "Set Xtraz Status" ), actionMenu );
KAction* xtrazStatusSetAction = new KAction( i18n( "Set Status..." ), xtrazStatusMenu );
QAction* xtrazStatusSetAction = new QAction( i18n( "Set Status..." ), xtrazStatusMenu );
QObject::connect( xtrazStatusSetAction, SIGNAL(triggered(bool)), this, SLOT(setXtrazStatus()) );
xtrazStatusMenu->addAction( xtrazStatusSetAction );
KAction* xtrazStatusEditAction = new KAction( i18n( "Edit Statuses..." ), xtrazStatusMenu );
QAction* xtrazStatusEditAction = new QAction( i18n( "Edit Statuses..." ), xtrazStatusMenu );
QObject::connect( xtrazStatusEditAction, SIGNAL(triggered(bool)), this, SLOT(editXtrazStatuses()) );
xtrazStatusMenu->addAction( xtrazStatusEditAction );
......
......@@ -25,7 +25,7 @@
#include "oscartypeclasses.h"
#include "oscarpresence.h"
class KAction;
class QAction;
class KToggleAction;
namespace Kopete { class StatusMessage; }
......@@ -110,7 +110,7 @@ private:
Kopete::StatusMessage mInitialStatusMessage;
ICQUserInfoWidget* mInfoWidget;
KAction* mEditInfoAction;
QAction* mEditInfoAction;
KToggleAction* mActionInvisible;
};
......
......@@ -20,7 +20,7 @@ namespace Xtraz
{
StatusAction::StatusAction( const Xtraz::Status &status, QObject *parent )
: KAction( parent ), mStatus( status )
: QAction( parent ), mStatus( status )
{
this->setText( mStatus.description() );
......
......@@ -17,14 +17,14 @@
#ifndef XTRAZSTATUSACTION_H
#define XTRAZSTATUSACTION_H
#include <kaction.h>
#include <QAction>
#include "xtrazstatus.h"
namespace Xtraz
{
class StatusAction: public KAction
class StatusAction: public QAction
{
Q_OBJECT
public:
......
......@@ -28,7 +28,7 @@
#include <QtGui/QTextCharFormat>
#include <QtGui/QTextBlock>
#include <kaction.h>
#include <QAction>
#include <kdebug.h>
#include <KLocalizedString>
#include <krandom.h>
......@@ -353,7 +353,7 @@ void OscarContact::setEncoding( int mib )
}
//here's where a filetransfer usually begins
//could be called by a KAction or our dcop code or something
//could be called by a QAction or our dcop code or something
void OscarContact::sendFile( const KUrl &sourceURL, const QString &altFileName, uint fileSize )
{
kDebug(OSCAR_GEN_DEBUG) << "file: '" << sourceURL
......
......@@ -17,7 +17,7 @@
#include "testbedaccount.h"
#include <kaction.h>
#include <QAction>
#include <kdebug.h>
#include <KLocalizedString>
#include <kactionmenu.h>
......@@ -52,9 +52,9 @@ void TestbedAccount::fillActionMenu( KActionMenu *actionMenu )
actionMenu->addSeparator();
KAction *action;
QAction *action;
action = new KAction (QIcon::fromTheme("testbed_showvideo"), i18n ("Show my own video..."), actionMenu );
action = new QAction (QIcon::fromTheme("testbed_showvideo"), i18n ("Show my own video..."), actionMenu );
//, "actionShowVideo");
QObject::connect( action, SIGNAL(triggered(bool)), this, SLOT(slotShowVideo()) );
actionMenu->addAction(action);
......
......@@ -18,7 +18,7 @@
#include <QList>
#include <kaction.h>
#include <QAction>
#include <kdebug.h>
#include <KLocalizedString>
......@@ -97,11 +97,11 @@ Kopete::ChatSession* TestbedContact::manager( CanCreateFlags canCreateFlags )
}
//QList<KAction *> *TestbedContact::customContextMenuActions() //OBSOLETE
//QList<QAction *> *TestbedContact::customContextMenuActions() //OBSOLETE
//{
//FIXME!!! this function is obsolete, we should use XMLGUI instead
/*m_actionCollection = new KActionCollection( this, "userColl" );
m_actionPrefs = new KAction(i18n( "&Contact Settings" ), 0, this,
m_actionPrefs = new QAction(i18n( "&Contact Settings" ), 0, this,
SLOT(showContactSettings()), m_actionCollection, "contactSettings" );
return m_actionCollection;*/
......
......@@ -20,12 +20,12 @@
#include <QMap>
#include <QList>
#include <KAction>
#include <QAction>
#include "kopetecontact.h"
#include "kopetemessage.h"
class KAction;
class QAction;
class KActionCollection;
namespace Kopete { class Account; }
namespace Kopete { class ChatSession; }
......@@ -58,7 +58,7 @@ public:
/**
* Return the actions for this contact
*/
//virtual QList<KAction *> *customContextMenuActions();
//virtual QList<QAction *> *customContextMenuActions();
using Kopete::Contact::customContextMenuActions;
/**
* Returns a Kopete::ChatSession associated with this contact
......@@ -97,7 +97,7 @@ protected:
Kopete::ChatSession* m_msgManager;
KActionCollection* m_actionCollection;
Type m_type;
KAction* m_actionPrefs;
QAction* m_actionPrefs;
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment