Commit 85139efe authored by R. Harish Navnit's avatar R. Harish Navnit Committed by Pali Rohár

Random changes that fix some forward declaration of classes errors and so on

(Porting to Kopete main app to KF5 still in progress)
parent 6482016e
/*
addaccountwizard.cpp - Kopete Add Account Wizard
......@@ -18,8 +19,8 @@
#include "addaccountwizard.h"
#include <qcheckbox.h>
#include <qlabel.h>
#include <QCheckBox>
#include <QLabel>
#include <kcolorbutton.h>
#include <kdebug.h>
......
......@@ -80,6 +80,7 @@
#include <kstandardaction.h>
#include <kiconloader.h>
#include <kcodecs.h>
#include <KMimeType>
// Kopete includes
#include "kopetecontact.h"
......@@ -1090,7 +1091,7 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
{
int light=100;
bool doLight=false;
if(senderColorRegExp.numCaptures()>=1)
if(senderColorRegExp.captureCount()>=1)
{
light=senderColorRegExp.cap(1).toUInt(&doLight);
}
......
......@@ -39,21 +39,21 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <QMenu>
#include <kstringhandler.h>
#include <kwindowsystem.h>
#include <kglobalsettings.h>
#include <kgenericfactory.h>
#include <khtmlview.h>
#include <kxmlguifactory.h>
#include <kpluginfactory.h>
#include <QMenu>
#include <QTimer>
#include <QSplitter>
#include <QMimeData>
#include <QScrollBar>
K_PLUGIN_FACTORY( ChatWindowPluginFactory, registerPlugin<ChatWindowPlugin>(); )
K_EXPORT_PLUGIN( ChatWindowPluginFactory( "kopete_chatwindow" ) )
ChatWindowPlugin::ChatWindowPlugin(QObject *parent, const QVariantList &) :
Kopete::ViewPlugin( ChatWindowPluginFactory::componentData(), parent )
......
......@@ -27,6 +27,8 @@
#include <QFrame>
#include <QCloseEvent>
#include <QList>
#include <kxmlguiwindow.h>
#include "kopetecontact.h"
#include "kdeversion.h"
#include <kopetechatsession.h>
......
......@@ -26,6 +26,7 @@
#include <QTextStream>
// KDE includes
#include <KGlobal>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
......
......@@ -19,6 +19,7 @@
#include <QHash>
#include <QObject>
#include <kopete_export.h>
......
......@@ -30,7 +30,6 @@
#include "kopetestdaction.h"
#include "kopeteviewmanager.h"
#include <QAction>
#include <ktoolbarspaceraction.h>
#include <kstandardaction.h>
#include <kcolordialog.h>
......@@ -47,15 +46,15 @@
#include <klocale.h>
#include <kmenubar.h>
#include <kmessagebox.h>
#include <QMenu>
#include <kpushbutton.h>
#include <ktextedit.h>
#include <kwindowsystem.h>
#include <kgenericfactory.h>
#include <kxmlguifactory.h>
#include <kpluginfactory.h>
#include <kvbox.h>
#include <ktoolbar.h>
#include <QIcon>
#include <kactioncollection.h>
#include <qlabel.h>
#include <qlayout.h>
......@@ -66,7 +65,9 @@
#include <QList>
#include <QMovie>
#include <QSplitter>
#include <kactioncollection.h>
#include <QIcon>
#include <QMenu>
#include <QAction>
K_PLUGIN_FACTORY( EmailWindowPluginFactory, registerPlugin<EmailWindowPlugin>(); )
K_EXPORT_PLUGIN( EmailWindowPluginFactory( "kopete_emailwindow" ) )
......
......@@ -22,13 +22,15 @@
#include <math.h>
#include <QIcon>
#include <QMenu>
#include <QAction>
#include <kdebug.h>
#include <klocale.h>
#include <kmenubar.h>
#include <QMenu>
#include <ktoolbar.h>
#include <kauthorized.h>
#include <QIcon>
#include <kemoticons.h>
#include "emoticonselector.h"
......@@ -88,7 +90,7 @@ KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent )
else
setIcon( QIcon::fromTheme( icon ) );
setShortcutConfigurable( false );
setShortcutsConfigurable( this, false );
connect( d->emoticonSelector, SIGNAL(itemSelected(QString)),
this, SIGNAL(activated(QString)) );
}
......
......@@ -22,6 +22,7 @@
#define _KOPETEEMOTICONACTION_H_
#include <KActionMenu>
#include <KActionCollection>
#include <kopete_export.h>
......
......@@ -24,7 +24,7 @@
// KDE includes
#include <kdebug.h>
#include <QAction>
#include <KGlobal>
#include <kactioncollection.h>
#include <kactionmenu.h>
#include <klocalizedstring.h>
......@@ -35,6 +35,7 @@
// Qt includes
#include <QUrl>
#include <QEvent>
#include <QAction>
#include <QKeyEvent>
#include <QTextCursor>
#include <QTextCharFormat>
......
......@@ -55,7 +55,6 @@
K_PLUGIN_FACTORY( KopeteAccountConfigFactory,
registerPlugin<KopeteAccountConfig>(); )
K_EXPORT_PLUGIN( KopeteAccountConfigFactory("kcm_kopete_accountconfig") )
KopeteAccountConfig::KopeteAccountConfig( QWidget *parent, const QVariantList &args )
: KCModule( KopeteAccountConfigFactory::componentData(), parent, args )
......
......@@ -63,7 +63,6 @@
K_PLUGIN_FACTORY( KopeteAppearanceConfigFactory,
registerPlugin<AppearanceConfig>(); )
K_EXPORT_PLUGIN( KopeteAppearanceConfigFactory("kcm_kopete_appearanceconfig") )
class FakeProtocol;
class FakeAccount;
......
......@@ -20,6 +20,8 @@
#include <KPushButton>
#include <KComboBox>
#include <KIcon>
#include <QSlider>
#include <QCheckBox>
......
......@@ -44,7 +44,6 @@
K_PLUGIN_FACTORY( KopeteAVDeviceConfigFactory,
registerPlugin<AVDeviceConfig>(); )
K_EXPORT_PLUGIN( KopeteAVDeviceConfigFactory("kcm_kopete_avdeviceconfig") )
AVDeviceConfig::AVDeviceConfig(QWidget *parent, const QVariantList &args)
: KCModule( KopeteAVDeviceConfigFactory::componentData(), parent, args )
......
......@@ -31,6 +31,7 @@
#include <kplugininfo.h>
#include <klocale.h>
#include <kpushbutton.h>
#include <kpluginfactory.h>
#include <kgenericfactory.h>
#include <kconfig.h>
#include <klineedit.h>
......@@ -42,7 +43,6 @@
K_PLUGIN_FACTORY( KopeteBehaviorConfigFactory,
registerPlugin<BehaviorConfig>(); )
K_EXPORT_PLUGIN( KopeteBehaviorConfigFactory("kcm_kopete_behaviorconfig") )
BehaviorConfig::BehaviorConfig(QWidget *parent, const QVariantList &args) :
KCModule( KopeteBehaviorConfigFactory::componentData(), parent, args )
......
......@@ -17,6 +17,7 @@
#define BEHAVIORCONFIG_H
#include <kcmodule.h>
#include <kplugininfo.h>
class QTabWidget;
......@@ -24,7 +25,6 @@ class BehaviorConfig_General;
class BehaviorConfig_Events;
class BehaviorConfig_Chat;
class BehaviorConfig_Away;
class KPluginInfo;
class BehaviorConfig : public KCModule
{
......
......@@ -24,6 +24,7 @@
#include <QCheckBox>
#include <QDir>
#include <QUrl>
#include <QLayout>
#include <QSpinBox>
#include <QSlider>
......@@ -49,7 +50,6 @@
#include <kurlrequesterdialog.h>
#include <krun.h>
#include <kfiledialog.h>
#include <QUrl>
#include <kemoticons.h>
#include <KCMultiDialog>
......@@ -83,7 +83,6 @@
K_PLUGIN_FACTORY( KopeteChatWindowConfigFactory,
registerPlugin<ChatWindowConfig>(); )
K_EXPORT_PLUGIN( KopeteChatWindowConfigFactory("kcm_kopete_chatwindowconfig") )
// Reimplement Kopete::Contact and its abstract method
// This is for style preview.
......
......@@ -36,7 +36,6 @@
K_PLUGIN_FACTORY( KopetePluginConfigFactory,
registerPlugin<KopetePluginConfig>(); )
K_EXPORT_PLUGIN( KopetePluginConfigFactory("kcm_kopete_pluginconfig") )
KopetePluginConfig::KopetePluginConfig( QWidget *parent, const QVariantList &args )
: KCModule(KopetePluginConfigFactory::componentData(), parent, args)
......
......@@ -21,6 +21,7 @@
#define KOPETEPLUGINCONFIG_H
#include <kcmodule.h>
#include <KPluginFactory>
class KPluginSelector;
......
......@@ -22,10 +22,10 @@
#include <QTabWidget>
#include <kgenericfactory.h>
#include <kpluginfactory.h>
#include "kopetestatussettings.h"
K_PLUGIN_FACTORY( KopeteStatusConfigFactory, registerPlugin<StatusConfig>(); )
K_EXPORT_PLUGIN( KopeteStatusConfigFactory("kcm_kopete_statusconfig") )
StatusConfig::StatusConfig( QWidget *parent, const QVariantList &args )
: KCModule( KopeteStatusConfigFactory::componentData(), parent, args )
......
......@@ -50,7 +50,7 @@ StatusConfig_Manager::StatusConfig_Manager( QWidget *parent )
statusView->setModel( d->statusModel );
connect( d->statusModel, SIGNAL(changed()), this, SIGNAL(changed()) );
KIcon icon = Kopete::OnlineStatusManager::pixmapForCategory( Kopete::OnlineStatusManager::Online );
QIcon icon = Kopete::OnlineStatusManager::pixmapForCategory( Kopete::OnlineStatusManager::Online );
cbStatusCategory->addItem( icon, i18n("Online"), Kopete::OnlineStatusManager::Online );
icon = Kopete::OnlineStatusManager::pixmapForCategory( Kopete::OnlineStatusManager::FreeForChat );
cbStatusCategory->addItem( icon, i18n("Free For Chat"), Kopete::OnlineStatusManager::FreeForChat );
......
......@@ -30,6 +30,7 @@
#include <KLocale>
#include <KStandardDirs>
#include <kio/global.h>
#include <kio/job.h>
#include <QDir>
#include <QDomDocument>
......
......@@ -22,6 +22,7 @@
#include <QMimeData>
#include <QDomDocument>
#include <QDomElement>
#include "kopeteaccount.h"
#include "kopetemetacontact.h"
......@@ -219,7 +220,7 @@ bool ContactListPlainModel::dropMimeData(const QMimeData *data, Qt::DropAction a
GroupMetaContactPair pair;
pair.first = Kopete::ContactList::self()->group( grp.toUInt() );
pair.second = Kopete::ContactList::self()->metaContact( QUuid(id) );
pair.second = Kopete::ContactList::self()->metaContact( QUuid(id).toString() );
items.append( pair );
}
......@@ -333,7 +334,7 @@ void ContactListPlainModel::saveModelSettingsImpl( QDomDocument& doc, QDomElemen
{
Kopete::MetaContact* mc = m_contacts.value( i );
QDomElement metaContactElement = doc.createElement( "MetaContact" );
metaContactElement.setAttribute( "uuid", mc->metaContactId() );
metaContactElement.setAttribute( "uuid", mc->metaContactId().toString() );
metaContactElement.setAttribute( "possition", i );
metaContactRootElement.appendChild( metaContactElement );
}
......
......@@ -17,9 +17,10 @@
#include "contactlistproxymodel.h"
#include <QStandardItem>
#include <QList>
#include <QTimer>
#include <QDebug>
#include <QStandardItem>
#include <kcontacts/addressee.h>
......@@ -61,7 +62,8 @@ ContactListProxyModel::~ContactListProxyModel()
void ContactListProxyModel::slotConfigChanged()
{
kDebug(14001) << "config changed";
//kDebug(14001) << "config changed";
qDebug() << "config changed";
invalidate();
}
......
......@@ -21,10 +21,10 @@
#include "contactlisttreemodel.h"
#include "contactlisttreemodel_p.h"
#include <QIcon>
#include <QDebug>
#include <QMimeData>
#include <QDomDocument>
#include <QIcon>
#include <KLocale>
#include "kopeteaccount.h"
......@@ -83,7 +83,8 @@ void ContactListTreeModel::addGroup( Kopete::Group* group )
}
else if ( !m_groups.contains( group ) )
{
kDebug(14001) << "addGroup" << group->displayName();
//kDebug(14001) << "addGroup" << group->displayName();
qDebug() << "addGroup" << group->displayName();
GroupModelItem* gmi = new GroupModelItem( group );
m_groups.insert( group, gmi );
......@@ -476,7 +477,7 @@ bool ContactListTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction ac
GroupMetaContactPair pair;
pair.first = Kopete::ContactList::self()->group( grp.toUInt() );
pair.second = Kopete::ContactList::self()->metaContact( QUuid(id) );
pair.second = Kopete::ContactList::self()->metaContact( QUuid(id).toString() );
items.append( pair );
}
......@@ -699,7 +700,7 @@ void ContactListTreeModel::saveModelSettingsImpl( QDomDocument& doc, QDomElement
MetaContactModelItem* mcmi = dynamic_cast<MetaContactModelItem*>( clmi );
if ( mcmi->metaContact() ) {
QDomElement metaContactElement = doc.createElement( "MetaContact" );
metaContactElement.setAttribute( "uuid", mcmi->metaContact()->metaContactId() );
metaContactElement.setAttribute( "uuid", mcmi->metaContact()->metaContactId().toString() );
metaContactElement.setAttribute( "possition", index++ );
groupElement.appendChild( metaContactElement );
}
......
......@@ -88,7 +88,7 @@ void KopeteAddressBookExport::fetchKABCData()
mLastName->addItem( QIcon(mAddrBookIcon), i18n("<Not Set>") );
// url
QString url = mAddressee.url().url();
QString url = mAddressee.url().url().toString();
if ( !url.isEmpty() )
mUrl->addItem( QIcon(mAddrBookIcon), url );
else
......
......@@ -28,7 +28,8 @@
#include <QHelpEvent>
#include <QToolTip>
#include <qimageblitz.h>
//FIXME: Find alternative to QImageBlitz in Qt5
//#include <qimageblitz.h>
#include <KIconLoader>
......@@ -249,7 +250,8 @@ void KopeteItemDelegate::paintItem( ContactList::LayoutItemConfig config, QPaint
int metaContactStatus = index.data( Kopete::Items::OnlineStatusRole ).toInt();
if ( metaContactStatus == Kopete::OnlineStatus::Offline )
Blitz::grayscale( metaContactImage );
//FIXME: Find alternative to QImageBlitz in Qt5
//Blitz::grayscale( metaContactImage );
switch ( metaContactStatus )
{
......@@ -257,14 +259,18 @@ void KopeteItemDelegate::paintItem( ContactList::LayoutItemConfig config, QPaint
break;
case Kopete::OnlineStatus::Away:
case Kopete::OnlineStatus::Busy:
Blitz::fade( metaContactImage, 0.5, Qt::white );
//FIXME: Find alternative to QImageBlitz in Qt5
//Blitz::fade( metaContactImage, 0.5, Qt::white );
break;
case Kopete::OnlineStatus::Offline:
Blitz::fade( metaContactImage, 0.4, Qt::white );
//FIXME: Find alternative to QImageBlitz in Qt5
//Blitz::fade( metaContactImage, 0.4, Qt::white );
break;
case Kopete::OnlineStatus::Unknown:
default:
Blitz::fade( metaContactImage, 0.8, Qt::white );
//FIXME: Find alternative to QImageBlitz in Qt5
//Blitz::fade( metaContactImage, 0.8, Qt::white );
qDebug() << "Qt::White";
}
QPixmap photoPixmap;
......
......@@ -201,7 +201,7 @@ void StatusRootAction::editStatuses()
{
KCMultiDialog *kcm = new KCMultiDialog( Kopete::UI::Global::mainWidget() );
kcm->setFaceType( KCMultiDialog::Plain );
kcm->setPlainCaption( i18n( "Configure Statuses" ) );
kcm->setWindowTitle(i18n("Configure Statuses"));
kcm->addModule( "kopete_statusconfig" );
kcm->exec();
}
......
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