Commit e6647f40 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed crash in the CoWowList Widget

parent dc8266d5
...@@ -236,23 +236,23 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title, ...@@ -236,23 +236,23 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
parent_ctx(parent_ctx) parent_ctx(parent_ctx)
{ {
QVBoxLayout* vbox = new QVBoxLayout(this); QVBoxLayout* vbox = new QVBoxLayout(this);
QHBoxLayout* hbox = new QHBoxLayout(this); QHBoxLayout* hbox = new QHBoxLayout();
QPushButton* ok_button = new QPushButton("OK", this); QPushButton* ok_button = new QPushButton("OK");
connect(ok_button, SIGNAL(clicked()), this, SLOT(list_ok_cb())); connect(ok_button, SIGNAL(clicked()), this, SLOT(list_ok_cb()));
hbox->addWidget(ok_button, 1, Qt::AlignRight); hbox->addWidget(ok_button, 1, Qt::AlignRight);
if (show_apply_button) { if (show_apply_button) {
QPushButton* apply_button = new QPushButton(translate_utf8("Apply"), this); QPushButton* apply_button = new QPushButton(translate_utf8("Apply"));
connect(apply_button, SIGNAL(clicked()), this, SLOT(list_apply_cb())); connect(apply_button, SIGNAL(clicked()), this, SLOT(list_apply_cb()));
hbox->addWidget(apply_button, 0); hbox->addWidget(apply_button, 0);
} }
QPushButton* cancel_button = new QPushButton("Cancel", this); QPushButton* cancel_button = new QPushButton("Cancel");
connect(cancel_button, SIGNAL(clicked()), this, SLOT(list_cancel_cb())); connect(cancel_button, SIGNAL(clicked()), this, SLOT(list_cancel_cb()));
hbox->addWidget(cancel_button, 0); hbox->addWidget(cancel_button, 0);
QTreeWidget* list = new QTreeWidget(this); list = new QTreeWidget();
// list->setColumnCount(2); // list->setColumnCount(2);
...@@ -264,7 +264,6 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title, ...@@ -264,7 +264,6 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
list->addTopLevelItem(item); list->addTopLevelItem(item);
name_p += textsize; name_p += textsize;
} }
delete texts;
connect(list, SIGNAL(itemActivated(QTreeWidgetItem*, int)), this, connect(list, SIGNAL(itemActivated(QTreeWidgetItem*, int)), this,
SLOT(list_row_activated_cb(QTreeWidgetItem*, int))); SLOT(list_row_activated_cb(QTreeWidgetItem*, int)));
......
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