diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-07-15 15:14:10 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-07-17 09:00:17 +0200 |
commit | fade19a9bfb89b791d9a64dd3e43441a5861e40c (patch) | |
tree | e691329773e462f851480ac92f75a0c9ce43284f /src/plugins/bineditor | |
parent | 0ba2b9b37d745107926e13cf7e241c5351229966 (diff) | |
download | qt-creator-fade19a9bfb89b791d9a64dd3e43441a5861e40c.tar.gz |
Move IEditor::createNew to IDocument::setContents
The method is for setting the contents, so it belongs to the document,
and should be named correspondingly.
Change-Id: I40363dc08f11268f530885b512e4a88e8b10d096
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/bineditor')
-rw-r--r-- | src/plugins/bineditor/bineditorplugin.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp index 251655ba7a..cf44f63885 100644 --- a/src/plugins/bineditor/bineditorplugin.cpp +++ b/src/plugins/bineditor/bineditorplugin.cpp @@ -195,6 +195,14 @@ public: return QLatin1String(Constants::C_BINEDITOR_MIMETYPE); } + bool setContents(const QByteArray &contents) + { + if (!contents.isEmpty()) + return false; + m_widget->clear(); + return true; + } + bool save(QString *errorString, const QString &fn, bool autoSave) { QTC_ASSERT(!autoSave, return true); // bineditor does not support autosave - it would be a bit expensive @@ -342,11 +350,6 @@ public: delete m_widget; } - bool createNew(const QString & /* contents */ = QString()) { - m_widget->clear(); - m_file->setFilePath(QString()); - return true; - } bool open(QString *errorString, const QString &fileName, const QString &realFileName) { QTC_ASSERT(fileName == realFileName, return false); // The bineditor can do no autosaving return m_file->open(errorString, fileName); |