From 3fc4511fdf70b3298a261e15c84d450ab83b528c Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev <annulen@yandex.ru> Date: Fri, 20 Jul 2012 19:42:38 +0400 Subject: [PATCH] Use plain QrcEditor* instead of QPointer Change-Id: Ie8529d0daf1573130212be7c0acfd42f7627a092 Reviewed-by: Eike Ziller <eike.ziller@nokia.com> --- src/plugins/resourceeditor/resourceeditorw.cpp | 9 +++------ src/plugins/resourceeditor/resourceeditorw.h | 4 +--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index b5941722971..cb4bd0c867c 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -315,8 +315,7 @@ void ResourceEditorW::openFile(const QString &fileName) void ResourceEditorW::onRefresh() { - if (!m_resourceEditor.isNull()) - m_resourceEditor.data()->refresh(); + m_resourceEditor->refresh(); } void ResourceEditorW::renameCurrentFile() @@ -326,14 +325,12 @@ void ResourceEditorW::renameCurrentFile() void ResourceEditorW::onUndo() { - if (!m_resourceEditor.isNull()) - m_resourceEditor.data()->onUndo(); + m_resourceEditor->onUndo(); } void ResourceEditorW::onRedo() { - if (!m_resourceEditor.isNull()) - m_resourceEditor.data()->onRedo(); + m_resourceEditor->onRedo(); } } // namespace Internal diff --git a/src/plugins/resourceeditor/resourceeditorw.h b/src/plugins/resourceeditor/resourceeditorw.h index 38b47b76dd8..1342d09fc30 100644 --- a/src/plugins/resourceeditor/resourceeditorw.h +++ b/src/plugins/resourceeditor/resourceeditorw.h @@ -34,8 +34,6 @@ #include <coreplugin/idocument.h> #include <coreplugin/editormanager/ieditor.h> -#include <QPointer> - QT_BEGIN_NAMESPACE class QMenu; class QToolBar; @@ -113,7 +111,7 @@ private: const QString m_fileFilter; QString m_displayName; QString m_suggestedName; - QPointer<QrcEditor> m_resourceEditor; + QrcEditor *m_resourceEditor; ResourceEditorDocument *m_resourceDocument; ResourceEditorPlugin *m_plugin; bool m_shouldAutoSave; -- GitLab