Verified Commit 24bf67c1 authored by Linus Jahn's avatar Linus Jahn 🔌
Browse files

DatabaseComponent: mmhhh tabs...

parent f2c36e4d
Pipeline #79149 passed with stage
in 2 minutes and 38 seconds
......@@ -41,24 +41,24 @@ class Database;
class DatabaseComponent : public QObject
{
Q_OBJECT
Q_OBJECT
public:
DatabaseComponent(Database *database, QObject *parent = nullptr);
DatabaseComponent(Database *database, QObject *parent = nullptr);
QSqlQuery createQuery();
QSqlDriver &sqlDriver();
QSqlRecord sqlRecord(const QString &tableName);
void transaction();
void commit();
QSqlQuery createQuery();
QSqlDriver &sqlDriver();
QSqlRecord sqlRecord(const QString &tableName);
void transaction();
void commit();
template<typename Functor>
auto run(Functor function)
{
return QtConcurrent::run(threadPool(), function);
}
template<typename Functor>
auto run(Functor function)
{
return QtConcurrent::run(threadPool(), function);
}
private:
QThreadPool *threadPool() const;
Database *m_database;
Database *m_database;
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment