diff options
author | crupest <crupest@outlook.com> | 2022-03-28 21:46:40 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-03-28 21:46:40 +0800 |
commit | 91695b78f565239223fc6f3a10b0219b8dc1b6f8 (patch) | |
tree | 712e8bebcec4377a7b5b5d8aa80daec08e0fa3b4 /src | |
parent | bfa89c0efd310c07e4255b45f99a2f05338fbe3f (diff) | |
download | cru-91695b78f565239223fc6f3a10b0219b8dc1b6f8.tar.gz cru-91695b78f565239223fc6f3a10b0219b8dc1b6f8.tar.bz2 cru-91695b78f565239223fc6f3a10b0219b8dc1b6f8.zip |
...
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/ui/DeleteLater.cpp | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 408c93d8..66b473d2 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -1,4 +1,5 @@ add_library(cru_ui SHARED + DeleteLater.cpp Helper.cpp ThemeManager.cpp ThemeResourceDictionary.cpp diff --git a/src/ui/DeleteLater.cpp b/src/ui/DeleteLater.cpp new file mode 100644 index 00000000..8a40642f --- /dev/null +++ b/src/ui/DeleteLater.cpp @@ -0,0 +1,12 @@ +#include "cru/ui/DeleteLater.h" + +#include "Helper.h" +#include "cru/platform/gui/UiApplication.h" + +namespace cru::ui { +DeleteLaterImpl::~DeleteLaterImpl() {} + +void DeleteLaterImpl::DeleteLater() { + GetUiApplication()->SetImmediate([this] { delete this; }); +} +} // namespace cru::ui |