From 8c1074e85939118ede18797bd1ce249bb6cee30d Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 17 Aug 2010 11:35:38 +0000 Subject: Make debug console available through cli param -d/--debug. --- client/pracro.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/pracro.cc b/client/pracro.cc index 7ae939e..a3c56ff 100644 --- a/client/pracro.cc +++ b/client/pracro.cc @@ -72,6 +72,7 @@ static void print_usage() printf(" -u, -U, --user USER Defines the requesting user(not the patient),\n" " defaults to \""USER_DEFAULT"\"\n"); printf(" -v, --version Print version information and exit.\n"); + printf(" -d, --debug Make debug console available.\n"); printf(" -V, --viewer TEMPLATES Show the viewer with TEMPLATES.\n"); printf(" -O, --viewer-only TEMPLATES\n"); printf(" Show the viewer only (no pracro editor window) with TEMPLATES.\n"); @@ -96,8 +97,6 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - dbg_init(); - QString macro = MACRO_DEFAULT; QString templ = TEMPLATE_DEFAULT; bool show_viewer = false; @@ -136,6 +135,10 @@ int main(int argc, char *argv[]) *arg == "-c") { config = getParam(args, arg); } + else if(*arg == "--debug" || + *arg == "-d") { + dbg_init(); + } else if(*arg == "--viewer" || *arg == "-V") { templs = getParam(args, arg); -- cgit v1.2.3