Skip to content

Commit

Permalink
Add clearJourney to abstract class. Not used yet.
Browse files Browse the repository at this point in the history
'call during destruction bypasses Virtual dispatch'
  • Loading branch information
poetaster committed Apr 7, 2022
1 parent 7db213a commit d0a0064
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/parser/parser_abstract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));

Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/parser/parser_abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand All @@ -59,6 +59,7 @@ public slots:
virtual bool supportsTimeTableDirection();
virtual QStringList getTrainRestrictions();
void cancelRequest();
virtual void clearJourney();

signals:
void stationsResult(const StationsList &result);
Expand Down

0 comments on commit d0a0064

Please sign in to comment.