# include <QMenuBar>
#endif
-#ifdef HAVE_WEBKIT
+#ifdef HAVE_WEBENGINE
+# include <QWebEngineView>
+#elif defined HAVE_WEBKIT
# include <QWebView>
#endif
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);
searchSelectionText = searchSelectionText.left(_webSearchSelectionTextMaxVisible).append(QString::fromUtf8("…"));
searchSelectionText = tr("Search '%1'").arg(searchSelectionText);
- menu.addAction(QIcon::fromTheme("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)