summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/textdocument.h
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-06-02 17:14:48 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-06-10 11:21:17 +0000
commit4f927e4c87f07c4d50efcef5b61478df61cc9d3f (patch)
treea9bbeafa63ea92a5171990bdc8639f93282a7252 /src/plugins/texteditor/textdocument.h
parentc916d250b3c1ff28a4ad0c93ccbd6005c9ff9f42 (diff)
downloadqt-creator-4f927e4c87f07c4d50efcef5b61478df61cc9d3f.tar.gz
Move "open" from IEditor to IDocument
For non-editor documents it currently is not used, but for editors it makes more sense to have that on the document instead of the editor. Most actual implementations of "open" were done in the documents already anyhow, because it is needed for reloading. Change-Id: I29d4df2078995cbe80172b51a9bebeecb3afad3c Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Diffstat (limited to 'src/plugins/texteditor/textdocument.h')
-rw-r--r--src/plugins/texteditor/textdocument.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/texteditor/textdocument.h b/src/plugins/texteditor/textdocument.h
index 818059e80a..8deb19c62b 100644
--- a/src/plugins/texteditor/textdocument.h
+++ b/src/plugins/texteditor/textdocument.h
@@ -117,7 +117,7 @@ public:
void setDefaultPath(const QString &defaultPath);
void setSuggestedFileName(const QString &suggestedFileName);
- virtual bool open(QString *errorString, const QString &fileName, const QString &realFileName);
+ bool open(QString *errorString, const QString &fileName, const QString &realFileName);
virtual bool reload(QString *errorString);
bool setPlainText(const QString &text);
@@ -138,6 +138,8 @@ public slots:
void setFontSettings(const TextEditor::FontSettings &fontSettings);
signals:
+ void aboutToOpen(const QString &fileName, const QString &realFileName);
+ void openFinishedSuccessfully();
void contentsChanged();
void tabSettingsChanged();
void fontSettingsChanged();
@@ -146,6 +148,7 @@ protected slots:
virtual void applyFontSettings();
private:
+ bool openImpl(QString *errorString, const QString &fileName, const QString &realFileName);
void cleanWhitespace(QTextCursor &cursor, bool cleanIndentation, bool inEntireDocument);
void ensureFinalNewLine(QTextCursor &cursor);