Check if setting was given on the command line. If so, then overwrite setting given in ini-file.
This commit is contained in:
		@@ -144,64 +144,63 @@ void CommandLineParser::readSettings() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString CommandLineParser::repositoryUrl() {
 | 
			
		||||
    return m_repositoryUrl;
 | 
			
		||||
    if (m_repositoryUrl.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_repositoryUrlOption)) {
 | 
			
		||||
        m_repositoryUrl = m_parser.value(m_repositoryUrlOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_repositoryUrl;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString CommandLineParser::plugInDir() {
 | 
			
		||||
    if (m_plugInDir.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_pluginDirectoryOption)) {
 | 
			
		||||
        m_plugInDir = m_parser.value(m_pluginDirectoryOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_plugInDir;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString CommandLineParser::plugInName() {
 | 
			
		||||
    if (m_plugInName.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_pluginNameOption)) {
 | 
			
		||||
        m_plugInName = m_parser.value(m_pluginNameOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_plugInName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString CommandLineParser::workingDir() {
 | 
			
		||||
    if (m_workingDir.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_workingDirectoryOption)) {
 | 
			
		||||
        m_workingDir = m_parser.value(m_workingDirectoryOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_workingDir;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CommandLineParser::dryRun() {
 | 
			
		||||
    if (m_dryRun.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_dryRunOption)) {
 | 
			
		||||
        m_dryRun = m_parser.value(m_dryRunOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_dryRun == "false" ? false : true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CommandLineParser::noUpdatePsaHardware() {
 | 
			
		||||
    if (m_noUpdatePsaHardware.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_noDownloadOption)) {
 | 
			
		||||
        m_noUpdatePsaHardware = m_parser.value(m_noDownloadOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_noUpdatePsaHardware == "false" ? false : true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CommandLineParser::yoctoVersion() {
 | 
			
		||||
    if (m_showYoctoVersion.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_yoctoVersionOption)) {
 | 
			
		||||
        m_showYoctoVersion = m_parser.value(m_yoctoVersionOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_showYoctoVersion == "false" ? false : true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CommandLineParser::yoctoInstallStatus() {
 | 
			
		||||
    if (m_showYoctoInstallStatus.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_yoctoInstallStatusOption)) {
 | 
			
		||||
        m_showYoctoInstallStatus = m_parser.value(m_yoctoInstallStatusOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_showYoctoInstallStatus == "false" ? false : true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CommandLineParser::extendedVersion() {
 | 
			
		||||
    if (m_showExtendedVersion.isEmpty()) {
 | 
			
		||||
    if (m_parser.isSet(m_extendedVersionOption)) {
 | 
			
		||||
        m_showExtendedVersion = m_parser.value(m_extendedVersionOption);
 | 
			
		||||
    }
 | 
			
		||||
    return m_showExtendedVersion == "false" ? false : true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user