Browse Source

Minor database fixes

pull/2701/head
tux3 10 years ago
parent
commit
8adb40d09f
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 2
      src/persistence/db/rawdatabase.cpp
  2. 4
      src/persistence/db/rawdatabase.h

2
src/persistence/db/rawdatabase.cpp

@ -332,7 +332,7 @@ void RawDatabase::process() @@ -332,7 +332,7 @@ void RawDatabase::process()
// Add transaction commands if necessary
if (trans.queries.size() > 1)
{
trans.queries.prepend(Query{"BEGIN;"});
trans.queries.prepend({"BEGIN;"});
trans.queries.append({"COMMIT;"});
}

4
src/persistence/db/rawdatabase.h

@ -83,12 +83,12 @@ protected slots: @@ -83,12 +83,12 @@ protected slots:
/// Unqueues, compiles, binds and executes queries, then notifies of results
/// MUST only be called from the worker thread
void process();
/// Extracts a variant from one column of a result row depending on the column type
QVariant extractData(sqlite3_stmt* stmt, int col);
protected:
/// Derives a 256bit key from the password and returns it hex-encoded
static QString deriveKey(QString password);
/// Extracts a variant from one column of a result row depending on the column type
static QVariant extractData(sqlite3_stmt* stmt, int col);
private:
/// SQL transactions to be processed

Loading…
Cancel
Save