void ChatItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
if(_selectionMode != NoSelection && !event->buttons() & Qt::LeftButton) {
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);
void ContentsChatItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) {
qint16 idx = posToCursor(event->pos());
for(int i = 0; i < privateData()->clickables.count(); i++) {
void ContentsChatItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) {
qint16 idx = posToCursor(event->pos());
for(int i = 0; i < privateData()->clickables.count(); i++) {