File tree Expand file tree Collapse file tree
SQLiteStudio3/coreSQLiteStudio/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33### 3.4.19
44- BUGFIX: #5447 Database object filtering improved - both speed (3x) and reliability (i.e. typing while filtering is in progress).
5+ - BUGFIX: #5450 Increased precision for very small decimal numbers (like 1e-15).
56- BUGFIX: Fixed manual updates checking in case when automatic on-startup checking is disabled.
67
78### 3.4.18
Original file line number Diff line number Diff line change @@ -966,14 +966,16 @@ QStringList concat(const QList<QStringList>& list)
966966
967967QString doubleToString (const QVariant& val)
968968{
969- QString str = val.toString ();
970- if (str.contains (" e" ) || str.midRef (str.indexOf (' .' ) + 1 ).length () > 14 )
971- {
972- str = QString::number (val.toDouble (), ' f' , 14 ).remove (QRegExp (" 0*$" ));
973- if (str.endsWith (" ." ))
974- str += " 0" ;
975- }
976- else if (!str.contains (' .' ))
969+ double d = val.toDouble ();
970+ QString str = QString::number (d, ' f' , 17 );
971+
972+ while (str.contains (' .' ) && str.endsWith (' 0' ))
973+ str.chop (1 );
974+
975+ if (str.endsWith (' .' ))
976+ str.chop (1 );
977+
978+ if (!str.contains (' .' ))
977979 str += " .0" ;
978980
979981 return str;
You can’t perform that action at this time.
0 commit comments