X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=6027569e5c4b7bd6c4b0e05a9c54816e7d6844cb;hb=c95649029bee1418b77ea2028f06b850759c7423;hp=1588f4df5c9b0cf13eba50a599e7043133aa1b75;hpb=b8e812857ca64834078e1f620bf98fffa48b7768;p=quassel.git diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 1588f4df..6027569e 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,12 +18,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include "chatscene.h" + #include #include #include #include #include -#include #include #include #include @@ -45,18 +46,18 @@ #include "chatitem.h" #include "chatline.h" #include "chatlinemodelitem.h" -#include "chatscene.h" #include "chatview.h" +#include "chatviewsettings.h" #include "client.h" #include "clientbacklogmanager.h" #include "columnhandleitem.h" #include "contextmenuactionprovider.h" +#include "icon.h" #include "mainwin.h" #include "markerlineitem.h" #include "messagefilter.h" #include "qtui.h" #include "qtuistyle.h" -#include "chatviewsettings.h" #include "webpreviewitem.h" const qreal minContentsWidth = 200; @@ -836,7 +837,7 @@ void ChatScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) // 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(QIcon::fromTheme("edit-copy"), tr("Copy Selection"), &menu, this, + QAction *act = new Action(icon::get("edit-copy"), tr("Copy Selection"), &menu, this, SLOT(selectionToClipboard()), QKeySequence::Copy); menu.insertAction(sep, act); @@ -845,7 +846,7 @@ void ChatScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) searchSelectionText = searchSelectionText.left(_webSearchSelectionTextMaxVisible).append(QString::fromUtf8("…")); searchSelectionText = tr("Search '%1'").arg(searchSelectionText); - QAction *webSearchAction = new Action(QIcon::fromTheme("edit-find"), searchSelectionText, &menu, this, SLOT(webSearchOnSelection())); + QAction *webSearchAction = new Action(icon::get("edit-find"), searchSelectionText, &menu, this, SLOT(webSearchOnSelection())); menu.insertAction(sep, webSearchAction); } @@ -1295,8 +1296,8 @@ void ChatScene::webPreviewNextStep() qWarning() << "removing preview"; if (webPreview.previewItem && webPreview.previewItem->scene()) removeItem(webPreview.previewItem); - // Fall through to deletion! - [[fallthrough]]; + // Fall through to deletion! + [[clang::fallthrough]]; case WebPreview::HidePreview: if (webPreview.previewItem) { delete webPreview.previewItem; @@ -1323,8 +1324,8 @@ void ChatScene::clearWebPreview(ChatItem *parentItem) if (webPreview.previewItem && webPreview.previewItem->scene()) removeItem(webPreview.previewItem); } - // fall through into to set hidden state - [[fallthrough]]; + // fall through into to set hidden state + [[clang::fallthrough]]; case WebPreview::DelayPreview: // we're just loading, so haven't shown the preview yet. webPreview.previewState = WebPreview::HidePreview;