ScopedTransaction: Replace boost::noncopyable with Q_DISABLE_COPY

This commit is contained in:
Jonas Kvinge 2023-08-03 19:58:16 +02:00
parent f70f126f76
commit 2a407bfe47
1 changed files with 4 additions and 2 deletions

View File

@ -23,13 +23,13 @@
#include "config.h"
#include <boost/noncopyable.hpp>
#include <QtGlobal>
class QSqlDatabase;
// Opens a transaction on a database.
// Rolls back the transaction if the object goes out of scope before Commit() is called.
class ScopedTransaction : boost::noncopyable {
class ScopedTransaction {
public:
explicit ScopedTransaction(QSqlDatabase *db);
~ScopedTransaction();
@ -39,6 +39,8 @@ class ScopedTransaction : boost::noncopyable {
private:
QSqlDatabase *db_;
bool pending_;
Q_DISABLE_COPY(ScopedTransaction)
};
#endif // SCOPEDTRANSACTION_H