summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR. Harish Navnit <[email protected]>2015-12-17 16:57:28 +0530
committerPali Roh├ír <[email protected]>2017-12-22 09:10:19 +0100
commit2086ed489f1a48d0a0ab695a89289e4c9f642b88 (patch)
tree487fe62103a5835139811c35f0d7bfe99d9fc897
parent85139efe8ca84675d9352beae3e55b72812adc67 (diff)
Some control module fixes to go along with a few more minor fixes.
Build still failing !
-rw-r--r--kopete/addaccountwizard/addaccountwizard.cpp3
-rw-r--r--kopete/chatwindow/chatmessagepart.cpp2
-rw-r--r--kopete/chatwindow/chattexteditpart.cpp2
-rw-r--r--kopete/chatwindow/chatview.cpp8
-rw-r--r--kopete/chatwindow/chatview.h1
-rw-r--r--kopete/chatwindow/kopetechatwindow.cpp15
-rw-r--r--kopete/chatwindow/kopeteemailwindow.cpp5
-rw-r--r--kopete/chatwindow/kopeteemailwindow.h1
-rw-r--r--kopete/chatwindow/kopeteemoticonaction.cpp5
-rw-r--r--kopete/chatwindow/kopeterichtextwidget.cpp2
-rw-r--r--kopete/config/accounts/kopeteaccountconfig.cpp2
-rw-r--r--kopete/config/avdevice/avdeviceconfig.cpp5
-rw-r--r--kopete/config/behavior/behaviorconfig.cpp10
-rw-r--r--kopete/config/chatwindow/chatwindowconfig.cpp13
-rw-r--r--kopete/config/plugins/kopetepluginconfig.cpp5
-rw-r--r--kopete/config/status/statusconfig.cpp2
-rw-r--r--kopete/contactlist/kopetecontactlistview.cpp9
-rw-r--r--kopete/contactlist/kopetelviprops.cpp8
-rw-r--r--kopete/identity/accountidentitydialog.cpp1
19 files changed, 55 insertions, 44 deletions
diff --git a/kopete/addaccountwizard/addaccountwizard.cpp b/kopete/addaccountwizard/addaccountwizard.cpp
index d2273c4..d845302 100644
--- a/kopete/addaccountwizard/addaccountwizard.cpp
+++ b/kopete/addaccountwizard/addaccountwizard.cpp
@@ -30,6 +30,7 @@
#include <kmessagebox_queued.h>
#include <kplugininfo.h>
#include <kvbox.h>
+#include <KDialog>
#include "editaccountwidget.h"
#include "kopeteaccount.h"
@@ -116,7 +117,7 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, bool firstRun )
this, SLOT(slotProtocolListClicked()));
connect(d->uiSelectService.protocolListView, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
this, SLOT(slotProtocolListDoubleClicked()));
- setHelp(QString(),"kopete");
+ //FIXME : KDialog::setHelp(QString(),"kopete");
}
QTreeWidgetItem* AddAccountWizard::Private::selectedProtocol()
diff --git a/kopete/chatwindow/chatmessagepart.cpp b/kopete/chatwindow/chatmessagepart.cpp
index fbd5a41..874d3d1 100644
--- a/kopete/chatwindow/chatmessagepart.cpp
+++ b/kopete/chatwindow/chatmessagepart.cpp
@@ -312,7 +312,7 @@ void ChatMessagePart::save()
{
const QUrl dummyUrl;
QPointer <KFileDialog> dlg = new KFileDialog( dummyUrl, QLatin1String( "text/html text/plain" ), view() );
- dlg->setCaption( i18n( "Save Conversation" ) );
+ dlg->setWindowTitle( i18n( "Save Conversation" ) );
dlg->setOperationMode( KFileDialog::Saving );
if ( dlg->exec() != QDialog::Accepted )
diff --git a/kopete/chatwindow/chattexteditpart.cpp b/kopete/chatwindow/chattexteditpart.cpp
index d8d429c..601596e 100644
--- a/kopete/chatwindow/chattexteditpart.cpp
+++ b/kopete/chatwindow/chattexteditpart.cpp
@@ -71,7 +71,7 @@ ChatTextEditPart::ChatTextEditPart(QWidget *parent, QObject*, const QStringList&
void ChatTextEditPart::init( Kopete::ChatSession *session, QWidget *parent)
{
// we need an instance
- setComponentData( ChatTextEditPartFactory::componentData() );
+ //FIXME: setComponentData( ChatTextEditPartFactory::componentData() );
editor = new KopeteRichTextWidget(parent, m_session->protocol()->capabilities(), actionCollection());
setWidget( editor );
diff --git a/kopete/chatwindow/chatview.cpp b/kopete/chatwindow/chatview.cpp
index 3cc3bfd..5f3c9af 100644
--- a/kopete/chatwindow/chatview.cpp
+++ b/kopete/chatwindow/chatview.cpp
@@ -56,7 +56,7 @@
K_PLUGIN_FACTORY( ChatWindowPluginFactory, registerPlugin<ChatWindowPlugin>(); )
ChatWindowPlugin::ChatWindowPlugin(QObject *parent, const QVariantList &) :
- Kopete::ViewPlugin( ChatWindowPluginFactory::componentData(), parent )
+ Kopete::ViewPlugin( parent )
{
// Load styles to make style fallback work
ChatWindowStyleManager::self();
@@ -271,7 +271,7 @@ void ChatView::resetFontAndColor()
if ( !mc )
return;
- QString contactListGroup = QString(QLatin1String("chatwindow_") + QString(mc->metaContactId()));
+ QString contactListGroup = QString(QLatin1String("chatwindow_") + QString(mc->metaContactId().toString()));
KConfigGroup config = KGlobal::config()->group(contactListGroup);
editPart()->resetConfig( config );
config.sync();
@@ -825,7 +825,7 @@ void ChatView::saveChatSettings()
return;
QString contactListGroup = QString(QLatin1String("chatwindow_") +
- QString(mc->metaContactId()));
+ QString(mc->metaContactId().toString()));
KConfigGroup config = KGlobal::config()->group(contactListGroup);
// If settings are the same as default delete entry from config. This will propagate global setting change.
@@ -851,7 +851,7 @@ void ChatView::loadChatSettings()
//read settings for metacontact
QString contactListGroup = QString(QLatin1String("chatwindow_") +
- QString(contacts.first()->metaContact()->metaContactId()));
+ QString(contacts.first()->metaContact()->metaContactId().toString()));
KConfigGroup config(KGlobal::config(), contactListGroup );
bool enableRichText = config.readEntry( "EnableRichText", Kopete::BehaviorSettings::self()->richTextByDefault() );
editPart()->textEdit()->setRichTextEnabled( enableRichText );
diff --git a/kopete/chatwindow/chatview.h b/kopete/chatwindow/chatview.h
index ca1965d..8db255a 100644
--- a/kopete/chatwindow/chatview.h
+++ b/kopete/chatwindow/chatview.h
@@ -22,7 +22,6 @@
#include "kopeteview.h"
#include "kopeteviewplugin.h"
-//#include <k3dockwidget.h>
#include <ktextedit.h> // for covariant return type of editWidget
#include <QDragEnterEvent>
#include <QDropEvent>
diff --git a/kopete/chatwindow/kopetechatwindow.cpp b/kopete/chatwindow/kopetechatwindow.cpp
index 3c76740..f7310f8 100644
--- a/kopete/chatwindow/kopetechatwindow.cpp
+++ b/kopete/chatwindow/kopetechatwindow.cpp
@@ -23,14 +23,15 @@
#include "kopetechatwindow.h"
-#include <QTextStream>
+#include <QMenu>
+#include <QIcon>
#include <QTimer>
-#include <QDockWidget>
#include <QFrame>
#include <QLabel>
-#include <QLayout>
-#include <QMenu>
#include <QPixmap>
+#include <QLayout>
+#include <QDockWidget>
+#include <QTextStream>
#include <QCloseEvent>
#include <QVBoxLayout>
@@ -43,8 +44,6 @@
#include <klocale.h>
#include <kmenubar.h>
#include <kconfig.h>
-#include <QMenu>
-#include <QIcon>
#include <kiconloader.h>
#include <kdebug.h>
#include <kwindowsystem.h>
@@ -62,6 +61,7 @@
#include <khbox.h>
#include <kvbox.h>
#include <ktoolbar.h>
+#include <KShortcut>
#include <kstandardaction.h>
#include <ktoggleaction.h>
#include <kactionmenu.h>
@@ -1356,8 +1356,9 @@ void KopeteChatWindow::resizeEvent( QResizeEvent *e )
bool KopeteChatWindow::eventFilter( QObject *obj, QEvent *event )
{
if ( m_activeView && obj == m_activeView->editWidget() && event->type() == QEvent::KeyPress ) {
+ KShortcut *eventFilterShortcut = new KShortcut(nickComplete->shortcut());
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
- if (nickComplete->shortcut().primary() == QKeySequence(keyEvent->key())) {
+ if (eventFilterShortcut->primary() == QKeySequence(keyEvent->key())) {
m_activeView->nickComplete();
return true;
}
diff --git a/kopete/chatwindow/kopeteemailwindow.cpp b/kopete/chatwindow/kopeteemailwindow.cpp
index db9cbc3..10f917f 100644
--- a/kopete/chatwindow/kopeteemailwindow.cpp
+++ b/kopete/chatwindow/kopeteemailwindow.cpp
@@ -73,7 +73,7 @@ K_PLUGIN_FACTORY( EmailWindowPluginFactory, registerPlugin<EmailWindowPlugin>();
K_EXPORT_PLUGIN( EmailWindowPluginFactory( "kopete_emailwindow" ) )
EmailWindowPlugin::EmailWindowPlugin(QObject *parent, const QVariantList &) :
- Kopete::ViewPlugin( EmailWindowPluginFactory::componentData(), parent )
+ Kopete::ViewPlugin( parent )
{}
KopeteView* EmailWindowPlugin::createView( Kopete::ChatSession *manager )
@@ -275,7 +275,8 @@ void KopeteEmailWindow::initActions(void)
QAction *animAction = new QAction( i18n("Toolbar Animation"), coll );
coll->addAction( "toolbar_animation", animAction );
- animAction->setDefaultWidget( d->anim );
+ //FIXME: setDefaultWidget() is a method in QWidgetAction
+ //animAction->setDefaultWidget( d->anim );
setXMLFile( QLatin1String( "kopeteemailwindow.rc" ) );
createGUI( d->editPart );
diff --git a/kopete/chatwindow/kopeteemailwindow.h b/kopete/chatwindow/kopeteemailwindow.h
index 615b911..2ca1092 100644
--- a/kopete/chatwindow/kopeteemailwindow.h
+++ b/kopete/chatwindow/kopeteemailwindow.h
@@ -23,6 +23,7 @@
#include "kopeteview.h"
#include "kopeteviewplugin.h"
#include <kxmlguiwindow.h>
+#include <KParts/MainWindow>
#include <QCloseEvent>
class EmailWindowPlugin;
diff --git a/kopete/chatwindow/kopeteemoticonaction.cpp b/kopete/chatwindow/kopeteemoticonaction.cpp
index e9bf738..a98342d 100644
--- a/kopete/chatwindow/kopeteemoticonaction.cpp
+++ b/kopete/chatwindow/kopeteemoticonaction.cpp
@@ -32,6 +32,9 @@
#include <ktoolbar.h>
#include <kauthorized.h>
#include <kemoticons.h>
+#include <KAction>
+#include <KActionMenu>
+#include <KActionCollection>
#include "emoticonselector.h"
#include "kopeteemoticons.h"
@@ -90,7 +93,7 @@ KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent )
else
setIcon( QIcon::fromTheme( icon ) );
- setShortcutsConfigurable( this, false );
+ //FIXME: setShortcutConfigurable( this, false );
connect( d->emoticonSelector, SIGNAL(itemSelected(QString)),
this, SIGNAL(activated(QString)) );
}
diff --git a/kopete/chatwindow/kopeterichtextwidget.cpp b/kopete/chatwindow/kopeterichtextwidget.cpp
index 7fc0389..8713fc0 100644
--- a/kopete/chatwindow/kopeterichtextwidget.cpp
+++ b/kopete/chatwindow/kopeterichtextwidget.cpp
@@ -205,7 +205,7 @@ void KopeteRichTextWidget::createActions(KActionCollection *actionCollection)
d->reset = 0;
}
- KRichTextWidget::createActions(actionCollection);
+ actionCollection->addActions(KRichTextWidget::createActions());
// FIXME: Really ugly hack, but we reset format in updateCharFormat and if we don't disconnect this
// then actions will have old values and not the reset.
diff --git a/kopete/config/accounts/kopeteaccountconfig.cpp b/kopete/config/accounts/kopeteaccountconfig.cpp
index 2ef4a20..9c70b5d 100644
--- a/kopete/config/accounts/kopeteaccountconfig.cpp
+++ b/kopete/config/accounts/kopeteaccountconfig.cpp
@@ -57,7 +57,7 @@ K_PLUGIN_FACTORY( KopeteAccountConfigFactory,
registerPlugin<KopeteAccountConfig>(); )
KopeteAccountConfig::KopeteAccountConfig( QWidget *parent, const QVariantList &args )
-: KCModule( KopeteAccountConfigFactory::componentData(), parent, args )
+: KCModule( parent, args )
{
setupUi( this );
diff --git a/kopete/config/avdevice/avdeviceconfig.cpp b/kopete/config/avdevice/avdeviceconfig.cpp
index 3edee53..9b4f3fd 100644
--- a/kopete/config/avdevice/avdeviceconfig.cpp
+++ b/kopete/config/avdevice/avdeviceconfig.cpp
@@ -42,11 +42,10 @@
#include "IdGuiElements.h"
-K_PLUGIN_FACTORY( KopeteAVDeviceConfigFactory,
- registerPlugin<AVDeviceConfig>(); )
+K_PLUGIN_FACTORY( KopeteAVDeviceConfigFactory, registerPlugin<AVDeviceConfig>(); )
AVDeviceConfig::AVDeviceConfig(QWidget *parent, const QVariantList &args)
- : KCModule( KopeteAVDeviceConfigFactory::componentData(), parent, args )
+ : KCModule( parent, args )
{
kDebug() << "kopete:config (avdevice): KopeteAVDeviceConfigFactory::componentData() called. ";
// "Video" TAB ============================================================
diff --git a/kopete/config/behavior/behaviorconfig.cpp b/kopete/config/behavior/behaviorconfig.cpp
index 5991f16..19f8ff0 100644
--- a/kopete/config/behavior/behaviorconfig.cpp
+++ b/kopete/config/behavior/behaviorconfig.cpp
@@ -31,8 +31,9 @@
#include <kplugininfo.h>
#include <klocale.h>
#include <kpushbutton.h>
-#include <kpluginfactory.h>
-#include <kgenericfactory.h>
+#include <KPluginFactory>
+#include <KPluginLoader>
+#include <KGenericFactory>
#include <kconfig.h>
#include <klineedit.h>
@@ -41,11 +42,10 @@
#include <qtabwidget.h>
-K_PLUGIN_FACTORY( KopeteBehaviorConfigFactory,
- registerPlugin<BehaviorConfig>(); )
+K_PLUGIN_FACTORY( KopeteBehaviorConfigFactory, registerPlugin<BehaviorConfig>(); )
BehaviorConfig::BehaviorConfig(QWidget *parent, const QVariantList &args) :
- KCModule( KopeteBehaviorConfigFactory::componentData(), parent, args )
+ KCModule( parent, args )
{
QVBoxLayout *layout = new QVBoxLayout(this);
// since KSetting::Dialog has margins here, we don't need our own.
diff --git a/kopete/config/chatwindow/chatwindowconfig.cpp b/kopete/config/chatwindow/chatwindowconfig.cpp
index 1bacd6a..00bec34 100644
--- a/kopete/config/chatwindow/chatwindowconfig.cpp
+++ b/kopete/config/chatwindow/chatwindowconfig.cpp
@@ -34,7 +34,6 @@
#include <kdeversion.h>
#include <kinputdialog.h>
-
#include <kcolorcombo.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -45,13 +44,17 @@
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
+#include <kmessagebox_queued.h>
#include <kpushbutton.h>
#include <kstandarddirs.h>
#include <kurlrequesterdialog.h>
#include <krun.h>
#include <kfiledialog.h>
#include <kemoticons.h>
+#include <KGlobal>
#include <KCMultiDialog>
+#include <KComponentData>
+#include <KLocalizedString>
// KNewStuff
#include <knewstuff2/engine.h>
@@ -142,7 +145,7 @@ private:
};
ChatWindowConfig::ChatWindowConfig(QWidget *parent, const QVariantList &args )
- : KCModule( KopeteChatWindowConfigFactory::componentData(), parent, args ),
+ : KCModule( parent, args ),
m_currentStyle (0L), m_loading(false),
m_previewProtocol(0L), m_previewAccount(0L),
m_jackMetaContact(0L), m_myself(0L), m_jack(0L)
@@ -512,7 +515,7 @@ void ChatWindowConfig::slotGetChatStyles()
{
case ChatWindowStyleManager::StyleCannotOpen:
{
- KMessageBox::queuedMessageBox( this, KMessageBox::Error, i18nc("@info", "The specified archive <filename>%1</filename> cannot be opened.\nMake sure that the archive is a valid ZIP or TAR archive.", styleFile.pathOrUrl()), errorTitle);
+ KMessageBox::queuedMessageBox( this, KMessageBox::Error, i18nc("@info", "The specified archive <filename>%1</filename> cannot be opened.\nMake sure that the archive is a valid ZIP or TAR archive.", styleFile.toDisplayString(QUrl::PreferLocalFile)), errorTitle);
break;
}
case ChatWindowStyleManager::StyleNoDirectoryValid:
@@ -521,7 +524,7 @@ void ChatWindowConfig::slotGetChatStyles()
break;
}
case ChatWindowStyleManager::StyleNotValid:
- KMessageBox::queuedMessageBox( this, KMessageBox::Error, i18nc("@info", "The specified archive <filename>%1</filename> does not contain a valid Chat Window Style.", styleFile.pathOrUrl()), errorTitle );
+ KMessageBox::queuedMessageBox( this, KMessageBox::Error, i18nc("@info", "The specified archive <filename>%1</filename> does not contain a valid Chat Window Style.", styleFile.toDisplayString(QUrl::PreferLocalFile)), errorTitle );
break;
case ChatWindowStyleManager::StyleInstallOk:
{
@@ -725,7 +728,7 @@ void ChatWindowConfig::slotManageEmoticonThemes()
KGlobal::setActiveComponent(KopeteChatWindowConfigFactory::componentData());
KCMultiDialog *kcm = new KCMultiDialog( this );
- kcm->setCaption( i18n( "Configure Emoticon Themes" ) );
+ kcm->setWindowTitle( i18n( "Configure Emoticon Themes" ) );
kcm->addModule( "emoticons" );
kcm->exec();
updateEmoticonList();
diff --git a/kopete/config/plugins/kopetepluginconfig.cpp b/kopete/config/plugins/kopetepluginconfig.cpp
index 2156cb4..60c7a64 100644
--- a/kopete/config/plugins/kopetepluginconfig.cpp
+++ b/kopete/config/plugins/kopetepluginconfig.cpp
@@ -34,11 +34,10 @@
// Kopete includes
#include "kopetepluginmanager.h"
-K_PLUGIN_FACTORY( KopetePluginConfigFactory,
- registerPlugin<KopetePluginConfig>(); )
+K_PLUGIN_FACTORY( KopetePluginConfigFactory, registerPlugin<KopetePluginConfig>(); )
KopetePluginConfig::KopetePluginConfig( QWidget *parent, const QVariantList &args )
-: KCModule(KopetePluginConfigFactory::componentData(), parent, args)
+: KCModule( parent, args)
{
m_pluginSelector = new KPluginSelector( this );
diff --git a/kopete/config/status/statusconfig.cpp b/kopete/config/status/statusconfig.cpp
index fe98ee5..b22ce16 100644
--- a/kopete/config/status/statusconfig.cpp
+++ b/kopete/config/status/statusconfig.cpp
@@ -28,7 +28,7 @@
K_PLUGIN_FACTORY( KopeteStatusConfigFactory, registerPlugin<StatusConfig>(); )
StatusConfig::StatusConfig( QWidget *parent, const QVariantList &args )
-: KCModule( KopeteStatusConfigFactory::componentData(), parent, args )
+: KCModule( parent, args )
{
QVBoxLayout *layout = new QVBoxLayout(this);
// since KSetting::Dialog has margins here, we don't need our own.
diff --git a/kopete/contactlist/kopetecontactlistview.cpp b/kopete/contactlist/kopetecontactlistview.cpp
index ea08a82..294e1ed 100644
--- a/kopete/contactlist/kopetecontactlistview.cpp
+++ b/kopete/contactlist/kopetecontactlistview.cpp
@@ -1049,8 +1049,9 @@ void KopeteContactListView::groupPopup( Kopete::Group *group, const QPoint& pos
popup->removeAction( action );
delete action;
}
- //COMPLETE IT : popup->actions().first()->menu()->setTitle(title);
- d->menuTitleMap.insert( popup, popup->addSection(title, popup->actions().first()) );
+ //FIXME : Possible bug/error ahead
+ popup->actions().first()->menu()->setTitle(title);
+ d->menuTitleMap.insert( popup, popup->addSection( popup->actions().first()->text()) );
popup->popup( pos );
}
}
@@ -1082,7 +1083,9 @@ void KopeteContactListView::metaContactPopup( Kopete::MetaContact *metaContact,
popup->removeAction( action );
delete action;
}
- d->menuTitleMap.insert( popup, popup->addSection(title, popup->actions().first()) );
+ //FIXME: Possible bug/error ahead
+ popup->actions().first()->menu()->setTitle(title);
+ d->menuTitleMap.insert( popup, popup->addSection( popup->actions().first()->text()) );
// Submenus for separate contact actions
bool sep = false; //FIXME: find if there is already a separator in the end - Olivier
diff --git a/kopete/contactlist/kopetelviprops.cpp b/kopete/contactlist/kopetelviprops.cpp
index 59095c9..3b66990 100644
--- a/kopete/contactlist/kopetelviprops.cpp
+++ b/kopete/contactlist/kopetelviprops.cpp
@@ -607,12 +607,12 @@ void KopeteMetaLVIProps::slotOpenSoundDialog( KUrlRequester *requester )
requester->disconnect( SIGNAL(openFileDialog(KUrlRequester*)),
this, SLOT(slotOpenSoundDialog(KUrlRequester*)));
- KFileDialog *fileDialog = requester->fileDialog();
- //fileDialog->setCaption( i18n("Select Sound File") );
+ QFileDialog *fileDialog = requester->fileDialog();
+ fileDialog->setWindowTitle( i18n("Select Sound File") );
QStringList filters;
filters << "audio/x-wav" << "audio/mpeg" << "application/ogg"
<< "audio/x-adpcm";
- fileDialog->setMimeFilter( filters );
+ fileDialog->setMimeTypeFilters( filters );
// find the first "sound"-resource that contains files
QStringList soundDirs =
@@ -628,7 +628,7 @@ void KopeteMetaLVIProps::slotOpenSoundDialog( KUrlRequester *requester )
dir = *it;
if ( dir.isReadable() && dir.count() > 2 ) {
soundURL.setPath( *it );
- fileDialog->setUrl( soundURL );
+ fileDialog->setDirectoryUrl( soundURL );
break;
}
++it;
diff --git a/kopete/identity/accountidentitydialog.cpp b/kopete/identity/accountidentitydialog.cpp
index f5ea7d8..79daeae 100644
--- a/kopete/identity/accountidentitydialog.cpp
+++ b/kopete/identity/accountidentitydialog.cpp
@@ -18,6 +18,7 @@
#include "accountidentitydialog.h"
#include "ui_accountidentitybase.h"
+#include <QUrl>
#include <QHeaderView>
#include <QMap>
#include <QPointer>