summaryrefslogtreecommitdiff
path: root/library/config.cpp
Unidiff
Diffstat (limited to 'library/config.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/config.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/library/config.cpp b/library/config.cpp
index 9634571..e07eecb 100644
--- a/library/config.cpp
+++ b/library/config.cpp
@@ -28,17 +28,19 @@
28#include <qtextstream.h> 28#include <qtextstream.h>
29 29
30#include <sys/stat.h> 30#include <sys/stat.h>
31#include <sys/types.h> 31#include <sys/types.h>
32#include <fcntl.h> 32#include <fcntl.h>
33#include <stdlib.h> 33#include <stdlib.h>
34#include <unistd.h> 34#include <unistd.h>
35 35
36#define QTOPIA_INTERNAL_LANGLIST
36#include "config.h" 37#include "config.h"
38#include "global.h"
37 39
38 40
39/*! 41/*!
40 \internal 42 \internal
41*/ 43*/
42QString Config::configFilename(const QString& name, Domain d) 44QString Config::configFilename(const QString& name, Domain d)
43{ 45{
44 switch (d) { 46 switch (d) {
@@ -90,24 +92,19 @@ QString Config::configFilename(const QString& name, Domain d)
90 92
91 In the File Domain, \a name is an absolute filename. 93 In the File Domain, \a name is an absolute filename.
92*/ 94*/
93Config::Config( const QString &name, Domain domain ) 95Config::Config( const QString &name, Domain domain )
94 : filename( configFilename(name,domain) ) 96 : filename( configFilename(name,domain) )
95{ 97{
96 git = groups.end(); 98 git = groups.end();
97 read(); 99 read();
98 100 QStringList l = Global::languageList();
99 lang = getenv("LANG"); 101 lang = l[0];
100 int i = lang.find("."); 102 glang = l[1];
101 if ( i > 0 )
102 lang = lang.left( i );
103 i = lang.find( "_" );
104 if ( i > 0 )
105 glang = lang.left(i);
106} 103}
107 104
108/*! 105/*!
109 Writes any changes to disk and destroys the in-memory object. 106 Writes any changes to disk and destroys the in-memory object.
110*/ 107*/
111Config::~Config() 108Config::~Config()
112{ 109{
113 if ( changed ) 110 if ( changed )