fixed graph view bug

This commit is contained in:
liranbg 2014-10-18 19:06:46 +03:00
parent 1bfac4322e
commit 73951fe69c
3 changed files with 7 additions and 6 deletions

View file

@ -54,7 +54,7 @@ void GradePage::coursesListInit(QString &linesTokinzedString)
for (iterator = holder.begin(); iterator != holder.end(); ++iterator)
{
tempToken = (*iterator);
if ((!tempToken.isEmpty()) && (tempToken.length() > 1))
if ((!tempToken.isEmpty()) && (tempToken.length() > 10))
{
gradeCourse *cTemp = lineToCourse(tempToken);
if (cTemp != NULL)

View file

@ -24,7 +24,7 @@ void gradegraph::showGraph(GradePage *gpPTR)
tableWidget->replot();
this->show();
this->exec();
}
gradegraph::~gradegraph()

View file

@ -115,18 +115,19 @@ int Page::stitchText(QString &from, QString &to, int index)
QString bTag = from.mid(index, 3);
QString dateline = from.mid(index,from.indexOf("</b>",index+4)-index);
QString temp;
QString date;
QStringList holder = dateline.split("<>&nbsp;:");
QString date = "";
dateline.remove(":");
QStringList holder = dateline.split("&nbsp;");
QStringList::iterator iterator;
int i = 0;
for (iterator = holder.begin(); iterator != holder.end(); ++iterator)
{
temp = (*iterator);
if (i == 0)
if (i == 1) //year
{
date += temp + "\t";
}
else if (i == 3)
else if (i == 4) //semester
{
date += temp;
}