void XGUI::loadDrivers() { int i = 0; QString line; comboDriver->clear(); // Now populate the combo box QFile file( PROGDIR + "/settings/drivers.txt" ); if ( file.open( QIODevice::ReadOnly ) ) { QTextStream stream( &file ); while ( !stream.atEnd() ) { line = stream.readLine(); // line of text excluding '\n' if ( isDriverAvailable(line) ) { comboDriver->addItem(line); if ( line == "vesa" ) comboDriver->setCurrentIndex(i); } i++; } file.close(); } }
int haveDriver (const char *code, const char *codes, const DriverEntry *table) { return (table && table->address)? isDriverIncluded(code, table): isDriverAvailable(code, codes); }