From 73951fe69cd15c0af8a1d8887b90b2bf9e868075 Mon Sep 17 00:00:00 2001 From: liranbg Date: Sat, 18 Oct 2014 19:06:46 +0300 Subject: [PATCH] fixed graph view bug --- src/jceData/Grades/gradePage.cpp | 2 +- src/jceData/Grades/graph/gradegraph.cpp | 2 +- src/jceData/page.cpp | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/jceData/Grades/gradePage.cpp b/src/jceData/Grades/gradePage.cpp index f5703b7..130b2a3 100644 --- a/src/jceData/Grades/gradePage.cpp +++ b/src/jceData/Grades/gradePage.cpp @@ -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) diff --git a/src/jceData/Grades/graph/gradegraph.cpp b/src/jceData/Grades/graph/gradegraph.cpp index 327bc30..69f16a7 100644 --- a/src/jceData/Grades/graph/gradegraph.cpp +++ b/src/jceData/Grades/graph/gradegraph.cpp @@ -24,7 +24,7 @@ void gradegraph::showGraph(GradePage *gpPTR) tableWidget->replot(); - this->show(); + this->exec(); } gradegraph::~gradegraph() diff --git a/src/jceData/page.cpp b/src/jceData/page.cpp index 8e6a2a8..9eed9b9 100644 --- a/src/jceData/page.cpp +++ b/src/jceData/page.cpp @@ -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("",index+4)-index); QString temp; - QString date; - QStringList holder = dateline.split("<> :"); + QString date = ""; + dateline.remove(":"); + QStringList holder = dateline.split(" "); 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; }