comparison gui/src/ResourceManager.cpp @ 13570:7828e1bf5b0d

Default settings are now loaded it there is no user-defined settings.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Mon, 01 Aug 2011 16:45:38 +0200
parents ad905cd33563
children a7c923ab980f
comparison
equal deleted inserted replaced
13569:640190448fdf 13570:7828e1bf5b0d
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #include "ResourceManager.h" 19 #include "ResourceManager.h"
20 #include <QFile>
20 21
21 ResourceManager ResourceManager::m_singleton; 22 ResourceManager ResourceManager::m_singleton;
22 23
23 ResourceManager::ResourceManager () 24 ResourceManager::ResourceManager ()
24 { 25 {
47 48
48 void 49 void
49 ResourceManager::setSettings (QString file) 50 ResourceManager::setSettings (QString file)
50 { 51 {
51 delete m_settings; 52 delete m_settings;
53 if (!QFile::exists (file))
54 file = "../default-settings/.octave-gui";
52 m_settings = new QSettings (file, QSettings::IniFormat); 55 m_settings = new QSettings (file, QSettings::IniFormat);
53 } 56 }
54 57
55 QString 58 QString
56 ResourceManager::findTranslatorFile (QString language) 59 ResourceManager::findTranslatorFile (QString language)