From 606f836e9d1c17801ed4564a300cdbaa26097383 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 17:41:23 +0300 Subject: Use CREATEWIDGET macro in actions. --- src/gui/widgets/createwidget.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/widgets') 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(Widget::callPostInit(new type(__VA_ARGS__))) +#define CREATEWIDGETR0(type) \ + static_cast(Widget::callPostInit(new type)) + #endif // GUI_WIDGETS_CREATEWIDGET_H -- cgit v1.2.3-70-g09d2