forked from qt-creator/qt-creator
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user