summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolseditorsupport.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-04-18 18:21:17 +0200
committerEike Ziller <eike.ziller@digia.com>2013-04-19 16:21:30 +0200
commitb450b3071e7fd3de22c8d51503efd90c62780ee1 (patch)
treea949011c4cd25b92d1adc1012f43bd908549b220 /src/plugins/cpptools/cpptoolseditorsupport.cpp
parente31575a493c70116c46eb09fd9d469a70ddd2298 (diff)
downloadqt-creator-b450b3071e7fd3de22c8d51503efd90c62780ee1.tar.gz
TextEditors: Separate away methods that actually work on a document
Introduces ITextEditorDocument. This is part of a more general "use documents instead of editors whereever possible". It will allow to move to e.g. ITextEditor::openedTextDocumentContents() instead of ITextEditor::openedTextEditorsContents(). Change-Id: I5ebceaa257a0d2c3e8ac4ac51b9b08b6faa42487 Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolseditorsupport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp
index 8f5fa3cd44..32f1eac904 100644
--- a/src/plugins/cpptools/cpptoolseditorsupport.cpp
+++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp
@@ -73,7 +73,7 @@ QString CppEditorSupport::contents()
if (! _textEditor)
return QString();
else if (! _cachedContents.isEmpty())
- _cachedContents = _textEditor->contents();
+ _cachedContents = _textEditor->textDocument()->contents();
return _cachedContents;
}
@@ -112,7 +112,7 @@ void CppEditorSupport::updateDocumentNow()
_updateDocumentTimer->stop();
QStringList sourceFiles(_textEditor->document()->fileName());
- _cachedContents = _textEditor->contents();
+ _cachedContents = _textEditor->textDocument()->contents();
_documentParser = _modelManager->updateSourceFiles(sourceFiles);
}
}