-rw-r--r-- | library/tzselect.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/library/tzselect.cpp b/library/tzselect.cpp index 9436867..2e5a433 100644 --- a/library/tzselect.cpp +++ b/library/tzselect.cpp | |||
@@ -15,35 +15,33 @@ | |||
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 | #define QTOPIA_INTERNAL_TZSELECT_INC_LOCAL | 21 | #define QTOPIA_INTERNAL_TZSELECT_INC_LOCAL |
22 | 22 | ||
23 | #include "tzselect.h" | 23 | #include "tzselect.h" |
24 | #include "resource.h" | 24 | #include "resource.h" |
25 | #include "global.h" | 25 | #include "global.h" |
26 | #include "config.h" | 26 | #include "config.h" |
27 | #include <qtoolbutton.h> | 27 | #include <qtoolbutton.h> |
28 | #include <qfile.h> | 28 | #include <qfile.h> |
29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
30 | 30 | ||
31 | #ifdef Q_WS_QWS | ||
32 | #include <qcopchannel_qws.h> | 31 | #include <qcopchannel_qws.h> |
33 | #endif | ||
34 | 32 | ||
35 | class TimeZoneSelectorPrivate | 33 | class TimeZoneSelectorPrivate |
36 | { | 34 | { |
37 | public: | 35 | public: |
38 | TimeZoneSelectorPrivate() : includeLocal(FALSE) {} | 36 | TimeZoneSelectorPrivate() : includeLocal(FALSE) {} |
39 | bool includeLocal; | 37 | bool includeLocal; |
40 | }; | 38 | }; |
41 | 39 | ||
42 | TZCombo::TZCombo( QWidget *p, const char* n ) | 40 | TZCombo::TZCombo( QWidget *p, const char* n ) |
43 | : QComboBox( p, n ) | 41 | : QComboBox( p, n ) |
44 | { | 42 | { |
45 | updateZones(); | 43 | updateZones(); |
46 | // check to see if TZ is set, if it is set the current item to that | 44 | // check to see if TZ is set, if it is set the current item to that |
47 | QString tz = getenv("TZ"); | 45 | QString tz = getenv("TZ"); |
48 | if (parent()->inherits("TimeZoneSelector")) { | 46 | if (parent()->inherits("TimeZoneSelector")) { |
49 | if ( ((TimeZoneSelector *)parent())->localIncluded() ) { | 47 | if ( ((TimeZoneSelector *)parent())->localIncluded() ) { |
@@ -55,39 +53,37 @@ TZCombo::TZCombo( QWidget *p, const char* n ) | |||
55 | int n = 0, | 53 | int n = 0, |
56 | index = 0; | 54 | index = 0; |
57 | for ( QStringList::Iterator it=identifiers.begin(); | 55 | for ( QStringList::Iterator it=identifiers.begin(); |
58 | it!=identifiers.end(); ++it) { | 56 | it!=identifiers.end(); ++it) { |
59 | if ( *it == tz ) | 57 | if ( *it == tz ) |
60 | index = n; | 58 | index = n; |
61 | n++; | 59 | n++; |
62 | } | 60 | } |
63 | setCurrentItem(index); | 61 | setCurrentItem(index); |
64 | } else { | 62 | } else { |
65 | setCurrentItem(0); | 63 | setCurrentItem(0); |
66 | } | 64 | } |
67 | 65 | ||
68 | 66 | ||
69 | 67 | ||
70 | // listen on QPE/System | 68 | // listen on QPE/System |
71 | #if defined(Q_WS_QWS) | ||
72 | #if !defined(QT_NO_COP) | 69 | #if !defined(QT_NO_COP) |
73 | QCopChannel *channel = new QCopChannel( "QPE/System", this ); | 70 | QCopChannel *channel = new QCopChannel( "QPE/System", this ); |
74 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 71 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
75 | this, SLOT(handleSystemChannel(const QCString&, const QByteArray&)) ); | 72 | this, SLOT(handleSystemChannel(const QCString&, const QByteArray&)) ); |
76 | #endif | 73 | #endif |
77 | #endif | ||
78 | 74 | ||
79 | 75 | ||
80 | } | 76 | } |
81 | 77 | ||
82 | TZCombo::~TZCombo() | 78 | TZCombo::~TZCombo() |
83 | { | 79 | { |
84 | } | 80 | } |
85 | 81 | ||
86 | void TZCombo::updateZones() | 82 | void TZCombo::updateZones() |
87 | { | 83 | { |
88 | QString cur = currentText(); | 84 | QString cur = currentText(); |
89 | clear(); | 85 | clear(); |
90 | identifiers.clear(); | 86 | identifiers.clear(); |
91 | int curix=0; | 87 | int curix=0; |
92 | QString tz = getenv("TZ"); | 88 | QString tz = getenv("TZ"); |
93 | bool tzFound = FALSE; | 89 | bool tzFound = FALSE; |