summaryrefslogtreecommitdiff
path: root/core/tools/quicklauncher/main.cpp
Unidiff
Diffstat (limited to 'core/tools/quicklauncher/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/tools/quicklauncher/main.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp
index e509908..7d368ab 100644
--- a/core/tools/quicklauncher/main.cpp
+++ b/core/tools/quicklauncher/main.cpp
@@ -15,34 +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#include <qpainter.h> 21#include <qpainter.h>
22#include <qstrlist.h> 22#include <qstrlist.h>
23#include <qtimer.h> 23#include <qtimer.h>
24#include <qguardedptr.h> 24#include <qguardedptr.h>
25#include <qcopchannel_qws.h> 25#include <qcopchannel_qws.h>
26#define QTOPIA_INTERNAL_INITAPP 26#define QTOPIA_INTERNAL_INITAPP
27#include <qtopia/timezone.h>
28#include <qtopia/qpeapplication.h> 27#include <qtopia/qpeapplication.h>
29#include <qtopia/resource.h>
30#include <qtopia/pluginloader.h>
31#include <stdio.h> 28#include <stdio.h>
32#include <stdlib.h> 29#include <stdlib.h>
33#include <sys/types.h> 30#include <sys/types.h>
34#include <sys/stat.h> 31#include <sys/stat.h>
35#include <unistd.h> 32#include <unistd.h>
36 33
34#include "dropins.h"
35
37static QPEApplication *app = 0; 36static QPEApplication *app = 0;
38static PluginLoader *loader = 0; 37static PluginLoader *loader = 0;
39static ApplicationInterface *appIface = 0; 38static ApplicationInterface *appIface = 0;
40static QGuardedPtr<QWidget> mainWindow; 39static QGuardedPtr<QWidget> mainWindow;
41 40
42#ifdef _OS_LINUX_ 41#ifdef _OS_LINUX_
43static char **argv0 = 0; 42static char **argv0 = 0;
44static int argv_lth; 43static int argv_lth;
45extern char **environ; 44extern char **environ;
46#ifndef SPT_BUFSIZE 45#ifndef SPT_BUFSIZE
47#define SPT_BUFSIZE 2048 46#define SPT_BUFSIZE 2048
48#endif 47#endif
@@ -201,29 +200,36 @@ int main( int argc, char** argv )
201 qDebug( "QuickLauncher running" ); 200 qDebug( "QuickLauncher running" );
202 // Pre-load default fonts 201 // Pre-load default fonts
203 QFontMetrics fm( QApplication::font() ); 202 QFontMetrics fm( QApplication::font() );
204 fm.ascent(); // causes font load. 203 fm.ascent(); // causes font load.
205 QFont f( QApplication::font() ); 204 QFont f( QApplication::font() );
206 f.setWeight( QFont::Bold ); 205 f.setWeight( QFont::Bold );
207 QFontMetrics fmb( f ); 206 QFontMetrics fmb( f );
208 fmb.ascent(); // causes font load. 207 fmb.ascent(); // causes font load.
209 208
210 // Each of the following force internal structures/internal 209 // Each of the following force internal structures/internal
211 // initialization to be performed. This may mean allocating 210 // initialization to be performed. This may mean allocating
212 // memory that is not needed by all applications. 211 // memory that is not needed by all applications.
212#if 0
213 TimeZone::current().isValid(); // popuplate timezone cache 213 TimeZone::current().isValid(); // popuplate timezone cache
214 TimeString::currentDateFormat(); // create internal structures 214 TimeString::currentDateFormat(); // create internal structures
215 TimeString::currentAMPM(); 215 TimeString::currentAMPM();
216#endif
216 Resource::loadIconSet("new"); // do internal init 217 Resource::loadIconSet("new"); // do internal init
217 218
219 /* make sure libopie gets lined in */
220 {
221 OWait item;
222 }
223
218 // Create a widget to force initialization of title bar images, etc. 224 // Create a widget to force initialization of title bar images, etc.
219 QObject::disconnect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit())); 225 QObject::disconnect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit()));
220 QWidget *w = new QWidget(0,0,Qt::WDestructiveClose|Qt::WStyle_ContextHelp|Qt::WStyle_Tool); 226 QWidget *w = new QWidget(0,0,Qt::WDestructiveClose|Qt::WStyle_ContextHelp|Qt::WStyle_Tool);
221 w->setGeometry( -100, -100, 10, 10 ); 227 w->setGeometry( -100, -100, 10, 10 );
222 w->show(); 228 w->show();
223 QTimer::singleShot( 0, w, SLOT(close()) ); 229 QTimer::singleShot( 0, w, SLOT(close()) );
224 230
225 app->enter_loop(); 231 app->enter_loop();
226 } 232 }
227 233
228 int rv = app->exec(); 234 int rv = app->exec();
229 235