author | chicken <chicken> | 2004-03-01 18:10:37 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 18:10:37 (UTC) |
commit | 7fd20d139e2d9bc37ce22bbdb07f4ebc54903f91 (patch) (unidiff) | |
tree | 15ef5e3d00c5476ea98ca36ba6c8392eb02e53c8 /library/global.cpp | |
parent | 5b4e342004537f84fa53911a46cd00d810378da7 (diff) | |
download | opie-7fd20d139e2d9bc37ce22bbdb07f4ebc54903f91.zip opie-7fd20d139e2d9bc37ce22bbdb07f4ebc54903f91.tar.gz opie-7fd20d139e2d9bc37ce22bbdb07f4ebc54903f91.tar.bz2 |
fix includes
-rw-r--r-- | library/global.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/library/global.cpp b/library/global.cpp index a627348..5ac969b 100644 --- a/library/global.cpp +++ b/library/global.cpp | |||
@@ -1,115 +1,113 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the 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 | #define QTOPIA_INTERNAL_LANGLIST | 20 | #define QTOPIA_INTERNAL_LANGLIST |
21 | #include <qpe/qpedebug.h> | 21 | #include <qpe/qpedebug.h> |
22 | #include <qpe/global.h> | 22 | #include <qpe/global.h> |
23 | #include <qpe/qdawg.h> | 23 | #include <qpe/qdawg.h> |
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
26 | #include <qpe/storage.h> | 26 | #include <qpe/storage.h> |
27 | #include <qpe/applnk.h> | 27 | #include <qpe/applnk.h> |
28 | #include <qpe/qcopenvelope_qws.h> | 28 | #include <qpe/qcopenvelope_qws.h> |
29 | #include <qpe/config.h> | 29 | #include <qpe/config.h> |
30 | 30 | ||
31 | #include <qfile.h> | ||
32 | #include <qlabel.h> | 31 | #include <qlabel.h> |
33 | #include <qtimer.h> | 32 | #include <qtimer.h> |
34 | #include <qmap.h> | 33 | #include <qmap.h> |
35 | #include <qdict.h> | 34 | #include <qdict.h> |
36 | #include <qdir.h> | 35 | #include <qdir.h> |
37 | #include <qmessagebox.h> | 36 | #include <qmessagebox.h> |
38 | #include <qregexp.h> | 37 | #include <qregexp.h> |
39 | 38 | ||
40 | #include <stdlib.h> | 39 | #include <stdlib.h> |
41 | #include <sys/stat.h> | 40 | #include <sys/stat.h> |
42 | #include <sys/wait.h> | 41 | #include <sys/wait.h> |
43 | #include <sys/types.h> | 42 | #include <sys/types.h> |
44 | #include <fcntl.h> | 43 | #include <fcntl.h> |
45 | #include <unistd.h> | 44 | #include <unistd.h> |
46 | #include <errno.h> | 45 | #include <errno.h> |
47 | 46 | ||
48 | #include <qwindowsystem_qws.h> // for qwsServer | 47 | #include <qwindowsystem_qws.h> // for qwsServer |
49 | #include <qdatetime.h> | 48 | #include <qdatetime.h> |
50 | 49 | ||
51 | #include <qfile.h> | ||
52 | 50 | ||
53 | //#include "quickexec_p.h" | 51 | //#include "quickexec_p.h" |
54 | 52 | ||
55 | class Emitter : public QObject { | 53 | class Emitter : public QObject { |
56 | Q_OBJECT | 54 | Q_OBJECT |
57 | public: | 55 | public: |
58 | Emitter( QWidget* receiver, const QString& document ) | 56 | Emitter( QWidget* receiver, const QString& document ) |
59 | { | 57 | { |
60 | connect(this, SIGNAL(setDocument(const QString&)), | 58 | connect(this, SIGNAL(setDocument(const QString&)), |
61 | receiver, SLOT(setDocument(const QString&))); | 59 | receiver, SLOT(setDocument(const QString&))); |
62 | emit setDocument(document); | 60 | emit setDocument(document); |
63 | disconnect(this, SIGNAL(setDocument(const QString&)), | 61 | disconnect(this, SIGNAL(setDocument(const QString&)), |
64 | receiver, SLOT(setDocument(const QString&))); | 62 | receiver, SLOT(setDocument(const QString&))); |
65 | } | 63 | } |
66 | 64 | ||
67 | signals: | 65 | signals: |
68 | void setDocument(const QString&); | 66 | void setDocument(const QString&); |
69 | }; | 67 | }; |
70 | 68 | ||
71 | 69 | ||
72 | class StartingAppList : public QObject { | 70 | class StartingAppList : public QObject { |
73 | Q_OBJECT | 71 | Q_OBJECT |
74 | public: | 72 | public: |
75 | static void add( const QString& name ); | 73 | static void add( const QString& name ); |
76 | static bool isStarting( const QString name ); | 74 | static bool isStarting( const QString name ); |
77 | private slots: | 75 | private slots: |
78 | void handleNewChannel( const QString &); | 76 | void handleNewChannel( const QString &); |
79 | private: | 77 | private: |
80 | StartingAppList( QObject *parent=0, const char* name=0 ) ; | 78 | StartingAppList( QObject *parent=0, const char* name=0 ) ; |
81 | 79 | ||
82 | QDict<QTime> dict; | 80 | QDict<QTime> dict; |
83 | static StartingAppList *appl; | 81 | static StartingAppList *appl; |
84 | }; | 82 | }; |
85 | 83 | ||
86 | StartingAppList* StartingAppList::appl = 0; | 84 | StartingAppList* StartingAppList::appl = 0; |
87 | 85 | ||
88 | StartingAppList::StartingAppList( QObject *parent, const char* name ) | 86 | StartingAppList::StartingAppList( QObject *parent, const char* name ) |
89 | :QObject( parent, name ) | 87 | :QObject( parent, name ) |
90 | { | 88 | { |
91 | #if QT_VERSION >= 232 && defined(QWS) | 89 | #if QT_VERSION >= 232 && defined(QWS) |
92 | connect( qwsServer, SIGNAL( newChannel(const QString&)), | 90 | connect( qwsServer, SIGNAL( newChannel(const QString&)), |
93 | this, SLOT( handleNewChannel(const QString&)) ); | 91 | this, SLOT( handleNewChannel(const QString&)) ); |
94 | #endif | 92 | #endif |
95 | dict.setAutoDelete( TRUE ); | 93 | dict.setAutoDelete( TRUE ); |
96 | } | 94 | } |
97 | 95 | ||
98 | void StartingAppList::add( const QString& name ) | 96 | void StartingAppList::add( const QString& name ) |
99 | { | 97 | { |
100 | #if QT_VERSION >= 232 && !defined(QT_NO_COP) | 98 | #if QT_VERSION >= 232 && !defined(QT_NO_COP) |
101 | if ( !appl ) | 99 | if ( !appl ) |
102 | appl = new StartingAppList; | 100 | appl = new StartingAppList; |
103 | QTime *t = new QTime; | 101 | QTime *t = new QTime; |
104 | t->start(); | 102 | t->start(); |
105 | appl->dict.insert( "QPE/Application/" + name, t ); | 103 | appl->dict.insert( "QPE/Application/" + name, t ); |
106 | #endif | 104 | #endif |
107 | } | 105 | } |
108 | 106 | ||
109 | bool StartingAppList::isStarting( const QString name ) | 107 | bool StartingAppList::isStarting( const QString name ) |
110 | { | 108 | { |
111 | #if QT_VERSION >= 232 && !defined(QT_NO_COP) | 109 | #if QT_VERSION >= 232 && !defined(QT_NO_COP) |
112 | if ( appl ) { | 110 | if ( appl ) { |
113 | QTime *t = appl->dict.find( "QPE/Application/" + name ); | 111 | QTime *t = appl->dict.find( "QPE/Application/" + name ); |
114 | if ( !t ) | 112 | if ( !t ) |
115 | return FALSE; | 113 | return FALSE; |