CppEditor: Ensure utf8 encoded working copy from the preprocessor dialog

Change-Id: Ifbc2adeff83cbef9841da872e15a5b9dd8379a3d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-11-12 10:08:59 +01:00
parent 25c21b3517
commit 18f38709d5
2 changed files with 3 additions and 3 deletions

View File

@@ -709,7 +709,7 @@ void CPPEditorWidget::setMimeType(const QString &mt)
const QString &projectFile = ProjectExplorer::SessionManager::value(
QLatin1String(Constants::CPP_PREPROCESSOR_PROJECT_PREFIX) + filePath).toString();
const QByteArray &additionalDirectives = ProjectExplorer::SessionManager::value(
projectFile + QLatin1Char(',') + filePath).toByteArray();
projectFile + QLatin1Char(',') + filePath).toString().toUtf8();
QSharedPointer<SnapshotUpdater> updater
= m_modelManager->cppEditorSupport(editor())->snapshotUpdater();
@@ -1988,7 +1988,7 @@ void CPPEditorWidget::showPreProcessorWidget()
if (preProcessorDialog.exec() == QDialog::Accepted) {
QSharedPointer<SnapshotUpdater> updater
= m_modelManager->cppEditorSupport(editor())->snapshotUpdater();
updater->setEditorDefines(preProcessorDialog.additionalPreProcessorDirectives().toLatin1());
updater->setEditorDefines(preProcessorDialog.additionalPreProcessorDirectives().toUtf8());
updater->update(m_modelManager->workingCopy());
}
}