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/imageviewer | |
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/imageviewer')
-rw-r--r-- | src/plugins/imageviewer/imageviewer.cpp | 6 | ||||
-rw-r--r-- | src/plugins/imageviewer/imageviewer.h | 1 | ||||
-rw-r--r-- | src/plugins/imageviewer/imageviewerfile.cpp | 6 | ||||
-rw-r--r-- | src/plugins/imageviewer/imageviewerfile.h | 1 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp index 3604c1195a..e214eade6d 100644 --- a/src/plugins/imageviewer/imageviewer.cpp +++ b/src/plugins/imageviewer/imageviewer.cpp @@ -119,12 +119,6 @@ ImageViewer::~ImageViewer() delete d; } -bool ImageViewer::createNew(const QString &contents) -{ - Q_UNUSED(contents) - return false; -} - bool ImageViewer::open(QString *errorString, const QString &fileName, const QString &realFileName) { if (!d->imageView->openFile(realFileName)) { diff --git a/src/plugins/imageviewer/imageviewer.h b/src/plugins/imageviewer/imageviewer.h index 4ad5cbc853..2890d45a32 100644 --- a/src/plugins/imageviewer/imageviewer.h +++ b/src/plugins/imageviewer/imageviewer.h @@ -54,7 +54,6 @@ public: explicit ImageViewer(QWidget *parent = 0); ~ImageViewer(); - bool createNew(const QString &contents = QString()); bool open(QString *errorString, const QString &fileName, const QString &realFileName); Core::IDocument *document(); Core::Id id() const; diff --git a/src/plugins/imageviewer/imageviewerfile.cpp b/src/plugins/imageviewer/imageviewerfile.cpp index e04539a59c..a7c96e0ceb 100644 --- a/src/plugins/imageviewer/imageviewerfile.cpp +++ b/src/plugins/imageviewer/imageviewerfile.cpp @@ -72,6 +72,12 @@ bool ImageViewerFile::save(QString *errorString, const QString &fileName, bool a return false; } +bool ImageViewerFile::setContents(const QByteArray &contents) +{ + Q_UNUSED(contents); + return false; +} + QString ImageViewerFile::defaultPath() const { return QString(); diff --git a/src/plugins/imageviewer/imageviewerfile.h b/src/plugins/imageviewer/imageviewerfile.h index 448e9abdc4..d042e8ab1f 100644 --- a/src/plugins/imageviewer/imageviewerfile.h +++ b/src/plugins/imageviewer/imageviewerfile.h @@ -46,6 +46,7 @@ public: explicit ImageViewerFile(ImageViewer *parent = 0); bool save(QString *errorString, const QString &fileName, bool autoSave); + bool setContents(const QByteArray &contents); QString defaultPath() const; QString suggestedFileName() const; |