| Home · All Classes · Annotated · Functions |
This document describes the Qtopia Startup Sequence from when the qpe binary is loaded to when the user is able to interact with the device. Each stage of the startup sequence is described and a rough estimate is given for the time used by each of these stages.
The following table lists the startup stages in order. For each stage, the table notes the file and function where that stage is performed and the estimated percentage of the total startup time used by that stage.
| Number | Description | Function | Called From | Phone % | Notes |
|---|---|---|---|---|---|
| 1 | Static data initialization before main() | - | - | 38.16% | This code is distributed through the Qtopia server. |
| 2 | Initialize Environment | initEnvironment() in src/server/main.cpp | initApplication() in src/server/main.cpp | 0.93% | This step initializes essential environment variables such as TZ and LANG and determines the rotation and QWS display (specified as command line arguments and/or environment variables) that is used by Qtopia. |
| 3 | Cleanup QCop directory | cleanup() in src/server/main.cpp | initApplication() in src/server/main.cpp | 0.37% | This step deletes all QCop files in the Qtopia data directory. |
| 4 | Desktop background setup | QWSServer::setDesktopBackground() in qtopiacore/qt/src/gui/embedded/qwindowsystem_qws.cpp | initApplication() in src/server/main.cpp | - | This step is currently disabled, awaiting porting to Qt4 |
| 5 | Construct ServerApplication object | ServerApplication::ServerApplication() in src/server/serverapp.cpp | initApplication() in src/server/main.cpp | 17.62% | ServerApplication is the server's QtopiaApplication object. |
| 6 | Refresh time zone information | refreshTimeZoneConfig() in src/server/main.cpp | initApplication() in src/server/main.cpp | 0.15% | Qtopia maintains a list of default time zones. These time zones are considered to be the most frequently used zones in Qtopia. If the list of default time zones is empty it will be initialized with six standard time zones (New York, Los Angeles, Oslo, Tokyo, Hong Kong and Brisbane). |
| 7 | Keyboard initialization | initKeyboard() in src/server/main.cpp | initApplication() in src/server/main.cpp | 0.05% | This stage sets up the keyboard layout used by Qtopia Core |
| 8 | Load and display splash screen | SplashScreen::splash() in src/server/main.cpp | initApplication() in src/server/main.cpp | 1.47% | For the Phone Edition, Qtopia presents a (possibly animated) splash screen. This step loads and starts the splash screen. |
| 9 | Check first use | firstUse() in src/server/main.cpp | initApplication() in src/server/main.cpp | - | The first time Qtopia is started, it runs a First Use Wizard to ask the user for environment settings such as time zone and language. This step checks whether it is necessary to run the First Use Wizard. |
| 10 | Construct Server object | Server::Server() in src/server/server.cpp | initApplication() in src/server/main.cpp | 40.59% | The Server object is the main widget of the QPE server application. |
| 10.1 | Server base class and member initialization | - | Server::Server() in src/server/server.cpp | 0.02% | This step initializes the Server object's base class and member variables. |
| 10.2 | Start ScreenSaverMonitor | ScreenSaverMonitor::ScreenSaverMonitor() in src/libraries/qtopia/screensaver.cpp | Server::Server() in src/server/server.cpp | 0.01% | The ScreenSaverMonitor tracks temporary screen saver alterations across Qtopia applications, such as temporarily disabling back light dimming while playing a video. |
| 10.3 | Server GUI creation (phone) | PhoneImpl::createGUI() in src/server/phone/phoneimpl.cpp | Server::Server() in src/server/server.cpp | 33.17% | This step creates the GUI elements of the Server's user interface. |
| 10.4 | Document Manager startup | DocumentList::DocumentList() in src/server/documentlist.cpp | Server::Server() in src/server/server.cpp | 0.05% | This step starts the service that manages the documents stored on the device and presented to the user in the Documents menu. The Document Manager handles updating the Document menu when documents are created or removed and when removable media containing documents are inserted or removed. |
| 10.5 | AppLauncher startup | AppLauncher::AppLauncher() in src/server/applauncher.cpp | Server::Server() in src/server/server.cpp | 7.06% | The Applauncher class connects the Qtopia user interface and applications. It handles application startup and utilizes Quicklauncher |
| 10.6 | SecurityMonitor startup | SecurityMonitor::SecurityMonitor() in src/libraries/qtopiasecurity/monitor.cpp and IdMangler::IdMangler() in src/server/qsxemangle.cpp | Server::Server() in src/server/server.cpp | - | The SecurityMonitor runs as a background thread and manages the Qtopia Safe Execution Environment. |
| 10.7 | StorageMetaInfo startup | QStorageMetaInfo::QStorageMetaInfo() in src/libraries/qtopia/qstorage.cpp | Server::Server() in src/server/server.cpp | 0.11% | The server uses a QStorageMetaInfo object to track filesystem mounting activity. |
| 10.8 | QCop channel creation | - | Server::Server() in src/server/server.cpp | 0.03% | This step creates the various QCopChannel objects that manage communication between parts of the Qtopia system. |
| 10.9 | Transfer Server startup | Server::startTransferServer() in src/server/server.cpp | Server::Server() in src/server/server.cpp | <0.01% | The TransferServer is responsible for file transfer with Qtopia Desktop and uses the FTP protocol. |
| 10.10 | Infra-red Server startup | IrServer::IrServer() in src/server/irserver.cpp | Server::Server() in src/server/server.cpp | 0.02% | The IrServer is loaded via a plug-in. It uses the Object Exchange Protocol (OBEX). The QObex plug-in is used by Qtopia for infra-red communication and links with OpenOBEX. |
| 10.11 | Package Handler startup | iPackageHandler::PackageHandler() in src/server/packageslave.cpp | Server::Server() in src/server/server.cpp | 0.02% | The PackageHandler allows the (de-)installation of Qtopia packages. It relies on ipkg to do this task. |
| 10.12 | Pre-load Applications | preloadApps() in src/server/server.cpp | Server::Server() in src/server/server.cpp | 0.07% | This step pre-loads any applications that are listed in the PreloadApps section of the Launcher settings file. |
| 11 | ServerApplication login | ServerApplication::login() in src/server/serverapp.cpp | initApplication() in src/server/main.cpp | 0.19% | This stage performs any necessary user authentication before allowing further user input. For example, the Phone Edition will check whether the SIM card has a PIN number programmed, and if so requires the user to enter the PIN number to unlock the keypad. |
| 12 | Start SysFileMonitor | SysFileMonitor::SysFileMonitor() in src/server/stabmon.cpp | initApplication() in src/server/main.cpp | <0.01% | The SysFileMonitor polls /etc/mtab and various other status files in order to track new Storage Cards added to the system. If the HotPlug system is Qtopia-aware this monitor is not necessary. The Qtopia StorageInfo class propagates these changes throughout Qtopia. |
| 13 | QtopiaNetwork::createServer | QtopiaNetwork::createServer() in src/libraries/qtopia/qtopianetwork.cpp | initApplication() in src/server/main.cpp | 0.39% | This step creates a server object to manage the device's network interfaces. |
| 14 | Display the server (phone) | SplashScreen::setReplacement() in src/server/main.cpp | initApplication() in src/server/main.cpp | 0.02% | This step displays the main window of the server application on the device screen, replacing the previously displayed splash screen (if any). |
| 15 | AlarmServer startup | Qtopia_initAlarmServer() in src/libraries/qtopia/qalarmserver.cpp | initApplication() in src/server/main.cpp | 0.06% | This step starts the AlarmServer, which handles the raising of alarms that have been set via the Calendar application. |
To provide a responsive user interface as quickly as possible, some startup processing is postponed until after the Qtopia Server has entered its event loop. The delayed processing is setup by using a single-shot QTimer to call a slot once the event loop has started. The following table lists the delayed processing items and notes the place in the source code where the QTimer that triggers each item is created.
| Number | Description | Function | Triggered at | Notes |
|---|---|---|---|---|
| 1 | Load application links | DocumentList::startInitialScan() in src/server/documentlist.cpp | DocumentList::DocumentList() in src/server/documentlist.cpp | This step finds all applications, loads their icons and adds each application (if all requirements are met) to the launcher view. |
| 2 | Load document links | DocumentList::startInitialScan() in src/server/documentlist.cpp | DocumentList::DocumentList() in src/server/documentlist.cpp | This step searches for all documents on the device and adds them to the document list in the launcher view. |
| 3 | Create QuickLauncher | AppLauncher::createQuickLauncher() in src/server/applauncher.cpp | AppLauncher::AppLauncher() in src/server/applauncher.cpp | If the quicklauncher binary exists, this step starts it as a separate process. |
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |