diff --git a/src/libs/utils/CMakeLists.txt b/src/libs/utils/CMakeLists.txt index aa6a3e199e6..a0ec62ac244 100644 --- a/src/libs/utils/CMakeLists.txt +++ b/src/libs/utils/CMakeLists.txt @@ -43,7 +43,6 @@ add_qtc_library(Utils environmentfwd.h environmentmodel.cpp environmentmodel.h execmenu.cpp execmenu.h - executeondestruction.h expected.h externalterminalprocessimpl.cpp externalterminalprocessimpl.h fadingindicator.cpp fadingindicator.h diff --git a/src/libs/utils/executeondestruction.h b/src/libs/utils/executeondestruction.h deleted file mode 100644 index 82832afb9a9..00000000000 --- 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 - -namespace Utils { - -class ExecuteOnDestruction -{ -public: - ExecuteOnDestruction() noexcept : destructionCode([] {}) {} - ExecuteOnDestruction(std::function code) : destructionCode(std::move(code)) {} - ~ExecuteOnDestruction() { if (destructionCode) destructionCode(); } - - void reset(std::function code) { destructionCode = std::move(code); } - -private: - std::function destructionCode; -}; - -} // Utils diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs index df23fc3ba24..d117b7057cb 100644 --- a/src/libs/utils/utils.qbs +++ b/src/libs/utils/utils.qbs @@ -109,7 +109,6 @@ Project { "environmentmodel.h", "execmenu.cpp", "execmenu.h", - "executeondestruction.h", "externalterminalprocessimpl.cpp", "externalterminalprocessimpl.h", "fadingindicator.cpp",