From 42b8e36e60f70655ba3c64cd40fbab0863609ff6 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 4 Dec 2009 13:03:58 +0000 Subject: [PATCH] Fixed problem with variable-argument lists on 64bit platforms. --- src/SalomeApp/SalomeApp_Notebook.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 ); } -- 2.39.2