Commit 03615140 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Added a small function to turn DEBUG on/off.

parent 8c9d8f8e
...@@ -59,8 +59,6 @@ ...@@ -59,8 +59,6 @@
#include <QApplication> #include <QApplication>
#include <QTimer> #include <QTimer>
extern int DEBUG;
Wtt* WbQt::wtt_new(const char* name, const char* iconname, Wtt* WbQt::wtt_new(const char* name, const char* iconname,
ldh_tWBContext ldhwbctx, pwr_tVolumeId volid, ldh_tVolume volctx, ldh_tWBContext ldhwbctx, pwr_tVolumeId volid, ldh_tVolume volctx,
wnav_sStartMenu* root_menu, pwr_tStatus* status) wnav_sStartMenu* root_menu, pwr_tStatus* status)
...@@ -80,7 +78,7 @@ WVsel* WbQt::vsel_new(pwr_tStatus* status, const char* name, ...@@ -80,7 +78,7 @@ WVsel* WbQt::vsel_new(pwr_tStatus* status, const char* name,
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
DEBUG = 1; setDebug(1);
if (argc >= 2 && streq(argv[1], "-m")) { if (argc >= 2 && streq(argv[1], "-m")) {
wb_erep::printMethods(); wb_erep::printMethods();
debug_print("Shutting down...\n"); debug_print("Shutting down...\n");
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "co_debug.h"
#include "cow_style_qt.h" #include "cow_style_qt.h"
#include "wb_log_qt.h" #include "wb_log_qt.h"
...@@ -49,8 +51,6 @@ ...@@ -49,8 +51,6 @@
#include <QApplication> #include <QApplication>
extern int DEBUG;
CmdQt::CmdQt(int argc, char* argv[]) CmdQt::CmdQt(int argc, char* argv[])
{ {
QWidget* w; QWidget* w;
...@@ -79,7 +79,7 @@ CmdQt::CmdQt(int argc, char* argv[]) ...@@ -79,7 +79,7 @@ CmdQt::CmdQt(int argc, char* argv[])
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
DEBUG = 1; setDebug(1);
QApplication app(argc, argv); QApplication app(argc, argv);
QApplication::setStyle(new PwrStyle()); QApplication::setStyle(new PwrStyle());
new CmdQt(argc, argv); new CmdQt(argc, argv);
......
...@@ -45,8 +45,6 @@ ...@@ -45,8 +45,6 @@
#include <QApplication> #include <QApplication>
extern int DEBUG;
CoHelpQt* help; CoHelpQt* help;
void close_cb(void* ctx, void* xhelp) void close_cb(void* ctx, void* xhelp)
...@@ -59,7 +57,7 @@ void close_cb(void* ctx, void* xhelp) ...@@ -59,7 +57,7 @@ void close_cb(void* ctx, void* xhelp)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
DEBUG=1; setDebug(1);
int sts; int sts;
QApplication app(argc, argv); QApplication app(argc, argv);
......
...@@ -48,8 +48,6 @@ ...@@ -48,8 +48,6 @@
#include <QApplication> #include <QApplication>
extern int DEBUG;
CoXHelp* xhelp; CoXHelp* xhelp;
RtMon* rtmon; RtMon* rtmon;
...@@ -73,7 +71,7 @@ static void rtmon_close_cb(void* ctx) ...@@ -73,7 +71,7 @@ static void rtmon_close_cb(void* ctx)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
DEBUG=1; setDebug(1);
int sts; int sts;
char display[80] = ""; char display[80] = "";
......
...@@ -48,8 +48,6 @@ ...@@ -48,8 +48,6 @@
#include <QApplication> #include <QApplication>
extern int DEBUG;
static void usage() static void usage()
{ {
printf("\n\ printf("\n\
...@@ -73,7 +71,7 @@ static void statusmon_close(void* ctx) ...@@ -73,7 +71,7 @@ static void statusmon_close(void* ctx)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
DEBUG=1; setDebug(1);
int sts; int sts;
int mode = nodelist_eMode_SystemStatus; int mode = nodelist_eMode_SystemStatus;
int view_descr = 0; int view_descr = 0;
......
...@@ -59,8 +59,6 @@ ...@@ -59,8 +59,6 @@
#include <QMenuBar> #include <QMenuBar>
#include <QVBoxLayout> #include <QVBoxLayout>
extern int DEBUG;
void XttQt::hotkey_Command(char* arg, void* userdata) void XttQt::hotkey_Command(char* arg, void* userdata)
{ {
Xtt* xtt = (Xtt*)userdata; Xtt* xtt = (Xtt*)userdata;
...@@ -553,7 +551,7 @@ void XttQtWidget::valchanged_cmd_entry() ...@@ -553,7 +551,7 @@ void XttQtWidget::valchanged_cmd_entry()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
DEBUG=1; setDebug(1);
int sts; int sts;
QApplication app(argc, argv); QApplication app(argc, argv);
......
...@@ -52,8 +52,6 @@ ...@@ -52,8 +52,6 @@
#include <QApplication> #include <QApplication>
#include <QMainWindow> #include <QMainWindow>
extern int DEBUG;
XttCmdQt::XttCmdQt(QWidget* w) XttCmdQt::XttCmdQt(QWidget* w)
{ {
pwr_tStatus sts; pwr_tStatus sts;
...@@ -77,7 +75,7 @@ static int timeout_func() ...@@ -77,7 +75,7 @@ static int timeout_func()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
DEBUG=1; setDebug(1);
pwr_tStatus sts; pwr_tStatus sts;
int i; int i;
char str[256]; char str[256];
......
...@@ -58,8 +58,6 @@ ...@@ -58,8 +58,6 @@
static QWidget* toplevel; static QWidget* toplevel;
static QWidget* mainwindow; static QWidget* mainwindow;
extern int DEBUG;
static void usage() static void usage()
{ {
printf("\nUsage: wb_ge [-l language] [graphname]\n"); printf("\nUsage: wb_ge [-l language] [graphname]\n");
...@@ -67,7 +65,7 @@ static void usage() ...@@ -67,7 +65,7 @@ static void usage()
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
DEBUG=1; setDebug(1);
int i; int i;
pwr_tFileName file; pwr_tFileName file;
char graph_name[80]; char graph_name[80];
......
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