ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT")
ENDIF()
+# Other global definitions
+ADD_DEFINITIONS("-DGLOBAL_DOUBLE_CONVERSION")
+
# Detection summary:
SALOME_PACKAGE_REPORT_AND_CHECK()
: QDoubleSpinBox( parent ),
myCleared( false )
{
+#if !defined(GLOBAL_DOUBLE_CONVERSION)
// VSR 01/07/2010: Disable thousands separator for spin box
// (to avoid incosistency of double-2-string and string-2-double conversion)
+ // see issue 14540 (old id 21219)
QLocale loc;
loc.setNumberOptions(loc.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator);
setLocale(loc);
+#endif
// Use precision equal to default Qt decimals
myPrecision = decimals();
: QDoubleSpinBox( parent ),
myCleared( false )
{
+#if !defined(GLOBAL_DOUBLE_CONVERSION)
// VSR 01/07/2010: Disable thousands separator for spin box
// (to avoid incosistency of double-2-string and string-2-double conversion)
+ // see issue 14540 (old id 21219)
QLocale loc;
loc.setNumberOptions(loc.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator);
setLocale(loc);
+#endif
// Use precision equal to default Qt decimals
myPrecision = decimals();
myCleared( false ),
myPrecision( prec )
{
+#if !defined(GLOBAL_DOUBLE_CONVERSION)
// VSR 01/07/2010: Disable thousands separator for spin box
// (to avoid incosistency of double-2-string and string-2-double conversion)
+ // see issue 14540 (old id 21219)
QLocale loc;
loc.setNumberOptions(loc.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator);
setLocale(loc);
+#endif
setDecimals( dec );
setMinimum( min );
: QSpinBox( parent ),
myCleared( false )
{
+#if !defined(GLOBAL_DOUBLE_CONVERSION)
// VSR 01/07/2010: Disable thousands separator for spin box
// (to avoid incosistency of double-2-string and string-2-double conversion)
+ // see issue 14540 (old id 21219)
QLocale loc;
loc.setNumberOptions(loc.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator);
setLocale(loc);
+#endif
setCorrectionMode( QSpinBox::CorrectToNearestValue );
connect( lineEdit(), SIGNAL( textChanged( const QString& ) ),
: QSpinBox( parent ),
myCleared( false )
{
+#if !defined(GLOBAL_DOUBLE_CONVERSION)
// VSR 01/07/2010: Disable thousands separator for spin box
// (to avoid incosistency of double-2-string and string-2-double conversion)
+ // see issue 14540 (old id 21219)
QLocale loc;
loc.setNumberOptions(loc.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator);
setLocale(loc);
+#endif
setMinimum( min );
setMaximum( max );
QLocale::setDefault( QLocale::c() );
resMgr.setWorkingMode( ResourceMgr::IgnoreUserValues );
+#if defined(GLOBAL_DOUBLE_CONVERSION)
+ // VSR 30/03/2021: moved here from QtxDoubleSpinBox/QtxIntSpinBox because of crash on Qt 5.12.
+ // Disable thousands separator for spin box
+ // see issue 14540 (old id 21219)
+ QLocale locale;
+ locale.setNumberOptions(locale.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator);
+ QLocale::setDefault(locale);
+#endif
+
if ( !debugExceptions )
debugExceptions = resMgr.booleanValue( "launch", "noexcepthandler", false );
if ( !noSplash )
QLocale::setDefault(QLocale::c());
resMgr.setWorkingMode(ResourceMgr::IgnoreUserValues);
+#if defined(GLOBAL_DOUBLE_CONVERSION)
+ // VSR 30/03/2021: moved here from QtxDoubleSpinBox/QtxIntSpinBox because of crash on Qt 5.12.
+ // Disable thousands separator for spin box
+ // see issue 14540 (old id 21219)
+ QLocale locale;
+ locale.setNumberOptions(locale.numberOptions() | QLocale::OmitGroupSeparator | QLocale::RejectGroupSeparator);
+ QLocale::setDefault(locale);
+#endif
+
bool isGUI = boolCmdOption("--show-desktop", "--hide-desktop", true); // true by default
bool isSplash = boolCmdOption("--show-splash", "--hide-splash", true); // true by default