Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
05134504 by Fatih Uzunoglu at 2024-06-02T06:23:07+00:00
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.

- - - - -


1 changed file:

- modules/gui/qt/maininterface/mainctx.cpp


Changes:

=====================================
modules/gui/qt/maininterface/mainctx.cpp
=====================================
@@ -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 );



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/05134504b0dd59100db6327acd2ad7b06b149cb2

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/05134504b0dd59100db6327acd2ad7b06b149cb2
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to