From: ouv Date: Fri, 4 Dec 2009 13:03:58 +0000 (+0000) Subject: Fixed problem with variable-argument lists on 64bit platforms. X-Git-Tag: PHASE_17_Part1_V2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=42b8e36e60f70655ba3c64cd40fbab0863609ff6;p=modules%2Fgui.git Fixed problem with variable-argument lists on 64bit platforms. --- diff --git a/src/SalomeApp/SalomeApp_Notebook.cxx b/src/SalomeApp/SalomeApp_Notebook.cxx index a07b18985..78ab36e08 100644 --- a/src/SalomeApp/SalomeApp_Notebook.cxx +++ b/src/SalomeApp/SalomeApp_Notebook.cxx @@ -186,10 +186,18 @@ QStringList SalomeApp_Notebook::absentParameters( const QString& theExpr ) const void SalomeApp_Notebook::setParameters( SALOME::ParameterizedObject_ptr theObject, int theCount, QAbstractSpinBox* theFirstSpin, ... ) { + va_list aSpins; + va_start( aSpins, theFirstSpin ); + + int aCounter = 0; QList aSpinList; - QAbstractSpinBox** aSpinArray = &theFirstSpin; - for( int i = 0; i < theCount; i++, aSpinArray++ ) - aSpinList << *aSpinArray; + QAbstractSpinBox* aSpin = theFirstSpin; + while( aSpin && aCounter < theCount ) + { + aSpinList.append( aSpin ); + aSpin = va_arg( aSpins, QAbstractSpinBox* ); + aCounter++; + } setParameters( theObject, aSpinList ); }