Commit 6e9a8354 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Added destructor to cow_pb_gsd_attr

parent 46a2037e
...@@ -171,11 +171,6 @@ void GsdAttrQtWidget::activate_cmd_apply() ...@@ -171,11 +171,6 @@ void GsdAttrQtWidget::activate_cmd_apply()
attr->activate_cmd_apply(); attr->activate_cmd_apply();
} }
void GsdAttrQtWidget::activate_cmd_ca()
{
attr->activate_cmd_ca();
}
void GsdAttrQtWidget::activate_cmd_input() void GsdAttrQtWidget::activate_cmd_input()
{ {
attr->cmd_prompt->setVisible(false); attr->cmd_prompt->setVisible(false);
...@@ -208,11 +203,15 @@ void GsdAttrQtWidget::focusInEvent(QFocusEvent* event) ...@@ -208,11 +203,15 @@ void GsdAttrQtWidget::focusInEvent(QFocusEvent* event)
void GsdAttrQtWidget::closeEvent(QCloseEvent* event) void GsdAttrQtWidget::closeEvent(QCloseEvent* event)
{ {
debug_print("GsdAttrQtWidget::closeEvent\n");
attr->activate_exit(); attr->activate_exit();
QWidget::closeEvent(event); QWidget::closeEvent(event);
} }
GsdAttrQt::~GsdAttrQt()
{
delete attrnav;
}
GsdAttrQt::GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object, GsdAttrQt::GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
pb_gsd* a_gsd, int a_edit_mode) pb_gsd* a_gsd, int a_edit_mode)
: GsdAttr(a_parent_ctx, a_object, a_gsd, a_edit_mode) : GsdAttr(a_parent_ctx, a_object, a_gsd, a_edit_mode)
...@@ -277,7 +276,7 @@ GsdAttrQt::GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object, ...@@ -277,7 +276,7 @@ GsdAttrQt::GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
cmd_input = new QLineEdit(); cmd_input = new QLineEdit();
cmd_input->setFixedHeight(25); cmd_input->setFixedHeight(25);
QObject::connect(cmd_input, SIGNAL(editing_finished()), toplevel, QObject::connect(cmd_input, SIGNAL(editingFinished()), toplevel,
SLOT(valchanged_cmd_input())); SLOT(valchanged_cmd_input()));
statusbar->addWidget(msg_label); statusbar->addWidget(msg_label);
...@@ -294,7 +293,7 @@ GsdAttrQt::GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object, ...@@ -294,7 +293,7 @@ GsdAttrQt::GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
QObject::connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()),
toplevel, SLOT(activate_cmd_apply())); toplevel, SLOT(activate_cmd_apply()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
toplevel, SLOT(activate_cmd_ca())); toplevel, SLOT(close()));
QVBoxLayout* vbox = new QVBoxLayout(toplevel); QVBoxLayout* vbox = new QVBoxLayout(toplevel);
vbox->setMenuBar(menu_bar); vbox->setMenuBar(menu_bar);
......
...@@ -62,6 +62,7 @@ public: ...@@ -62,6 +62,7 @@ public:
GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object, GsdAttrQt(QWidget* a_parent_wid, void* a_parent_ctx, void* a_object,
pb_gsd* a_gsd, int a_edit_mode); pb_gsd* a_gsd, int a_edit_mode);
~GsdAttrQt();
void message(char severity, const char* message); void message(char severity, const char* message);
void set_prompt(const char* prompt); void set_prompt(const char* prompt);
...@@ -98,7 +99,6 @@ public slots: ...@@ -98,7 +99,6 @@ public slots:
void activate_cmd_input(); void activate_cmd_input();
void activate_cmd_ok(); void activate_cmd_ok();
void activate_cmd_apply(); void activate_cmd_apply();
void activate_cmd_ca();
void valchanged_cmd_input(){} void valchanged_cmd_input(){}
......
...@@ -48,7 +48,6 @@ GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid, ...@@ -48,7 +48,6 @@ GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
pwr_tStatus* status) pwr_tStatus* status)
: GsdAttrNav(xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status) : GsdAttrNav(xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status)
{ {
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget); form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
*w = form_widget; *w = form_widget;
...@@ -61,6 +60,7 @@ GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid, ...@@ -61,6 +60,7 @@ GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
GsdAttrNavQt::~GsdAttrNavQt() GsdAttrNavQt::~GsdAttrNavQt()
{ {
delete trace_timerid; delete trace_timerid;
delete wow;
delete brow; delete brow;
form_widget->close(); form_widget->close();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment