Commit 18bd6c25 authored by Jan Möbius's avatar Jan Möbius

Fixed some settings paths


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11683 383ad7c9-94d9-4d36-a494-682f7c89f535
parent aab888b4
...@@ -572,8 +572,7 @@ Core::init() { ...@@ -572,8 +572,7 @@ Core::init() {
if ( OpenFlipper::Options::gui() ) { if ( OpenFlipper::Options::gui() ) {
QSettings windowStates(QDir::home().absolutePath() + OpenFlipper::Options::dirSeparator() + ".OpenFlipper" + QSettings windowStates(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "WindowStates.dat", QSettings::IniFormat);
OpenFlipper::Options::dirSeparator() + "WindowStates.dat", QSettings::IniFormat);
//try to restore the windowState //try to restore the windowState
coreWidget_->restoreState (windowStates.value("Core/Window/State").toByteArray ()); coreWidget_->restoreState (windowStates.value("Core/Window/State").toByteArray ());
...@@ -1019,8 +1018,7 @@ Core::slotRecentOpen(QAction* _action) ...@@ -1019,8 +1018,7 @@ Core::slotRecentOpen(QAction* _action)
void void
Core::writeOnExit() { Core::writeOnExit() {
QString inifile = QDir::home().absolutePath() + OpenFlipper::Options::dirSeparator() + ".OpenFlipper" + QString inifile = OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "OpenFlipper.ini";
OpenFlipper::Options::dirSeparator() + "OpenFlipper.ini";
INIFile ini; INIFile ini;
if ( ! ini.connect( inifile ,false) ) { if ( ! ini.connect( inifile ,false) ) {
...@@ -1040,8 +1038,7 @@ Core::writeOnExit() { ...@@ -1040,8 +1038,7 @@ Core::writeOnExit() {
//store the windowState //store the windowState
if ( OpenFlipper::Options::gui() ) { if ( OpenFlipper::Options::gui() ) {
QSettings windowStates(QDir::home().absolutePath() + OpenFlipper::Options::dirSeparator() + ".OpenFlipper" + QSettings windowStates(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "WindowStates.dat", QSettings::IniFormat);
OpenFlipper::Options::dirSeparator() + "WindowStates.dat", QSettings::IniFormat);
windowStates.setValue("Core/Window/State", coreWidget_->saveState ()); windowStates.setValue("Core/Window/State", coreWidget_->saveState ());
windowStates.setValue("Core/Window/Geometry", coreWidget_->saveGeometry ()); windowStates.setValue("Core/Window/Geometry", coreWidget_->saveGeometry ());
...@@ -1119,8 +1116,7 @@ void Core::slotLogToFile(Logtype _type, QString _message){ ...@@ -1119,8 +1116,7 @@ void Core::slotLogToFile(Logtype _type, QString _message){
QFileInfo fi( fileName ); QFileInfo fi( fileName );
if ( fileName == "" || !fi.dir().exists() ) { if ( fileName == "" || !fi.dir().exists() ) {
OpenFlipperSettings().setValue("Core/Log/logFile", QDir::home().absolutePath() + OpenFlipper::Options::dirSeparator() + ".OpenFlipper" + OpenFlipperSettings().setValue("Core/Log/logFile", OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "OpenFlipper.log");
OpenFlipper::Options::dirSeparator() + "OpenFlipper.log");
} }
logFile_ = new QFile( OpenFlipperSettings().value("Core/Log/logFile").toString() ); logFile_ = new QFile( OpenFlipperSettings().value("Core/Log/logFile").toString() );
......
...@@ -187,8 +187,7 @@ void Core::applyOptions(){ ...@@ -187,8 +187,7 @@ void Core::applyOptions(){
} }
void Core::saveOptions(){ void Core::saveOptions(){
QString inifile = QDir::home().absolutePath() + OpenFlipper::Options::dirSeparator() + ".OpenFlipper" + QString inifile = OpenFlipper::Options::configDirStr() + "OpenFlipper.ini";
OpenFlipper::Options::dirSeparator() + "OpenFlipper.ini";
INIFile ini; INIFile ini;
if ( ! ini.connect( inifile ,false) ) { if ( ! ini.connect( inifile ,false) ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment