diff options
author | Eike Ziller <eike.ziller@nokia.com> | 2012-02-14 16:43:51 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@nokia.com> | 2012-02-20 13:32:49 +0100 |
commit | d66acb51d0c8b511df9f679806cbd3d84cce41ef (patch) | |
tree | 58289c9e7f7bc6107b4d620fad791a206d097555 /src/plugins/glsleditor | |
parent | 266da3568d2db185f67227d38e29cd20d28fb2bd (diff) | |
download | qt-creator-d66acb51d0c8b511df9f679806cbd3d84cce41ef.tar.gz |
Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively.
Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/glsleditor')
-rw-r--r-- | src/plugins/glsleditor/glslcompletionassist.cpp | 12 | ||||
-rw-r--r-- | src/plugins/glsleditor/glslcompletionassist.h | 5 | ||||
-rw-r--r-- | src/plugins/glsleditor/glsleditor.cpp | 2 | ||||
-rw-r--r-- | src/plugins/glsleditor/glsleditorfactory.cpp | 4 | ||||
-rw-r--r-- | src/plugins/glsleditor/glsleditorfactory.h | 2 |
5 files changed, 12 insertions, 13 deletions
diff --git a/src/plugins/glsleditor/glslcompletionassist.cpp b/src/plugins/glsleditor/glslcompletionassist.cpp index 01c35d0e5f..6bd3469759 100644 --- a/src/plugins/glsleditor/glslcompletionassist.cpp +++ b/src/plugins/glsleditor/glslcompletionassist.cpp @@ -43,7 +43,7 @@ #include <glsl/glslsymbols.h> #include <glsl/glslastdump.h> -#include <coreplugin/ifile.h> +#include <coreplugin/idocument.h> #include <texteditor/completionsettings.h> #include <texteditor/codeassist/basicproposalitem.h> #include <texteditor/codeassist/basicproposalitemlistmodel.h> @@ -239,7 +239,7 @@ IAssistProposal *GLSLCompletionAssistProcessor::perform(const IAssistInterface * bool functionCall = (ch == QLatin1Char('(') && pos == m_interface->position() - 1); if (ch == QLatin1Char(',')) { - QTextCursor tc(m_interface->document()); + QTextCursor tc(m_interface->textDocument()); tc.setPosition(pos); const int start = expressionUnderCursor.startOfFunctionCall(tc); if (start == -1) @@ -254,7 +254,7 @@ IAssistProposal *GLSLCompletionAssistProcessor::perform(const IAssistInterface * if (ch == QLatin1Char('.') || functionCall) { const bool memberCompletion = ! functionCall; - QTextCursor tc(m_interface->document()); + QTextCursor tc(m_interface->textDocument()); tc.setPosition(pos); // get the expression under cursor @@ -465,13 +465,13 @@ void GLSLCompletionAssistProcessor::addCompletion(const QString &text, // ----------------------------- // GLSLCompletionAssistInterface // ----------------------------- -GLSLCompletionAssistInterface::GLSLCompletionAssistInterface(QTextDocument *document, +GLSLCompletionAssistInterface::GLSLCompletionAssistInterface(QTextDocument *textDocument, int position, - Core::IFile *file, + Core::IDocument *document, TextEditor::AssistReason reason, const QString &mimeType, const Document::Ptr &glslDoc) - : DefaultAssistInterface(document, position, file, reason) + : DefaultAssistInterface(textDocument, position, document, reason) , m_mimeType(mimeType) , m_glslDoc(glslDoc) { diff --git a/src/plugins/glsleditor/glslcompletionassist.h b/src/plugins/glsleditor/glslcompletionassist.h index d0c134360f..e644d2b1d1 100644 --- a/src/plugins/glsleditor/glslcompletionassist.h +++ b/src/plugins/glsleditor/glslcompletionassist.h @@ -98,9 +98,8 @@ private: class GLSLCompletionAssistInterface : public TextEditor::DefaultAssistInterface { public: - GLSLCompletionAssistInterface(QTextDocument *document, - int position, - Core::IFile *file, + GLSLCompletionAssistInterface(QTextDocument *textDocument, + int position, Core::IDocument *document, TextEditor::AssistReason reason, const QString &mimeType, const Document::Ptr &glslDoc); diff --git a/src/plugins/glsleditor/glsleditor.cpp b/src/plugins/glsleditor/glsleditor.cpp index 6a6f9a1f69..e9a7a1738c 100644 --- a/src/plugins/glsleditor/glsleditor.cpp +++ b/src/plugins/glsleditor/glsleditor.cpp @@ -420,7 +420,7 @@ TextEditor::IAssistInterface *GLSLTextEditorWidget::createAssistInterface( if (kind == TextEditor::Completion) return new GLSLCompletionAssistInterface(document(), position(), - editor()->file(), + editor()->document(), reason, mimeType(), glslDocument()); diff --git a/src/plugins/glsleditor/glsleditorfactory.cpp b/src/plugins/glsleditor/glsleditorfactory.cpp index deadc5ea34..397e392241 100644 --- a/src/plugins/glsleditor/glsleditorfactory.cpp +++ b/src/plugins/glsleditor/glsleditorfactory.cpp @@ -75,14 +75,14 @@ QString GLSLEditorFactory::displayName() const return tr(C_GLSLEDITOR_DISPLAY_NAME); } -Core::IFile *GLSLEditorFactory::open(const QString &fileName) +Core::IDocument *GLSLEditorFactory::open(const QString &fileName) { Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id()); if (!iface) { qWarning() << "QmlEditorFactory::open: openEditor failed for " << fileName; return 0; } - return iface->file(); + return iface->document(); } Core::IEditor *GLSLEditorFactory::createEditor(QWidget *parent) diff --git a/src/plugins/glsleditor/glsleditorfactory.h b/src/plugins/glsleditor/glsleditorfactory.h index e54128266b..3cfad99e31 100644 --- a/src/plugins/glsleditor/glsleditorfactory.h +++ b/src/plugins/glsleditor/glsleditorfactory.h @@ -51,7 +51,7 @@ public: QStringList mimeTypes() const; Core::Id id() const; QString displayName() const; - Core::IFile *open(const QString &fileName); + Core::IDocument *open(const QString &fileName); Core::IEditor *createEditor(QWidget *parent); private slots: |