diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-14 17:41:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-14 17:41:23 +0300 |
commit | 606f836e9d1c17801ed4564a300cdbaa26097383 (patch) | |
tree | 1caf3bfcc5224ea32ec7c2ce18627cf48313cad7 /src/gui/widgets/createwidget.h | |
parent | 0bea9cbee260faff6db5c4d440edfad78bdb6cf2 (diff) | |
download | plus-606f836e9d1c17801ed4564a300cdbaa26097383.tar.gz plus-606f836e9d1c17801ed4564a300cdbaa26097383.tar.bz2 plus-606f836e9d1c17801ed4564a300cdbaa26097383.tar.xz plus-606f836e9d1c17801ed4564a300cdbaa26097383.zip |
Use CREATEWIDGET macro in actions.
Diffstat (limited to 'src/gui/widgets/createwidget.h')
-rw-r--r-- | src/gui/widgets/createwidget.h | 6 |
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 |