Emit signal when changing the database name.

This commit is contained in:
Felix Geyer 2011-11-13 14:54:11 +01:00
parent 0014d50b59
commit 0e41ed72dd
2 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,7 @@
Metadata::Metadata(Database* parent) Metadata::Metadata(Database* parent)
: QObject(parent) : QObject(parent)
, m_parent(parent)
{ {
m_recycleBin = 0; m_recycleBin = 0;
m_entryTemplatesGroup = 0; m_entryTemplatesGroup = 0;
@ -191,6 +192,8 @@ void Metadata::setGenerator(const QString& value)
void Metadata::setName(const QString& value) void Metadata::setName(const QString& value)
{ {
m_name = value; m_name = value;
Q_EMIT nameTextChanged(m_parent);
} }
void Metadata::setNameChanged(const QDateTime& value) void Metadata::setNameChanged(const QDateTime& value)

View File

@ -91,7 +91,12 @@ public:
void addCustomField(const QString& key, const QString& value); void addCustomField(const QString& key, const QString& value);
void removeCustomField(const QString& key); void removeCustomField(const QString& key);
Q_SIGNALS:
void nameTextChanged(Database* db);
private: private:
Database* m_parent;
QString m_generator; QString m_generator;
QString m_name; QString m_name;
QDateTime m_nameChanged; QDateTime m_nameChanged;