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 ac4301a7 authored by R. Harish Navnit's avatar R. Harish Navnit Committed by Pali Rohár

Modify kopete protocol

  * Drop the KComponentData &instance param in Kopete::Protocol ctor.
  * testbed protocol compiles with KF5
parent 1c5910a9
......@@ -101,7 +101,7 @@ public:
class FakeProtocol : public Kopete::Protocol
{
public:
FakeProtocol( const KComponentData &instance, QObject *parent ) : Kopete::Protocol(instance, parent){}
FakeProtocol( QObject *parent ) : Kopete::Protocol(parent){}
Kopete::Account* createNewAccount( const QString &/*accountId*/ ){return 0L;}
AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/){return 0L;}
KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */){return 0L;}
......@@ -556,7 +556,8 @@ void ChatWindowConfig::slotGetChatStyles()
void ChatWindowConfig::createPreviewChatSession()
{
m_previewProtocol = new FakeProtocol( KComponentData(QByteArray("kopete-preview-chatwindowstyle")), 0 ); m_previewProtocol->setObjectName( QLatin1String("kopete-preview-chatwindowstyle") );
m_previewProtocol = new FakeProtocol( 0 );
m_previewProtocol->setObjectName( QLatin1String("kopete-preview-chatwindowstyle") );
m_previewAccount = new FakeAccount(m_previewProtocol, QString("previewaccount"));
m_myself = new FakeContact(m_previewAccount, i18nc("This is the myself preview contact id", "myself@preview"), Kopete::ContactList::self()->myself());
......
......@@ -50,8 +50,8 @@ public:
Kopete::OnlineStatus accountNotConnectedStatus;
};
Protocol::Protocol( const KAboutData &instance, QObject *parent, bool canAddMyself )
: Plugin( instance, parent ), d(new Private())
Protocol::Protocol( QObject *parent, bool canAddMyself )
: Plugin( parent ), d(new Private())
{
d->canAddMyself = canAddMyself;
d->mStickLastSeen = Global::Properties::self()->lastSeen();
......
......@@ -173,7 +173,7 @@ protected:
* @param parent The protocol's parent object
* @param name The protocol's name
*/
Protocol( const KAboutData &instance, QObject *parent, bool canAddMyself = false );
Protocol( QObject *parent, bool canAddMyself = false );
/**
* @brief Sets the capabilities of this protcol.
......
......@@ -97,16 +97,16 @@ Kopete::ChatSession* TestbedContact::manager( CanCreateFlags canCreateFlags )
}
QList<KAction *> *TestbedContact::customContextMenuActions() //OBSOLETE
{
//QList<KAction *> *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,
SLOT(showContactSettings()), m_actionCollection, "contactSettings" );
return m_actionCollection;*/
return 0L;
}
//return 0L;
//}
void TestbedContact::showContactSettings()
{
......
......@@ -17,8 +17,11 @@
#ifndef TESTBEDCONTACT_H
#define TESTBEDCONTACT_H
#include <qmap.h>
#include <QMap>
#include <QList>
#include <KAction>
#include "kopetecontact.h"
#include "kopetemessage.h"
......@@ -55,7 +58,7 @@ public:
/**
* Return the actions for this contact
*/
virtual QList<KAction *> *customContextMenuActions();
//virtual QList<KAction *> *customContextMenuActions();
using Kopete::Contact::customContextMenuActions;
/**
* Returns a Kopete::ChatSession associated with this contact
......
......@@ -18,6 +18,7 @@
#include <QList>
#include <kgenericfactory.h>
#include <KLocalizedString>
#include <kdebug.h>
#include "kopeteaccountmanager.h"
......@@ -27,12 +28,11 @@
#include "testbededitaccountwidget.h"
K_PLUGIN_FACTORY( TestbedProtocolFactory, registerPlugin<TestbedProtocol>(); )
K_EXPORT_PLUGIN( TestbedProtocolFactory( "kopete_testbed" ) )
TestbedProtocol *TestbedProtocol::s_protocol = 0L;
TestbedProtocol::TestbedProtocol( QObject* parent, const QVariantList &/*args*/ )
: Kopete::Protocol( TestbedProtocolFactory::componentData(), parent ),
: Kopete::Protocol( parent ),
testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, QStringList(QString()),
i18n( "Online" ), i18n( "O&nline" ), Kopete::OnlineStatusManager::Online ),
testbedAway( Kopete::OnlineStatus::Away, 25, this, 1, QStringList(QLatin1String("msn_away")),
......
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