diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp index 963ddf89e0..e2a21ae1f2 100644 --- a/src/AboutDialog.cpp +++ b/src/AboutDialog.cpp @@ -2,21 +2,27 @@ #include "ui_AboutDialog.h" #include "version.h" #include "sqlite.h" +#include "sqlitedb.h" -AboutDialog::AboutDialog(QWidget *parent) : +AboutDialog::AboutDialog(DBBrowserDB* _db, QWidget *parent) : QDialog(parent), - ui(new Ui::AboutDialog) + ui(new Ui::AboutDialog), + db(_db) { +#ifdef ENABLE_SQLCIPHER + // Retrieve the SQLCipher version + QString sqlcipher_version = db->getPragma("cipher_version"); +#endif + + // Display the About dialog ui->setupUi(this); this->setFixedSize(this->width(), this->height()); - ui->label_version->setText(tr("Version ") + APP_VERSION + "\n\n" + tr("Qt Version ") + QT_VERSION_STR + "\n\n" + #ifdef ENABLE_SQLCIPHER - tr("SQLCipher Version ") + SQLITE_VERSION -#else - tr("SQLite Version ") + SQLITE_VERSION + tr("SQLCipher Version ") + sqlcipher_version + "\n\n" + #endif + tr("SQLite Version ") + SQLITE_VERSION ); } diff --git a/src/AboutDialog.h b/src/AboutDialog.h index 7eed5c72d9..b63f88a96c 100644 --- a/src/AboutDialog.h +++ b/src/AboutDialog.h @@ -7,16 +7,19 @@ namespace Ui { class AboutDialog; } +class DBBrowserDB; + class AboutDialog : public QDialog { Q_OBJECT public: - explicit AboutDialog(QWidget *parent = 0); + explicit AboutDialog(DBBrowserDB* _db, QWidget *parent = 0); ~AboutDialog(); private: Ui::AboutDialog *ui; + DBBrowserDB* db; }; #endif diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 28a992d959..3fd3fa2c79 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -765,7 +765,7 @@ void MainWindow::helpWhatsThis() void MainWindow::helpAbout() { - AboutDialog dialog(this); + AboutDialog dialog(&db, this); dialog.exec(); }