bool CDummyRepeaterSoundcardSet::Validate() { if (getReadDevice().IsEmpty() || getWriteDevice().IsEmpty()) { wxMessageDialog dialog(this, _("The soundcard is not set"), m_title + _(" Error"), wxICON_ERROR); dialog.ShowModal(); return false; } return true; }
bool DebconfFrontend::process() { QTextStream in(getReadDevice()); QString line = in.readLine(); if (line.isEmpty()) { return false; } QString command = line.section(QLatin1Char( ' ' ), 0, 0); QString value = line.section(QLatin1Char( ' ' ), 1); qCDebug(DEBCONF) << "DEBCONF <--- [" << command << "] " << value; const Cmd *c = commands; while (c->cmd != 0) { if (command == QLatin1String( c->cmd )) { (this->*(c->run))(value); return true; } ++ c; } return false; }