Add gui option for history max items and size to database settings widget.
This commit is contained in:
@@ -31,8 +31,8 @@ Metadata::Metadata(Database* parent)
|
||||
m_recycleBinEnabled = true;
|
||||
m_masterKeyChangeRec = -1;
|
||||
m_masterKeyChangeForce = -1;
|
||||
m_historyMaxItems = 10;
|
||||
m_historyMaxSize = 6291456;
|
||||
m_historyMaxItems = defaultHistoryMaxItems;
|
||||
m_historyMaxSize = defaultHistoryMaxSize;
|
||||
|
||||
QDateTime now = Tools::currentDateTimeUtc();
|
||||
m_nameChanged = now;
|
||||
@@ -52,6 +52,9 @@ Metadata::Metadata(Database* parent)
|
||||
m_updateDatetime = true;
|
||||
}
|
||||
|
||||
const int Metadata::defaultHistoryMaxItems = 10;
|
||||
const int Metadata::defaultHistoryMaxSize = 6291456;
|
||||
|
||||
template <class P, class V> bool Metadata::set(P& property, const V& value)
|
||||
{
|
||||
if (property != value) {
|
||||
|
||||
@@ -69,6 +69,9 @@ public:
|
||||
int historyMaxSize() const;
|
||||
QHash<QString, QString> customFields() const;
|
||||
|
||||
static const int defaultHistoryMaxItems;
|
||||
static const int defaultHistoryMaxSize;
|
||||
|
||||
void setGenerator(const QString& value);
|
||||
void setName(const QString& value);
|
||||
void setNameChanged(const QDateTime& value);
|
||||
|
||||
Reference in New Issue
Block a user