Skip to content

Commit

Permalink
fix: Fix where we store the QSettings ini file
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishwaldo committed Jun 19, 2020
1 parent 22c9f68 commit adf3e38
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion ozwadmin-main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ int main(int argc, char *argv[])

parser.process(a);



#ifdef Q_OS_UNIX
if (parser.isSet(userDir)) {
QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, parser.value(userDir).append("ozw-admin.ini"));
qCDebug(ozwadmin) << "Settings Path is at " << QSettings().fileName();
}
#endif
QSettings settings;

QString dbPath, userPath;
Expand Down Expand Up @@ -240,7 +248,6 @@ int main(int argc, char *argv[])
qCInfo(ozwadmin) << "DBPath: " << dbPath;
qCInfo(ozwadmin) << "userPath: " << userPath;


MainWindow w;
w.show();
if (parser.isSet(serialPort)) {
Expand Down
3 changes: 2 additions & 1 deletion ozwadmin-main/ozwcore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ QTOZWManager *OZWCore::getQTOZWManager() {
SettingsManager::SettingsManager(QObject *parent) :
QObject(parent)
{
qCDebug(ozwadmin) << "Settings Path: " << m_settings.fileName();

bool ok;
int size = qEnvironmentVariableIntValue("QTRO_NODES_CACHE_SIZE", &ok);
if (!ok) {
Expand All @@ -57,7 +59,6 @@ SettingsManager::SettingsManager(QObject *parent) :

setLogBufferSize(logBufferSize());
setRetriveLogBuffer(retriveLogBuffer());

}
SettingsManager::~SettingsManager()
{
Expand Down

0 comments on commit adf3e38

Please sign in to comment.