-rw-r--r-- | library/config.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/library/config.cpp b/library/config.cpp index b28c771..8b60f60 100644 --- a/library/config.cpp +++ b/library/config.cpp | |||
@@ -1,55 +1,53 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qdir.h> | 21 | #include <qdir.h> |
22 | #include <qfile.h> | ||
23 | #include <qfileinfo.h> | ||
24 | #include <qmessagebox.h> | 22 | #include <qmessagebox.h> |
25 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) | 23 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) |
26 | #include <qtextcodec.h> | 24 | #include <qtextcodec.h> |
27 | #endif | 25 | #endif |
28 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
29 | 27 | ||
30 | #include <sys/stat.h> | 28 | #include <sys/stat.h> |
31 | #include <sys/types.h> | 29 | #include <sys/types.h> |
32 | #include <fcntl.h> | 30 | #include <fcntl.h> |
33 | #include <stdlib.h> | 31 | #include <stdlib.h> |
34 | #include <unistd.h> | 32 | #include <unistd.h> |
35 | 33 | ||
36 | #define QTOPIA_INTERNAL_LANGLIST | 34 | #define QTOPIA_INTERNAL_LANGLIST |
37 | #include "config.h" | 35 | #include "config.h" |
38 | #include "global.h" | 36 | #include "global.h" |
39 | 37 | ||
40 | 38 | ||
41 | /*! | 39 | /*! |
42 | \internal | 40 | \internal |
43 | */ | 41 | */ |
44 | QString Config::configFilename(const QString& name, Domain d) | 42 | QString Config::configFilename(const QString& name, Domain d) |
45 | { | 43 | { |
46 | switch (d) { | 44 | switch (d) { |
47 | case File: | 45 | case File: |
48 | return name; | 46 | return name; |
49 | case User: { | 47 | case User: { |
50 | QDir dir = (QString(getenv("HOME")) + "/Settings"); | 48 | QDir dir = (QString(getenv("HOME")) + "/Settings"); |
51 | if ( !dir.exists() ) | 49 | if ( !dir.exists() ) |
52 | mkdir(dir.path().local8Bit(),0700); | 50 | mkdir(dir.path().local8Bit(),0700); |
53 | return dir.path() + "/" + name + ".conf"; | 51 | return dir.path() + "/" + name + ".conf"; |
54 | } | 52 | } |
55 | } | 53 | } |