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

Change-Id: I9847a1e22d9dc384658972c1462c4f6d42654daa
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-09-21 22:45:40 +02:00
parent aa8602e1e8
commit 422eee2938

View File

@@ -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();