Commit f4724c02 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Added Wpkg destructor.

parent 1ca88cff
......@@ -154,9 +154,14 @@ void WPkgQt::reset_cursor()
toplevel->window()->unsetCursor();
}
WPkgQt::~WPkgQt()
{
delete wow;
delete wpkgnav;
}
void WPkgQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WPkgQtWidget::closeEvent\n");
if (pkg->close_cb) {
(pkg->close_cb)(pkg->parent_ctx);
} else {
......@@ -171,7 +176,6 @@ WPkgQt::WPkgQt(QWidget* wa_parent_wid, void* wa_parent_ctx)
int sts;
toplevel = new WPkgQtWidget(this, wa_parent_wid);
toplevel->setToolTip(fl("wb_wpkg widget"));
toplevel->setMinimumSize(600, 600);
toplevel->setWindowTitle(fl("Distributor"));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......
......@@ -50,6 +50,8 @@ class WPkgQtWidget;
class WPkgQt : public WPkg {
public:
WPkgQt(QWidget* wa_parent_wid, void* wa_parent_ctx);
~WPkgQt();
QWidget* brow_widget;
QWidget* form_widget;
QLabel* msg_label;
......
......@@ -45,18 +45,14 @@ WPkgNavQt::WPkgNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
pwr_tStatus* status)
: WPkgNav(wa_parent_ctx, wa_name, wa_utility, status)
{
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
showNow(brow_widget);
*w = form_widget;
*status = 1;
}
WPkgNavQt::~WPkgNavQt()
{
debug_print("WPkgNavQt::~WPkgNavQt\n");
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