All pastes #436373 Raw Edit

Cheetah

public text v1 · immutable
·published 2007-04-12 13:49 UTC
rendered paste body
void MainWindow::doProcessBuffer()
{
	int tmpPos;
	bool tmpOK;
	QString tmpLine;
	winChannel *tmpChannel;
	
	QTextCursor tc;
	
	// Read from the buffer, line by line
	tmpPos = inbuffer.indexOf("\r\n");
	while( tmpPos != -1 ) {
		tmpLine = QString( inbuffer.left(tmpPos+2) );
		inbuffer.remove(0, tmpPos+2);
		
		tmpChannel = new winChannel(this);
		pChannelWindows.append(tmpChannel);
		
		tc = fLog->textCursor();
		tc.movePosition(QTextCursor::End);
		fLog->setTextCursor(tc);
		fLog->insertPlainText( tmpLine );
		fLog->ensureCursorVisible();
		
		// Process the channels
		tmpOK = doProcessChannels(tmpLine);
		
		tmpPos = inbuffer.indexOf("\r\n");
	}
	
	
	
	
}