Commit 405be12e authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Porting++. Reactivate otr

parent a1938788
......@@ -23,7 +23,7 @@
#include <QMimeData>
#include "kdebug.h"
#include "kmenu.h"
#include <QMenu>
#include "kopetecontact.h"
#include "chatsessionmemberslistmodel.h"
......@@ -33,7 +33,7 @@ ChatMembersListView::ChatMembersListView( QWidget *parent )
: QListView( parent )
{
setContextMenuPolicy (Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(QPoint)), SLOT(slotContextMenuRequested(QPoint)));
connect(this, &QWidget::customContextMenuRequested, this, &ChatMembersListView::slotContextMenuRequested);
}
void ChatMembersListView::slotContextMenuRequested( const QPoint & pos )
......
......@@ -65,6 +65,7 @@
// KDE includes
#include <KFormat>
#include <kactioncollection.h>
#include <kdebug.h>
......@@ -1120,7 +1121,7 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K
}
resultHTML.replace( QLatin1String("%fileName%"), Qt::escape( message.fileName() ).replace('"',"&quot;") );
resultHTML.replace( QLatin1String("%fileSize%"), KGlobal::locale()->formatByteSize( message.fileSize() ).replace('"',"&quot;") );
resultHTML.replace( QLatin1String("%fileSize%"), KFormat().formatByteSize( message.fileSize() ).replace('"',"&quot;") );
resultHTML.replace( QLatin1String("%fileIconPath%"), fileIcon );
resultHTML.replace( QLatin1String("%saveFileHandlerId%"), QString( "ftSV%1" ).arg( message.id() ) );
......
......@@ -28,7 +28,7 @@
#include <kactioncollection.h>
#include <kcolordialog.h>
#include <QColorDialog>
#include <kconfig.h>
#include <kcompletion.h>
#include <kdebug.h>
......
......@@ -37,7 +37,7 @@
#include <KUrl>
#include <KUrlMimeData>
#include <kconfig.h>
#include <ktabwidget.h>
#include <QTabWidget>
#include <kdebug.h>
#include <KLocalizedString>
#include <kmessagebox.h>
......
......@@ -32,7 +32,7 @@
#include <ktoolbarspaceraction.h>
#include <kstandardaction.h>
#include <kcolordialog.h>
#include <QColorDialog>
#include <kconfig.h>
#include <kcursor.h>
#include <kdebug.h>
......
......@@ -39,7 +39,7 @@
#include <QIcon>
#include <QAction>
#include <QMenu>
#include <kcolordialog.h>
#include <QColorDialog>
#include "addaccountwizard.h"
#include "editaccountwidget.h"
......@@ -391,7 +391,8 @@ void KopeteAccountConfig::slotAccountSetColor()
QColor color = a->color();
if ( KColorDialog::getColor(color, Qt::black, this) == KColorDialog::Accepted ) {
color = QColorDialog::getColor(Qt::black, this);
if ( color.isValid() ) {
a->setColor(color);
}
......
......@@ -72,9 +72,9 @@ if(WITH_webpresence AND LIBXML2_FOUND AND LIBXSLT_FOUND)
add_subdirectory( webpresence )
endif(WITH_webpresence AND LIBXML2_FOUND AND LIBXSLT_FOUND)
message(STATUS "otr plugin disabled")
#if (WITH_otr AND LIBOTR_FOUND)
# add_subdirectory ( otr )
#endif (WITH_otr AND LIBOTR_FOUND)
if (WITH_otr AND LIBOTR_FOUND)
add_subdirectory ( otr )
endif (WITH_otr AND LIBOTR_FOUND)
#[[if (WITH_cryptography AND KLEOPATRA_FOUND AND QGPGME_FOUND)
add_subdirectory ( cryptography )
endif (WITH_cryptography AND KLEOPATRA_FOUND AND QGPGME_FOUND)]]
......@@ -27,7 +27,7 @@
#include <kdebug.h>
#include <krun.h>
#include <kmenu.h>
#include <QMenu>
#include <kaction.h>
#include <kstandardaction.h>
#include <dom/dom_doc.h>
......@@ -373,7 +373,7 @@ void History2Dialog::doneProgressBar() {
}
void History2Dialog::slotRightClick(const QString &url, const QPoint &point) {
KMenu *chatWindowPopup = new KMenu();
QMenu *chatWindowPopup = new QMenu();
if ( !url.isEmpty() ) {
mURL = url;
......
......@@ -43,7 +43,6 @@
OtrGUIClient::OtrGUIClient( Kopete::ChatSession *parent )
: QObject( parent ), KXMLGUIClient( parent )
{
setComponentData( OTRPlugin::plugin()->componentData() );
connect( OTRPlugin::plugin(),
SIGNAL(destroyed(QObject*)), this,
......
......@@ -34,7 +34,8 @@
#include <ui/kopeteview.h>
#include <kopeteprotocol.h>
#include <kopetecontact.h>
#include <KGlobal>
#include <KLocale>
#include <kdebug.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
......
......@@ -39,6 +39,7 @@
#include <kdebug.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kglobal.h>
/*********************** Konstruktor/Destruktor **********************/
......
......@@ -59,7 +59,7 @@ K_EXPORT_PLUGIN ( OTRPluginFactory ( "kopete_otr" ) )
OTRPlugin::OTRPlugin ( QObject *parent, const QVariantList &/*args*/ )
: Kopete::Plugin ( OTRPluginFactory::componentData(), parent )
: Kopete::Plugin ( parent )
{
kDebug(14318) << "OTR Plugin loading...";
......@@ -92,7 +92,7 @@ OTRPlugin::OTRPlugin ( QObject *parent, const QVariantList &/*args*/ )
slotSettingsChanged();
//adding menu to contaclists menubar and contacts popup menu
otrPolicyMenu = new KSelectAction( KIcon("object-locked"), i18nc( "@item:inmenu", "&OTR Policy" ), this );
otrPolicyMenu = new KSelectAction( QIcon::fromTheme("object-locked"), i18nc( "@item:inmenu", "&OTR Policy" ), this );
actionCollection()->addAction( "otr_policy", otrPolicyMenu );
KAction *separatorAction = new KAction( otrPolicyMenu );
......
......@@ -55,7 +55,7 @@ K_PLUGIN_FACTORY(OTRPreferencesFactory, registerPlugin<OTRPreferences>();)
K_EXPORT_PLUGIN(OTRPreferencesFactory ( "kcm_kopete_otr" ))
OTRPreferences::OTRPreferences(QWidget *parent, const QVariantList &args)
: KCModule(OTRPreferencesFactory::componentData(), parent, args)
: KCModule(parent, args)
{
QVBoxLayout *layout = new QVBoxLayout( this ) ;
QWidget *widget = new QWidget(this);
......
......@@ -25,6 +25,7 @@
#include "privkeypopup.h"
#include <kwindowsystem.h>
#include <KIcon>
PrivKeyPopup::PrivKeyPopup( QWidget *parent ):KDialog( parent ){
QWidget *widget = new QWidget( this );
......
......@@ -28,6 +28,7 @@
#include "qevent.h"
#include "ui_privkeypopup.h"
#include <KDialog>
class PrivKeyPopup: public KDialog
{
......
......@@ -26,7 +26,7 @@
#include <QListWidgetItem>
#include <KLocalizedString>
#include <kcolordialog.h>
#include <QColorDialog>
#include <kgenericfactory.h>
#include <kdebug.h>
......@@ -154,7 +154,8 @@ QStringList TextEffectPreferences::colors()
void TextEffectPreferences::slotAddPressed()
{
QColor myColor;
if( KColorDialog::getColor( myColor ) == KColorDialog::Accepted )
myColor = QColorDialog::getColor();
if ( myColor.isValid() )
{
preferencesDialog->mColorsListBox->addItem(myColor.name());
}
......
......@@ -41,7 +41,7 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <kmenu.h>
#include <QMenu>
#include <kmessagebox.h>
#include <knotification.h>
#include <ktemporaryfile.h>
......
......@@ -33,7 +33,7 @@
#include <klocale.h>
#include <kxmlguiwindow.h>
#include <kmessagebox.h>
#include <kmenu.h>
#include <QMenu>
#include <kshortcut.h>
#include <kopetecontact.h>
......
......@@ -46,7 +46,7 @@
//#include <QLineEdit>
//#include <klineeditdlg.h>
#include <klocale.h>
#include <kmenu.h>
#include <QMenu>
#include <kmessagebox.h>
......
......@@ -23,7 +23,7 @@
#include <QTreeWidget>
#include <QContextMenuEvent>
#include <QHeaderView>
#include <KMenu>
#include <QMenu>
#include <KMessageBox>
#include <KLocale>
#include <KDebug>
......@@ -95,7 +95,7 @@ bool dlgJabberServices::eventFilter(QObject *object, QEvent *event)
{
QContextMenuEvent *e = (QContextMenuEvent *)event;
ServiceItem *si = (ServiceItem *)ui.trServices->currentItem();
KMenu *menu = new KMenu(this);
QMenu *menu = new QMenu(this);
if(si->features().canRegister())
menu->addAction(mActRegister);
if(si->features().canSearch())
......
......@@ -27,7 +27,7 @@
#include <kaction.h>
#include <kactionmenu.h>
#include <kmenu.h>
#include <QMenu>
#include <klocale.h>
#include <kconfigbase.h>
#include <kinputdialog.h>
......
......@@ -24,7 +24,7 @@
#include <kdebug.h>
#include <klocale.h>
#include <kactionmenu.h>
#include <kmenu.h>
#include <QMenu>
#include <kicon.h>
#include <kconfiggroup.h>
......
......@@ -23,7 +23,7 @@
#include <klocale.h>
#include <kxmlguiwindow.h>
#include <kmessagebox.h>
#include <kmenu.h>
#include <QMenu>
#include <kactionmenu.h>
#include <kshortcut.h>
#include <kicon.h>
......
......@@ -22,7 +22,7 @@
#include <kopeteaccount.h>
#include <kactionmenu.h>
#include <kmenu.h>
#include <QMenu>
class SkypeProtocol;
class QString;
......
......@@ -20,7 +20,7 @@
#include <kconfigbase.h>
#include <kaction.h>
#include <kmenu.h>
#include <QMenu>
#include <kdebug.h>
#include <kmessagebox.h>
#include <klocale.h>
......
......@@ -42,7 +42,7 @@
#include "wpaccount.h"
#include "wpcontact.h"
class KMenu;
class QMenu;
WPProtocol *WPProtocol::sProtocol = 0;
......
......@@ -27,7 +27,7 @@
#include <kactionmenu.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmenu.h>
#include <QMenu>
#include <kmessagebox.h>
#include <knotification.h>
#include <KCodecs>
......
......@@ -32,7 +32,7 @@
#include <kinputdialog.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kmenu.h>
#include <QMenu>
#include <kmainwindow.h>
#include <ktoolbar.h>
#include <krun.h>
......
......@@ -34,7 +34,7 @@
#include <kinputdialog.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kmenu.h>
#include <QMenu>
#include <kaction.h>
#include <kactionmenu.h>
#include <kactioncollection.h>
......
......@@ -24,7 +24,7 @@
#include <kaction.h>
#include <kactionmenu.h>
#include <KMenu>
#include <QMenu>
#include "kopetechatsession.h"
#include "wlmchatsessioninkaction.h"
......
......@@ -18,7 +18,7 @@
#include <QHBoxLayout>
#include <KMenu>
#include <QMenu>
#include <KIcon>
#include <KLocale>
......@@ -30,7 +30,7 @@ class WlmChatSessionInkAction::WlmChatSessionInkActionPrivate
public:
WlmChatSessionInkActionPrivate()
{
m_popup = new KMenu(0L);
m_popup = new QMenu(0L);
m_sessionInk = new QWidget;
Ui::InkWindow ui;
ui.setupUi(m_sessionInk);
......@@ -48,7 +48,7 @@ public:
m_sessionInk = 0;
}
KMenu *m_popup;
QMenu *m_popup;
QWidget *m_sessionInk;
};
......
......@@ -41,7 +41,7 @@
#include <kdebug.h>
#include <kaction.h>
#include <kactionmenu.h>
#include <kmenu.h>
#include <QMenu>
#include <kmessagebox.h>
#include <krun.h>
#include <kstandarddirs.h>
......
......@@ -28,7 +28,7 @@
#include <kinputdialog.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kmenu.h>
#include <QMenu>
#include <ktemporaryfile.h>
#include <kxmlguiwindow.h>
#include <ktoolbar.h>
......
......@@ -22,7 +22,7 @@
#include <QLineEdit>
#include <klocale.h>
#include <kmessagebox.h>
#include <kmenu.h>
#include <QMenu>
#include <kconfig.h>
#include <kopetecontactaction.h>
......
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