Core: Use FileName for file path in IDocument

Change-Id: I85f7398aee59d0d36f0e5c3bf88ff3c96002e394
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2014-12-21 21:54:30 +02:00
committed by Orgad Shaneh
parent 9c1b28fec2
commit c6a983d271
123 changed files with 327 additions and 324 deletions

View File

@@ -224,7 +224,7 @@ void QmlJSEditorWidget::updateCodeWarnings(QmlJS::Document::Ptr doc)
void QmlJSEditorWidget::modificationChanged(bool changed)
{
if (!changed && m_modelManager)
m_modelManager->fileChangedOnDisk(textDocument()->filePath());
m_modelManager->fileChangedOnDisk(textDocument()->filePath().toString());
}
void QmlJSEditorWidget::jumpToOutlineElement(int /*index*/)
@@ -641,12 +641,12 @@ TextEditorWidget::Link QmlJSEditorWidget::findLinkAt(const QTextCursor &cursor,
void QmlJSEditorWidget::findUsages()
{
m_findReferences->findUsages(textDocument()->filePath(), textCursor().position());
m_findReferences->findUsages(textDocument()->filePath().toString(), textCursor().position());
}
void QmlJSEditorWidget::renameUsages()
{
m_findReferences->renameUsages(textDocument()->filePath(), textCursor().position());
m_findReferences->renameUsages(textDocument()->filePath().toString(), textCursor().position());
}
void QmlJSEditorWidget::showContextPane()
@@ -846,7 +846,7 @@ AssistInterface *QmlJSEditorWidget::createAssistInterface(
if (assistKind == TextEditor::Completion) {
return new QmlJSCompletionAssistInterface(document(),
position(),
textDocument()->filePath(),
textDocument()->filePath().toString(),
reason,
m_qmlJsEditorDocument->semanticInfo());
} else if (assistKind == TextEditor::QuickFix) {

View File

@@ -451,7 +451,7 @@ QmlJSEditorDocumentPrivate::QmlJSEditorDocumentPrivate(QmlJSEditorDocument *pare
m_updateOutlineModelTimer.setSingleShot(true);
connect(&m_updateOutlineModelTimer, SIGNAL(timeout()), this, SLOT(updateOutlineModel()));
modelManager->updateSourceFiles(QStringList(parent->filePath()), false);
modelManager->updateSourceFiles(QStringList(parent->filePath().toString()), false);
}
QmlJSEditorDocumentPrivate::~QmlJSEditorDocumentPrivate()
@@ -468,13 +468,13 @@ void QmlJSEditorDocumentPrivate::invalidateFormatterCache()
void QmlJSEditorDocumentPrivate::reparseDocument()
{
ModelManagerInterface::instance()->updateSourceFiles(QStringList() << q->filePath(),
false);
ModelManagerInterface::instance()->updateSourceFiles(QStringList(q->filePath().toString()),
false);
}
void QmlJSEditorDocumentPrivate::onDocumentUpdated(Document::Ptr doc)
{
if (q->filePath() != doc->fileName())
if (q->filePath().toString() != doc->fileName())
return;
// text document has changed, simply wait for the next onDocumentUpdated

View File

@@ -50,7 +50,7 @@ using namespace Internal;
QmlJSQuickFixAssistInterface::QmlJSQuickFixAssistInterface(QmlJSEditorWidget *editor,
TextEditor::AssistReason reason)
: AssistInterface(editor->document(), editor->position(),
editor->textDocument()->filePath(), reason)
editor->textDocument()->filePath().toString(), reason)
, m_semanticInfo(editor->qmlJsEditorDocument()->semanticInfo())
, m_currentFile(QmlJSRefactoringChanges::file(editor, m_semanticInfo.document))
{}

View File

@@ -336,7 +336,7 @@ QMimeData *QmlOutlineModel::mimeData(const QModelIndexList &indexes) const
QModelIndex index = indexes.at(i);
AST::SourceLocation location = sourceLocation(index);
data->addFile(m_editorDocument->filePath(), location.startLine,
data->addFile(m_editorDocument->filePath().toString(), location.startLine,
location.startColumn - 1 /*editors have 0-based column*/);
QList<int> rowPath;