summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR. Harish Navnit <[email protected]>2016-01-08 23:00:30 +0530
committerPali Roh├ír <[email protected]>2017-12-22 09:10:19 +0100
commit2b97a12bbe074fe2f71a1532fb3f980bb98a34ca (patch)
tree26eb2b4821c084ab5bf868a2ccecd934491f312c
parent2086ed489f1a48d0a0ab695a89289e4c9f642b88 (diff)
Fix, fix, dirty fixes, workarounds, cleanup
-rw-r--r--kopete/chatwindow/chatview.cpp16
-rw-r--r--kopete/chatwindow/kopetechatwindow.cpp17
-rw-r--r--kopete/chatwindow/kopetechatwindowstylemanager.cpp2
-rw-r--r--kopete/chatwindow/kopeteemailwindow.cpp7
-rw-r--r--kopete/chatwindow/kopeterichtextwidget.cpp6
-rw-r--r--kopete/config/appearance/appearanceconfig.cpp8
-rw-r--r--kopete/config/appearance/layout/Token.cpp2
-rw-r--r--kopete/config/appearance/layout/Token.h4
-rw-r--r--kopete/config/appearance/layout/TokenDropTarget.cpp8
-rw-r--r--kopete/config/appearance/layout/TokenPool.cpp4
-rw-r--r--kopete/config/appearance/tooltipeditdialog.cpp4
-rw-r--r--kopete/config/chatwindow/chatwindowconfig.cpp12
-rw-r--r--kopete/contactlist/contactlistlayoutmanager.cpp4
-rw-r--r--kopete/contactlist/contactlistmodel.cpp15
-rw-r--r--kopete/contactlist/contactlistmodel.h2
-rw-r--r--kopete/kopeteapplication.cpp11
-rw-r--r--kopete/kopeteapplication.h3
-rw-r--r--kopete/kopetedbusinterface.cpp2
-rw-r--r--kopete/kopetedbusinterface_p.cpp10
-rw-r--r--kopete/kopeteidentitystatusbaricon.cpp2
-rw-r--r--kopete/kopetewindow.cpp33
-rw-r--r--kopete/systemtray.cpp21
22 files changed, 108 insertions, 85 deletions
diff --git a/kopete/chatwindow/chatview.cpp b/kopete/chatwindow/chatview.cpp
index 5f3c9af..b097810 100644
--- a/kopete/chatwindow/chatview.cpp
+++ b/kopete/chatwindow/chatview.cpp
@@ -272,7 +272,7 @@ void ChatView::resetFontAndColor()
return;
QString contactListGroup = QString(QLatin1String("chatwindow_") + QString(mc->metaContactId().toString()));
- KConfigGroup config = KGlobal::config()->group(contactListGroup);
+ KConfigGroup config = KSharedConfig::openConfig()->group(contactListGroup);
editPart()->resetConfig( config );
config.sync();
}
@@ -807,7 +807,7 @@ void ChatView::messageSentSuccessfully()
void ChatView::saveOptions()
{
- KSharedConfig::Ptr config = KGlobal::config();
+ KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup kopeteChatWindowMainWinSettings( config, ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
kopeteChatWindowMainWinSettings.writeEntry( QLatin1String("ChatViewSplitter"), d->splitter->saveState().toBase64() );
saveChatSettings();
@@ -826,7 +826,7 @@ void ChatView::saveChatSettings()
QString contactListGroup = QString(QLatin1String("chatwindow_") +
QString(mc->metaContactId().toString()));
- KConfigGroup config = KGlobal::config()->group(contactListGroup);
+ KConfigGroup config = KSharedConfig::openConfig()->group(contactListGroup);
// If settings are the same as default delete entry from config. This will propagate global setting change.
if ( editPart()->isRichTextEnabled() != Kopete::BehaviorSettings::self()->richTextByDefault() )
@@ -852,7 +852,7 @@ void ChatView::loadChatSettings()
//read settings for metacontact
QString contactListGroup = QString(QLatin1String("chatwindow_") +
QString(contacts.first()->metaContact()->metaContactId().toString()));
- KConfigGroup config(KGlobal::config(), contactListGroup );
+ KConfigGroup config(KSharedConfig::openConfig(), contactListGroup );
bool enableRichText = config.readEntry( "EnableRichText", Kopete::BehaviorSettings::self()->richTextByDefault() );
editPart()->textEdit()->setRichTextEnabled( enableRichText );
emit rtfEnabled( this, editPart()->isRichTextEnabled() );
@@ -863,7 +863,7 @@ void ChatView::loadChatSettings()
void ChatView::readOptions()
{
- KConfigGroup kopeteChatWindowMainWinSettings( KGlobal::config(), ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
+ KConfigGroup kopeteChatWindowMainWinSettings( KSharedConfig::openConfig(), ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
//kDebug(14000) << "reading splitterpos from key: " << dockKey;
QByteArray state;
state = kopeteChatWindowMainWinSettings.readEntry( QLatin1String("ChatViewSplitter"), state );
@@ -928,6 +928,8 @@ void ChatView::dragMoveEvent( QDragMoveEvent * event )
bool ChatView::isDragEventAccepted( const QDragMoveEvent * event ) const
{
+ /**
+ * TODO: Implement virtual functions in QDragMoveEvent
if( event->provides( "application/kopete.metacontacts.list" ) )
{
QByteArray encodedData = event->encodedData ( "application/kopete.metacontacts.list" );
@@ -959,9 +961,12 @@ bool ChatView::isDragEventAccepted( const QDragMoveEvent * event ) const
if ( contact && contact->canAcceptFiles() )
return true;
}
+ */
return false;
}
+/* TODO : Zero uses of dropEvent() function found.
+ * Fix the errors or remove the function ?
void ChatView::dropEvent ( QDropEvent * event )
{
Kopete::ContactPtrList contacts;
@@ -1018,6 +1023,7 @@ void ChatView::dropEvent ( QDropEvent * event )
QWidget::dropEvent(event);
}
+*/
void ChatView::registerContextMenuHandler( QObject *target, const char* slot )
{
diff --git a/kopete/chatwindow/kopetechatwindow.cpp b/kopete/chatwindow/kopetechatwindow.cpp
index f7310f8..e4d421d 100644
--- a/kopete/chatwindow/kopetechatwindow.cpp
+++ b/kopete/chatwindow/kopetechatwindow.cpp
@@ -265,7 +265,7 @@ KopeteChatWindow::KopeteChatWindow( Kopete::ChatSession::Form form, QWidget *par
windows.append( this );
windowListChanged();
- m_alwaysShowTabs = KGlobal::config()->group( "ChatWindowSettings" ).
+ m_alwaysShowTabs = KSharedConfig::openConfig()->group( "ChatWindowSettings" ).
readEntry( QLatin1String("AlwaysShowTabs"), false );
// kDebug( 14010 ) << "Open Windows: " << windows.count();
@@ -399,13 +399,13 @@ void KopeteChatWindow::initActions(void)
tabRight=new QAction( i18n( "&Activate Next Tab" ), coll );
coll->addAction( "tabs_right", tabRight );
- tabRight->setShortcut( KStandardShortcut::tabNext() );
+ tabRight->setShortcuts( KStandardShortcut::tabNext() );
tabRight->setEnabled( false );
connect( tabRight, SIGNAL(triggered(bool)), this, SLOT(slotNextTab()) );
tabLeft=new QAction( i18n( "&Activate Previous Tab" ), coll );
coll->addAction( "tabs_left", tabLeft );
- tabLeft->setShortcut( KStandardShortcut::tabPrev() );
+ tabLeft->setShortcuts( KStandardShortcut::tabPrev() );
tabLeft->setEnabled( false );
connect( tabLeft, SIGNAL(triggered(bool)), this, SLOT(slotPreviousTab()) );
@@ -503,7 +503,8 @@ void KopeteChatWindow::initActions(void)
QAction *animAction = new QAction( i18n("Toolbar Animation"), coll );
coll->addAction( "toolbar_animation", animAction );
- animAction->setDefaultWidget( anim );
+ QWidgetAction *animWidgetAction = static_cast<QWidgetAction *>(animAction);
+ animWidgetAction->setDefaultWidget( anim );
//toolBar()->insertWidget( 99, anim->width(), anim );
//toolBar()->alignItemRight( 99 );
@@ -650,7 +651,7 @@ void KopeteChatWindow::createTabBar()
{
if( !m_tabBar )
{
- KConfigGroup cg( KGlobal::config(), QLatin1String("ChatWindowSettings") );
+ KConfigGroup cg( KSharedConfig::openConfig(), QLatin1String("ChatWindowSettings") );
m_tabBar = new KTabWidget( mainArea );
m_tabBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
@@ -1167,7 +1168,7 @@ void KopeteChatWindow::readOptions()
{
// load and apply config file settings affecting the appearance of the UI
// kDebug(14010) ;
- applyMainWindowSettings( KGlobal::config()->group( ( initialForm == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) ) );
+ applyMainWindowSettings( KSharedConfig::openConfig()->group( ( initialForm == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) ) );
//config->setGroup( QLatin1String("ChatWindowSettings") );
}
@@ -1175,12 +1176,12 @@ void KopeteChatWindow::saveOptions()
{
// kDebug(14010) ;
- KConfigGroup kopeteChatWindowMainWinSettings( KGlobal::config(), ( initialForm == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
+ KConfigGroup kopeteChatWindowMainWinSettings( KSharedConfig::openConfig(), ( initialForm == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
// saves menubar,toolbar and statusbar setting
saveMainWindowSettings( kopeteChatWindowMainWinSettings );
if ( m_tabBar ) {
- KConfigGroup chatWindowSettings( KGlobal::config(), QLatin1String("ChatWindowSettings") );
+ KConfigGroup chatWindowSettings( KSharedConfig::openConfig(), QLatin1String("ChatWindowSettings") );
chatWindowSettings.writeEntry ( QLatin1String("Tab Placement"), (int)m_tabBar->tabPosition() );
chatWindowSettings.sync();
}
diff --git a/kopete/chatwindow/kopetechatwindowstylemanager.cpp b/kopete/chatwindow/kopetechatwindowstylemanager.cpp
index 7130be7..53f4b80 100644
--- a/kopete/chatwindow/kopetechatwindowstylemanager.cpp
+++ b/kopete/chatwindow/kopetechatwindowstylemanager.cpp
@@ -356,7 +356,7 @@ ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &styleNa
// NOTE: This is a hidden config switch for style developers
// Check in the config if the cache is disabled.
// if the cache is disabled, reload the style every time it's getted.
- KConfigGroup config(KGlobal::config(), "KopeteStyleDebug");
+ KConfigGroup config(KSharedConfig::openConfig(), "KopeteStyleDebug");
bool disableCache = config.readEntry("disableStyleCache", false);
if(disableCache)
{
diff --git a/kopete/chatwindow/kopeteemailwindow.cpp b/kopete/chatwindow/kopeteemailwindow.cpp
index 10f917f..79c0b54 100644
--- a/kopete/chatwindow/kopeteemailwindow.cpp
+++ b/kopete/chatwindow/kopeteemailwindow.cpp
@@ -70,7 +70,6 @@
#include <QAction>
K_PLUGIN_FACTORY( EmailWindowPluginFactory, registerPlugin<EmailWindowPlugin>(); )
-K_EXPORT_PLUGIN( EmailWindowPluginFactory( "kopete_emailwindow" ) )
EmailWindowPlugin::EmailWindowPlugin(QObject *parent, const QVariantList &) :
Kopete::ViewPlugin( parent )
@@ -187,7 +186,7 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP
else
toggleMode( Send );
- KSharedConfig::Ptr config = KGlobal::config();
+ KSharedConfig::Ptr config = KSharedConfig::openConfig();
applyMainWindowSettings( config->group( QLatin1String( "KopeteEmailWindow" ) ) );
d->sendInProgress = false;
@@ -205,7 +204,7 @@ KopeteEmailWindow::~KopeteEmailWindow()
emit( closing( this ) );
// saves menubar, toolbar and statusbar setting
- KConfigGroup cg( KGlobal::config(), QLatin1String( "KopeteEmailWindow" ) );
+ KConfigGroup cg( KSharedConfig::openConfig(), QLatin1String( "KopeteEmailWindow" ) );
saveMainWindowSettings( cg );
cg.sync();
@@ -311,7 +310,7 @@ void KopeteEmailWindow::slotSmileyActivated(const QString &sm )
void KopeteEmailWindow::slotConfToolbar()
{
- KConfigGroup cg( KGlobal::config(), QLatin1String( "KopeteEmailWindow" ) );
+ KConfigGroup cg( KSharedConfig::openConfig(), QLatin1String( "KopeteEmailWindow" ) );
saveMainWindowSettings( cg );
QPointer <KEditToolBar> dlg = new KEditToolBar(actionCollection());
dlg->setResourceFile("kopeteemailwindow.rc");
diff --git a/kopete/chatwindow/kopeterichtextwidget.cpp b/kopete/chatwindow/kopeterichtextwidget.cpp
index 8713fc0..210b284 100644
--- a/kopete/chatwindow/kopeterichtextwidget.cpp
+++ b/kopete/chatwindow/kopeterichtextwidget.cpp
@@ -109,8 +109,8 @@ KopeteRichTextWidget::KopeteRichTextWidget(QWidget* parent, Kopete::Protocol::Ca
KopeteRichTextWidget::~KopeteRichTextWidget()
{
- KConfigGroup configGroupMode( KGlobal::config(), QLatin1String( "KopeteChatWindowGroupMode" ));
- KConfigGroup configIndividual( KGlobal::config(), QLatin1String( "KopeteChatWindowIndividualMode" ));
+ KConfigGroup configGroupMode( KSharedConfig::openConfig(), QLatin1String( "KopeteChatWindowGroupMode" ));
+ KConfigGroup configIndividual( KSharedConfig::openConfig(), QLatin1String( "KopeteChatWindowIndividualMode" ));
configGroupMode.writeEntry( "AutoResize", d->autoResize->isChecked());
configIndividual.writeEntry( "AutoResize", d->autoResize->isChecked());
delete d;
@@ -162,7 +162,7 @@ void KopeteRichTextWidget::slotEnableAutoResize(bool enable)
void KopeteRichTextWidget::createActions(KActionCollection *actionCollection)
{
- KConfigGroup config(KGlobal::config(), QLatin1String("KopeteChatWindowIndividualMode"));
+ KConfigGroup config(KSharedConfig::openConfig(), QLatin1String("KopeteChatWindowIndividualMode"));
bool autoResizeEnabled = config.readEntry("AutoResize", true);
d->autoResize = new KToggleAction( i18n("Input auto-resize"), actionCollection );
diff --git a/kopete/config/appearance/appearanceconfig.cpp b/kopete/config/appearance/appearanceconfig.cpp
index 427693e..6c85063 100644
--- a/kopete/config/appearance/appearanceconfig.cpp
+++ b/kopete/config/appearance/appearanceconfig.cpp
@@ -23,6 +23,7 @@
#include "tooltipeditdialog.h"
+#include <QTimer>
#include <QCheckBox>
#include <QDir>
#include <QLayout>
@@ -42,7 +43,7 @@
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <kio/netaccess.h>
-#include <khtmlview.h>
+#include <KF5/KHtml/khtmlview.h>
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -51,6 +52,7 @@
#include <kurlrequesterdialog.h>
#include <krun.h>
#include <kfiledialog.h>
+#include <KGlobal>
#include "kopeteglobal.h"
@@ -85,7 +87,7 @@ public:
AppearanceConfig::AppearanceConfig(QWidget *parent, const QVariantList &args )
-: KCModule( KopeteAppearanceConfigFactory::componentData(), parent, args ), d(new Private())
+: KCModule( parent, args ), d(new Private())
{
QVBoxLayout *layout = new QVBoxLayout(this);
// since the tab widget is already within a layout with margins in the KSettings::Dialog
@@ -95,7 +97,7 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const QVariantList &args )
d->mAppearanceTabCtl->setObjectName("mAppearanceTabCtl");
layout->addWidget( d->mAppearanceTabCtl );
- KConfigGroup config(KGlobal::config(), "ChatWindowSettings");
+ KConfigGroup config(KSharedConfig::openConfig(), "ChatWindowSettings");
// "Contact List" TAB =======================================================
QWidget *contactListWidget = new QWidget(d->mAppearanceTabCtl);
diff --git a/kopete/config/appearance/layout/Token.cpp b/kopete/config/appearance/layout/Token.cpp
index 79eb21c..11cd707 100644
--- a/kopete/config/appearance/layout/Token.cpp
+++ b/kopete/config/appearance/layout/Token.cpp
@@ -85,7 +85,7 @@ Token::value() const
return m_value;
}
-KIcon
+QIcon
Token::icon() const
{
return m_icon;
diff --git a/kopete/config/appearance/layout/Token.h b/kopete/config/appearance/layout/Token.h
index 8860b8e..b8e059f 100644
--- a/kopete/config/appearance/layout/Token.h
+++ b/kopete/config/appearance/layout/Token.h
@@ -43,7 +43,7 @@ class Token : public QWidget
explicit Token( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
- KIcon icon() const;
+ QIcon icon() const;
QString iconName() const;
QString name() const;
int value() const;
@@ -57,7 +57,7 @@ class Token : public QWidget
protected:
QString m_name;
- KIcon m_icon;
+ QIcon m_icon;
QString m_iconName;
int m_value;
diff --git a/kopete/config/appearance/layout/TokenDropTarget.cpp b/kopete/config/appearance/layout/TokenDropTarget.cpp
index 296054a..0418fb0 100644
--- a/kopete/config/appearance/layout/TokenDropTarget.cpp
+++ b/kopete/config/appearance/layout/TokenDropTarget.cpp
@@ -21,11 +21,12 @@
#include "Token.h"
+#include <QDrag>
+#include <QtDebug>
+#include <QMimeData>
#include <QDropEvent>
#include <QVBoxLayout>
-#include <QtDebug>
-
/** TokenDragger - eventfilter that drags a token, designed to be a child of TokenDropTarget
This is necessary, as if TokenDropTarget would QDrag::exec() itself, the eventFilter would be blocked
and thus not be able to handle other events for the parenting widget, like e.g. dragEnter... */
@@ -150,7 +151,8 @@ TokenDropTarget::accept( QDropEvent *de )
return false;
}
- if ( de->source() && parentWidget() && de->source()->parentWidget() == parentWidget() )
+ //FIXME : Find the apt replacement for : de->source()->parentWidget()
+ if ( de->source() && parentWidget() && de->source()->findChild<QWidget *>()->parentWidget() == parentWidget() )
{ // move
de->setDropAction(Qt::MoveAction);
de->accept();
diff --git a/kopete/config/appearance/layout/TokenPool.cpp b/kopete/config/appearance/layout/TokenPool.cpp
index c0cdc0d..4e9c6ee 100644
--- a/kopete/config/appearance/layout/TokenPool.cpp
+++ b/kopete/config/appearance/layout/TokenPool.cpp
@@ -19,6 +19,8 @@
#include <KApplication>
+#include <QtGui/QDrag>
+#include <QMimeData>
#include <QMouseEvent>
@@ -128,7 +130,7 @@ TokenPool::performDrag( QMouseEvent *event )
QDataStream dataStream( &itemData, QIODevice::WriteOnly );
dataStream << token->name() << token->iconName() << token->value() << QPoint( event->pos() - rect().topLeft() );
- QMimeData *mimeData = new QMimeData;
+ QMimeData *mimeData = new QMimeData();
mimeData->setData( m_mimeType, itemData );
QDrag *drag = new QDrag( this );
diff --git a/kopete/config/appearance/tooltipeditdialog.cpp b/kopete/config/appearance/tooltipeditdialog.cpp
index 03b4474..1cf2bb5 100644
--- a/kopete/config/appearance/tooltipeditdialog.cpp
+++ b/kopete/config/appearance/tooltipeditdialog.cpp
@@ -105,8 +105,8 @@ TooltipEditDialog::TooltipEditDialog(QWidget *parent)
tbDown->setAutoRepeat(true);
connect(tbDown, SIGNAL(clicked()), SLOT(slotDownButton()));
- KIcon left = QIcon::fromTheme("go-previous");
- KIcon right = QIcon::fromTheme("go-next");
+ QIcon left = QIcon::fromTheme("go-previous");
+ QIcon right = QIcon::fromTheme("go-next");
tbAdd->setIcon(QApplication::isRightToLeft() ? left : right);
tbAdd->setEnabled(false);
diff --git a/kopete/config/chatwindow/chatwindowconfig.cpp b/kopete/config/chatwindow/chatwindowconfig.cpp
index 00bec34..6b0cdb2 100644
--- a/kopete/config/chatwindow/chatwindowconfig.cpp
+++ b/kopete/config/chatwindow/chatwindowconfig.cpp
@@ -150,7 +150,7 @@ ChatWindowConfig::ChatWindowConfig(QWidget *parent, const QVariantList &args )
m_previewProtocol(0L), m_previewAccount(0L),
m_jackMetaContact(0L), m_myself(0L), m_jack(0L)
{
- KConfigGroup config(KGlobal::config(), "ChatWindowSettings");
+ KConfigGroup config(KSharedConfig::openConfig(), "ChatWindowSettings");
QVBoxLayout *layout = new QVBoxLayout(this);
// since KSetting::Dialog has margins here, we don't need our own.
@@ -484,7 +484,7 @@ void ChatWindowConfig::slotDeleteChatStyle()
void ChatWindowConfig::slotGetChatStyles()
{
- KConfigGroup configGrp(KGlobal::config(), "KNewStuff2");
+ KConfigGroup configGrp(KSharedConfig::openConfig(), "KNewStuff2");
configGrp.writeEntry("ProvidersUrl", "http://download.kde.org/khotnewstuff/kopetestyles12-providers.xml");
configGrp.writeEntry("TargetDir", "kopete_chatstyles");
configGrp.sync();
@@ -495,7 +495,9 @@ void ChatWindowConfig::slotGetChatStyles()
// FIXME: Upon closing the Settings KCMultiDialog all KCMs are deleted and when reopening
// the settings dialog there is no active valid KComponentData, which KNS2 relies on.
// Forcing an active one below works around bug 163382, but the problem is somewhere else.
- KGlobal::setActiveComponent(KopeteChatWindowConfigFactory::componentData());
+
+ // FIXME: componentData() is not a member of KopeteChatWindowConfigFactory
+ //KGlobal::setActiveComponent(KopeteChatWindowConfigFactory::componentData());
KNS::Entry::List entries = engine->downloadDialogModal(this);
@@ -725,7 +727,9 @@ void ChatWindowConfig::slotManageEmoticonThemes()
// FIXME: Upon closing the Settings KCMultiDialog all KCMs are deleted and when reopening
// the settings dialog there is no active valid KComponentData, which KNS2 relies on.
// Forcing an active one below works around bug 165919, but the problem is somewhere else.
- KGlobal::setActiveComponent(KopeteChatWindowConfigFactory::componentData());
+
+ // FIXME: componentData() is not a member of KopeteChatWindowConfigFactory
+ //KGlobal::setActiveComponent(KopeteChatWindowConfigFactory::componentData());
KCMultiDialog *kcm = new KCMultiDialog( this );
kcm->setWindowTitle( i18n( "Configure Emoticon Themes" ) );
diff --git a/kopete/contactlist/contactlistlayoutmanager.cpp b/kopete/contactlist/contactlistlayoutmanager.cpp
index cd46d6c..29a1027 100644
--- a/kopete/contactlist/contactlistlayoutmanager.cpp
+++ b/kopete/contactlist/contactlistlayoutmanager.cpp
@@ -65,7 +65,7 @@ LayoutManager::LayoutManager()
loadDefaultLayouts();
loadUserLayouts();
- KConfigGroup config( KGlobal::config(), "ContactList Layout" );
+ KConfigGroup config( KSharedConfig::openConfig(), "ContactList Layout" );
m_activeLayout = config.readEntry( "CurrentLayout", DefaultStyleName );
// Fallback to default
@@ -85,7 +85,7 @@ void LayoutManager::setActiveLayout( const QString &layout )
{
kDebug() << layout;
m_activeLayout = layout;
- KConfigGroup config(KGlobal::config(), "ContactList Layout");
+ KConfigGroup config(KSharedConfig::openConfig(), "ContactList Layout");
config.writeEntry( "CurrentLayout", m_activeLayout );
emit( activeLayoutChanged() );
}
diff --git a/kopete/contactlist/contactlistmodel.cpp b/kopete/contactlist/contactlistmodel.cpp
index e9d0de4..706cdfe 100644
--- a/kopete/contactlist/contactlistmodel.cpp
+++ b/kopete/contactlist/contactlistmodel.cpp
@@ -26,11 +26,11 @@
#include <QDomDocument>
#include <QUrl>
-#include <KDebug>
#include <KMessageBox>
-#include <KEmoticonsTheme>
-#include <KLocalizedString>
-#include <kmessagebox_queued.h>
+#include <KF5/KI18n/KLocalizedString>
+#include <KF5/KDELibs4Support/KDE/KDebug>
+#include <KF5/KEmoticons/KEmoticonsTheme>
+#include <KF5/KDELibs4Support/kmessagebox_queued.h>
#include "kopeteaccount.h"
#include "kopetepicture.h"
@@ -489,10 +489,9 @@ bool ContactListModel::dropMetaContacts( int row, const QModelIndex &parent, Qt:
displayNames << mc->displayName();
}
- if( KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(),
- i18n( "<qt>Are you sure you want to merge meta contacts?\n<b>%1</b>", displayNames.join( ", " ) ),
- i18n( "Meta Contact Merge" ), KStandardGuiItem::yes(), KStandardGuiItem::no(),
- "askDDMergeMetaContacts", KMessageBox::Notify | KMessageBox::Dangerous ) != KMessageBox::Yes )
+ if( KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n( "<qt>Are you sure you want to merge meta contacts?\n<b>%1</b>", displayNames.join( ", " ) ),
+ i18n( "Meta Contact Merge" ), KStandardGuiItem::yes(), KStandardGuiItem::no(),"askDDMergeMetaContacts",
+ KMessageBox::Dangerous ) != KMessageBox::Yes)
{
return false;
}
diff --git a/kopete/contactlist/contactlistmodel.h b/kopete/contactlist/contactlistmodel.h
index e977fa1..5cc61d9 100644
--- a/kopete/contactlist/contactlistmodel.h
+++ b/kopete/contactlist/contactlistmodel.h
@@ -19,9 +19,9 @@
#ifndef KOPETE_UI_CONTACTLISTMODEL_H
#define KOPETE_UI_CONTACTLISTMODEL_H
-#include <QAbstractItemModel>
#include <QPair>
#include <QHash>
+#include <QAbstractItemModel>
#include <kopete_export.h>
diff --git a/kopete/kopeteapplication.cpp b/kopete/kopeteapplication.cpp
index 1a0d693..222ccf9 100644
--- a/kopete/kopeteapplication.cpp
+++ b/kopete/kopeteapplication.cpp
@@ -41,7 +41,7 @@
#include "kopetecommandhandler.h"
#include "kopetecontactlist.h"
#include "kopeteglobal.h"
-#include "kopetefileengine.h"
+//#include "kopetefileengine.h"
#include "kopetemimetypehandler.h"
#include "kopetepluginmanager.h"
#include "kopeteprotocol.h"
@@ -91,7 +91,8 @@ KopeteApplication::KopeteApplication()
*/
QTimer::singleShot( 0, this, SLOT(slotLoadPlugins()) );
- m_fileEngineHandler = new Kopete::FileEngineHandler();
+ //NOTE : QAbstractFileEngine and QAbstractFileEngineHandler deprecated in Qt5
+ //m_fileEngineHandler = new Kopete::FileEngineHandler();
//Create the emoticon installer
m_emoticonHandler = new Kopete::EmoticonMimeTypeHandler;
@@ -124,7 +125,7 @@ KopeteApplication::~KopeteApplication()
delete plugin;
}
- delete m_fileEngineHandler;
+ //delete m_fileEngineHandler;
delete m_emoticonHandler;
//kDebug( 14000 ) << "Done";
}
@@ -134,7 +135,7 @@ void KopeteApplication::slotLoadPlugins()
// we have to load the address book early, because calling this enters the Qt event loop when there are remote resources.
// The plugin manager is written with the assumption that Kopete will not reenter the event loop during plugin load,
// otherwise lots of things break as plugins are loaded, then contacts are added to incompletely initialised MCLVIs
- Kopete::KABCPersistence::self()->addressBook();
+ //Kopete::KABCPersistence::self()->addressbook();
//Create the command handler (looks silly)
Kopete::CommandHandler::commandHandler();
@@ -146,7 +147,7 @@ void KopeteApplication::slotLoadPlugins()
Kopete::AccountManager::self()->load();
Kopete::ContactList::self()->load();
- KSharedConfig::Ptr config = KGlobal::config();
+ KSharedConfig::Ptr config = KSharedConfig::openConfig();
// Parse command-line arguments
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
diff --git a/kopete/kopeteapplication.h b/kopete/kopeteapplication.h
index 23d922d..abdfe19 100644
--- a/kopete/kopeteapplication.h
+++ b/kopete/kopeteapplication.h
@@ -78,7 +78,8 @@ private:
QPointer<KopeteWindow> m_mainWindow;
bool m_isShuttingDown;
Kopete::MimeTypeHandler *m_emoticonHandler;
- Kopete::FileEngineHandler *m_fileEngineHandler;
+ //NOTE: QAbstractFileEngine and QAbstractFileEngineHandler deprecated in Qt5
+ //Kopete::FileEngineHandler *m_fileEngineHandler;
private:
void handleURLArgs();
};
diff --git a/kopete/kopetedbusinterface.cpp b/kopete/kopetedbusinterface.cpp
index 6a31d22..87d0f9e 100644
--- a/kopete/kopetedbusinterface.cpp
+++ b/kopete/kopetedbusinterface.cpp
@@ -447,7 +447,7 @@ QVariantMap KopeteDBusInterface::contactProperties(const QString &contactId)
properties["id"] = contact->metaContactId().toString();
if (contact->photoSource() == Kopete::MetaContact::SourceCustom)
{
- properties["picture"] = contact->customPhoto().prettyUrl();
+ properties["picture"] = contact->customPhoto().toDisplayString();
}
else
{
diff --git a/kopete/kopetedbusinterface_p.cpp b/kopete/kopetedbusinterface_p.cpp
index 3c6a483..2f8c5d7 100644
--- a/kopete/kopetedbusinterface_p.cpp
+++ b/kopete/kopetedbusinterface_p.cpp
@@ -66,7 +66,7 @@ void ContactStalker::slotEmitSignal()
{
if (m_contact)
{
- emit contactChanged(m_contact->metaContactId());
+ emit contactChanged(m_contact->metaContactId().toString());
}
}
@@ -80,8 +80,8 @@ void ContactStalker::messageAppended(Kopete::Message &message,
}
if ( message.direction() == Kopete::Message::Inbound ) {
- QString contactId = message.from()->metaContact()->metaContactId();
- if (contactId == m_contact->metaContactId())
+ QString contactId = message.from()->metaContact()->metaContactId().toString();
+ if (contactId == m_contact->metaContactId().toString())
{
foreach(Kopete::Contact *subContact, m_contact->contacts())
{
@@ -102,7 +102,7 @@ void ContactStalker::slotMetaContactRemoved(Kopete::MetaContact *contact)
if (contact == m_contact)
{
m_contact = 0L;
- emit contactChanged(contact->metaContactId());
+ emit contactChanged(contact->metaContactId().toString());
}
}
@@ -135,7 +135,7 @@ QStringList KopeteDBusInterfacePrivate::listContact(const QList<
foreach(Kopete::MetaContact *contact, contactList)
{
- result << contact->metaContactId();
+ result << contact->metaContactId().toString();
}
return result;
diff --git a/kopete/kopeteidentitystatusbaricon.cpp b/kopete/kopeteidentitystatusbaricon.cpp
index 8c201a6..40fa19f 100644
--- a/kopete/kopeteidentitystatusbaricon.cpp
+++ b/kopete/kopeteidentitystatusbaricon.cpp
@@ -48,7 +48,7 @@ void KopeteIdentityStatusBarIcon::mousePressEvent( QMouseEvent *me )
KActionMenu *statusMenu = new KActionMenu(m_identity->label(), this);
// add a title to the popup menu before the online action
- statusMenu->menu()->addTitle(m_identity->label());
+ statusMenu->menu()->addSection(m_identity->label());
// Will be automatically deleted when the statusMenu is deleted.
Kopete::StatusRootAction* statusAction = new Kopete::StatusRootAction( statusMenu );
diff --git a/kopete/kopetewindow.cpp b/kopete/kopetewindow.cpp
index d826d33..d357da7 100644
--- a/kopete/kopetewindow.cpp
+++ b/kopete/kopetewindow.cpp
@@ -22,23 +22,25 @@
#include "kopetewindow.h"
+#include <QUrl>
+#include <QIcon>
+#include <QMenu>
+#include <QTimer>
+#include <QEvent>
+#include <QLabel>
+#include <QAction>
#include <QCursor>
#include <QLayout>
-
-#include <QTimer>
#include <QPixmap>
+#include <QLineEdit>
+#include <QTextEdit>
#include <QCloseEvent>
#include <QMouseEvent>
-#include <QEvent>
-#include <QLabel>
#include <QShowEvent>
-#include <QLineEdit>
#include <QSignalMapper>
-#include <QTextEdit>
#include <khbox.h>
#include <kvbox.h>
-#include <QAction>
#include <kactionmenu.h>
#include <kactioncollection.h>
#include <ktoggleaction.h>
@@ -46,11 +48,9 @@
#include <kdebug.h>
#include <kglobalaccel.h>
#include <klocale.h>
-#include <QIcon>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <knotifyconfigwidget.h>
-#include <QMenu>
#include <kshortcutsdialog.h>
#include <kedittoolbar.h>
#include <kmenubar.h>
@@ -61,7 +61,6 @@
#include <kplugininfo.h>
#include <ksqueezedtextlabel.h>
#include <kstringhandler.h>
-#include <QUrl>
#include <kxmlguifactory.h>
#include <ktoolbar.h>
#include <kdialog.h>
@@ -590,7 +589,7 @@ bool KopeteWindow::eventFilter ( QObject* target, QEvent* event )
void KopeteWindow::loadOptions()
{
- KSharedConfig::Ptr config = KGlobal::config();
+ KSharedConfig::Ptr config = KSharedConfig::openConfig();
toolBar ( "mainToolBar" )->applySettings ( config->group ( "ToolBar Settings" ) );
toolBar ( "quickSearchBar" )->applySettings ( config->group ( "QuickSearchBar Settings" ) );
@@ -629,12 +628,12 @@ void KopeteWindow::loadOptions()
void KopeteWindow::saveOptions()
{
- KConfigGroup mainToolbarGroup ( KGlobal::config(), "ToolBar Settings" );
+ KConfigGroup mainToolbarGroup ( KSharedConfig::openConfig(), "ToolBar Settings" );
toolBar ( "mainToolBar" )->saveSettings ( mainToolbarGroup );
- KConfigGroup qsbGroup ( KGlobal::config(), "QuickSearchBar Settings" );
+ KConfigGroup qsbGroup ( KSharedConfig::openConfig(), "QuickSearchBar Settings" );
toolBar ( "quickSearchBar" )->saveSettings ( qsbGroup );
- KConfigGroup cg ( KGlobal::config(), "General Options" );
+ KConfigGroup cg ( KSharedConfig::openConfig(), "General Options" );
saveMainWindowSettings ( cg );
cg.writeEntry ( "Position", pos() );
@@ -778,7 +777,7 @@ void KopeteWindow::slotConfGlobalKeys()
void KopeteWindow::slotConfToolbar()
{
- KConfigGroup cg ( KGlobal::config(), "General Options" );
+ KConfigGroup cg ( KSharedConfig::openConfig(), "General Options" );
saveMainWindowSettings ( cg );
KEditToolBar *dlg = new KEditToolBar ( factory() );
connect ( dlg, SIGNAL (newToolBarConfig()), this, SLOT (slotUpdateToolbar()) );
@@ -788,7 +787,7 @@ void KopeteWindow::slotConfToolbar()
void KopeteWindow::slotUpdateToolbar()
{
- applyMainWindowSettings ( KGlobal::config()->group ( "General Options" ) );
+ applyMainWindowSettings ( KSharedConfig::openConfig()->group ( "General Options" ) );
}
void KopeteWindow::slotGlobalAway()
@@ -936,7 +935,7 @@ void KopeteWindow::slotAllPluginsLoaded()
// actionConnect->setEnabled(true);
d->actionDisconnect->setEnabled ( true );
- KConfigGroup cg( KGlobal::config(), "General Options" );
+ KConfigGroup cg( KSharedConfig::openConfig(), "General Options" );
// If some account already loaded, build the status icon
QList<Kopete::Account *> accountList = Kopete::AccountManager::self()->accounts();
diff --git a/kopete/systemtray.cpp b/kopete/systemtray.cpp
index e964aa4..69ac68d 100644
--- a/kopete/systemtray.cpp
+++ b/kopete/systemtray.cpp
@@ -19,14 +19,18 @@
#include "systemtray.h"
-#include <qtimer.h>
+#include <QMenu>
+#include <QTimer>
+#include <QAction>
+#include <KDebug>
+#include <KLocale>
+#include <KGlobal>
#include <K4AboutData>
-#include <kactioncollection.h>
-#include <QAction>
-#include <QMenu>
-#include <klocale.h>
-#include <kdebug.h>
+#include <KComponentData>
+#include <KLocalizedString>
+#include <KActionCollection>
+
#include "kopetechatsessionmanager.h"
#include "kopetebehaviorsettings.h"
#include "kopetemetacontact.h"
@@ -78,7 +82,10 @@ KopeteSystemTray::KopeteSystemTray(QWidget* parent)
// in the close widget click case, we only want to hide the parent window
// so instead, we make it call our general purpose quit slot on the window, which causes a window close and everything else we need
// KDE4 - app will have to listen for quitSelected instead
- QAction *quit = actionCollection()->action( "file_quit" );
+ QList<QAction *> actionList = actionCollection();
+ KActionCollection *newActionList = new KActionCollection(parent);
+ newActionList->addActions(actionList);
+ QAction *quit = newActionList->action( "file_quit" );
quit->disconnect();
KopeteWindow *myParent = static_cast<KopeteWindow *>( parent );
connect( quit, SIGNAL(activated()), myParent, SLOT(slotQuit()) );