@@ -92,17 +92,17 @@ void Options::setTheme(QString value)
9292 config.setValue (" theme" , value);
9393}
9494
95- int Options::themeScalingFactor () const
95+ double Options::themeScalingFactor () const
9696{
97- int value = config.value (" theme_scaling_factor" , " 1" ).toInt ();
98- if (value <= 0 )
97+ double value = config.value (" theme_scaling_factor" , " 1" ).toDouble ();
98+ if (value < 0.1 )
9999 {
100- value = 1 ;
100+ value = 0. 1 ;
101101 }
102102 return value;
103103}
104104
105- void Options::setThemeScalingFactor (int value)
105+ void Options::setThemeScalingFactor (double value)
106106{
107107 config.setValue (" theme_scaling_factor" , value);
108108}
@@ -680,11 +680,11 @@ QVector<ServerInfo> Options::favorites()
680680 f_server.description = favorite.value (" desc" , " No description" ).toString ();
681681 if (favorite.contains (" protocol" ))
682682 {
683- f_server.legacy = favorite.value (" protocol" ).toString () == " tcp " ;
683+ f_server.protocol = favorite.value (" protocol" ).toString ();
684684 }
685685 else
686686 {
687- f_server.legacy = favorite. value ( " legacy " , false ). toBool () ;
687+ f_server.protocol = " tcp " ;
688688 }
689689
690690 serverlist.append (std::move (f_server));
@@ -705,7 +705,7 @@ void Options::setFavorites(QVector<ServerInfo> value)
705705 favorite.setValue (" address" , fav_server.address );
706706 favorite.setValue (" port" , fav_server.port );
707707 favorite.setValue (" desc" , fav_server.description );
708- favorite.setValue (" legacy " , fav_server.legacy );
708+ favorite.setValue (" protocol " , fav_server.protocol );
709709 favorite.endGroup ();
710710 }
711711 favorite.sync ();
@@ -726,7 +726,7 @@ void Options::addFavorite(ServerInfo server)
726726 favorite.setValue (" address" , server.address );
727727 favorite.setValue (" port" , server.port );
728728 favorite.setValue (" desc" , server.description );
729- favorite.setValue (" legacy " , server.legacy );
729+ favorite.setValue (" protocol " , server.protocol );
730730 favorite.endGroup ();
731731 favorite.sync ();
732732}
@@ -738,7 +738,7 @@ void Options::updateFavorite(ServerInfo server, int index)
738738 favorite.setValue (" address" , server.address );
739739 favorite.setValue (" port" , server.port );
740740 favorite.setValue (" desc" , server.description );
741- favorite.setValue (" legacy " , server.legacy );
741+ favorite.setValue (" protocol " , server.protocol );
742742 favorite.endGroup ();
743743 favorite.sync ();
744744}
0 commit comments