Utils: Use Q_DISABLE_COPY / Q_DISABLE_COPY_MOVE

Change-Id: If9ea6220700769cd99ede3ebaacc4d75cb673e89
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2023-04-23 10:02:04 +02:00
parent 9a1be79c0d
commit bb9ba4349a
3 changed files with 6 additions and 12 deletions

View File

@@ -17,15 +17,13 @@ class ProcessInterface;
template<typename R, typename... Params>
class Hook
{
Q_DISABLE_COPY_MOVE(Hook)
public:
using Callback = std::function<R(Params...)>;
public:
Hook() = delete;
Hook(const Hook &other) = delete;
Hook(Hook &&other) = delete;
Hook &operator=(const Hook &other) = delete;
Hook &operator=(Hook &&other) = delete;
explicit Hook(Callback defaultCallback) { set(defaultCallback); }