refs #605, fixed unit test itself

* threaded reader were normal members causing a crash when those were moved in their own thread
* we need own event processing for unit test
* Network request needs to be generated in main thread
* don`t shutdown readers on QCoreApplication::aboutToQuit, let CApplication handle it
* use CApplication in unit test (as in real world)

Unrelated:
* access global setup via application
This commit is contained in:
Klaus Basan
2016-02-27 22:17:07 +01:00
committed by Mathew Sutcliffe
parent 12957f8ec0
commit f124412896
10 changed files with 167 additions and 111 deletions

View File

@@ -20,9 +20,7 @@ namespace BlackMisc
CContinuousWorker(owner, name),
m_updateTimer(new QTimer(this))
{
bool c = connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &CThreadedReader::gracefulShutdown);
Q_ASSERT_X(c, Q_FUNC_INFO, "Connect failed");
Q_UNUSED(c);
// void
}
qint64 CThreadedReader::lastModifiedMsSinceEpoch(QNetworkReply *nwReply) const