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();
}
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) {
property = value;
updateTimeinfo();

View File

@ -94,7 +94,7 @@ Q_SIGNALS:
void modified();
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 removeEntry(Entry* entry);
@ -114,7 +114,7 @@ private:
QString m_defaultAutoTypeSequence;
TriState m_autoTypeEnabled;
TriState m_searchingEnabled;
Entry* m_lastTopVisibleEntry;
QPointer<Entry> m_lastTopVisibleEntry;
QList<Group*> m_children;
QList<Entry*> m_entries;