emailservices/nmailagent/src/main.cpp
changeset 20 ecc8def7944a
parent 18 578830873419
child 23 2dc6caa42ec3
equal deleted inserted replaced
18:578830873419 20:ecc8def7944a
    14 * Description:
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include <QCoreApplication>
    19 #include "nmmailagentheaders.h"
    20 #include "nmmailagent.h"
    20 #include "nmmailagent.h"
       
    21 
       
    22 #ifdef __WINSCW__
       
    23 const int NmStartupDelay = 14000; // 14s
       
    24 #else
       
    25 const int NmStartupDelay = 4000; // 4s
       
    26 #endif
       
    27 
    21 
    28 
    22 /*!
    29 /*!
    23 	int main
    30 	int main
    24 */
    31 */
    25 int main(int argc, char *argv[])
    32 int main(int argc, char *argv[])
    26 {
    33 {
    27     QCoreApplication app(argc, argv);
    34     QCoreApplication app(argc, argv);
    28     NmMailAgent agent;
    35     NmMailAgent agent;
    29     if( !agent.init() ) {
    36 
    30         // failed to start the framework
    37     // Agent will be initialised with a delay to avoid startup problems
    31         return 1;
    38     QTimer::singleShot(NmStartupDelay, &agent, SLOT(delayedStart()));
    32     }
    39 
    33     return app.exec();
    40     return app.exec();
    34 }
    41 }