Changeset 2104023 for src/alarm


Ignore:
Timestamp:
02/02/10 14:58:53 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
ca90cb1
Parents:
ba631ca
Message:

corrected 'exec' path when adding an alarm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/alarm/alarm.cpp

    rba631ca r2104023  
    66#include <QDir>
    77#include <QFileInfo>
     8
     9#include <QDebug>
    810
    911//#include <dbus-1.0/dbus/dbus-protocol.h>
     
    2325
    2426    /* Use absolute time triggering */
     27    //eve->alarm_time = time(0) + 5; // for testing (5 seconds from now)
    2528    eve->alarm_time = aDateTime.toTime_t();
    2629    eve->flags = ALARM_EVENT_BOOT;
     
    3033    alarm_action_set_label(act, "FOSDEM'10");
    3134
    32     QFileInfo fi(*qApp->argv());
    33     QString name(fi.fileName());
    34 
    35     QString command = QDir::currentPath() + "/" + name + QString(" %1").arg(QString::number(aEventId));
    36     //QString command =  *qApp->argv() + QString(" %1").arg(QString::number(aEventId));
     35    QString command = QFileInfo(*qApp->argv()).absoluteFilePath() + QString(" %1").arg(QString::number(aEventId));
     36    qDebug() << "Setting alarm: " << command;
    3737    alarm_action_set_exec_command(act, command.toLocal8Bit().data());
    3838    act->flags |= ALARM_ACTION_TYPE_EXEC;
Note: See TracChangeset for help on using the changeset viewer.