aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-03-28 21:46:40 +0800
committercrupest <crupest@outlook.com>2022-03-28 21:46:40 +0800
commit91695b78f565239223fc6f3a10b0219b8dc1b6f8 (patch)
tree712e8bebcec4377a7b5b5d8aa80daec08e0fa3b4 /src/ui
parentbfa89c0efd310c07e4255b45f99a2f05338fbe3f (diff)
downloadcru-91695b78f565239223fc6f3a10b0219b8dc1b6f8.tar.gz
cru-91695b78f565239223fc6f3a10b0219b8dc1b6f8.tar.bz2
cru-91695b78f565239223fc6f3a10b0219b8dc1b6f8.zip
...
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/CMakeLists.txt1
-rw-r--r--src/ui/DeleteLater.cpp12
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