Update timeinfo of group only when properties of the group itself change.

This commit is contained in:
Florian Geyer 2012-04-18 16:58:14 +02:00 committed by Felix Geyer
parent 34204f3281
commit 84d9d2ec47
2 changed files with 4 additions and 5 deletions

View File

@ -35,8 +35,6 @@ Group::Group()
m_searchingEnabled = Inherit;
m_updateTimeinfo = true;
connect(this, SIGNAL(modified()), this, SLOT(updateTimeinfo()));
}
Group::~Group()
@ -47,6 +45,7 @@ Group::~Group()
template <class T> bool Group::set(T& property, const T& value) {
if (property != value) {
property = value;
updateTimeinfo();
Q_EMIT modified();
return true;
}
@ -177,6 +176,7 @@ void Group::setIcon(int iconNumber)
m_pixmapCacheKey = QPixmapCache::Key();
updateTimeinfo();
Q_EMIT modified();
Q_EMIT dataChanged(this);
}

View File

@ -92,9 +92,6 @@ Q_SIGNALS:
void modified();
private Q_SLOTS:
void updateTimeinfo();
private:
template <class T> inline bool set(T& property, const T& value);
@ -128,6 +125,8 @@ private:
friend void Database::setRootGroup(Group* group);
friend Entry::~Entry();
friend void Entry::setGroup(Group *group);
void updateTimeinfo();
};
#endif // KEEPASSX_GROUP_H