Skip to content

Commit

Permalink
ScopedTransaction: Replace boost::noncopyable with Q_DISABLE_COPY
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaski committed Aug 3, 2023
1 parent f70f126 commit 2a407bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/scopedtransaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -39,6 +39,8 @@ class ScopedTransaction : boost::noncopyable {
private:
QSqlDatabase *db_;
bool pending_;

Q_DISABLE_COPY(ScopedTransaction)
};

#endif // SCOPEDTRANSACTION_H

0 comments on commit 2a407bf

Please sign in to comment.