Commit 944da4c0 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Fixed QT popup menu. Added debug logging.

parent da74eabe
......@@ -49,6 +49,7 @@
void PnViewerQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("PnViewerQtWidget::closeEvent\n");
viewer->activate_close();
QWidget::closeEvent(event);
}
......
......@@ -73,7 +73,7 @@ class PnViewerQtWidget : public QWidget {
public:
PnViewerQtWidget(PnViewerQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), viewer(parent_ctx){}
: QWidget(), viewer(parent_ctx){}
protected:
void focusInEvent(QFocusEvent* event);
......
......@@ -47,6 +47,7 @@ PnViewerNavQt::PnViewerNavQt(
void* l_parent_ctx, QWidget* l_parent_wid, viewer_eType l_type, QWidget** w)
: PnViewerNav(l_parent_ctx, l_type)
{
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget
= scrolledbrowwidgetqt_new(PnViewerNav::init_brow_cb, this, &brow_widget);
......
......@@ -59,7 +59,7 @@ static void usage()
static void viewer_close(void* c)
{
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
int main(int argc, char* argv[])
......@@ -89,11 +89,11 @@ int main(int argc, char* argv[])
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-h") == 0) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
} else if (strcmp(argv[i], "-l") == 0) {
if (i + 1 >= argc) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
Lng::set(argv[i + 1]);
i++;
......@@ -109,7 +109,7 @@ int main(int argc, char* argv[])
ctx->viewer->close_cb = viewer_close;
} catch (co_error& e) {
printf("** Exception: %s\n", e.what().c_str());
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
ctx->toplevel->show();
......
......@@ -206,6 +206,7 @@ void GsdAttrQtWidget::focusInEvent(QFocusEvent* event)
void GsdAttrQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("GsdAttrQtWidget::closeEvent\n");
attr->activate_exit();
QWidget::closeEvent(event);
}
......
......@@ -77,7 +77,7 @@ class GsdAttrQtWidget : public QWidget {
public:
GsdAttrQtWidget(GsdAttrQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), attr(parent_ctx)
: QWidget(), attr(parent_ctx)
{
}
......
......@@ -48,6 +48,7 @@ GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
pwr_tStatus* 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);
showNow(brow_widget);
......
......@@ -245,6 +245,7 @@ void GsdmlAttrQtWidget::focusInEvent(QFocusEvent* event)
void GsdmlAttrQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("GsdmlAttrQtWidget::closeEvent\n");
attr->activate_exit();
QWidget::closeEvent(event);
}
......
......@@ -81,7 +81,7 @@ class GsdmlAttrQtWidget : public QWidget {
public:
GsdmlAttrQtWidget(GsdmlAttrQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), attr(parent_ctx)
: QWidget(), attr(parent_ctx)
{
}
......
......@@ -48,6 +48,7 @@ GsdmlAttrNavQt::GsdmlAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
pwr_tStatus* status)
: GsdmlAttrNav(xn_parent_ctx, xn_name, xn_gsdml, xn_edit_mode, status)
{
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget = scrolledbrowwidgetqt_new(init_brow_cb, this, &brow_widget);
showNow(brow_widget);
......
......@@ -1991,10 +1991,7 @@ Possible return values:
#endif
strcat(pPapiVersion, (CSTRING*)SW_VERSION);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdate-time"
strcat(pPapiVersion, (CSTRING*)__DATE__);
#pragma GCC diagnostic pop
// --- get PROFIBUS firmware version
DataLength = (USIGN16)VERSION_STRING_LENGTH;
......
......@@ -42,7 +42,7 @@
void tbl_close_cb(void* tbl)
{
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
int main(int argc, char* argv[])
......@@ -70,7 +70,7 @@ int main(int argc, char* argv[])
sevcli_init(&sts, &sevcli);
if (EVEN(sts)) {
printf("Sev client init error %u\n", sts);
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
if (strcmp(servername, "") != 0) {
......@@ -80,7 +80,7 @@ int main(int argc, char* argv[])
sevcli_get_itemlist(&sts, sevcli, &items, &itemcnt);
if (EVEN(sts)) {
printf("Sev client get itemlist error %u\n", sts);
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
QApplication app(argc, argv);
......
......@@ -56,6 +56,7 @@ void XttTblQt::message(char severity, const char* message)
void XttTblQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("XttTblQtWidget::closeEvent\n");
if (tbl->close_cb) {
(tbl->close_cb)(tbl);
} else {
......
......@@ -74,7 +74,7 @@ class XttTblQtWidget : public QWidget {
public:
XttTblQtWidget(XttTblQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), tbl(parent_ctx)
: QWidget(), tbl(parent_ctx)
{
}
......
......@@ -47,6 +47,7 @@ TblNavQt::TblNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
pwr_tStatus* status)
: TblNav(xn_parent_ctx, xn_itemlist, xn_item_cnt, status)
{
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget
= scrolledbrowwidgetqt_new(TblNav::init_brow_cb, this, &brow_widget);
......
......@@ -37,9 +37,6 @@
#include "rt_rtt_menu.h"
#include "dtt_appl_rttsys_m.rdecl"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
RTT_HELP_START
RTT_HELP_SUBJ("PWR_RTT")
......@@ -120,5 +117,3 @@ RTT_MENU_NEW("SYSTEM", dtt_menu_m6)
RTT_MENUITEM_COMMAND("STORE", "SHOW FILE")
RTT_MENUITEM_EXIT("EXIT")
RTT_MAINMENU_END
#pragma GCC diagnostic pop
......@@ -54,15 +54,10 @@
#include "rt_rtt_menu.h"
#include "dtt_rttsys_functions.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
RTT_RTTSYSDB_START
RTT_RTTSYSDB_CONTINUE
RTT_RTTSYSDB_END
#pragma GCC diagnostic pop
int rttsys_start_grafcet_monitor(menu_ctx ctx, pwr_tObjid plc_objid)
{
return RTT__SUCCESS;
......
......@@ -39,9 +39,6 @@
#include "rt_rtt_menu.h"
#include "rt_rtt_edit.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
RTT_HELP_START
RTT_HELP_SUBJ("PWR_RTT")
RTT_HELP_INFO(" Välj ut önskat ämne med piltangenterna och tryck på RETURN")
......@@ -63,8 +60,6 @@ RTT_MENUITEM_EXIT("EXIT")
}
;
#pragma GCC diagnostic pop
int main(int argc, char* argv[])
{
int sts;
......
......@@ -60,8 +60,6 @@
#include "pwr_remoteclasses.h"
/*_Local rtt database____________________________________________________*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
RTT_RTTSYSDB_START
#include "dtt_appl_rttsys_m.rdb1"
......@@ -69,8 +67,6 @@ RTT_RTTSYSDB_CONTINUE
#include "dtt_appl_rttsys_m.rdb2"
RTT_RTTSYSDB_END
#pragma GCC diagnostic pop
#define IF_NOGDH_RETURN \
if (!rtt_gdh_started) { \
rtt_message('E', "Rtt is not connected to nethandler"); \
......
......@@ -153,9 +153,6 @@ union i3e_s_be {
#define VAX_F_BIAS 0x81
#define I3E_S_BIAS 0x7f
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-macros"
#define IBYTE0(i) ((i >> 0x18) & 0x000000ff)
#define IBYTE1(i) ((i >> 0x08) & 0x0000ff00)
#define IBYTE2(i) ((i << 0x08) & 0x00ff0000)
......@@ -167,8 +164,6 @@ union i3e_s_be {
*(int*)t = (IBYTE0(i) | IBYTE1(i) | IBYTE2(i) | IBYTE3(i)); \
}
#pragma GCC diagnostic pop
#if (defined(OS_LINUX)) && (pwr_dHost_byteOrder == pwr_dBigEndian)
static pwr_tBoolean dlinux_sfloat(char* p, gdb_sAttribute* ap)
......
......@@ -58,9 +58,6 @@ typedef pwr_tUInt32 mh_mOutunitFlags;
/* Callback prototypes */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdocumentation"
/**
* @brief Callback function to handle aknowledge messages.
*
......@@ -172,8 +169,6 @@ typedef pwr_tStatus (*mh_cbOutunitReturn)(mh_sReturn*);
*/
typedef pwr_tStatus (*mh_cbOutunitAlarmStatus)(mh_sAlarmStatus*);
#pragma GCC diagnostic pop
/* Exported functions */
pwr_tStatus mh_OutunitAck(mh_sEventId* Id);
......
......@@ -62,6 +62,7 @@ Wtt* WbQt::wtt_new(const char* name, const char* iconname,
ldh_tWBContext ldhwbctx, pwr_tVolumeId volid, ldh_tVolume volctx,
wnav_sStartMenu* root_menu, pwr_tStatus* status)
{
debug_print("Creating a WttQt\n");
return new WttQt(
0, toplevel, name, iconname, ldhwbctx, volid, volctx, root_menu, status);
}
......@@ -71,6 +72,7 @@ WVsel* WbQt::vsel_new(pwr_tStatus* status, const char* name,
int (*bc_success)(void*, pwr_tVolumeId*, int), void (*bc_cancel)(),
int (*bc_time_to_exit)(void*), int show_volumes, wb_eType wb_type)
{
debug_print("Creating a WVselQt\n");
return new WVselQt(status, NULL, mainwindow, name, ldhwbctx, volumename,
bc_success, bc_cancel, bc_time_to_exit, show_volumes, wb_type);
}
......@@ -79,12 +81,14 @@ int main(int argc, char* argv[])
{
if (argc >= 2 && strcmp(argv[1], "-m") == 0) {
wb_erep::printMethods();
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
QApplication app(argc, argv);
new WbQt(argc, argv);
return app.exec();
WbQt(argc, argv);
int res = app.exec();
debug_print("app.exec() finished executing!\n");
return res;
}
WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
......@@ -118,20 +122,19 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
strcpy(username, "");
strcpy(password, "");
debug_print("wb_qt: started with arguments:\n");
// Open directory volume as default
volumename_p = volumename;
strcpy(volumename, "directory");
sw_projectvolume = 1;
arg_cnt = 0;
debug_print("%s ", argv[0]);
for (i = 1; i < argc; i++) {
debug_print("arg%d: %s\n", i, argv[i]);
fprintf(stderr, "%s ", argv[i]);
if (argv[i][0] == '-') {
switch (argv[i][1]) {
case 'h':
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
case 'a':
// Load all volumes
sw_projectvolume = 0;
......@@ -148,7 +151,7 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
case 'l':
if (i + 1 >= argc) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
Lng::set(argv[i + 1]);
i++;
......@@ -156,14 +159,14 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
case 'f':
if (i + 1 >= argc) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
i++;
break;
case 'c':
if (i + 1 >= argc) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
sw_classeditor = 1;
strcpy(filename, argv[i + 1]);
......@@ -196,6 +199,7 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
arg_cnt++;
}
}
fprintf(stderr, "\n");
toplevel = new QWidget();
toplevel->setToolTip(fl("WbQt widget"));
......@@ -207,6 +211,7 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
new wb_log_qt(toplevel);
// Create message window
debug_print("Creating a MsgWindowQt\n");
MsgWindowQt* msg_window
= new MsgWindowQt(0, mainwindow, "Workbench messages", &sts);
msg_window->find_wnav_cb = Wb::find_wnav_cb;
......@@ -215,6 +220,7 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
MsgWindow::message('I', "Development environment started");
// Create help window
debug_print("Creating a CoXHelpQt\n");
CoXHelpQt* xhelp = new CoXHelpQt(mainwindow, 0, xhelp_eUtility_Wtt, &sts);
CoXHelp::set_default(xhelp);
......@@ -302,6 +308,7 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
exit(LOGIN__NOPRIV);
}
} else if (login_display) {
debug_print("Creating a CoLoginQt\n");
new CoLoginQt(NULL, mainwindow, "PwR Login", systemgroup,
&Wb::login_success, &Wb::login_cancel, 0, &sts);
}
......@@ -314,8 +321,13 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
toplevel->hide();
if (!quiet) {
debug_print("Creating a CoWowQt\n");
CoWowQt* wow = new CoWowQt(toplevel);
// Use timeout to get in on the top of the display
QTimer::singleShot(100, wow->object, SLOT(DisplayWarranty()));
}
}
\ No newline at end of file
}
WbQt::~WbQt(){
debug_print("Shutting down...\n");
}
......@@ -50,7 +50,7 @@ class WbQt : public Wb {
WbQt(int argc, char* argv[]);
virtual ~WbQt(){}
virtual ~WbQt();
Wtt* wtt_new(const char* name, const char* iconname, ldh_tWBContext wbctx,
pwr_tVolumeId volid, ldh_tVolume volctx, wnav_sStartMenu* root_menu,
pwr_tStatus* status);
......
......@@ -136,6 +136,7 @@ void WbBckWQtWidget::focusInEvent(QFocusEvent* event)
void WbBckWQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WbBckWQtWidget::closeEvent\n");
delete bck;
QWidget::closeEvent(event);
}
......
......@@ -72,7 +72,7 @@ class WbBckWQtWidget : public QWidget {
public:
WbBckWQtWidget(WbBckWQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), bck(parent_ctx)
: QWidget(), bck(parent_ctx)
{
}
......
......@@ -58,6 +58,7 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
WbBckWNavQt::~WbBckWNavQt()
{
debug_print("WbBckWNavQt::~WbBckWNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -143,6 +143,7 @@ void WbExpWQtWidget::focusInEvent(QFocusEvent* event)
void WbExpWQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WbExpWQtWidget::closeEvent\n");
delete expw;
QWidget::closeEvent(event);
}
......
......@@ -74,7 +74,7 @@ class WbExpWQtWidget : public QWidget {
public:
WbExpWQtWidget(WbExpWQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), expw(parent_ctx)
: QWidget(), expw(parent_ctx)
{
}
......
......@@ -58,6 +58,7 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
WbExpWNavQt::~WbExpWNavQt()
{
debug_print("WbExpWNavQt::~WbExpWNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -727,6 +727,7 @@ void WFoeQt::pop()
void WFoeQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WFoeQtWidget::closeEvent\n");
foe->activate_quit();
QWidget::closeEvent(event);
}
......
......@@ -174,7 +174,7 @@ class WFoeQtWidget : public QWidget {
public:
WFoeQtWidget(WFoeQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), foe(parent_ctx)
: QWidget(), foe(parent_ctx)
{
}
......
......@@ -61,6 +61,7 @@ WGreQt::WGreQt(void* wg_parent_ctx, QWidget* wg_parent_wid, const char* name)
WGreQt::~WGreQt()
{
debug_print("WGreQt::~WGreQt\n");
form_widget->close();
}
......
......@@ -74,6 +74,7 @@ NavQt::NavQt(void* nav_parent_ctx, QWidget* nav_parent_wid,
NavQt::~NavQt()
{
debug_print("NavQt::~NavQt\n");
PalFile::config_tree_free(menu);
free_pixmaps();
delete trace_obj;
......
......@@ -54,6 +54,7 @@ PalQt::PalQt(void* pal_parent_ctx, QWidget* pal_parent_wid,
debug_print("creating a scrolledbrowwidgetqt\n");
QWidget* scrolledbrow
= scrolledbrowwidgetqt_new(Pal::init_brow_cb, this, &brow_widget);
brow_widget->setToolTip(fl("PalQt"));
showNow(brow_widget);
......@@ -74,6 +75,7 @@ PalQt::PalQt(void* pal_parent_ctx, QWidget* pal_parent_wid,
PalQt::~PalQt()
{
debug_print("PalQt::~PalQt\n");
PalFile::config_tree_free(menu);
free_pixmaps();
delete trace_obj;
......
......@@ -72,6 +72,7 @@ void WUtedQt::remove_command_window()
void WUtedQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WUtedQtWidget::closeEvent\n");
delete uted;
QWidget::closeEvent(event);
}
......@@ -304,6 +305,7 @@ WUtedQt::WUtedQt(void* wu_parent_ctx, QWidget* wu_parent_wid,
// Destroys the widget and frees allocated memory for the context.
WUtedQt::~WUtedQt()
{
debug_print("WUtedQt::~WUtedQt\n");
if (quit_cb) {
(quit_cb)(parent_ctx);
}
......
......@@ -97,7 +97,7 @@ class WUtedQtWidget : public QWidget {
public:
WUtedQtWidget(WUtedQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), uted(parent_ctx)
: QWidget(), uted(parent_ctx)
{
}
......
......@@ -66,7 +66,7 @@ class WVselQtWidget : public QWidget {
public:
WVselQtWidget(WVselQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), sel(parent_ctx)
: QWidget(), sel(parent_ctx)
{
}
......
......@@ -349,6 +349,7 @@ void WAttQt::update_title()
void WAttQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WAttQtWidget::closeEvent\n");
if (watt->close_cb) {
(watt->close_cb)(watt);
} else {
......
......@@ -88,7 +88,7 @@ class WAttQtWidget : public QWidget {
public:
WAttQtWidget(WAttQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), watt(parent_ctx)
: QWidget(), watt(parent_ctx)
{
}
......
......@@ -64,6 +64,7 @@ WAttNavQt::WAttNavQt(void* wa_parent_ctx, wattnav_eType wa_type,
WAttNavQt::~WAttNavQt()
{
debug_print("WAttNavQt::~WAttNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -173,6 +173,7 @@ void WAttTextQt::set_attr_value()
void WAttTextQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WAttTextQtWidget::closeEvent\n");
if (atxt->close_cb) {
(atxt->close_cb)(atxt);
} else {
......
......@@ -75,7 +75,7 @@ class WAttTextQtWidget : public QWidget {
public:
WAttTextQtWidget(WAttTextQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), atxt(parent_ctx)
: QWidget(), atxt(parent_ctx)
{
}
......
......@@ -401,6 +401,7 @@ void WdaQt::update_title()
void WdaQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WdaQtWidget::closeEvent\n");
if (wda->close_cb) {
(wda->close_cb)(wda);
} else {
......
......@@ -95,7 +95,7 @@ class WdaQtWidget : public QWidget {
public:
WdaQtWidget(WdaQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), wda(parent_ctx)
: QWidget(), wda(parent_ctx)
{
}
......
......@@ -64,6 +64,7 @@ WdaNavQt::WdaNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
WdaNavQt::~WdaNavQt()
{
debug_print("WdaNavQt::~WdaNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -142,6 +142,7 @@ void WGeQtWidget::action_resize(QResizeEvent* event)
WGeQt::~WGeQt()
{
debug_print("WGeQt::~WGeQt\n");
if (nav_shell) {
nav_shell->close();
}
......@@ -178,6 +179,7 @@ void WGeQt::pop()
void WGeQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WGeQtWidget::closeEvent\n");
if (ge->modal) {
ge->terminated = 1;
} else {
......
......@@ -82,7 +82,7 @@ class WGeQtWidget : public QWidget {
public:
WGeQtWidget(WGeQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), ge(parent_ctx)
: QWidget(), ge(parent_ctx)
{
}
......
......@@ -84,8 +84,10 @@ WNavQt::WNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid, const char* xn_name,
trace_obj = new WNavQtTraceObject(this);
debug_print("creating a scrolledbrowwidgetqt\n");
QScrollArea* scrolledbrow = ((QScrollArea*)scrolledbrowwidgetqt_new(
WNav::init_brow_base_cb, this, &brow_widget));
brow_widget->setToolTip(fl("WNavQt"));
scrolledbrow->setFrameShape(QFrame::Box);
scrolledbrow->setLineWidth(3);
......@@ -127,6 +129,7 @@ WNavQt::WNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid, const char* xn_name,
WNavQt::~WNavQt()
{
debug_print("WNavQt::~WNavQt\n");
closing_down = 1;
delete trace_obj;
......
......@@ -156,6 +156,7 @@ void WPkgQt::reset_cursor()
void WPkgQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WPkgQtWidget::closeEvent\n");
if (pkg->close_cb) {
(pkg->close_cb)(pkg->parent_ctx);
} else {
......
......@@ -73,7 +73,7 @@ class WPkgQtWidget : public QWidget {
public:
WPkgQtWidget(WPkgQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), pkg(parent_ctx)
: QWidget(), pkg(parent_ctx)
{
}
......
......@@ -56,6 +56,7 @@ WPkgNavQt::WPkgNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
WPkgNavQt::~WPkgNavQt()
{
debug_print("WPkgNavQt::~WPkgNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -147,6 +147,7 @@ void WRevQt::reset_cursor()
void WRevQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WRevQtWidget::closeEvent\n");
if (rev->close_cb) {
(rev->close_cb)(rev->parent_ctx);
} else {
......@@ -237,6 +238,7 @@ WRevQt::WRevQt(
void WRevInputDialog::closeEvent(QCloseEvent* event)
{
debug_print("WRevInputDialog::closeEvent\n");
QWidget::closeEvent(event);
rev->dialog_count--;
rev->india_widget = 0;
......
......@@ -100,7 +100,7 @@ class WRevQtWidget : public QWidget {
public:
WRevQtWidget(WRevQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), rev(parent_ctx)
: QWidget(), rev(parent_ctx)
{
}
......
......@@ -56,6 +56,7 @@ WRevNavQt::WRevNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
WRevNavQt::~WRevNavQt()
{
debug_print("WRevNavQt::~WRevNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -63,6 +63,7 @@
#include "wb_wpkg_qt.h"
#include "wb_wtt_qt.h"
#include <QCloseEvent>
#include <QDialogButtonBox>
#include <QInputDialog>
#include <QMenu>
......@@ -605,14 +606,7 @@ int WttQt::create_popup_menu(pwr_sAttrRef aref, int x, int y)
return sts;
}
QMenu* popup = build_menu();
if (!popup) {
return 0;
}
popup->popup(QPoint(popupmenu_x, popupmenu_y));
return 1;
return build_menu(popupmenu_x, popupmenu_y);
}
int WttQt::create_pal_popup_menu(pwr_tCid cid, int x, int y)
......@@ -627,14 +621,7 @@ int WttQt::create_pal_popup_menu(pwr_tCid cid, int x, int y)
return sts;
}
QMenu* popup = build_menu();
if (!popup) {
return 0;
}
popup->popup(QPoint(popupmenu_x, popupmenu_y));
return 1;
return build_menu(popupmenu_x, popupmenu_y);
}
void WttQt::set_noedit_show()
......@@ -1609,6 +1596,7 @@ void BootDialog::boot_cancel_cb()
// Destroy callback
void BootDialog::closeEvent(QCloseEvent* event)
{
debug_print("BootDialog::closeEvent\n");
if (wtt->boot_volumelist && wtt->boot_volumecount) {
free((char*)wtt->boot_volumelist);
wtt->boot_volumelist = 0;
......@@ -1746,8 +1734,9 @@ void WttQt::set_options()
void WttQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WttQtWidget::closeEvent\n");
Wtt::close(wtt);
QWidget::closeEvent(event);
event->ignore();
}
WttQt::WttQt(void* wt_parent_ctx, QWidget* wt_parent_wid, const char* wt_name,
......@@ -2339,6 +2328,7 @@ WttQt::WttQt(void* wt_parent_ctx, QWidget* wt_parent_wid, const char* wt_name,
WttQt::~WttQt()
{
debug_print("WttQt::~WttQt\n");
if (close_cb) {
(close_cb)(this);
}
......@@ -2359,6 +2349,7 @@ WttQt::~WttQt()
}
if (!close_cb) {
debug_print("Shutting down...\n");
exit(0);
}
}
......@@ -2370,6 +2361,7 @@ void WttQt::pop()
void OptionsDialog::closeEvent(QCloseEvent* event)
{
debug_print("OptionsDialog::closeEvent\n");
wtt->update_options_form();
QWidget::closeEvent(event);
}
......@@ -2398,6 +2390,7 @@ void OptionsDialog::activate_options_cancel()
{
wtt->message(' ', "");
wtt->update_options_form();
setVisible(false);
}
OptionsDialog::OptionsDialog(WttQt* parent_ctx, QWidget* parent)
......@@ -2499,40 +2492,49 @@ void WttQt::create_options_dialog()
options_form = new OptionsDialog(this, toplevel);
}
QMenu* WttQt::build_menu()
int WttQt::build_menu(int x, int y)
{
return build_submenu(MENU_POPUP, "", SLOT(popup_button_cb()),
(ldh_sMenuItem*)mcp->ItemList, 0);
int i = 0;
QMenu* popup = build_submenu(
SLOT(popup_button_cb()), (ldh_sMenuItem*)mcp->ItemList, &i);
if (!popup) {
return 0;
}
popup->popup(QPoint(x, y));
return 1;
}
QMenu* WttQt::build_submenu(int MenuType, const char* MenuTitle,
const char* Callback, ldh_sMenuItem* Items, int idx)
QMenu* WttQt::build_submenu(
const char* Callback, ldh_sMenuItem* Items, int* idx)
{
QMenu* menu = new QMenu(toplevel);
int i;
unsigned int Level = Items[*idx].Level;
unsigned int Level = Items[idx].Level;
for (; Items[idx].Level != 0 && Items[idx].Level >= Level; idx++) {
if (Items[idx].Disabled) {
for (; Items[*idx].Level != 0 && Items[*idx].Level >= Level; (*idx)++) {
if (Items[*idx].Disabled) {
continue;
}
if (Items[idx].Item == ldh_eMenuItem_Cascade) {
QMenu* sub = menu->addMenu(fl(Items[idx].Name));
debug_print(
"build_submenu recursively calling build_submenu to add a submenu\n");
QMenu* w = build_submenu(
MENU_PULLDOWN, Items[idx].Name, Callback, Items, idx + 1);
sub->addMenu(w);
if (Items[*idx].Item == ldh_eMenuItem_Cascade) {
i = *idx;
(*idx)++;
QMenu* w = build_submenu(Callback, Items, idx);
(*idx)--;
w->setTitle(fl(Items[i].Name));
menu->addMenu(w);
} else {
if (Items[idx].Item == ldh_eMenuItem_Separator) {
if (Items[*idx].Item == ldh_eMenuItem_Separator) {
// Separator
menu->addSeparator();
} else {
// Pushbutton
QAction* w = menu->addAction(fl(Items[idx].Name));
w->setEnabled(Items[idx].Flags.f.Sensitive ? true : false);
w->setData(idx);
QAction* w = menu->addAction(fl(Items[*idx].Name));
w->setEnabled(Items[*idx].Flags.f.Sensitive ? true : false);
w->setData(*idx);
if (Callback) {
QObject::connect(w, SIGNAL(triggered()), toplevel, Callback);
}
......
......@@ -96,7 +96,9 @@ public:
const char* iconname, ldh_tWBContext wt_wbctx, pwr_tVolumeId wt_volid,
ldh_tVolume wt_volctx, wnav_sStartMenu* root_menu, pwr_tStatus* status);
WttQt(){}
WttQt()
{
}
~WttQt();
QWidget* wnav_brow_widget;
......@@ -180,9 +182,8 @@ public:
CoWowFocusTimerQt focustimer;
int realized;
QMenu* build_menu();
QMenu* build_submenu(int MenuType, const char* MenuTitle,
const char* Callback, ldh_sMenuItem* Items, int idx);
int build_menu(int x, int y);
QMenu* build_submenu(const char* Callback, ldh_sMenuItem* Items, int* idx);
virtual void set_clock_cursor();
virtual void reset_cursor();
......@@ -228,8 +229,7 @@ class WttQtWidget : public QWidget {
Q_OBJECT
public:
WttQtWidget(WttQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), wtt(parent_ctx)
WttQtWidget(WttQt* parent_ctx, QWidget* parent) : QWidget(), wtt(parent_ctx)
{
}
......
......@@ -99,6 +99,7 @@ void WCrrQt::print()
void WCrrQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("WCrrQtWidget::closeEvent\n");
if (crr->close_cb) {
(crr->close_cb)(crr->parent_ctx, crr);
} else {
......
......@@ -68,7 +68,7 @@ class WCrrQtWidget : public QWidget {
public:
WCrrQtWidget(WCrrQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), crr(parent_ctx)
: QWidget(), crr(parent_ctx)
{
}
......
......@@ -100,14 +100,11 @@ wb_name::operator bool() const
return oddSts();
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winfinite-recursion"
std::ostream& operator<<(std::ostream& os, const wb_name& name)
{
os << (name.c_str());
return os;
}
#pragma GCC diagnostic pop
bool wb_name::hasVolume() const throw(wb_error)
{
......
......@@ -233,14 +233,11 @@ public:
return m_vrep->readAttribute(sts, o, bix, offset, size, p);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winfinite-recursion"
virtual void* readBody(
pwr_tStatus* sts, const wb_orep* o, pwr_eBix bix, void* p)
{
return readBody(sts, o, bix, p);
}
#pragma GCC diagnostic pop
virtual bool writeBody(pwr_tStatus* sts, wb_orep* o, pwr_eBix bix, void* p);
......
......@@ -47,6 +47,7 @@
void CoHelpQt::close_cb(void* ctx, void* xhelp)
{
debug_print("Shutting down...\n");
((CoXHelpQt*)xhelp)->toplevel->close();
exit(0);
}
......@@ -67,6 +68,7 @@ int main(int argc, char* argv[])
CoHelpQt::~CoHelpQt()
{
debug_print("CoHelpQt::~CoHelpQt\n");
}
CoHelpQt::CoHelpQt(int argc, char* argv[], int* return_sts)
......
......@@ -58,7 +58,7 @@ static void rtmon_help_cb(void* ctx, const char* topic)
static void rtmon_close_cb(void* ctx)
{
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
int main(int argc, char* argv[])
......@@ -73,7 +73,7 @@ int main(int argc, char* argv[])
debug_print("arg%d: %s\n", i, argv[i]);
if (strcmp(argv[i], "-h") == 0) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
} else if (strcmp(argv[i], "--display") == 0 && i + 1 < argc) {
strncpy(display, argv[i + 1], sizeof(display));
}
......
......@@ -58,7 +58,7 @@ static void usage()
static void statusmon_close(void* ctx)
{
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
int main(int argc, char* argv[])
......@@ -75,14 +75,14 @@ int main(int argc, char* argv[])
debug_print("arg%d: %s\n", i, argv[i]);
if (strcmp(argv[i], "-h") == 0) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
} else if (strcmp(argv[i], "-l") == 0 && i + 1 < argc) {
strncpy(language, argv[i + 1], sizeof(language));
Lng::set(language);
} else if (strcmp(argv[i], "-m") == 0) {
if (argc == i) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
if (strcmp(argv[i + 1], "1") == 0) {
mode = nodelist_eMode_Status1;
......@@ -96,7 +96,7 @@ int main(int argc, char* argv[])
mode = nodelist_eMode_Status5;
} else {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
i++;
} else if (strcmp(argv[i], "-e") == 0) {
......
......@@ -560,6 +560,7 @@ int main(int argc, char* argv[])
XttQt::~XttQt()
{
debug_print("XttQt::~XttQt\n");
delete cmd_recall;
delete value_recall;
delete hotkey;
......@@ -568,6 +569,7 @@ XttQt::~XttQt()
void XttQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("XttQtWidget::closeEvent\n");
xtt->close(xtt,
xtt->xnav->op || xtt->xnav->ge_main || xtt->xnav->multiview_main ? 0 : 1);
QWidget::closeEvent(event);
......
......@@ -93,7 +93,7 @@ int main(int argc, char* argv[])
switch (argv[i][1]) {
case 'h':
XttCmd::usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
case 'q':
// Quiet
quiet = 1;
......@@ -120,7 +120,7 @@ int main(int argc, char* argv[])
sts = gdh_Init("rt_xtt_cmd");
if (EVEN(sts)) {
printf("Unable to connect to database\n");
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
QApplication app(argc, argv);
......
......@@ -92,7 +92,7 @@ int main(int argc, char* argv[])
if (strcmp(argv[i], "-l") == 0) {
if (i + 1 >= argc) {
usage();
exit(0);
debug_print("Shutting down...\n"); exit(0);
}
Lng::set(argv[i + 1]);
i++;
......
......@@ -90,6 +90,7 @@ void CoLoginQtWidget::valchanged_username()
void CoLoginQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("CoLoginQtWidget::closeEvent\n");
if (del) {
login->activate_cancel();
del = false;
......
......@@ -108,6 +108,7 @@ void CoLogWQtWidget::focusInEvent(QFocusEvent* event)
void CoLogWQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("CoLogWQtWidget::closeEvent\n");
delete logw;
QWidget::closeEvent(event);
}
......
......@@ -67,7 +67,7 @@ class CoLogWQtWidget : public QWidget {
public:
CoLogWQtWidget(CoLogWQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), logw(parent_ctx)
: QWidget(), logw(parent_ctx)
{
}
......
......@@ -57,6 +57,7 @@ CoLogWNavQt::CoLogWNavQt(
CoLogWNavQt::~CoLogWNavQt()
{
debug_print("CoLogWNavQt::~CoLogWNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -60,6 +60,7 @@ MsgListQt::MsgListQt(void* ev_parent_ctx, QWidget* ev_parent_wid, QWidget** w)
MsgListQt::~MsgListQt()
{
debug_print("MsgListQt::~MsgListQt\n");
delete brow;
form_widget->close();
}
......
......@@ -48,6 +48,7 @@
void MsgWindowQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("MsgWindowQtWidget::closeEvent\n");
activate_exit();
QWidget::closeEvent(event);
}
......
......@@ -69,7 +69,7 @@ class MsgWindowQtWidget : public QWidget {
public:
MsgWindowQtWidget(MsgWindowQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), msgwin(parent_ctx)
: QWidget(), msgwin(parent_ctx)
{
}
......
......@@ -53,6 +53,7 @@
void RtMonQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("RtMonQtWidget::closeEvent\n");
if (rtmon->close_cb) {
(rtmon->close_cb)(rtmon->parent_ctx);
} else {
......@@ -243,6 +244,7 @@ void RtMonQtWidget::rtmon_scan()
RtMonQt::~RtMonQt()
{
debug_print("RtMonQt::~RtMonQt\n");
if (timerid) {
delete timerid;
}
......
......@@ -87,7 +87,7 @@ class RtMonQtWidget : public QWidget {
public:
RtMonQtWidget(RtMonQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), rtmon(parent_ctx)
: QWidget(), rtmon(parent_ctx)
{
}
......
......@@ -51,6 +51,7 @@
void NodelistQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("NodelistQtWidget::closeEvent\n");
if (nodelist->close_cb) {
(nodelist->close_cb)(nodelist->parent_ctx);
} else {
......
......@@ -109,7 +109,7 @@ class NodelistQtWidget : public QWidget {
public:
NodelistQtWidget(NodelistQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), nodelist(parent_ctx)
: QWidget(), nodelist(parent_ctx)
{
}
......
......@@ -65,6 +65,7 @@ NodelistNavQt::NodelistNavQt(void* nodelist_parent_ctx,
NodelistNavQt::~NodelistNavQt()
{
debug_print("NodelistNavQt::~NodelistNavQt\n");
delete trace_obj;
delete brow;
......
......@@ -53,6 +53,7 @@ void CowTreeQt::message(char severity, const char* message)
void CowTreeQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("CowTreeQtWidget::closeEvent\n");
if (tree->close_cb) {
(tree->close_cb)(tree->parent_ctx);
} else {
......
......@@ -71,7 +71,7 @@ class CowTreeQtWidget : public QWidget {
public:
CowTreeQtWidget(CowTreeQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), tree(parent_ctx)
: QWidget(), tree(parent_ctx)
{
}
......
......@@ -64,6 +64,7 @@ TreeNavQt::TreeNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
TreeNavQt::~TreeNavQt()
{
debug_print("TreeNavQt::~TreeNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -237,7 +237,7 @@ void CoWowListWidgetQt::list_cancel_cb()
CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
const char* texts, int textsize, void(action_cb)(void*, char*, int),
void(cancel_cb)(void*), void* parent_ctx, int show_apply_button)
: QWidget(parent, Qt::Window), action_cb(action_cb), cancel_cb(cancel_cb),
: QWidget(), action_cb(action_cb), cancel_cb(cancel_cb),
parent_ctx(parent_ctx)
{
QVBoxLayout* vbox = new QVBoxLayout(this);
......@@ -281,6 +281,7 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
setFixedSize(200, 400);
setWindowTitle(translate_utf8(title));
debug_print("Created a CoWowListWidgetQt\n");
setAttribute(Qt::WA_DeleteOnClose);
show();
......@@ -296,6 +297,7 @@ void CoWowListWidgetQt::focusInEvent(QFocusEvent* event)
void CoWowListWidgetQt::closeEvent(QCloseEvent* event)
{
debug_print("CoWowListWidgetQt::closeEvent\n");
QWidget::closeEvent(event);
list_cancel_cb();
}
......@@ -321,19 +323,16 @@ void CoWowQt::DeleteList(void* data)
ctx->close();
}
void CoWowWarrantQt::display_license()
{
((CoWowQtObject*)parentWidget())->DisplayLicense();
}
void CoWowWarrantQt::reject()
{
debug_print("Shutting down...\n");
QDialog::reject();
exit(0);
}
void CoWowWarrantQt::destroy(bool destroyWindow, bool destroySubWindows)
{
debug_print("Shutting down...\n");
QDialog::destroy(destroyWindow, destroySubWindows);
exit(0);
}
......@@ -406,7 +405,7 @@ CoWowWarrantQt::CoWowWarrantQt(CoWowQtObject* parent)
connect(accept, SIGNAL(clicked()), this, SLOT(accept()));
connect(reject, SIGNAL(clicked()), this, SLOT(reject()));
connect(help, SIGNAL(clicked()), this, SLOT(display_license()));
connect(help, SIGNAL(clicked()), parent, SLOT(DisplayLicense()));
main_layout->addWidget(buttons);
......@@ -414,6 +413,7 @@ CoWowWarrantQt::CoWowWarrantQt(CoWowQtObject* parent)
adjustSize();
setWindowTitle(translate_utf8("Accept License Terms"));
debug_print("Created a CoWowWarrantQt\n");
setAttribute(Qt::WA_DeleteOnClose);
pop(this);
......@@ -426,9 +426,9 @@ void CoWowQtObject::DisplayWarranty()
void CoWowQtObject::DisplayLicense()
{
QMessageBox* mbox = new QMessageBox(0);
QMessageBox* mbox = new QMessageBox(parent_wid);
mbox->setWindowTitle(translate_utf8("License"));
mbox->setWindowFlags(Qt::Window);
debug_print("Created a DisplayLicense\n");
mbox->setAttribute(Qt::WA_DeleteOnClose);
QScrollArea* scroll = new QScrollArea(mbox);
......@@ -546,6 +546,7 @@ CoWowTimerQt::CoWowTimerQt()
CoWowTimerQt::~CoWowTimerQt()
{
debug_print("CoWowTimerQt::~CoWowTimerQt\n");
delete object;
}
......@@ -630,6 +631,7 @@ void CoWowFocusTimerQt::enable_set_focus()
CoWowFocusTimerQt::~CoWowFocusTimerQt()
{
debug_print("CoWowFocusTimerQt::~CoWowFocusTimerQt\n");
if (set_focus_disabled) {
delete timer;
}
......@@ -729,6 +731,7 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title,
setFixedSize(400, 150);
setWindowTitle(fl(title));
debug_print("Created a CoWowModalDialogQt\n");
setAttribute(Qt::WA_DeleteOnClose);
QLabel* text_w = new QLabel(fl(text));
......@@ -801,6 +804,7 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title,
void CoWowModalDialogQt::destroy(bool destroyWindow, bool destroySubWindows)
{
debug_print("Not shutting down...\n");
setResult(wow_eModalDialogReturn_Deleted);
QDialog::destroy(destroyWindow, destroySubWindows);
}
......@@ -1105,10 +1109,11 @@ CoWowQt::CoWowQt(QWidget* parent)
CoWowQt::~CoWowQt()
{
debug_print("CoWowQt::~CoWowQt\n");
delete object;
}
void CoWowQt::SetParent(QWidget* parent)
{
object->parent_wid = parent;
object->setParent(parent);
}
\ No newline at end of file
......@@ -180,7 +180,6 @@ public:
public slots:
virtual void reject();
virtual void display_license();
protected:
void destroy(bool destroyWindow = true, bool destroySubWindows = true);
......@@ -263,7 +262,7 @@ class CoWowQtObject : public QObject {
Q_OBJECT
public:
CoWowQtObject(QWidget* parent) : QObject(), parent_wid(parent)
CoWowQtObject(QWidget* parent) : QObject(parent), parent_wid(parent)
{
}
QWidget* parent_wid;
......
......@@ -161,6 +161,7 @@ void CoXHelpQt::print()
void CoXHelpQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("CoXHelpQtWidget::closeEvent\n");
if (xhelp->close_cb) {
(xhelp->close_cb)(xhelp->parent_ctx, xhelp);
} else {
......
......@@ -77,7 +77,7 @@ class CoXHelpQtWidget : public QWidget {
public:
CoXHelpQtWidget(CoXHelpQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), xhelp(parent_ctx)
: QWidget(), xhelp(parent_ctx)
{
}
......
......@@ -49,7 +49,7 @@ CoXHelpNavQt::CoXHelpNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
char* xn_name, xhelp_eUtility xn_utility, QWidget** w, pwr_tStatus* status)
: CoXHelpNav(xn_parent_ctx, xn_name, xn_utility, status)
{
debug_print("CoXHelpNavQt: creating a scrolledbrowwidgetqt\n");
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget = scrolledbrowwidgetqt_new(
CoXHelpNav::init_brow_base_cb, this, &brow_widget);
......@@ -63,6 +63,7 @@ CoXHelpNavQt::CoXHelpNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
CoXHelpNavQt::~CoXHelpNavQt()
{
debug_print("CoXHelpNavQt::~CoXHelpNavQt\n");
closing_down = 1;
for (int i = 0; i < brow_cnt; i++) {
......
......@@ -79,7 +79,6 @@ QWidget* browwidgetqt_new(
int (*init_proc)(FlowCtx* ctx, void* client_data), void* client_data)
{
QtScrollWidgetFlow* w = new QtScrollWidgetFlow();
debug_print("creating a new flow scroll widget\n");
w->init(flow_eCtxType_Brow, init_proc, client_data, brow_init_proc);
return w;
}
......@@ -89,7 +88,6 @@ QWidget* scrolledbrowwidgetqt_new(
QWidget** browwidget)
{
QtScrollWidgetFlow* w = new QtScrollWidgetFlow();
debug_print("creating a new flow scroll widget\n");
QWidget* form = w->initScroll(
flow_eCtxType_Brow, init_proc, client_data, brow_init_proc);
*browwidget = w;
......@@ -99,7 +97,6 @@ QWidget* scrolledbrowwidgetqt_new(
QWidget* brownavwidgetqt_new(QWidget* main_brow)
{
QtScrollWidgetFlow* w = new QtScrollWidgetFlow();
debug_print("creating a new flow scroll widget\n");
w->init(flow_eCtxType_Brow, main_brow);
return w;
}
......
......@@ -186,6 +186,7 @@ static QColor flow_allocate_color(FlowDrawQt* draw_ctx, const char* named_color)
FlowDrawQt::~FlowDrawQt()
{
debug_print("FlowDrawQt::~FlowDrawQt\n");
closing_down = 1;
basectx->set_nodraw();
......@@ -851,7 +852,7 @@ int FlowDrawQt::event_handler(QEvent* event)
break;
}
case QEvent::Show: {
sts = basectx->event_handler_nav(flow_eEvent_Exposure, 0, 0);
sts = basectx->event_handler_nav(flow_eEvent_Map, 0, 0);
break;
}
case QEvent::MouseMove: {
......
......@@ -58,6 +58,7 @@ FlowPrintDrawQt::FlowPrintDrawQt(void* context, const char* t, int p,
FlowPrintDrawQt::~FlowPrintDrawQt()
{
debug_print("FlowPrintDrawQt::~FlowPrintDrawQt\n");
}
int FlowPrintDrawQt::print_page(
......
......@@ -206,13 +206,12 @@ void QtScrollWidgetFlow::paintEvent(QPaintEvent* event)
QPainter painter(this);
QRect dirtyRect = event->rect();
painter.drawImage(dirtyRect, image, dirtyRect);
QPainter imPainter(&image);
imPainter.fillRect(image.rect(), palette().color(QPalette::Background));
QWidget::paintEvent(event);
}
void QtScrollWidgetFlow::closeEvent(QCloseEvent* event)
{
debug_print("QtScrollWidgetFlow::closeEvent\n");
if (!destroyed) {
destroyed = 1;
if (scroll_timerid) {
......@@ -260,8 +259,6 @@ bool QtScrollWidgetFlow::event(QEvent* event)
void QtScrollWidgetFlow::realize()
{
debug_print("realize\n");
if (!parent_ctx) {
if (is_navigator) {
QtScrollWidgetFlow* main
......
......@@ -185,6 +185,7 @@ int AttrQt::reconfigure_attr()
void AttrQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("AttrQtWidget::closeEvent\n");
if (attr->close_cb) {
(attr->close_cb)(
attr->parent_ctx, attr, attr->object, attr->client_data, 0);
......@@ -437,6 +438,7 @@ AttrQt::AttrQt(QWidget* a_parent_wid, void* a_parent_ctx, attr_eType a_type,
AttrQt::~AttrQt()
{
debug_print("AttrQt::~AttrQt\n");
if (original_data) {
delete original_data;
}
......
......@@ -63,6 +63,7 @@ AttrNavQt::AttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
AttrNavQt::~AttrNavQt()
{
debug_print("AttrNavQt::~AttrNavQt\n");
delete trace_obj;
delete brow;
......@@ -76,6 +77,7 @@ void AttrNavQt::trace_start()
AttrNavQtTraceObject::~AttrNavQtTraceObject()
{
debug_print("AttrNavQtTraceObject::~AttrNavQtTraceObject\n");
delete trace_timerid;
}
......
......@@ -621,6 +621,7 @@ void* GeCurveQt::get_widget()
GeCurveQt::~GeCurveQt()
{
debug_print("GeCurveQt::~GeCurveQt\n");
delete wow;
if (minmax_widget) {
minmax_widget->close();
......@@ -629,6 +630,7 @@ GeCurveQt::~GeCurveQt()
void GeCurveQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("GeCurveQtWidget::closeEvent\n");
if (!(curve->options & curve_mOptions_Embedded)) {
curve->activate_exit();
}
......
......@@ -74,6 +74,7 @@ GraphQt::GraphQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
GraphQt::~GraphQt()
{
debug_print("GraphQt::~GraphQt\n");
Attr* attrctx;
int sts;
......
......@@ -1184,6 +1184,7 @@ void GeQt::update()
void GeQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("GeQtWidget::closeEvent\n");
ge->Ge::activate_exit();
QWidget::closeEvent(event);
}
......@@ -1232,6 +1233,7 @@ void GeQt::save_and_close()
GeQt::~GeQt()
{
debug_print("GeQt::~GeQt\n");
if (graph->is_modified()) {
open_yesnodia("Do you wan't to save changes", "Save", Ge::exit_save_cb,
Ge::exit_nosave_cb);
......
......@@ -118,7 +118,7 @@ class GeQtWidget : public QWidget {
public:
GeQtWidget(GeQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), ge(parent_ctx)
: QWidget(), ge(parent_ctx)
{
}
......
......@@ -50,6 +50,7 @@
void SubGraphsQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("SubGraphsQtWidget::closeEvent\n");
if (subgraphs->close_cb) {
(subgraphs->close_cb)(subgraphs);
} else {
......@@ -163,6 +164,7 @@ SubGraphsQt::SubGraphsQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
SubGraphsQt::~SubGraphsQt()
{
debug_print("SubGraphsQt::~SubGraphsQt\n");
subgraphs_tAttr attrlist_p, next_p;
// Delete all attr-widgets in attrlist
......
......@@ -75,7 +75,7 @@ class SubGraphsQtWidget : public QWidget {
public:
SubGraphsQtWidget(SubGraphsQt* parent_ctx, QWidget* parent)
: QWidget(parent, Qt::Window), subgraphs(parent_ctx)
: QWidget(), subgraphs(parent_ctx)
{
}
......
......@@ -63,6 +63,7 @@ SubPaletteQt::SubPaletteQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
SubPaletteQt::~SubPaletteQt()
{
debug_print("SubPaletteQt::~SubPaletteQt\n");
delete brow;
}
......
......@@ -86,7 +86,6 @@ QWidget* colpalwidgetqt_new(
int (*init_proc)(GlowCtx* ctx, void* client_data), void* client_data)
{
QtScrollWidgetGlow* w = new QtScrollWidgetGlow();
debug_print("creating a new glow scroll widget\n");
w->init(glow_eCtxType_ColPal, init_proc, client_data, colpal_init_proc);
return w;
}
......@@ -97,7 +96,6 @@ QWidget* scrolledcolpalwidgetqt_new(
{
QtScrollWidgetGlow* w = new QtScrollWidgetGlow();
*colpalwidget = w;
debug_print("creating a new glow scroll widget\n");
return w->initScroll(
glow_eCtxType_ColPal, init_proc, client_data, colpal_init_proc);
}
......@@ -105,7 +103,6 @@ QWidget* scrolledcolpalwidgetqt_new(
QWidget* colpalnavwidgetqt_new(QWidget* main_colpal)
{
QtScrollWidgetGlow* w = new QtScrollWidgetGlow();
debug_print("creating a new glow scroll widget\n");
w->init(glow_eCtxType_ColPal, main_colpal);
return w;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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