X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=5c81bf7e8cb8e51e6e6cb747fc26194f88a9dedd;hp=5ece1ff87f6dda1b6bdb46b6be7efa856046862d;hb=6fd69e84e6c395a108e6b2620c6428907b7d7efd;hpb=68878dc8366f2f4a0afe132847aad9a51a80cdbf diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 5ece1ff8..5c81bf7e 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -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); } @@ -1296,7 +1297,6 @@ void ChatScene::webPreviewNextStep() if (webPreview.previewItem && webPreview.previewItem->scene()) removeItem(webPreview.previewItem); // Fall through to deletion! - [[clang::fallthrough]]; case WebPreview::HidePreview: if (webPreview.previewItem) { delete webPreview.previewItem; @@ -1324,7 +1324,6 @@ void ChatScene::clearWebPreview(ChatItem *parentItem) removeItem(webPreview.previewItem); } // 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;