summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-03-22 13:41:43 +0100
committerPali Roh├ír <[email protected]>2017-12-22 09:10:22 +0100
commita096462aeb8cc55750fbd945d74675ad74456403 (patch)
tree8169226b44196dce0e8fc51314d072941c6eea94
parent75f2ec113624668db11f37ab5b8756fe203de171 (diff)
Reactivate qq protocol
-rw-r--r--protocols/qq/qqchatsession.cpp7
-rw-r--r--protocols/qq/qqchatsession.h3
-rw-r--r--protocols/qq/qqcontact.cpp16
-rw-r--r--protocols/qq/qqcontact.h14
-rw-r--r--protocols/qq/qqprotocol.cpp2
-rw-r--r--protocols/qq/ui/qqeditaccountwidget.cpp3
-rw-r--r--protocols/qq/ui/qqwebcamdialog.cpp2
7 files changed, 23 insertions, 24 deletions
diff --git a/protocols/qq/qqchatsession.cpp b/protocols/qq/qqchatsession.cpp
index 0941f1b..0dde7e0 100644
--- a/protocols/qq/qqchatsession.cpp
+++ b/protocols/qq/qqchatsession.cpp
@@ -27,6 +27,7 @@
#include <kactionmenu.h>
#include <kshortcut.h>
#include <kicon.h>
+#include <kmessagebox_queued.h>
#include <kopetecontact.h>
#include <kopetecontactaction.h>
@@ -49,7 +50,7 @@ QQChatSession::QQChatSession( const Kopete::Contact* user, Kopete::ContactPtrLis
kDebug ( 14140 ) << "New message manager for " << user->contactId();
// Needed because this is (indirectly) a KXMLGuiClient, so it can find the gui description .rc file
- setComponentData( protocol->componentData() );
+ //setComponentData( protocol->componentData() );
// make sure Kopete knows about this instance
Kopete::ChatSessionManager::self()->registerChatSession ( this );
@@ -290,13 +291,13 @@ void QQChatSession::slotActionInviteAboutToShow()
{
if( !members().contains( it.value() ) && it.value()->isOnline() )
{
- KAction *a = new Kopete::UI::ContactAction( it.value(), actionCollection() );
+ QAction *a = new Kopete::UI::ContactAction( it.value(), actionCollection() );
m_actionInvite->addAction( a );
m_inviteActions.append( a ) ;
}
}
// Invite someone off-list
- KAction *b=new KAction( KIcon(), i18n ("&Other..."), actionCollection() );
+ QAction *b=new QAction( KIcon(), i18n ("&Other..."), actionCollection() );
actionCollection()->addAction( "actionOther", b );
QObject::connect( b, SIGNAL(triggered(bool)),
this, SLOT(slotInviteOtherContact()) );
diff --git a/protocols/qq/qqchatsession.h b/protocols/qq/qqchatsession.h
index 5cbac9d..42d4e85 100644
--- a/protocols/qq/qqchatsession.h
+++ b/protocols/qq/qqchatsession.h
@@ -13,7 +13,6 @@
#ifndef QQCHATSESSION_H
#define QQCHATSESSION_H
-#include <q3ptrqueue.h>
#include <QLabel>
#include <QList>
#include <QDateTime>
@@ -157,7 +156,7 @@ private:
QList< Kopete::Message > m_pendingOutgoingMessages; // messages queued while we wait for the server to tell us the conference is created.
Kopete::ContactPtrList m_pendingInvites; // people we wanted to invite to the conference, queued while waiting for the conference to be created.
KActionMenu *m_actionInvite;
- typedef QList<KAction*> ActionList;
+ typedef QList<QAction*> ActionList;
ActionList m_inviteActions;
// labels showing secure and logging status
QAction *m_secure;
diff --git a/protocols/qq/qqcontact.cpp b/protocols/qq/qqcontact.cpp
index df6ebc9..1d7d50a 100644
--- a/protocols/qq/qqcontact.cpp
+++ b/protocols/qq/qqcontact.cpp
@@ -25,7 +25,7 @@
#include <QList>
#undef KDE_NO_COMPAT
-#include <kaction.h>
+#include <QAction>
#include <kdebug.h>
#include <kfiledialog.h>
#include <QLineEdit>
@@ -128,31 +128,31 @@ Kopete::ChatSession *QQContact::manager( Kopete::Contact::CanCreateFlags canCrea
return static_cast<QQAccount*>(account())->chatSession( chatMembers, guid, canCreate );
}
-QList<KAction*> *QQContact::customContextMenuActions()
+QList<QAction*> *QQContact::customContextMenuActions()
{
- QList<KAction*> *m_actionCollection = new QList<KAction*>;
+ QList<QAction*> *m_actionCollection = new QList<QAction*>;
// Block/unblock Contact
QString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" );
if( !actionBlock )
{
- actionBlock = new KAction( KIcon("qq_blocked"), label, this );
+ actionBlock = new QAction( KIcon("qq_blocked"), label, this );
connect( actionBlock, SIGNAL(triggered(bool)), this, SLOT(slotBlockUser()) );
//show profile
- actionShowProfile = new KAction( i18n("Show Profile"), this );
+ actionShowProfile = new QAction( i18n("Show Profile"), this );
connect( actionBlock, SIGNAL(triggered(bool)), this, SLOT(slotShowProfile()) );
// Send mail (only available if it is an hotmail account)
- actionSendMail = new KAction( KIcon("mail-message-new"), i18n("Send Email..."), this );
+ actionSendMail = new QAction( KIcon("mail-message-new"), i18n("Send Email..."), this );
connect( actionSendMail, SIGNAL(triggered(bool)), this, SLOT(slotSendMail()) );
// Invite to receive webcam
- actionWebcamReceive = new KAction( KIcon("webcamreceive"), i18n( "View Contact's Webcam" ), this );
+ actionWebcamReceive = new QAction( KIcon("webcamreceive"), i18n( "View Contact's Webcam" ), this );
connect( actionWebcamReceive, SIGNAL(triggered(bool)), this, SLOT(slotWebcamReceive()) );
//Send webcam action
- actionWebcamSend = new KAction( KIcon("webcamsend"), i18n( "Send Webcam" ), this );
+ actionWebcamSend = new QAction( KIcon("webcamsend"), i18n( "Send Webcam" ), this );
connect( actionWebcamSend, SIGNAL(triggered(bool)), this, SLOT(slotWebcamSend()) );
}
else
diff --git a/protocols/qq/qqcontact.h b/protocols/qq/qqcontact.h
index 8aaefc1..9c09b53 100644
--- a/protocols/qq/qqcontact.h
+++ b/protocols/qq/qqcontact.h
@@ -32,7 +32,7 @@
class QPixmap;
-class KAction;
+class QAction;
class KTemporaryFile;
namespace Kopete { class Protocol; }
@@ -93,7 +93,7 @@ public:
virtual bool isReachable();
- virtual QList<KAction*> *customContextMenuActions();
+ virtual QList<QAction*> *customContextMenuActions();
using Kopete::Contact::customContextMenuActions;
/**
@@ -176,11 +176,11 @@ private:
QString m_phoneMobile;
- KAction *actionBlock;
- KAction *actionShowProfile;
- KAction *actionSendMail;
- KAction *actionWebcamReceive;
- KAction *actionWebcamSend;
+ QAction *actionBlock;
+ QAction *actionShowProfile;
+ QAction *actionSendMail;
+ QAction *actionWebcamReceive;
+ QAction *actionWebcamSend;
QString m_obj; //the QQObject
QMap<const char*, QByteArray> m_contactDetail;
diff --git a/protocols/qq/qqprotocol.cpp b/protocols/qq/qqprotocol.cpp
index bb78c41..81d2728 100644
--- a/protocols/qq/qqprotocol.cpp
+++ b/protocols/qq/qqprotocol.cpp
@@ -31,7 +31,7 @@ K_EXPORT_PLUGIN( QQProtocolFactory( "kopete_qq" ) )
QQProtocol *QQProtocol::s_protocol = 0L;
QQProtocol::QQProtocol( QObject* parent, const QVariantList &/*args*/ )
- : Kopete::Protocol( QQProtocolFactory::componentData(), parent ),
+ : Kopete::Protocol( parent ),
qqOnline( Kopete::OnlineStatus::Online, 25, this, 0, QStringList(QString()),
i18n( "Online" ), i18n( "O&nline" ) ),
qqAway( Kopete::OnlineStatus::Away, 25, this, 1, QStringList(QLatin1String("msn_away")),
diff --git a/protocols/qq/ui/qqeditaccountwidget.cpp b/protocols/qq/ui/qqeditaccountwidget.cpp
index 6c54383..d7cbd7b 100644
--- a/protocols/qq/ui/qqeditaccountwidget.cpp
+++ b/protocols/qq/ui/qqeditaccountwidget.cpp
@@ -19,12 +19,10 @@
#include "qqeditaccountwidget.h"
#include <qcheckbox.h>
-#include <q3groupbox.h>
#include <qimage.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
-#include <q3listbox.h>
#include <qpushbutton.h>
#include <qregexp.h>
#include <qspinbox.h>
@@ -54,6 +52,7 @@
#include "qqnotifysocket.h"
#include "qqprotocol.h"
#include "dlgqqvcard.h"
+#include <kmessagebox_queued.h>
// TODO: This was using KAutoConfig before, use KConfigXT instead.
class QQEditAccountWidgetPrivate
diff --git a/protocols/qq/ui/qqwebcamdialog.cpp b/protocols/qq/ui/qqwebcamdialog.cpp
index 9a88079..2a24fbb 100644
--- a/protocols/qq/ui/qqwebcamdialog.cpp
+++ b/protocols/qq/ui/qqwebcamdialog.cpp
@@ -36,7 +36,7 @@ QQWebcamDialog::QQWebcamDialog( const QString &contactId, QWidget * parent )
//setButtons( KDialog::Close );
setDefaultButton( KDialog::Close );
// showButtonSeparator( true );
- setWindowFlags( Qt::WDestructiveClose );
+ //FIXME KF5 setWindowFlags( Qt::WDestructiveClose );
setInitialSize( QSize(320,290) );