Mercurial > octave-nkf
comparison gui/src/ResourceManager.cpp @ 13571:a7c923ab980f
Default file gets copied to home directory when no settings file is present.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 01 Aug 2011 16:49:33 +0200 |
parents | 7828e1bf5b0d |
children | fd31226d4c3a |
comparison
equal
deleted
inserted
replaced
13570:7828e1bf5b0d | 13571:a7c923ab980f |
---|---|
49 void | 49 void |
50 ResourceManager::setSettings (QString file) | 50 ResourceManager::setSettings (QString file) |
51 { | 51 { |
52 delete m_settings; | 52 delete m_settings; |
53 if (!QFile::exists (file)) | 53 if (!QFile::exists (file)) |
54 file = "../default-settings/.octave-gui"; | 54 { |
55 QFile::copy("../default-settings/.octave-gui", file); | |
56 } | |
55 m_settings = new QSettings (file, QSettings::IniFormat); | 57 m_settings = new QSettings (file, QSettings::IniFormat); |
56 } | 58 } |
57 | 59 |
58 QString | 60 QString |
59 ResourceManager::findTranslatorFile (QString language) | 61 ResourceManager::findTranslatorFile (QString language) |