author | mickeyl <mickeyl> | 2004-05-02 18:03:26 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-05-02 18:03:26 (UTC) |
commit | 1ddcf3566b3339bb649b07b64bd5802b735f37ba (patch) (unidiff) | |
tree | 87495c1882069521c8fd7a70174c1dcf6e8e25b4 | |
parent | 43bd7d72643e2ee3bc4d830c6927def392bc9c7f (diff) | |
download | opie-1ddcf3566b3339bb649b07b64bd5802b735f37ba.zip opie-1ddcf3566b3339bb649b07b64bd5802b735f37ba.tar.gz opie-1ddcf3566b3339bb649b07b64bd5802b735f37ba.tar.bz2 |
#define QTOPIA_INTERNAL_INITAPP must happen before #include "dropins.h" or
this won't compile
-rw-r--r-- | core/tools/quicklauncher/dropins.h | 9 | ||||
-rw-r--r-- | core/tools/quicklauncher/main.cpp | 10 |
2 files changed, 11 insertions, 8 deletions
diff --git a/core/tools/quicklauncher/dropins.h b/core/tools/quicklauncher/dropins.h index 7acace9..a9664f8 100644 --- a/core/tools/quicklauncher/dropins.h +++ b/core/tools/quicklauncher/dropins.h | |||
@@ -1,19 +1,22 @@ | |||
1 | /* OPIE */ | ||
2 | #include <opie2/owait.h> | ||
3 | using namespace Opie::Ui; | ||
1 | 4 | ||
2 | #include <qstring.h> | ||
3 | #include <qtopia/qcom.h> | 5 | #include <qtopia/qcom.h> |
4 | #include <qtopia/qlibrary.h> | 6 | #include <qtopia/qlibrary.h> |
7 | #include <qtopia/qpeapplication.h> | ||
5 | #include <qtopia/applicationinterface.h> | 8 | #include <qtopia/applicationinterface.h> |
6 | #include <qtopia/resource.h> | 9 | #include <qtopia/resource.h> |
7 | 10 | ||
8 | #include <opie2/owait.h> | 11 | /* QT */ |
9 | |||
10 | #include <qmetaobject.h> | 12 | #include <qmetaobject.h> |
11 | #include <qmap.h> | 13 | #include <qmap.h> |
14 | #include <qstring.h> | ||
12 | 15 | ||
13 | namespace QuickPrivate { | 16 | namespace QuickPrivate { |
14 | 17 | ||
15 | struct PluginLoader { | 18 | struct PluginLoader { |
16 | PluginLoader( const char* ) { | 19 | PluginLoader( const char* ) { |
17 | } | 20 | } |
18 | 21 | ||
19 | QRESULT queryInterface( const QString& app, const QUuid&, QUnknownInterface** ); | 22 | QRESULT queryInterface( const QString& app, const QUuid&, QUnknownInterface** ); |
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp index c2467fb..b1befce 100644 --- a/core/tools/quicklauncher/main.cpp +++ b/core/tools/quicklauncher/main.cpp | |||
@@ -13,28 +13,29 @@ | |||
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 | #define QTOPIA_INTERNAL_INITAPP | ||
21 | #include "dropins.h" | 22 | #include "dropins.h" |
22 | 23 | ||
23 | /* OPIE */ | 24 | /* OPIE */ |
24 | #include <opie2/odebug.h> | 25 | #include <opie2/odebug.h> |
26 | using namespace Opie::Core; | ||
25 | 27 | ||
26 | /* QT */ | 28 | /* QT */ |
27 | #include <qpainter.h> | 29 | #include <qpainter.h> |
28 | #include <qstrlist.h> | 30 | #include <qstrlist.h> |
29 | #include <qtimer.h> | 31 | #include <qtimer.h> |
30 | #include <qguardedptr.h> | 32 | #include <qguardedptr.h> |
31 | #include <qcopchannel_qws.h> | 33 | #include <qcopchannel_qws.h> |
32 | #define QTOPIA_INTERNAL_INITAPP | ||
33 | 34 | ||
34 | #ifdef private | 35 | #ifdef private |
35 | # undef private | 36 | # undef private |
36 | #endif | 37 | #endif |
37 | #define private public | 38 | #define private public |
38 | #include <qtopia/qpeapplication.h> | 39 | #include <qtopia/qpeapplication.h> |
39 | #undef private | 40 | #undef private |
40 | 41 | ||
@@ -56,17 +57,16 @@ static QGuardedPtr<QWidget> mainWindow; | |||
56 | #ifdef _OS_LINUX_ | 57 | #ifdef _OS_LINUX_ |
57 | static char **argv0 = 0; | 58 | static char **argv0 = 0; |
58 | static int argv_lth; | 59 | static int argv_lth; |
59 | extern char **environ; | 60 | extern char **environ; |
60 | #ifndef SPT_BUFSIZE | 61 | #ifndef SPT_BUFSIZE |
61 | #define SPT_BUFSIZE 2048 | 62 | #define SPT_BUFSIZE 2048 |
62 | #endif | 63 | #endif |
63 | #include <stdarg.h> | 64 | #include <stdarg.h> |
64 | using namespace Opie::Ui; | ||
65 | void setproctitle (const char *fmt,...) { | 65 | void setproctitle (const char *fmt,...) { |
66 | int i; | 66 | int i; |
67 | char buf[SPT_BUFSIZE]; | 67 | char buf[SPT_BUFSIZE]; |
68 | va_list ap; | 68 | va_list ap; |
69 | 69 | ||
70 | if (!argv0) | 70 | if (!argv0) |
71 | return; | 71 | return; |
72 | 72 | ||
@@ -128,25 +128,25 @@ private slots: | |||
128 | { | 128 | { |
129 | QStrList argList; | 129 | QStrList argList; |
130 | 130 | ||
131 | if ( msg == "execute(QStrList)" ) { | 131 | if ( msg == "execute(QStrList)" ) { |
132 | delete qlChannel; | 132 | delete qlChannel; |
133 | QDataStream stream( data, IO_ReadOnly ); | 133 | QDataStream stream( data, IO_ReadOnly ); |
134 | QStrList argList; | 134 | QStrList argList; |
135 | stream >> argList; | 135 | stream >> argList; |
136 | odebug << "QuickLauncher execute: " << argList.at(0) << "" << oendl; | 136 | odebug << "QuickLauncher execute: " << argList.at(0) << oendl; |
137 | doQuickLaunch( argList ); | 137 | doQuickLaunch( argList ); |
138 | delete this; | 138 | delete this; |
139 | } else if ( msg == "execute(QString)" ) { | 139 | } else if ( msg == "execute(QString)" ) { |
140 | delete qlChannel; | 140 | delete qlChannel; |
141 | QDataStream stream( data, IO_ReadOnly ); | 141 | QDataStream stream( data, IO_ReadOnly ); |
142 | QString arg; | 142 | QString arg; |
143 | stream >> arg; | 143 | stream >> arg; |
144 | odebug << "QuickLauncher execute: " << arg << "" << oendl; | 144 | odebug << "QuickLauncher execute: " << arg << oendl; |
145 | QStrList argList; | 145 | QStrList argList; |
146 | argList.append( arg.utf8() ); | 146 | argList.append( arg.utf8() ); |
147 | doQuickLaunch( argList ); | 147 | doQuickLaunch( argList ); |
148 | delete this; | 148 | delete this; |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
152 | private: | 152 | private: |
@@ -182,17 +182,17 @@ int main( int argc, char** argv ) | |||
182 | 182 | ||
183 | unsetenv( "LD_BIND_NOW" ); | 183 | unsetenv( "LD_BIND_NOW" ); |
184 | 184 | ||
185 | QCString arg0 = argv[0]; | 185 | QCString arg0 = argv[0]; |
186 | int sep = arg0.findRev( '/' ); | 186 | int sep = arg0.findRev( '/' ); |
187 | if ( sep > 0 ) | 187 | if ( sep > 0 ) |
188 | arg0 = arg0.mid( sep+1 ); | 188 | arg0 = arg0.mid( sep+1 ); |
189 | if ( arg0 != "quicklauncher" ) { | 189 | if ( arg0 != "quicklauncher" ) { |
190 | odebug << "QuickLauncher invoked as: " << arg0.data() << "" << oendl; | 190 | odebug << "QuickLauncher invoked as: " << arg0.data() << oendl; |
191 | QuickLauncher::exec( argc, argv ); | 191 | QuickLauncher::exec( argc, argv ); |
192 | } else { | 192 | } else { |
193 | #ifdef _OS_LINUX_ | 193 | #ifdef _OS_LINUX_ |
194 | // Setup to change proc title | 194 | // Setup to change proc title |
195 | int i; | 195 | int i; |
196 | char **envp = environ; | 196 | char **envp = environ; |
197 | /* Move the environment so we can reuse the memory. | 197 | /* Move the environment so we can reuse the memory. |
198 | * (Code borrowed from sendmail.) */ | 198 | * (Code borrowed from sendmail.) */ |