Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
5de24943
Commit
5de24943
authored
Dec 17, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Fixed xtt_op and xtt_ev destructors.
parent
1e1b8952
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
22 deletions
+45
-22
src/lib/co/src/co_debug.cpp
src/lib/co/src/co_debug.cpp
+6
-1
src/lib/co/src/co_debug.h
src/lib/co/src/co_debug.h
+2
-0
src/lib/rt/src/rt_mh_outunit.c
src/lib/rt/src/rt_mh_outunit.c
+2
-2
xtt/lib/xtt/qt/xtt_clog_qt.cqt
xtt/lib/xtt/qt/xtt_clog_qt.cqt
+0
-2
xtt/lib/xtt/qt/xtt_ev_qt.cqt
xtt/lib/xtt/qt/xtt_ev_qt.cqt
+25
-8
xtt/lib/xtt/qt/xtt_evlist_qt.cpp
xtt/lib/xtt/qt/xtt_evlist_qt.cpp
+0
-2
xtt/lib/xtt/qt/xtt_op_qt.cqt
xtt/lib/xtt/qt/xtt_op_qt.cqt
+4
-7
xtt/lib/xtt/qt/xtt_xnav_qt.cqt
xtt/lib/xtt/qt/xtt_xnav_qt.cqt
+6
-0
No files found.
src/lib/co/src/co_debug.cpp
View file @
5de24943
...
...
@@ -40,7 +40,12 @@
#include <string.h>
#include <time.h>
int
DEBUG
=
0
;
static
int
DEBUG
=
0
;
void
setDebug
(
int
debug
)
{
DEBUG
=
debug
;
}
void
print_time
(
FILE
*
stream
,
int
fulldate
)
{
...
...
src/lib/co/src/co_debug.h
View file @
5de24943
...
...
@@ -41,6 +41,8 @@
#include <stdio.h>
void
setDebug
(
int
debug
);
void
print_time
(
FILE
*
stream
,
int
fulldate
=
0
);
void
dbg_print
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...);
...
...
src/lib/rt/src/rt_mh_outunit.c
View file @
5de24943
...
...
@@ -398,7 +398,7 @@ pwr_tStatus mh_OutunitDisconnect()
/* Disconnect all handlers and free memory */
LstForEach
(
hl
,
&
l
.
handler_l
)
{
for
(
hl
=
l
.
handler_l
.
next
;
hl
!=
&
l
.
handler_l
;
hl
=
l
.
handler_l
.
next
)
{
hp
=
LstEntry
(
hl
,
sHandler
,
handler_l
);
sendToHandler
(
hp
,
mh_eMsg_OutunitDisconnect
,
0
,
NULL
);
ackListDestroy
(
hp
);
...
...
@@ -541,7 +541,7 @@ static void ackListDestroy(sHandler* hp)
sAck
*
ap
;
struct
LstHead
*
al
;
LstForEach
(
al
,
&
hp
->
ack_l
)
{
for
(
al
=
hp
->
ack_l
.
next
;
al
!=
&
(
hp
->
ack_l
);
al
=
hp
->
ack_l
.
next
)
{
ap
=
LstEntry
(
al
,
sAck
,
ack_l
);
LstRemove
(
al
);
LstNull
(
al
);
...
...
xtt/lib/xtt/qt/xtt_clog_qt.cqt
View file @
5de24943
...
...
@@ -54,7 +54,6 @@
void CLogQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("CLogQtWidget::closeEvent\n");
if (clog->close_cb) {
(clog->close_cb)(clog->parent_ctx);
} else {
...
...
@@ -67,7 +66,6 @@ CLogQt::CLogQt(void* clog_parent_ctx, QWidget* clog_parent_wid,
const char* clog_name, pwr_tStatus* status)
: CLog(clog_parent_ctx, clog_name, status), parent_wid(clog_parent_wid)
{
debug_print("\n");
toplevel = new CLogQtWidget(this, clog_parent_wid);
toplevel->setToolTip(fl("xtt_clog widget"));
toplevel->setMinimumSize(1000, 800);
...
...
xtt/lib/xtt/qt/xtt_ev_qt.cqt
View file @
5de24943
...
...
@@ -54,7 +54,7 @@
class CallbackWidget : public QDialog {
public:
CallbackWidget(EvQtObject* parent, void (EvQtObject::*close)(), void (EvQtObject::*focus)())
: QDialog(), ev(parent), close_cb(close), focus_cb(focus){}
: QDialog(), ev(parent), close_cb(close), focus_cb(focus)
{}
protected:
void closeEvent(QCloseEvent* event);
...
...
@@ -68,7 +68,6 @@ private:
void CallbackWidget::closeEvent(QCloseEvent* event)
{
debug_print("CallbackWidget::closeEvent\n");
((ev)->*(close_cb))();
QDialog::closeEvent(event);
}
...
...
@@ -126,7 +125,7 @@ EvQt::EvQt(void* ev_parent_ctx, QWidget* ev_parent_wid, char* eve_name,
parent_wid_eve->setMinimumSize(eve_width, eve_height);
parent_wid_eve->setToolTip(fl("xtt_ev eve widget"));
parent_wid_eve->setWindowTitle(translate_utf8(eve_name));
parent_wid_eve->setAttribute(Qt::WA_DeleteOnClose);
// Do not set the DeleteOnClose attribute.
CoWowQt::SetWindowIcon(parent_wid_eve);
...
...
@@ -228,10 +227,10 @@ EvQt::EvQt(void* ev_parent_ctx, QWidget* ev_parent_wid, char* eve_name,
{
parent_wid_ala = new CallbackWidget(
object, &EvQtObject::ala_activate_exit, &EvQtObject::ala_action_inputfocus);
parent_wid_
eve
->setToolTip(fl("xtt_ev ala widget"));
parent_wid_
ala
->setToolTip(fl("xtt_ev ala widget"));
parent_wid_ala->setMinimumSize(ala_width, ala_height);
parent_wid_ala->setWindowTitle(translate_utf8(ala_name));
parent_wid_ala->setAttribute(Qt::WA_DeleteOnClose);
// Do not set the DeleteOnClose attribute.
CoWowQt::SetWindowIcon(parent_wid_ala);
...
...
@@ -366,10 +365,10 @@ EvQt::EvQt(void* ev_parent_ctx, QWidget* ev_parent_wid, char* eve_name,
{
parent_wid_blk = new CallbackWidget(
object, &EvQtObject::blk_activate_exit, &EvQtObject::blk_action_inputfocus);
parent_wid_
eve
->setToolTip(fl("xtt_ev blk widget"));
parent_wid_
blk
->setToolTip(fl("xtt_ev blk widget"));
parent_wid_blk->setMinimumSize(blk_width, blk_height);
parent_wid_blk->setWindowTitle(translate_utf8(blk_name));
parent_wid_blk->setAttribute(Qt::WA_DeleteOnClose);
// Do not set the DeleteOnClose attribute.
CoWowQt::SetWindowIcon(parent_wid_blk);
...
...
@@ -514,7 +513,6 @@ EvEve* EvQt::open_eventlist_satellite(const char* title, pwr_tStatus* sts,
EvQt::~EvQt()
{
debug_print("EvQt::~EvQt\n");
if (connected) {
mh_OutunitDisconnect();
}
...
...
@@ -528,6 +526,25 @@ EvQt::~EvQt()
((EvAlaQt*)sala[i])->toplevel->close();
}
}
if (eve) {
delete eve;
}
if (ala) {
delete ala;
}
if (blk) {
delete blk;
}
ala = eve = blk = NULL;
if (parent_wid_eve) {
delete parent_wid_eve;
}
if (parent_wid_ala) {
delete parent_wid_ala;
}
if (parent_wid_blk) {
delete parent_wid_blk;
}
if (object)
delete object;
}
...
...
xtt/lib/xtt/qt/xtt_evlist_qt.cpp
View file @
5de24943
...
...
@@ -53,7 +53,6 @@ EvListQt::EvListQt(void* ev_parent_ctx, QWidget* ev_parent_wid,
void
(
*
ev_init_cb
)(
void
*
))
:
EvList
(
ev_parent_ctx
,
ev_type
,
ev_size
,
ev_eventname_seg
,
ev_init_cb
)
{
debug_print
(
"creating a scrolledbrowwidgetqt
\n
"
);
form_widget
=
scrolledbrowwidgetqt_new
(
init_brow_cb
,
this
,
&
brow_widget
);
form_widget
->
show
();
...
...
@@ -63,7 +62,6 @@ EvListQt::EvListQt(void* ev_parent_ctx, QWidget* ev_parent_wid,
EvListQt
::~
EvListQt
()
{
debug_print
(
"EvListQt::~EvListQt
\n
"
);
if
(
browtree
)
{
delete
browtree
->
ctx
;
}
...
...
xtt/lib/xtt/qt/xtt_op_qt.cqt
View file @
5de24943
...
...
@@ -56,6 +56,7 @@
#include "xtt_op_qt.h"
#include <QApplication>
#include <QCloseEvent>
#include <QDesktopWidget>
#include <QPushButton>
...
...
@@ -138,7 +139,6 @@ OpQt::OpQt(void* op_parent_ctx, QWidget* op_parent_wid, char* opplace,
: Op(op_parent_ctx, opplace, status), title_label(0), a_height(2),
text_size(12)
{
debug_print("\n");
pwr_tStatus sts;
memset(a_exist, 0, sizeof(a_exist));
...
...
@@ -494,7 +494,6 @@ OpQt::OpQt(void* op_parent_ctx, QWidget* op_parent_wid, char* opplace,
OpQt::~OpQt()
{
debug_print("OpQt::~OpQt\n");
if (jop) {
delete jop;
}
...
...
@@ -505,15 +504,13 @@ OpQt::~OpQt()
if (wow) {
delete wow;
}
delete toplevel;
}
void OpQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("OpQtWidget::closeEvent\n");
if (op->close_cb) {
(op->close_cb)(op->parent_ctx);
}
QWidget::closeEvent(event);
op->activate_exit();
event->ignore();
}
void OpQt::map()
...
...
xtt/lib/xtt/qt/xtt_xnav_qt.cqt
View file @
5de24943
...
...
@@ -129,6 +129,12 @@ XNavQt::~XNavQt()
brow_DeleteSecondaryCtx(collect_brow->ctx);
delete collect_brow;
delete brow;
if (ev) {
delete ev;
}
if (op) {
delete op;
}
form_widget->close();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment