From f9189543bf4bdb099bc8b428d54226bd1050e1b0 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 18 May 2012 22:23:44 -0400 Subject: [PATCH] CDBEnv: fix qt build --- src/db.h | 1 + src/qt/optionsmodel.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/db.h b/src/db.h index 4919284a3..3cb07ed50 100644 --- a/src/db.h +++ b/src/db.h @@ -52,6 +52,7 @@ public: void Flush(bool fShutdown); void CheckpointLSN(std::string strFile); void SetDetach(bool fDetachDB_) { fDetachDB = fDetachDB_; } + bool GetDetach() { return fDetachDB; } void CloseDb(const std::string& strFile); diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 9f1c6447a..e110cfa6a 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -128,7 +128,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const case DisplayAddresses: return QVariant(bDisplayAddresses); case DetachDatabases: - return QVariant(fDetachDB); + return QVariant(bitdb.GetDetach()); case Language: return settings.value("language", ""); default: @@ -215,7 +215,8 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in } break; case DetachDatabases: { - fDetachDB = value.toBool(); + bool fDetachDB = value.toBool(); + bitdb.SetDetach(fDetachDB); settings.setValue("detachDB", fDetachDB); } break;