Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
0261862b
Commit
0261862b
authored
Oct 04, 2014
by
Fabio Bas
Browse files
Fix configuration loading
parent
871f5f7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
servatrice/src/main.cpp
View file @
0261862b
...
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
...
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
configPath
=
SettingsCache
::
guessConfigurationPath
(
configPath
);
configPath
=
SettingsCache
::
guessConfigurationPath
(
configPath
);
qWarning
()
<<
"Using configuration file: "
<<
configPath
;
qWarning
()
<<
"Using configuration file: "
<<
configPath
;
settingsCache
=
new
SettingsCache
();
settingsCache
=
new
SettingsCache
(
configPath
);
loggerThread
=
new
QThread
;
loggerThread
=
new
QThread
;
loggerThread
->
setObjectName
(
"logger"
);
loggerThread
->
setObjectName
(
"logger"
);
...
...
servatrice/src/settingscache.cpp
View file @
0261862b
...
@@ -7,6 +7,12 @@
...
@@ -7,6 +7,12 @@
#include
<QDesktopServices>
#include
<QDesktopServices>
#endif
#endif
SettingsCache
::
SettingsCache
(
const
QString
&
fileName
,
QSettings
::
Format
format
,
QObject
*
parent
)
:
QSettings
(
fileName
,
format
,
parent
)
{
}
QString
SettingsCache
::
guessConfigurationPath
(
QString
&
specificPath
)
QString
SettingsCache
::
guessConfigurationPath
(
QString
&
specificPath
)
{
{
const
QString
fileName
=
"servatrice.ini"
;
const
QString
fileName
=
"servatrice.ini"
;
...
...
servatrice/src/settingscache.h
View file @
0261862b
...
@@ -9,7 +9,7 @@ class SettingsCache : public QSettings {
...
@@ -9,7 +9,7 @@ class SettingsCache : public QSettings {
private:
private:
QSettings
*
settings
;
QSettings
*
settings
;
public:
public:
SettingsCache
(
const
QString
&
fileName
=
"servatrice.ini"
,
QSettings
::
Format
format
=
QSettings
::
IniFormat
,
QObject
*
parent
=
0
)
{
}
;
SettingsCache
(
const
QString
&
fileName
=
"servatrice.ini"
,
QSettings
::
Format
format
=
QSettings
::
IniFormat
,
QObject
*
parent
=
0
);
static
QString
guessConfigurationPath
(
QString
&
specificPath
);
static
QString
guessConfigurationPath
(
QString
&
specificPath
);
};
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment