X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=9e7e1eb687f41cf14d2e2e0fd1702b659bd99130;hp=ed24bbaf72ce687f284fddf2a44c0d31229c56ff;hb=b2c1179d290dc97f2c8497db9ed0c8adcc679ed7;hpb=eacb532f13295a30fa4366a6ff29d1168db84280 diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index ed24bbaf..9e7e1eb6 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -289,9 +289,7 @@ void ChatItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { void ChatItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if(_selectionMode != NoSelection && !event->buttons() & Qt::LeftButton) { - QString selection - = data(MessageModel::DisplayRole).toString().mid(qMin(_selectionStart, _selectionEnd), qAbs(_selectionStart - _selectionEnd)); - chatScene()->putToClipboard(selection); + chatScene()->selectionToClipboard(QClipboard::Selection); event->accept(); } else event->ignore(); @@ -559,6 +557,7 @@ void ContentsChatItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { event->accept(); } +/* void ContentsChatItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { qint16 idx = posToCursor(event->pos()); for(int i = 0; i < privateData()->clickables.count(); i++) { @@ -581,6 +580,7 @@ void ContentsChatItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { } } } +*/ void ContentsChatItem::showWebPreview(const Clickable &click) { #ifndef HAVE_WEBKIT