Ignore:
Timestamp:
Oct 30, 2008, 5:48:40 PM (16 years ago)
Author:
garnier
Message:

update to G4 DEBUG official messages

Location:
trunk/source/interfaces
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/History

    r867 r874  
    1 $Id: History,v 1.101 2008/10/15 09:09:47 lgarnier Exp $
     1$Id: History,v 1.102 2008/10/24 13:23:22 lgarnier Exp $
    22-------------------------------------------------------------------
    33
     
    1818     ----------------------------------------------------------
    1919
     2024 October, Laurent Garnier
     21 - Change GEANT4_QT_DEBUG flag by QTDEBUG
     22 - Suppress unuseful DEBUG messages
     23
    202415 October, Laurent Garnier
    2125 - Fix a problem on some linux with QApplication. But this is NOT the good way to do it...
  • trunk/source/interfaces/basic/include/G4UIQt.hh

    r867 r874  
    8080
    8181public: // With description
    82   G4UIQt(int*,char**);
     82  G4UIQt(int,char**);
    8383  // (argv, argc) or (0, NULL) had to be given.
    8484  G4UIsession* SessionStart();
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r867 r874  
    2525//
    2626//
    27 // $Id: G4UIQt.cc,v 1.20 2008/10/15 09:09:47 lgarnier Exp $
     27// $Id: G4UIQt.cc,v 1.21 2008/10/24 13:23:22 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
    3030// L. Garnier
    31 
    32 //#define GEANT4_QT_DEBUG
    3331
    3432#ifdef G4UI_BUILD_QT_SESSION
     
    102100*/
    103101G4UIQt::G4UIQt (
    104  int* argc
     102 int argc
    105103,char** argv
    106104)
     
    140138  fMainWindow = new QMainWindow();
    141139
    142 #ifdef GEANT4_QT_DEBUG
     140#ifdef G4DEBUG
    143141  printf("G4UIQt::Initialise after main window creation\n");
    144142#endif
     
    201199#endif
    202200  fTextArea->setReadOnly(true);
    203 
    204 
    205 #ifdef GEANT4_QT_DEBUG
    206   printf("G4UIQt::   2\n");
    207 #endif
    208 
    209 
    210201
    211202  layoutTop->addWidget(fTextArea);
     
    306297
    307298
    308 #ifdef GEANT4_QT_DEBUG
    309   printf("disable secondary loop\n");
    310 #endif
    311299  interactorManager->DisableSecondaryLoop (); // TO KEEP
    312300  if ((QApplication*)interactorManager->GetMainInteractor())
     
    323311
    324312  interactorManager->EnableSecondaryLoop ();
    325 #ifdef GEANT4_QT_DEBUG
    326   printf("enable secondary loop\n");
    327 #endif
    328313  return this;
    329314}
     
    369354  if (!aState) return;
    370355
    371 #ifdef GEANT4_QT_DEBUG
    372   printf("G4UIQt::PauseSessionStart\n");
    373 #endif
    374356  if(aState=="G4_pause> ") {  // TO KEEP
    375357    SecondaryLoop ("Pause, type continue to exit this state"); // TO KEEP
     
    394376  if (!aPrompt) return;
    395377
    396 #ifdef GEANT4_QT_DEBUG
    397   printf("G4UIQt::SecondaryLoop\n");
    398 #endif
    399378  G4Qt* interactorManager = G4Qt::getInstance (); // TO KEEP ?
    400379  Prompt(aPrompt); // TO KEEP
     
    1005984)
    1006985{
    1007 #ifdef GEANT4_QT_DEBUG
     986#ifdef G4DEBUG
    1008987  printf("G4UIQt::GetHelpChoice SHOULD NEVER GO HERE");
    1009988#endif
     
    1017996)
    1018997{
    1019 #ifdef GEANT4_QT_DEBUG
     998#ifdef G4DEBUG
    1020999  printf("G4UIQt::ExitHelp SHOULD NEVER GO HERE");
    10211000#endif
     
    16151594      commandResultMap.insert(tmp*multFactor+doubleKeyAdd,QString((char*)(aCommandTree->GetCommand(a+1)->GetCommandPath()).data()));
    16161595#endif
    1617 #ifdef GEANT4_QT_DEBUG
    1618 #endif
    16191596    }
    16201597   
  • trunk/source/interfaces/common/include/G4Qt.hh

    r867 r874  
    5151public:
    5252  static G4Qt* getInstance();
    53   static G4Qt* getInstance(int*,char**,char*);
     53  static G4Qt* getInstance(int,char**,char*);
    5454  G4bool Inited();
    5555  void* GetEvent();
     
    5757  virtual ~G4Qt();                     
    5858private:
    59   G4Qt (int*,char**,char*);                     
     59  G4Qt (int,char**,char*);                     
    6060  static G4Qt* instance; // Pointer to single instance.
    6161};
  • trunk/source/interfaces/common/src/G4Qt.cc

    r867 r874  
    2525//
    2626//
    27 // $Id: G4Qt.cc,v 1.9 2008/10/15 09:09:47 lgarnier Exp $
     27// $Id: G4Qt.cc,v 1.10 2008/10/24 13:23:22 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5656/***************************************************************************/
    5757G4Qt* G4Qt::getInstance (
    58  int*    a_argn
     58 int    a_argn
    5959,char** a_args
    6060,char*  a_class
     
    7070/***************************************************************************/
    7171G4Qt::G4Qt (
    72  int*    a_argn
     72 int    a_argn
    7373,char** a_args
    7474,char*  a_class
     
    7777/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
    7878{
    79 #ifdef GEANT4_QT_DEBUG
     79#ifdef G4DEBUG
    8080  printf("G4Qt::G4Qt try to inited Qt\n");
    8181#endif
     
    8888      SetMainInteractor (qApp);
    8989      //#endif
    90       SetArguments      (*a_argn,a_args);
    91 #ifdef GEANT4_QT_DEBUG
     90      SetArguments      (a_argn,a_args);
     91
     92#ifdef G4DEBUG
    9293      printf("G4Qt::G4Qt alredy inited in external \n");
    9394#endif
     
    9596
    9697    if(QtInited==FALSE) {  //Qt should be Inited once !
    97 #ifdef GEANT4_QT_DEBUG
    98       printf("G4Qt::G4Qt inited Qt\n");
    99 #endif
     98      // Then two cases :
     99      // - It is the first time we create G4UI  (argc!=0)
     100      //   -> Inited and register
     101      // - It is the first time we create G4VIS  (arc == 0)
     102      //   -> Inited and NOT register
     103
     104      int argc;
     105      char ** test;
     106      if (a_argn != 0) {
     107        SetArguments      (a_argn,a_args);
     108#ifdef G4DEBUG
     109      printf("G4Qt::G4Qt inited, first time creating UI \n");
     110#endif
     111      } else { //argc = 0
     112        test = GetArguments(&argc);
     113
     114#ifdef G4DEBUG
     115
     116        printf("G4Qt::G4Qt inited, create new QtVis\n");
     117        printf("G4Qt::G4Qt arguments avant %s\n",a_args[0]);
     118        printf("G4Qt::G4Qt arguments avant %s\n",a_args[1]);
     119        printf("G4Qt::G4Qt arguments avant %s\n",a_args[2]);
     120        printf("G4Qt::G4Qt arguments avant %s\n",a_args[3]);
     121        printf("G4Qt::G4Qt arguments apres %d\n",argc);
     122        printf("G4Qt::G4Qt arguments apres %s \n",test[0]);
     123        printf("G4Qt::G4Qt arguments apres %s \n",test[1]);
     124        printf("G4Qt::G4Qt arguments apres %s \n",test[2]);
     125        printf("G4Qt::G4Qt arguments apres %s \n",test[3]);
     126#endif
     127        if (argc == 0) {
     128          G4cout        << "G4Qt : Unable to init Qt." << G4endl;
     129          return;
     130        }
     131      }
    100132#if QT_VERSION < 0x040000
    101       qApp = new QApplication (*a_argn, a_args);
     133      qApp = new QApplication (a_argn, a_args);
    102134      //    QApplication qApp(a_argn, a_args);
    103135      //    if(&qApp == NULL) {
    104136#else
    105       new QApplication (*a_argn, a_args);
    106 #endif
     137      new QApplication (a_argn, a_args);
     138#endif
     139     
    107140      if(!qApp) {
    108141       
    109142        G4cout        << "G4Qt : Unable to init Qt." << G4endl;
    110143      } else {
     144        if (a_argn != 0) {
     145          SetMainInteractor (qApp);
     146          SetArguments      (a_argn,a_args);
     147        }
    111148        QtInited  = TRUE;
    112         //#if QT_VERSION < 0x040000
    113         //      SetMainInteractor (&qApp);
    114         //#else
    115         SetMainInteractor (qApp);
    116         //#endif
    117         SetArguments      (*a_argn,a_args);
    118 #ifdef GEANT4_QT_DEBUG
     149#ifdef G4DEBUG
    119150        printf("G4Qt::G4Qt inited Qt END\n");
    120151#endif
     
    122153    }
    123154  }
    124 #ifdef GEANT4_QT_DEBUG
     155#ifdef G4DEBUG
    125156  if (qApp) {
    126157    printf("G4Qt::qApp exist\n");
Note: See TracChangeset for help on using the changeset viewer.