File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
553.5.8git
66
7+ TODO bug fix: incorrect selection of UI language (#408)
8+
79TODO improve settings management -> move settings class in client/server classes, move actual settings variables
810
911TODO add new register message which contains version and, e.g., max number of clients
1012
13+ TODO bug fix: grouping faders in the client should be proportional (see discussion in #202)
14+
1115TODO https://github.com/corrados/jamulus/issues/341#issuecomment-647172946
1216 - generate .qm on compile time with lrelease
1317
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ void CSettings::Load()
3636 // prepare file name for loading initialization data from XML file and read
3737 // data from file if possible
3838 QFile file ( strFileName );
39+
3940 if ( file.open ( QIODevice::ReadOnly ) )
4041 {
4142 QTextStream in ( &file );
@@ -690,11 +691,13 @@ void CSettings::Save()
690691
691692
692693// Help functions **************************************************************
693- void CSettings::SetFileName ( const QString& sNFiName )
694+ void CSettings::SetFileName ( const QString& sNFiName ,
695+ const QString& sDefaultFileName )
694696{
695697 // return the file name with complete path, take care if given file name is
696698 // empty
697699 strFileName = sNFiName ;
700+
698701 if ( strFileName.isEmpty () )
699702 {
700703 // we use the Qt default setting file paths for the different OSs by
@@ -713,14 +716,7 @@ void CSettings::SetFileName ( const QString& sNFiName )
713716 }
714717
715718 // append the actual file name
716- if ( bIsClient )
717- {
718- strFileName = sConfigDir + " /" + DEFAULT_INI_FILE_NAME;
719- }
720- else
721- {
722- strFileName = sConfigDir + " /" + DEFAULT_INI_FILE_NAME_SERVER;
723- }
719+ strFileName = sConfigDir + " /" + sDefaultFileName ;
724720 }
725721}
726722
Original file line number Diff line number Diff line change @@ -40,18 +40,19 @@ class CSettings
4040{
4141public:
4242 CSettings ( CClient* pNCliP, const QString& sNFiName ) :
43- pClient ( pNCliP ), bIsClient ( true )
44- { SetFileName ( sNFiName ); }
43+ pClient ( pNCliP ), bIsClient ( true ), strFileName ( " " )
44+ { SetFileName ( sNFiName , DEFAULT_INI_FILE_NAME ); }
4545
4646 CSettings ( CServer* pNSerP, const QString& sNFiName ) :
47- pServer ( pNSerP ), bIsClient ( false )
48- { SetFileName ( sNFiName ); }
47+ pServer ( pNSerP ), bIsClient ( false ), strFileName ( " " )
48+ { SetFileName ( sNFiName , DEFAULT_INI_FILE_NAME_SERVER ); }
4949
5050 void Load ();
5151 void Save ();
5252
5353protected:
54- void SetFileName ( const QString& sNFiName );
54+ void SetFileName ( const QString& sNFiName ,
55+ const QString& sDefaultFileName );
5556
5657 // The following functions implement the conversion from the general string
5758 // to base64 (which should be used for binary data in XML files). This
You can’t perform that action at this time.
0 commit comments