diff --git a/src/parser/parser_abstract.cpp b/src/parser/parser_abstract.cpp index 33d07d7..a1fa468 100644 --- a/src/parser/parser_abstract.cpp +++ b/src/parser/parser_abstract.cpp @@ -56,7 +56,7 @@ ParserAbstract::ParserAbstract(QObject *parent) : currentRequestState = FahrplanNS::noneRequest; - requestTimeout = new QTimer(); + requestTimeout = new QTimer(this); connect(requestTimeout, SIGNAL(timeout()), this, SLOT(networkReplyTimedOut())); @@ -67,10 +67,15 @@ ParserAbstract::ParserAbstract(QObject *parent) : ParserAbstract::~ParserAbstract() { + //clearJourney(); delete requestTimeout; delete NetworkManager; } +void ParserAbstract::clearJourney() +{ + +} void ParserAbstract::networkReplyFinished(QNetworkReply *networkReply) { FahrplanNS::curReqStates internalRequestState = currentRequestState; diff --git a/src/parser/parser_abstract.h b/src/parser/parser_abstract.h index c31823e..43086a5 100644 --- a/src/parser/parser_abstract.h +++ b/src/parser/parser_abstract.h @@ -38,7 +38,7 @@ class ParserAbstract : public QObject enum Mode { Departure = 0, Arrival = 1 }; explicit ParserAbstract(QObject *parent = 0); - ~ParserAbstract(); + virtual ~ParserAbstract(); static QString getName() { return "Abstract"; } virtual QString name() { return getName(); } @@ -59,6 +59,7 @@ public slots: virtual bool supportsTimeTableDirection(); virtual QStringList getTrainRestrictions(); void cancelRequest(); + virtual void clearJourney(); signals: void stationsResult(const StationsList &result);