diff options
author | hjk <qtc-committer@nokia.com> | 2011-09-16 15:00:41 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-09-19 08:56:44 +0200 |
commit | 58cb19e55e92f5386458adbf54ff64adbcb85ed3 (patch) | |
tree | 17286cf1a6ddd2a880299caefb3edd563fafbbb4 /src/plugins/imageviewer/imageviewerfile.cpp | |
parent | dbe1653775f19fc35cd19f50294951711a713f58 (diff) | |
download | qt-creator-58cb19e55e92f5386458adbf54ff64adbcb85ed3.tar.gz |
all: less QScopedPointer
Change-Id: I536bdb4d4f0c10fa858560f3c160fc0fff8da9b2
Reviewed-on: http://codereview.qt-project.org/5116
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/imageviewer/imageviewerfile.cpp')
-rw-r--r-- | src/plugins/imageviewer/imageviewerfile.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/imageviewer/imageviewerfile.cpp b/src/plugins/imageviewer/imageviewerfile.cpp index ad4f7c5f2a..414b769559 100644 --- a/src/plugins/imageviewer/imageviewerfile.cpp +++ b/src/plugins/imageviewer/imageviewerfile.cpp @@ -55,13 +55,14 @@ struct ImageViewerFilePrivate ImageViewerFile::ImageViewerFile(ImageViewer *parent) : Core::IFile(parent), - d_ptr(new ImageViewerFilePrivate) + d(new ImageViewerFilePrivate) { - d_ptr->editor = parent; + d->editor = parent; } ImageViewerFile::~ImageViewerFile() { + delete d; } bool ImageViewerFile::reload(QString *errorString, @@ -73,9 +74,8 @@ bool ImageViewerFile::reload(QString *errorString, if (type == TypePermissions) { emit changed(); return true; - } else { - return d_ptr->editor->open(errorString, d_ptr->fileName, d_ptr->fileName); } + return d->editor->open(errorString, d->fileName, d->fileName); } bool ImageViewerFile::save(QString *errorString, const QString &fileName, bool autoSave) @@ -88,12 +88,12 @@ bool ImageViewerFile::save(QString *errorString, const QString &fileName, bool a void ImageViewerFile::rename(const QString &newName) { - d_ptr->fileName = newName; + d->fileName = newName; } QString ImageViewerFile::fileName() const { - return d_ptr->fileName; + return d->fileName; } QString ImageViewerFile::defaultPath() const @@ -108,7 +108,7 @@ QString ImageViewerFile::suggestedFileName() const QString ImageViewerFile::mimeType() const { - return d_ptr->mimeType; + return d->mimeType; } bool ImageViewerFile::isModified() const @@ -128,13 +128,13 @@ bool ImageViewerFile::isSaveAsAllowed() const void ImageViewerFile::setMimetype(const QString &mimetype) { - d_ptr->mimeType = mimetype; + d->mimeType = mimetype; emit changed(); } void ImageViewerFile::setFileName(const QString &filename) { - d_ptr->fileName = filename; + d->fileName = filename; emit changed(); } |