About dialog

About dialog now shows versions and contributors.

Fixes #563.
This commit is contained in:
Damien
2012-10-28 22:47:21 +01:00
committed by Mark Liversedge
parent 6b17087cfe
commit 37f294c82e
6 changed files with 450 additions and 32 deletions

View File

@@ -380,6 +380,24 @@ void DBAccess::checkDBVersion()
}
}
int DBAccess::getDBVersion()
{
int schema_version = -1;
// can we get a version number?
QSqlQuery query("SELECT schema_version from version;", dbconn);
bool rc = query.exec();
if (rc) {
while (query.next()) {
if (query.value(0).toInt() > schema_version)
schema_version = query.value(0).toInt();
}
}
query.finish();
return schema_version;
}
/*----------------------------------------------------------------------
* CRUD routines for Metrics table
*----------------------------------------------------------------------*/