Use QPointer for Entry::m_lastTopVisibleEntry.

Closes #14
This commit is contained in:
Felix Geyer 2012-04-22 00:10:04 +02:00
parent a3e7c93b59
commit 19bacd6737
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ Group::~Group()
cleanupParent(); cleanupParent();
} }
template <class T> bool Group::set(T& property, const T& value) { template <class P, class V> bool Group::set(P& property, const V& value) {
if (property != value) { if (property != value) {
property = value; property = value;
updateTimeinfo(); updateTimeinfo();

View File

@ -94,7 +94,7 @@ Q_SIGNALS:
void modified(); void modified();
private: private:
template <class T> inline bool set(T& property, const T& value); template <class P, class V> inline bool set(P& property, const V& value);
void addEntry(Entry* entry); void addEntry(Entry* entry);
void removeEntry(Entry* entry); void removeEntry(Entry* entry);
@ -114,7 +114,7 @@ private:
QString m_defaultAutoTypeSequence; QString m_defaultAutoTypeSequence;
TriState m_autoTypeEnabled; TriState m_autoTypeEnabled;
TriState m_searchingEnabled; TriState m_searchingEnabled;
Entry* m_lastTopVisibleEntry; QPointer<Entry> m_lastTopVisibleEntry;
QList<Group*> m_children; QList<Group*> m_children;
QList<Entry*> m_entries; QList<Entry*> m_entries;