diff --git a/src/main.cpp b/src/main.cpp index e030306cd6..1b47ad4ba2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -582,20 +582,6 @@ int main ( int argc, char** argv ) continue; } - // Clean up legacy fader settings -------------------------------------- - // Undocumented temporary command line argument: Clean up fader settings - // corrupted by bug #2680. Only needs to be used once (per file). - if ( GetFlagArgument ( argv, - i, - "--cleanuplegacyfadersettings", // no short form - "--cleanuplegacyfadersettings" ) ) - { - qInfo() << "- will clean up legacy fader settings on load"; - CommandLineOptions << "--cleanuplegacyfadersettings"; - ClientOnlyOptions << "--cleanuplegacyfadersettings"; - continue; - } - // Unknown option ------------------------------------------------------ qCritical() << qUtf8Printable ( QString ( "%1: Unknown option '%2' -- use '--help' for help" ).arg ( argv[0] ).arg ( argv[i] ) ); diff --git a/src/settings.cpp b/src/settings.cpp index 1eb9541dd6..d68c4dd7d8 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -232,8 +232,6 @@ void CClientSettings::ReadSettingsFromXML ( const QDomDocument& IniXMLDocument, int iValue; bool bValue; - bCleanUpLegacyFaderSettings = CommandLineOptions.contains ( "--cleanuplegacyfadersettings" ); - // IP addresses for ( iIdx = 0; iIdx < MAX_NUM_SERVER_ADDR_ITEMS; iIdx++ ) { @@ -559,53 +557,6 @@ void CClientSettings::ReadSettingsFromXML ( const QDomDocument& IniXMLDocument, ReadFaderSettingsFromXML ( IniXMLDocument ); } -QString CClientSettings::CleanUpLegacyFaderSetting ( QString strFaderTag, int iIdx ) -{ - bool ok; - int iIdy; - bool bDup; - - if ( !bCleanUpLegacyFaderSettings || strFaderTag.isEmpty() ) - { - return strFaderTag; - } - - QStringList slChanFaderTag = strFaderTag.split ( ":" ); - if ( slChanFaderTag.size() != 2 ) - { - return strFaderTag; - } - - const int iChan = slChanFaderTag[0].toInt ( &ok ); - if ( ok && iChan >= 0 && iChan <= MAX_NUM_CHANNELS ) - { - // *assumption*: legacy tag that needs cleaning up - strFaderTag = slChanFaderTag[1]; - } - - // duplicate detection - // this assumes the first entry into the vector is the newest one and skips any later ones. - // the alternative is to use iIdy for the vector entry, so overwriting the duplicate. - // (in both cases, this currently leaves holes in the vector.) - bDup = false; - for ( iIdy = 0; iIdy < iIdx; iIdy++ ) - { - if ( strFaderTag == vecStoredFaderTags[iIdy] ) - { - // duplicate entry - bDup = true; - break; - } - } - if ( bDup ) - { - // so skip all settings for this iIdx (use iIdx here even if using iIdy and not doing continue below) - return QString(); - } - - return strFaderTag; -} - void CClientSettings::ReadFaderSettingsFromXML ( const QDomDocument& IniXMLDocument ) { int iIdx; @@ -615,9 +566,8 @@ void CClientSettings::ReadFaderSettingsFromXML ( const QDomDocument& IniXMLDocum for ( iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ ) { // stored fader tags - QString strFaderTag = CleanUpLegacyFaderSetting ( - FromBase64ToString ( GetIniSetting ( IniXMLDocument, "client", QString ( "storedfadertag%1_base64" ).arg ( iIdx ), "" ) ), - iIdx ); + QString strFaderTag = + FromBase64ToString ( GetIniSetting ( IniXMLDocument, "client", QString ( "storedfadertag%1_base64" ).arg ( iIdx ), "" ) ); if ( strFaderTag.isEmpty() ) { diff --git a/src/settings.h b/src/settings.h index 6e3bd758c2..0117604ba4 100644 --- a/src/settings.h +++ b/src/settings.h @@ -165,7 +165,6 @@ class CClientSettings : public CSettings int iCustomDirectoryIndex; // index of selected custom directory bool bEnableFeedbackDetection; bool bEnableAudioAlerts; - bool bCleanUpLegacyFaderSettings; // window position/state settings QByteArray vecWindowPosSettings; @@ -180,9 +179,6 @@ class CClientSettings : public CSettings virtual void WriteSettingsToXML ( QDomDocument& IniXMLDocument ) override; virtual void ReadSettingsFromXML ( const QDomDocument& IniXMLDocument, const QList& CommandLineOptions ) override; - // Code for #2680 clean up - QString CleanUpLegacyFaderSetting ( QString strFaderTag, int iIdx ); - void ReadFaderSettingsFromXML ( const QDomDocument& IniXMLDocument ); void WriteFaderSettingsToXML ( QDomDocument& IniXMLDocument );