mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 19:11:39 -06:00
Show SQLite and SQLCipher version in About dialog when using SQLCipher
See issue #1474.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "AboutDialog.h"
|
||||
#include "ui_AboutDialog.h"
|
||||
#include "sqlite.h"
|
||||
#include "sqlitedb.h"
|
||||
#include "Application.h"
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent) :
|
||||
@@ -11,13 +11,16 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||
this->setFixedSize(this->width(), this->height());
|
||||
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
QString sqlite_version, sqlcipher_version;
|
||||
DBBrowserDB::getSqliteVersion(sqlite_version, sqlcipher_version);
|
||||
if(sqlcipher_version.isNull())
|
||||
sqlite_version = tr("SQLite Version ") + sqlite_version;
|
||||
else
|
||||
sqlite_version = tr("SQLCipher Version ") + sqlcipher_version + tr(" (based on SQLite %1)").arg(sqlite_version);
|
||||
|
||||
ui->label_version->setText(tr("Version ") + Application::versionString() + "\n\n" +
|
||||
tr("Qt Version ") + QT_VERSION_STR + "\n\n" +
|
||||
#ifdef ENABLE_SQLCIPHER
|
||||
tr("SQLCipher based on SQLite Version ") + SQLITE_VERSION
|
||||
#else
|
||||
tr("SQLite Version ") + SQLITE_VERSION
|
||||
#endif
|
||||
sqlite_version
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user