forked from qt-creator/qt-creator
CppTools: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: I31a6117c2b4be3f8603c16a9f98b6937a0b9aeb2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
committed by
Friedemann Kleint
parent
f0ef96ef0c
commit
be443b8edb
@@ -528,14 +528,14 @@ static InsertionLocation nextToSurroundingDefinitions(Declaration *declaration,
|
||||
if (!definitionFunction)
|
||||
return noResult;
|
||||
|
||||
Document::Ptr targetDoc = changes.snapshot().document(definition->fileName());
|
||||
Document::Ptr targetDoc = changes.snapshot().document(QString::fromUtf8(definition->fileName()));
|
||||
if (!targetDoc)
|
||||
return noResult;
|
||||
|
||||
targetDoc->translationUnit()->getPosition(definitionFunction->endOffset(), &line, &column);
|
||||
} else {
|
||||
// we don't have an offset to the start of the function definition, so we need to manually find it...
|
||||
CppRefactoringFilePtr targetFile = changes.file(definition->fileName());
|
||||
CppRefactoringFilePtr targetFile = changes.file(QString::fromUtf8(definition->fileName()));
|
||||
if (!targetFile->isValid())
|
||||
return noResult;
|
||||
|
||||
@@ -547,7 +547,7 @@ static InsertionLocation nextToSurroundingDefinitions(Declaration *declaration,
|
||||
targetFile->cppDocument()->translationUnit()->getTokenStartPosition(functionDefinition->firstToken(), &line, &column);
|
||||
}
|
||||
|
||||
return InsertionLocation(definition->fileName(), prefix, suffix, line, column);
|
||||
return InsertionLocation(QString::fromUtf8(definition->fileName()), prefix, suffix, line, column);
|
||||
}
|
||||
|
||||
QList<InsertionLocation> InsertionPointLocator::methodDefinition(
|
||||
|
||||
Reference in New Issue
Block a user