Skip to content

Commit

Permalink
Replace magic number.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Dec 29, 2024
1 parent d25e3eb commit 7640564
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/eible/ExportDsv.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,6 @@ class EIBLE_EXPORT ExportDsv : public ExportData
Qt::DateFormat qtDateFormat_{Qt::ISODate};

const char separator_;

const int precision_{2};
};
2 changes: 1 addition & 1 deletion src/ExportDsv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void ExportDsv::variantToString(const QVariant& variant,
case QMetaType::Int:
{
destinationArray.append(
locale_.toString(variant.toDouble(), 'f', 2).toUtf8());
locale_.toString(variant.toDouble(), 'f', precision_).toUtf8());
break;
}

Expand Down

0 comments on commit 7640564

Please sign in to comment.