summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-12-09 16:14:55 +0100
committerEike Ziller <eike.ziller@digia.com>2013-12-10 09:11:30 +0100
commit890f72160c61507b4bf85bdf4502d63a32f762d0 (patch)
treea70665ebbf49f7afe55f35ed43f98a2a87c6ca8d
parent5f2fe51c52e11c67ab66cfad43c02c7e004cfb8c (diff)
downloadqt-creator-890f72160c61507b4bf85bdf4502d63a32f762d0.tar.gz
Rename QString ITextEditorDocument::contents --> plainText
To differentiate it from the byte array based IDocument::setContents Change-Id: Icc9600732c2742fb79254a0697870bacce3a59ee Reviewed-by: David Schulz <david.schulz@digia.com>
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp2
-rw-r--r--src/plugins/cpptools/cpptoolseditorsupport.cpp2
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp8
-rw-r--r--src/plugins/designer/qtcreatorintegration.cpp2
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.cpp2
-rw-r--r--src/plugins/texteditor/basetextdocument.cpp2
-rw-r--r--src/plugins/texteditor/basetextdocument.h2
-rw-r--r--src/plugins/texteditor/itexteditor.cpp2
-rw-r--r--src/plugins/texteditor/itexteditor.h2
9 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index 58020e6153..8878eb2dd2 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -211,7 +211,7 @@ void CodepasterPlugin::postEditor()
if (ITextEditor *textEditor = qobject_cast<ITextEditor *>(editor)) {
data = textEditor->selectedText();
if (data.isEmpty())
- data = textEditor->textDocument()->contents();
+ data = textEditor->textDocument()->plainText();
mimeType = textEditor->document()->mimeType();
}
}
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp
index fca1a8402f..c2a3792c93 100644
--- a/src/plugins/cpptools/cpptoolseditorsupport.cpp
+++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp
@@ -186,7 +186,7 @@ QByteArray CppEditorSupport::contents() const
const int editorRev = editorRevision();
if (m_cachedContentsEditorRevision != editorRev && !m_fileIsBeingReloaded) {
m_cachedContentsEditorRevision = editorRev;
- m_cachedContents = m_textEditor->textDocument()->contents().toUtf8();
+ m_cachedContents = m_textEditor->textDocument()->plainText().toUtf8();
}
return m_cachedContents;
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index a68df5c9c0..f1a02a89d3 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -684,7 +684,7 @@ static bool currentTextEditorPosition(ContextData *data)
data->fileName = document->filePath();
if (document->property(Constants::OPENED_WITH_DISASSEMBLY).toBool()) {
int lineNumber = textEditor->currentLine();
- QString line = textEditor->textDocument()->contents()
+ QString line = textEditor->textDocument()->plainText()
.section(QLatin1Char('\n'), lineNumber - 1, lineNumber - 1);
data->address = DisassemblerLine::addressFromDisassemblyLine(line);
} else {
@@ -1843,7 +1843,7 @@ void DebuggerPluginPrivate::requestContextMenu(ITextEditor *editor,
ITextEditorDocument *document = editor->textDocument();
args.fileName = document->filePath();
if (document->property(Constants::OPENED_WITH_DISASSEMBLY).toBool()) {
- QString line = document->contents()
+ QString line = document->plainText()
.section(QLatin1Char('\n'), lineNumber - 1, lineNumber - 1);
BreakpointResponse needle;
needle.type = BreakpointByAddress;
@@ -1956,7 +1956,7 @@ void DebuggerPluginPrivate::toggleBreakpoint()
QTC_ASSERT(textEditor, return);
const int lineNumber = textEditor->currentLine();
if (textEditor->property(Constants::OPENED_WITH_DISASSEMBLY).toBool()) {
- QString line = textEditor->textDocument()->contents()
+ QString line = textEditor->textDocument()->plainText()
.section(QLatin1Char('\n'), lineNumber - 1, lineNumber - 1);
quint64 address = DisassemblerLine::addressFromDisassemblyLine(line);
toggleBreakpointByAddress(address);
@@ -2013,7 +2013,7 @@ void DebuggerPluginPrivate::requestMark(ITextEditor *editor,
return;
if (editor->property("DisassemblerView").toBool()) {
- QString line = editor->textDocument()->contents()
+ QString line = editor->textDocument()->plainText()
.section(QLatin1Char('\n'), lineNumber - 1, lineNumber - 1);
quint64 address = DisassemblerLine::addressFromDisassemblyLine(line);
toggleBreakpointByAddress(address);
diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp
index 9fc0bd8d11..ef40045b38 100644
--- a/src/plugins/designer/qtcreatorintegration.cpp
+++ b/src/plugins/designer/qtcreatorintegration.cpp
@@ -350,7 +350,7 @@ static Document::Ptr addDefinition(const Snapshot &docTable,
//! \todo use the InsertionPointLocator to insert at the correct place.
// (we'll have to extend that class first to do definition insertions)
- const QString contents = editable->textDocument()->contents();
+ const QString contents = editable->textDocument()->plainText();
int column;
editable->convertPosition(contents.length(), line, &column);
editable->gotoLine(*line, column);
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp
index 2c7469d1f4..36324371c4 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.cpp
+++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp
@@ -329,7 +329,7 @@ ModelManagerInterface::WorkingCopy ModelManager::workingCopy() const
if (TextEditor::BaseTextDocument *textDocument = qobject_cast<TextEditor::BaseTextDocument *>(document)) {
// TODO the language should be a property on the document, not the editor
if (documentModel->editorsForDocument(document).first()->context().contains(ProjectExplorer::Constants::LANG_QMLJS))
- workingCopy.insert(key, textDocument->contents(), textDocument->document()->revision());
+ workingCopy.insert(key, textDocument->plainText(), textDocument->document()->revision());
}
}
diff --git a/src/plugins/texteditor/basetextdocument.cpp b/src/plugins/texteditor/basetextdocument.cpp
index 239041311c..b9efca80b2 100644
--- a/src/plugins/texteditor/basetextdocument.cpp
+++ b/src/plugins/texteditor/basetextdocument.cpp
@@ -92,7 +92,7 @@ BaseTextDocument::~BaseTextDocument()
delete d;
}
-QString BaseTextDocument::contents() const
+QString BaseTextDocument::plainText() const
{
return document()->toPlainText();
}
diff --git a/src/plugins/texteditor/basetextdocument.h b/src/plugins/texteditor/basetextdocument.h
index a8f8f2ca7a..9b85c7c3d5 100644
--- a/src/plugins/texteditor/basetextdocument.h
+++ b/src/plugins/texteditor/basetextdocument.h
@@ -58,7 +58,7 @@ public:
virtual ~BaseTextDocument();
// ITextEditorDocument
- QString contents() const;
+ QString plainText() const;
QString textAt(int pos, int length) const;
QChar characterAt(int pos) const;
diff --git a/src/plugins/texteditor/itexteditor.cpp b/src/plugins/texteditor/itexteditor.cpp
index ab2b80b9b2..67a511033a 100644
--- a/src/plugins/texteditor/itexteditor.cpp
+++ b/src/plugins/texteditor/itexteditor.cpp
@@ -46,7 +46,7 @@ QMap<QString, QString> ITextEditor::openedTextDocumentContents()
if (!textEditorDocument)
continue;
QString fileName = textEditorDocument->filePath();
- workingCopy[fileName] = textEditorDocument->contents();
+ workingCopy[fileName] = textEditorDocument->plainText();
}
return workingCopy;
}
diff --git a/src/plugins/texteditor/itexteditor.h b/src/plugins/texteditor/itexteditor.h
index 2fa63d34c1..3a85676d60 100644
--- a/src/plugins/texteditor/itexteditor.h
+++ b/src/plugins/texteditor/itexteditor.h
@@ -81,7 +81,7 @@ class TEXTEDITOR_EXPORT ITextEditorDocument : public Core::TextDocument
public:
explicit ITextEditorDocument(QObject *parent = 0);
- virtual QString contents() const = 0;
+ virtual QString plainText() const = 0;
virtual QString textAt(int pos, int length) const = 0;
virtual QChar characterAt(int pos) const = 0;
};