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_repositoryUrlOption.setDefaultValue("https://git.mimbach49.de/GerhardHoffmann");
|
||||||
m_parser.addOption(m_repositoryUrlOption);
|
m_parser.addOption(m_repositoryUrlOption);
|
||||||
|
|
||||||
m_iniFileDirectoryOption.setDefaultValue(".");
|
m_iniFileDirectoryOption.setDefaultValue(QCoreApplication::applicationDirPath());
|
||||||
m_parser.addOption(m_iniFileDirectoryOption);
|
m_parser.addOption(m_iniFileDirectoryOption);
|
||||||
|
|
||||||
m_iniFileNameOption.setDefaultValue("ATBUpdateTool.ini");
|
m_iniFileNameOption.setDefaultValue("ATBUpdateTool.ini");
|
||||||
@ -128,7 +128,6 @@ void CommandLineParser::readSettings() {
|
|||||||
QString const iniFileDir = m_parser.value(m_iniFileDirectoryOption);
|
QString const iniFileDir = m_parser.value(m_iniFileDirectoryOption);
|
||||||
QString const iniFileName = m_parser.value(m_iniFileNameOption);
|
QString const iniFileName = m_parser.value(m_iniFileNameOption);
|
||||||
m_iniFileName = QDir::cleanPath(iniFileDir + QDir::separator() + iniFileName);
|
m_iniFileName = QDir::cleanPath(iniFileDir + QDir::separator() + iniFileName);
|
||||||
|
|
||||||
if (!m_iniFileName.isEmpty()) {
|
if (!m_iniFileName.isEmpty()) {
|
||||||
if (QFile(m_iniFileName).exists()) {
|
if (QFile(m_iniFileName).exists()) {
|
||||||
QSettings settings(m_iniFileName, QSettings::IniFormat);
|
QSettings settings(m_iniFileName, QSettings::IniFormat);
|
||||||
|
Loading…
Reference in New Issue
Block a user