summaryrefslogtreecommitdiff
path: root/src/plugins/imageviewer/imageviewerfile.cpp
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-09-16 15:00:41 +0200
committerhjk <qthjk@ovi.com>2011-09-19 08:56:44 +0200
commit58cb19e55e92f5386458adbf54ff64adbcb85ed3 (patch)
tree17286cf1a6ddd2a880299caefb3edd563fafbbb4 /src/plugins/imageviewer/imageviewerfile.cpp
parentdbe1653775f19fc35cd19f50294951711a713f58 (diff)
downloadqt-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.cpp18
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();
}