All pastes #436369 Raw Edit

Cheetah

public text v1 · immutable
·published 2007-04-12 13:47 UTC
rendered paste body
bool MainWindow::doProcessChannels(QString theLine){
	
	
	bool tmpHasMatched;
	int tmpPos;
	
	
	// Scan for channel matches
	for(int i=0; i<pChannels.size(); i++) {
		classChannel *cl = &pChannels[i];
		
		QRegExp rx(cl->channelActivator);
		tmpPos = rx.indexIn(theLine);
		qDebug() << tr("Debug pos: %1").arg(tmpPos);
		if( tmpPos != -1 ) {
			QString tmpKeyword = rx.cap(1);
			
			winChannel *tmpChannel = new winChannel(this);
			tmpChannel->configureWithKeyword(cl, tmpKeyword);
			tmpChannel->show();
			pChannelWindows.append(tmpChannel);
			qDebug() << tr("adding window ");
		}
	}

	
	return tmpHasMatched;
}