From 19bacd6737117ba4ea7f1b8ac83ff83e239424e3 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sun, 22 Apr 2012 00:10:04 +0200 Subject: [PATCH] Use QPointer for Entry::m_lastTopVisibleEntry. Closes #14 --- src/core/Group.cpp | 2 +- src/core/Group.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Group.cpp b/src/core/Group.cpp index 476742cef..50ef73093 100644 --- a/src/core/Group.cpp +++ b/src/core/Group.cpp @@ -42,7 +42,7 @@ Group::~Group() cleanupParent(); } -template bool Group::set(T& property, const T& value) { +template bool Group::set(P& property, const V& value) { if (property != value) { property = value; updateTimeinfo(); diff --git a/src/core/Group.h b/src/core/Group.h index 3cbd2e573..1b4ec864e 100644 --- a/src/core/Group.h +++ b/src/core/Group.h @@ -94,7 +94,7 @@ Q_SIGNALS: void modified(); private: - template inline bool set(T& property, const T& value); + template inline bool set(P& property, const V& value); void addEntry(Entry* entry); void removeEntry(Entry* entry); @@ -114,7 +114,7 @@ private: QString m_defaultAutoTypeSequence; TriState m_autoTypeEnabled; TriState m_searchingEnabled; - Entry* m_lastTopVisibleEntry; + QPointer m_lastTopVisibleEntry; QList m_children; QList m_entries;