CppTools: Compile with QT_NO_CAST_FROM_ASCII

Change-Id: I31a6117c2b4be3f8603c16a9f98b6937a0b9aeb2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Orgad Shaneh
2012-11-21 22:36:47 +02:00
committed by Friedemann Kleint
parent f0ef96ef0c
commit be443b8edb
16 changed files with 50 additions and 52 deletions

View File

@@ -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(