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

Port Bookmarks plugin to KF5

parent 98e214c9
......@@ -12,6 +12,7 @@
#include "addbookmarksplugin.h"
#include <kurl.h>
#include <kdebug.h>
#include <kbookmark.h>
#include <qvariant.h>
......@@ -24,10 +25,9 @@
#include "kopetemetacontact.h"
K_PLUGIN_FACTORY( BookmarksPluginFactory, registerPlugin<BookmarksPlugin>(); )
K_EXPORT_PLUGIN( BookmarksPluginFactory( "kopete_addbookmarks" ) )
BookmarksPlugin::BookmarksPlugin(QObject *parent, const QVariantList &/*args*/)
: Kopete::Plugin(BookmarksPluginFactory::componentData(), parent)
: Kopete::Plugin(parent)
{
//kDebug(14501) << "plugin loading";
connect( Kopete::ChatSessionManager::self(), SIGNAL(aboutToDisplay(Kopete::Message&)), this, SLOT(slotBookmarkURLsInMessage(Kopete::Message&)) );
......@@ -81,11 +81,14 @@ void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArra
group = getFolder( group, sender );
if( pos == -1 ){
group.addBookmark( m_map[(KIO::TransferJob*)transfer].url.prettyUrl(), m_map[(KIO::TransferJob*)transfer].url.url() );
URLandName arg1 = m_map[(KIO::TransferJob*)transfer];
URLandName arg2 = m_map[(KIO::TransferJob*)transfer];
//group.addBookmark( m_map[(KIO::TransferJob*)transfer].url.prettyUrl(), m_map[(KIO::TransferJob*)transfer].url.url() );
//FIXME: group.addBookmark( arg1.url.prettyUrl(), arg2.url );
kDebug( 14501 ) << "failed to extract title from first data chunk";
}else {
group.addBookmark( rx.cap( 1 ).simplified(),
m_map[(KIO::TransferJob*)transfer].url.url() );
URLandName arg = m_map[(KIO::TransferJob*)transfer];
//FIXME: group.addBookmark( rx.cap( 1 ).simplified(), arg.url);
}
mgr->emitChanged( group );
m_map.remove( (KIO::TransferJob*)transfer );
......
......@@ -13,11 +13,15 @@
#define ADDBOOKMARKSPLUGIN_H
#include "addbookmarksprefssettings.h"
#include <kgenericfactory.h>
#include <kopeteplugin.h>
#include <kbookmarkmanager.h>
#include <kopetemessage.h>
#include <kgenericfactory.h>
#include <kbookmarkmanager.h>
#include <kio/job.h>
#include <kurl.h>
#include <qmap.h>
/**
......
......@@ -12,22 +12,23 @@
#include "addbookmarkspreferences.h"
#include "ui_addbookmarksprefsui.h"
#include "addbookmarksplugin.h"
#include <kgenericfactory.h>
#include <kopetepluginmanager.h>
#include <kopetecontactlist.h>
#include <kopetemetacontact.h>
#include <qlayout.h>
#include <qnamespace.h>
#include <qradiobutton.h>
#include <QButtonGroup>
#include <QStringListModel>
#include <kopetemetacontact.h>
K_PLUGIN_FACTORY( BookmarksPreferencesFactory, registerPlugin<BookmarksPreferences>(); )
K_EXPORT_PLUGIN( BookmarksPreferencesFactory( "kcm_kopete_addbookmarks" ) )
BookmarksPreferences::BookmarksPreferences(QWidget *parent, const QVariantList &args)
: KCModule(BookmarksPreferencesFactory::componentData(), parent, args)
: KCModule(parent, args)
{
QVBoxLayout* l = new QVBoxLayout( this );
QWidget* w = new QWidget();
......
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