Fix: set directory of application for directory of the ini-file.
This commit is contained in:
parent
e87456f26b
commit
1e379cf086
@ -87,7 +87,7 @@ void CommandLineParser::configure() {
|
||||
m_repositoryUrlOption.setDefaultValue("https://git.mimbach49.de/GerhardHoffmann");
|
||||
m_parser.addOption(m_repositoryUrlOption);
|
||||
|
||||
m_iniFileDirectoryOption.setDefaultValue(".");
|
||||
m_iniFileDirectoryOption.setDefaultValue(QCoreApplication::applicationDirPath());
|
||||
m_parser.addOption(m_iniFileDirectoryOption);
|
||||
|
||||
m_iniFileNameOption.setDefaultValue("ATBUpdateTool.ini");
|
||||
@ -117,10 +117,10 @@ void CommandLineParser::configure() {
|
||||
m_extendedVersionOption.setDefaultValue("false");
|
||||
m_parser.addOption(m_extendedVersionOption);
|
||||
|
||||
m_yoctoVersionOption .setDefaultValue("false");
|
||||
m_yoctoVersionOption.setDefaultValue("false");
|
||||
m_parser.addOption(m_yoctoVersionOption);
|
||||
|
||||
m_yoctoInstallStatusOption .setDefaultValue("false");
|
||||
m_yoctoInstallStatusOption.setDefaultValue("false");
|
||||
m_parser.addOption(m_yoctoInstallStatusOption);
|
||||
}
|
||||
|
||||
@ -128,7 +128,6 @@ void CommandLineParser::readSettings() {
|
||||
QString const iniFileDir = m_parser.value(m_iniFileDirectoryOption);
|
||||
QString const iniFileName = m_parser.value(m_iniFileNameOption);
|
||||
m_iniFileName = QDir::cleanPath(iniFileDir + QDir::separator() + iniFileName);
|
||||
|
||||
if (!m_iniFileName.isEmpty()) {
|
||||
if (QFile(m_iniFileName).exists()) {
|
||||
QSettings settings(m_iniFileName, QSettings::IniFormat);
|
||||
|
Loading…
Reference in New Issue
Block a user