aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/executeondestruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/utils/executeondestruction.h')
-rw-r--r--src/libs/utils/executeondestruction.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/libs/utils/executeondestruction.h b/src/libs/utils/executeondestruction.h
deleted file mode 100644
index 82832afb9a..0000000000
--- a/src/libs/utils/executeondestruction.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
-#pragma once
-
-#include <functional>
-
-namespace Utils {
-
-class ExecuteOnDestruction
-{
-public:
- ExecuteOnDestruction() noexcept : destructionCode([] {}) {}
- ExecuteOnDestruction(std::function<void()> code) : destructionCode(std::move(code)) {}
- ~ExecuteOnDestruction() { if (destructionCode) destructionCode(); }
-
- void reset(std::function<void()> code) { destructionCode = std::move(code); }
-
-private:
- std::function<void()> destructionCode;
-};
-
-} // Utils