summaryrefslogtreecommitdiffstats
path: root/src/importers/mxpimporter.cpp
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2025-08-03 02:34:04 +0300
committerAlexander Golubev <fatzer2@gmail.com>2025-08-04 03:34:06 +0300
commit7b2d5032f9573eaafa300a3159971e37125fd2d9 (patch)
tree3c607af6e7b30df63665f1ff6a950cd559152fb0 /src/importers/mxpimporter.cpp
parent84991f49a0ab963597b697d99e9f3c1c6c9053ee (diff)
downloadkrecipes-7b2d5032.tar.gz
krecipes-7b2d5032.zip
Use locale-unaware functions when importing files
Locale-aware version of MixedNumber::fromString() were causing problems when locale has a different decimal separator than dot (`.`). Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit adf2fa32500d33417b6e6ac9e2867f3ab3eede34)
Diffstat (limited to 'src/importers/mxpimporter.cpp')
-rw-r--r--src/importers/mxpimporter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/importers/mxpimporter.cpp b/src/importers/mxpimporter.cpp
index 9a0221f..c43fc4c 100644
--- a/src/importers/mxpimporter.cpp
+++ b/src/importers/mxpimporter.cpp
@@ -182,7 +182,7 @@ void MXPImporter::loadIngredients( TQTextStream &stream, Recipe &recipe )
if ( !amount_str.isEmpty() ) // case of amount_str.isEmpty() correctly handled by class default
{
bool ok;
- MixedNumber amount( MixedNumber::fromString( amount_str, &ok ) );
+ MixedNumber amount( MixedNumber::fromString( amount_str, &ok, /* locale_aware = */ false ) );
if ( !ok )
{
addWarningMsg( TQString( i18n( "While loading recipe \"%1\" Invalid amount \"%2\" in the line \"%3\"" ) ).arg( recipe.title ).arg( amount_str ).arg( current.stripWhiteSpace() ) );