Solid::OpticalDrive::OpticalDrive(QObject *backendObject) : StorageDrive(*new OpticalDrivePrivate(), backendObject) { connect(backendObject, SIGNAL(ejectPressed(QString)), this, SIGNAL(ejectPressed(QString))); connect(backendObject, SIGNAL(ejectDone(Solid::ErrorType,QVariant,QString)), this, SIGNAL(ejectDone(Solid::ErrorType,QVariant,QString))); connect(backendObject, SIGNAL(ejectRequested(QString)), this, SIGNAL(ejectRequested(QString))); }
void EjectDialog::switchDisc() { hide(); bool result; emit ejectRequested(result); if (!result) { QMessageBox::warning(this, tr("Error"), tr("Failed to switch disc. Maybe device is busy?")); } show(); }