Create a unified base class to access the database.
Moved the default database class to QListDB and disallow leaking CMAObjects outside this class. Rewrote QListDB and CMAEvent to use the new internal API. Moved the file format constants to the base database class. Moved the metadata loading methods to the base database class.
This commit is contained in:
@@ -115,7 +115,7 @@ static const char *trigger_list[] = {
|
||||
};
|
||||
|
||||
SQLiteDB::SQLiteDB(QObject *parent) :
|
||||
QObject(parent)
|
||||
Database(parent)
|
||||
{
|
||||
uuid = QSettings().value("lastAccountId", "ffffffffffffffff").toString();
|
||||
}
|
||||
@@ -275,6 +275,13 @@ int SQLiteDB::recursiveScanRootDirectory(const QString &base_path, int parent, i
|
||||
return total_objects;
|
||||
}
|
||||
|
||||
bool SQLiteDB::getObjectMetadata(int ohfi, metadata_t &metadata)
|
||||
{
|
||||
Q_UNUSED(ohfi);
|
||||
Q_UNUSED(metadata);
|
||||
return false;
|
||||
}
|
||||
|
||||
int SQLiteDB::getPathId(const QString &path)
|
||||
{
|
||||
QSqlQuery query(QString("SELECT object_id from sources WHERE path = %1").arg(path));
|
||||
|
Reference in New Issue
Block a user