Commit c90ada79 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.itemLibrary: use utf8 for filenames (not latin1)

Task-number: QTCREATORBUG-4617
Change-Id: I6ff20816aa2800d4465a99ee69bdd871e6186a57
Reviewed-on: http://codereview.qt.nokia.com/1511Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent 10557d76
......@@ -379,7 +379,7 @@ void DragTool::dragMoveEvent(QGraphicsSceneDragDropEvent * event)
createQmlItemNode(itemLibraryEntry, parentNode, event->scenePos());
} else if (event->mimeData()->hasFormat("application/vnd.bauhaus.libraryresource")) {
Q_ASSERT(!event->mimeData()->data("application/vnd.bauhaus.libraryresource").isEmpty());
QString imageName = QString::fromLatin1((event->mimeData()->data("application/vnd.bauhaus.libraryresource")));
QString imageName = QString::fromUtf8((event->mimeData()->data("application/vnd.bauhaus.libraryresource")));
createQmlItemNodeFromImage(imageName, parentNode, event->scenePos());
} else Q_ASSERT(false);
m_blockMove = true;
......
......@@ -129,7 +129,7 @@ void ItemLibraryTreeView::startDrag(Qt::DropActions /* supportedActions */)
drag->setPreview(pixmap);
drag->setPixmap(QIcon(pixmap).pixmap(128, 128));
QMimeData *mimeData = new QMimeData;
mimeData->setData("application/vnd.bauhaus.libraryresource", fileInfo.absoluteFilePath().toLatin1());
mimeData->setData("application/vnd.bauhaus.libraryresource", fileInfo.absoluteFilePath().toUtf8());
drag->setMimeData(mimeData);
drag->exec();
}
......
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