Commit 9f4124df authored by Christian Stenger's avatar Christian Stenger Committed by hjk

Debugger: Fix copy to clipboard...

...for Locals & Expressions.

Task-number: QTCREATORBUG-15870
Change-Id: I5768908ab731adffd695627206fd03cc5ccce957
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent af8d9b1d
......@@ -889,17 +889,8 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
} else if (act == &actRemoveAllWatchExpression) {
handler->clearWatches();
} else if (act == &actCopy) {
QString text;
QTextStream str(&text);
handler->model()->rootItem()->walkTree([&str](Utils::TreeItem *item) {
str << QString(item->level(), QLatin1Char('\t'))
<< item->data(0, Qt::DisplayRole).toString() << '\t'
<< item->data(1, Qt::DisplayRole).toString() << '\t'
<< item->data(2, Qt::DisplayRole).toString() << '\n';
});
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(text, QClipboard::Selection);
clipboard->setText(text, QClipboard::Clipboard);
QString contents = handler->editorContents();
copyToClipboard(contents);
} else if (act == &actCopyValue) {
copyToClipboard(mi1.data().toString());
} else if (act == &actShowInEditor) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment