summaryrefslogtreecommitdiff
path: root/src/gui/widgets/createwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/createwidget.h')
-rw-r--r--src/gui/widgets/createwidget.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/createwidget.h b/src/gui/widgets/createwidget.h
index 9c72b95f5..70722a9e3 100644
--- a/src/gui/widgets/createwidget.h
+++ b/src/gui/widgets/createwidget.h
@@ -25,6 +25,9 @@
var = new type(__VA_ARGS__); \
var->postInit()
+#define CREATEWIDGET0(type, ...) \
+ (new type(__VA_ARGS__))->postInit()
+
#define CREATEWIDGET1(var, type) \
var = new type; \
var->postInit()
@@ -32,4 +35,7 @@
#define CREATEWIDGET2(type, ...) \
static_cast<type*>(Widget::callPostInit(new type(__VA_ARGS__)))
+#define CREATEWIDGETR0(type) \
+ static_cast<type*>(Widget::callPostInit(new type))
+
#endif // GUI_WIDGETS_CREATEWIDGET_H