Skip to content
Snippets Groups Projects
Commit 05134504 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Steve Lhomme
Browse files

qt: do not use double precision in settings

The docs state that:

> Note that INI files lose the distinction
between numeric data and the strings used
to encode them, so values written as numbers
shall be read back as QString. The numeric
value can be recovered using QString::toInt(),
QString::toDouble() and related functions.

Currently, double-precision numbers can not
be reconstructed properly due to QString's
way of handling dp numbers.

Since they are read back as QString, we
should save these numbers according to the
precision that QString is comfortable with,
so that they are parsed properly when the
application starts.
parent 29cde5f9
No related branches found
No related tags found
1 merge request!5468qt: do not use double precision in settings
Pipeline #476447 passed with warnings with stage
in 12 minutes and 59 seconds
......@@ -235,12 +235,12 @@ MainCtx::~MainCtx()
settings->beginGroup("MainWindow");
settings->setValue( "pl-dock-status", b_playlistDocked );
settings->setValue( "ShowRemainingTime", m_showRemainingTime );
settings->setValue( "interface-scale", m_intfUserScaleFactor );
settings->setValue( "interface-scale", QString::number( m_intfUserScaleFactor ) );
/* Save playlist state */
settings->setValue( "playlist-visible", m_playlistVisible );
settings->setValue( "playlist-width-factor", m_playlistWidthFactor);
settings->setValue( "player-playlist-width-factor", m_playerPlaylistWidthFactor);
settings->setValue( "playlist-width-factor", QString::number( m_playlistWidthFactor ) );
settings->setValue( "player-playlist-width-factor", QString::number( m_playerPlaylistWidthFactor ) );
settings->setValue( "grid-view", m_gridView );
settings->setValue( "grouping", m_grouping );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment