All pastes #2064132 Raw Edit

Miscellany

public cpp v1 · immutable
#2064132 ·published 2011-05-19 06:40 UTC
rendered paste body
//	=============================================================================ЧИТАЕМ КОНФИГ	config = new QFile("lectures.cfg");	config->open(QIODevice::ReadOnly);	if (config->isOpen())	{		QString temp,temp2;		temp=config->readLine();		dir_lectures=temp;		dir_lectures.remove(dir_lectures.length()-1,1);		temp=config->readLine();		articles_there=temp;		articles_there.remove(articles_there.length()-1,1);		int j=0;		int i=0;		num_arcticles=0;		while (temp[i]!='\n')		{			temp2="";			while (temp[i]!='|')			{				temp2[j]=temp[i];				i++;				j++;			}			i++;			if (temp2!="")			{				ui->articles->addItem(temp2);				num_arcticles++;			}			j=0;		}		config->close();	}