summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-14 18:13:01 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-14 18:13:01 +0300
commit7cb3d0c5c9558f5ab32c913ede673fac5233dc76 (patch)
tree5c3eb4a3f062927a5340f9f5c1c82ab88b7a5e6a /src/gui
parentb37d2f3d9b7b871f3624b5939a2204a96308d871 (diff)
downloadplus-7cb3d0c5c9558f5ab32c913ede673fac5233dc76.tar.gz
plus-7cb3d0c5c9558f5ab32c913ede673fac5233dc76.tar.bz2
plus-7cb3d0c5c9558f5ab32c913ede673fac5233dc76.tar.xz
plus-7cb3d0c5c9558f5ab32c913ede673fac5233dc76.zip
Use CREATEWIDGET macro in setupitem.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/setupitem.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index b359cc952..18196a739 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -31,6 +31,7 @@
#include "gui/widgets/button.h"
#include "gui/widgets/checkbox.h"
+#include "gui/widgets/createwidget.h"
#include "gui/widgets/dropdown.h"
#include "gui/widgets/horizontcontainer.h"
#include "gui/widgets/inttextfield.h"
@@ -409,9 +410,10 @@ void SetupItemTextField::action(const ActionEvent &event)
}
else if (eventId == mEventName + "_EDIT")
{
- mEditDialog = new EditDialog(mText, mTextField->getText(),
+ mEditDialog = CREATEWIDGETR(EditDialog,
+ mText,
+ mTextField->getText(),
mEventName + "_EDIT_OK");
- mEditDialog->postInit();
mEditDialog->addActionListener(this);
}
else if (eventId == mEventName + "_EDIT_OK")
@@ -546,9 +548,10 @@ void SetupItemIntTextField::action(const ActionEvent &event)
}
else if (eventId == mEventName + "_EDIT")
{
- mEditDialog = new EditDialog(mText, mTextField->getText(),
+ mEditDialog = CREATEWIDGETR(EditDialog,
+ mText,
+ mTextField->getText(),
mEventName + "_EDIT_OK");
- mEditDialog->postInit();
mEditDialog->addActionListener(this);
}
else if (eventId == mEventName + "_EDIT_OK")