/***************************************************************************
- * Copyright (C) 2005-2014 by the Quassel Project *
+ * Copyright (C) 2005-2015 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include <QDesktopServices>
#include <QDrag>
#include <QGraphicsSceneMouseEvent>
+#include <QIcon>
#include <QMenu>
#include <QMenuBar>
#include <QMimeData>
#include <QPersistentModelIndex>
#include <QUrl>
-#ifdef HAVE_KDE
+#ifdef HAVE_KDE4
# include <KMenuBar>
#else
# include <QMenuBar>
#endif
-#ifdef HAVE_WEBKIT
+#ifdef HAVE_WEBENGINE
+# include <QWebEngineView>
+#elif defined HAVE_WEBKIT
# include <QWebView>
#endif
#include "clientbacklogmanager.h"
#include "columnhandleitem.h"
#include "contextmenuactionprovider.h"
-#include "iconloader.h"
#include "mainwin.h"
#include "markerlineitem.h"
#include "messagefilter.h"
this, SLOT(rowsRemoved()));
connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), SLOT(dataChanged(QModelIndex, QModelIndex)));
-#ifdef HAVE_WEBKIT
+#if defined HAVE_WEBKIT || defined HAVE_WEBENGINE
webPreview.timer.setSingleShot(true);
connect(&webPreview.timer, SIGNAL(timeout()), this, SLOT(webPreviewNextStep()));
#endif
QPointF senderPos(firstColumnHandle()->sceneRight(), 0);
while (lineIter != lineIterBegin) {
- lineIter--;
+ --lineIter;
(*lineIter)->setFirstColumn(timestampWidth, senderWidth, senderPos);
}
//setItemIndexMethod(QGraphicsScene::BspTreeIndex);
qreal contentsWidth = _sceneRect.width() - secondColumnHandle()->sceneRight();
QPointF contentsPos(secondColumnHandle()->sceneRight(), 0);
while (lineIter != lineIterBegin) {
- lineIter--;
+ --lineIter;
(*lineIter)->setSecondColumn(senderWidth, contentsWidth, contentsPos, linePos);
}
//setItemIndexMethod(QGraphicsScene::BspTreeIndex);
// If we have text selected, insert the Copy Selection as first item
if (isPosOverSelection(pos)) {
QAction *sep = menu.insertSeparator(menu.actions().first());
- QAction *act = new Action(SmallIcon("edit-copy"), tr("Copy Selection"), &menu, this,
+ QAction *act = new Action(QIcon::fromTheme("edit-copy"), tr("Copy Selection"), &menu, this,
SLOT(selectionToClipboard()), QKeySequence::Copy);
menu.insertAction(sep, act);
searchSelectionText = searchSelectionText.left(_webSearchSelectionTextMaxVisible).append(QString::fromUtf8("…"));
searchSelectionText = tr("Search '%1'").arg(searchSelectionText);
- menu.addAction(SmallIcon("edit-find"), searchSelectionText, this, SLOT(webSearchOnSelection()));
+ QAction *webSearchAction = new Action(QIcon::fromTheme("edit-find"), searchSelectionText, &menu, this, SLOT(webSearchOnSelection()));
+ menu.insertAction(sep, webSearchAction);
}
if (QtUi::mainWindow()->menuBar()->isHidden())
// ========================================
-// Webkit Only stuff
+// Webkit/WebEngine Only stuff
// ========================================
-#ifdef HAVE_WEBKIT
+#if defined HAVE_WEBKIT || defined HAVE_WEBENGINE
void ChatScene::loadWebPreview(ChatItem *parentItem, const QUrl &url, const QRectF &urlRect)
{
if (!_showWebPreview)