Commit 422eee29 authored by hjk's avatar hjk

debugger: handle "bad" characters when d&d'ing new watchers

Change-Id: I9847a1e22d9dc384658972c1462c4f6d42654daa
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent aa8602e1
......@@ -550,7 +550,11 @@ void WatchTreeView::dragMoveEvent(QDragMoveEvent *ev)
void WatchTreeView::dropEvent(QDropEvent *ev)
{
if (ev->mimeData()->hasText()) {
watchExpression(ev->mimeData()->text());
QString exp;
QString data = ev->mimeData()->text();
foreach (const QChar c, data)
exp.append(c.isPrint() ? c : QChar(QLatin1Char(' ')));
watchExpression(exp);
//ev->acceptProposedAction();
ev->setDropAction(Qt::CopyAction);
ev->accept();
......
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