Minor bug fixes

- model::Db::lookupPaperNameFromId() bad if-else-if
- model::StrUtil::formatFraction missing arg in QString
- Added unit tests for StrUtil
This commit is contained in:
Jaye Evins
2025-05-08 11:09:11 -04:00
parent f15c21a01d
commit 18b0a1b09b
5 changed files with 98 additions and 6 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ namespace glabels
if ( denom[i] == 1.0 )
{
/* Simple integer. */
return QString().arg(x, 0, 'f', 0);
return QString("%1").arg(x, 0, 'f', 0);
}
auto n = int( x * denom[i] + 0.5 );
auto d = int( denom[i] );