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

Some control module fixes to go along with a few more minor fixes.

Build still failing !
parent 85139efe
......@@ -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()
......
......@@ -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 )
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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>
......
......@@ -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;
}
......
......@@ -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 );
......
......@@ -23,6 +23,7 @@
#include "kopeteview.h"
#include "kopeteviewplugin.h"
#include <kxmlguiwindow.h>
#include <KParts/MainWindow>
#include <QCloseEvent>
class EmailWindowPlugin;
......
......@@ -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)) );
}
......
......@@ -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.
......
......@@ -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 );
......
......@@ -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 ============================================================
......
......@@ -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.
......
......@@ -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();
......
......@@ -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 );
......
......@@ -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.
......
......@@ -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
......
......@@ -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;
......
......@@ -18,6 +18,7 @@
#include "accountidentitydialog.h"
#include "ui_accountidentitybase.h"
#include <QUrl>
#include <QHeaderView>
#include <QMap>
#include <QPointer>
......
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