Changeset 1321 for trunk


Ignore:
Timestamp:
Jun 23, 2010, 2:56:46 PM (14 years ago)
Author:
garnier
Message:

fix warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r1318 r1321  
    2525//
    2626//
    27 // $Id: G4UIQt.cc,v 1.45 2010/06/10 16:01:38 lgarnier Exp $
     27// $Id: G4UIQt.cc,v 1.48 2010/06/22 18:24:18 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    711711
    712712  if (fEmptyViewerTabLabel != NULL) {
    713     if (fTabWidget->isVisible()) {
     713    bool visible = false;
     714    if (fTabWidget != NULL) {
     715      if (fTabWidget->isVisible()) {
     716        visible = true;
     717      }
     718    }
     719    if (visible) {
    714720#if QT_VERSION >= 0x040000
    715721  #if QT_VERSION >= 0x040200
     
    744750#endif
    745751  // get the size of the tabbar
    746   int tabBarX;
    747   int tabBarY;
    748 #if QT_VERSION < 0x040000
    749   tabBarX = fTabWidget->width()-fTabWidget->page(0)->width();
    750   tabBarY = fTabWidget->height()-fTabWidget->page(0)->height();
    751 #else
    752   tabBarX = fTabWidget->width()-fTabWidget->widget(0)->width();
    753   tabBarY = fTabWidget->height()-fTabWidget->widget(0)->height();
    754 #endif
    755 
    756   fMainWindow->resize(tabBarX+fMainWindow->width()+fLastQTabSizeX-fTabWidget->width(),tabBarY+fMainWindow->height()+fLastQTabSizeY-fTabWidget->height());
     752  int tabBarX = 0;
     753  int tabBarY = 0;
     754
     755  if (fTabWidget != NULL) {
     756#if QT_VERSION < 0x040000
     757    tabBarX = -fTabWidget->page(0)->width();
     758    tabBarY = -fTabWidget->page(0)->height();
     759#else
     760    tabBarX = -fTabWidget->widget(0)->width();
     761    tabBarY = -fTabWidget->widget(0)->height();
     762#endif
     763  }
     764  fMainWindow->resize(tabBarX+fMainWindow->width()+fLastQTabSizeX,tabBarY+fMainWindow->height()+fLastQTabSizeY);
    757765
    758766#if QT_VERSION < 0x040000
     
    17601768
    17611769void G4UIQt::CoutFilterCallback(
     1770#if QT_VERSION < 0x040000
     1771const QString &) {
     1772#else
    17621773const QString & text) {
     1774#endif
    17631775
    17641776#if QT_VERSION < 0x040000
     
    21192131
    21202132 
     2133#if QT_VERSION >= 0x040500
    21212134void G4UIQt::TabCloseCallback(int a){
     2135#else
     2136void G4UIQt::TabCloseCallback(int){
     2137#endif
    21222138#if QT_VERSION >= 0x040500
    21232139  QWidget* temp = fTabWidget->widget(a);
     
    21682184
    21692185void G4QTabWidget::paintEvent(
    2170 QPaintEvent * event
     2186QPaintEvent *
    21712187)
    21722188{
Note: See TracChangeset for help on using the changeset viewer.