Commit 6f457b22 authored by Tobias Nätterlund's avatar Tobias Nätterlund Committed by Erik Verbruggen
Browse files

QNX: Force UTF-8 encoding for bar-descriptor.xml (QTCREATORBUG-8853)



Change-Id: I354fe227d8b5446c25fcb928b09a29e69a2104d0
Reviewed-by: Nicolas Arnaud-Cormos's avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: default avatarMehdi Fekari <mfekari@rim.com>
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent cec8dd5a
......@@ -36,12 +36,13 @@
#include "bardescriptordocumentnodehandlers.h"
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/editormanager.h>
#include <utils/qtcassert.h>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtCore/QTextCodec>
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include <QTextCodec>
using namespace Qnx;
using namespace Qnx::Internal;
......@@ -70,6 +71,13 @@ BarDescriptorDocument::BarDescriptorDocument(BarDescriptorEditorWidget *editorWi
// Assets
registerNodeHandler(new BarDescriptorDocumentAssetNodeHandler(m_editorWidget));
// blackberry-nativepackager requires the XML file to be in UTF-8 encoding,
// force if possible
if (QTextCodec *defaultUTF8 = QTextCodec::codecForName("UTF-8"))
setCodec(defaultUTF8);
else
setCodec(Core::EditorManager::instance()->defaultTextCodec());
}
BarDescriptorDocument::~BarDescriptorDocument()
......
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