been_1990
7th May 2010, 17:23
private:
Phonon::MediaObject *mediaObject;
//ADisplay.cpp
void ADisplay::setAlarm(QString alarmSound){
QUrl alarmS = alarmSound;
mediaObject->setCurrentSource(Phonon::MediaSource(alarmS));
}
Here whe have the bug:
mediaObject->setCurrentSource(Phonon::MediaSource(alarmS));
But only when it's created the second time:
display = new ADisplay();
display->setWindowFlags(Qt::WindowStaysOnTopHint);
connect(this,SIGNAL(soundAlarm(Al*)),display,SLOT( showDisplay(Al*)));
connect(display,SIGNAL(quiting(QString)),this,SLOT (quiting(QString)));
emit soundAlarm(a);
First time the above works, second time, bug.
4598
Phonon::MediaObject *mediaObject;
//ADisplay.cpp
void ADisplay::setAlarm(QString alarmSound){
QUrl alarmS = alarmSound;
mediaObject->setCurrentSource(Phonon::MediaSource(alarmS));
}
Here whe have the bug:
mediaObject->setCurrentSource(Phonon::MediaSource(alarmS));
But only when it's created the second time:
display = new ADisplay();
display->setWindowFlags(Qt::WindowStaysOnTopHint);
connect(this,SIGNAL(soundAlarm(Al*)),display,SLOT( showDisplay(Al*)));
connect(display,SIGNAL(quiting(QString)),this,SLOT (quiting(QString)));
emit soundAlarm(a);
First time the above works, second time, bug.
4598