Ref T32, utility functions for URL/URL list

* keep error messages of failed URLs
* append query
This commit is contained in:
Klaus Basan
2017-04-21 03:11:00 +02:00
parent cbe3122c40
commit 88ef2ee019
4 changed files with 26 additions and 12 deletions

View File

@@ -102,13 +102,17 @@ namespace BlackMisc
//! Next working URL, test if it can be connected
CUrl obtainNextWorkingUrl( bool random = false, const CUrl &failedUrl = CUrl());
//! Get the error messages
const QStringList &getErrorMessages() const { return m_errorMsgs; }
//! Reset failed URL, allows to set an optional new number of max.trials
void reset(int maxTrials = -1);
private:
int m_currentIndexDistributedLoad = -1; //!< index for random access
int m_maxTrials = 2; //!< number of max trials
CUrlList m_failedUrls;
int m_maxTrials = 2; //!< number of max trials
CUrlList m_failedUrls; //!< failed tested URLs
QStringList m_errorMsgs; //!< error messages while testing;
};
} //namespace