Changeset 8bd618c for src/app/main.cpp


Ignore:
Timestamp:
10/17/12 20:49:16 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
908b4ce
Parents:
95257a6
Message:

We added the conferenceId to some alarm related methods (ticket #41).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/app/main.cpp

    r95257a6 r8bd618c  
    4545    QCoreApplication::setApplicationName("ConfClerk");
    4646    QCoreApplication::setApplicationVersion(VERSION);
    47  
    48     QWidget *window;
    49     window = new MainWindow;
    5047
     48    QWidget* window = new MainWindow;
    5149
    5250#ifdef MAEMO
     
    6058        if( connection.registerService("at.priv.toastfreeware.confclerk") == false)
    6159        {
    62                 if(argc>1)
     60            if(argc==3)
    6361                {
    6462                        QDBusInterface *interface = new QDBusInterface("at.priv.toastfreeware.confclerk",
     
    6664                                                                       "at.priv.toastfreeware.confclerk.AlarmInterface",
    6765                                                                       connection);
    68                         interface->call("Alarm",atoi(argv[1]));
     66                interface->call("Alarm",atoi(argv[2]));
    6967                        return 0;
    7068                }
    7169        }
    7270    }
     71#endif
    7372
    74     if(argc > 1)
    75     {
    76         EventDialog dialog(atoi(argv[1]), window);
     73    // If we were started with the parameters confernceid and eventid, show the corresponding event (alarm)
     74    if (argc == 3) {
     75        QString conferenceIdStr = argv[1];
     76        QString eventIdStr = argv[2];
     77        EventDialog dialog(conferenceIdStr.toInt(), eventIdStr.toInt(), window);
    7778        dialog.exec();
    7879    }
    79 #endif
    80 
    8180    window->show();
    8281
Note: See TracChangeset for help on using the changeset viewer.