Tape* TapeManager::findTape( const QString & id ) { /* 2002-01-26 LEW */ // printf("Contents of _tapeIDs: %d entries\n", _tapes.count()); // for ( QStringList::Iterator it = _tapeIDs.begin(); it != _tapeIDs.end(); ++it ) { // printf("%s\n", (*it).latin1()); // } // printf("\n"); // QDictIterator<Tape> it( _tapes ); // printf("Contents of _tapes: %d entries\n", _tapes.count()); // for( ; it.current(); ++it ) // printf("index ?: %s (%d)\n", it.current()->getName().latin1(), // it.current()->getCTime()); // printf("\n"); /* 2002-01-26 LEW */ Tape* tape = _tapes[ id ]; if ( !tape ) { tape = new Tape( id.ascii() ); _tapes.insert( tape->getID(), tape ); } return tape; }
Tape* TapeManager::findTape( const char* id ) { Tape* tape = _tapes[ id ]; if ( !tape ) { tape = new Tape( id ); _tapes.insert( tape->getID(), tape ); } return tape; }