refs #687, use hash to avoid unnecessary operations

* for bookings
* VATSIM file (plus check if cache really changed before writing)
* METARs
This commit is contained in:
Klaus Basan
2016-06-25 02:31:28 +02:00
parent 0253da8bf9
commit 0fca9c1f18
5 changed files with 73 additions and 22 deletions

View File

@@ -94,8 +94,13 @@ namespace BlackCore
//! \threadsafe
void setInterval(int updatePeriodMs);
//! Stores new content hash and returns if content changed (based on hash value
//! \threadsafe
bool didContentChange(const QString &content, int startPosition = -1);
private:
QDateTime m_updateTimestamp; //!< when file/resource was read
uint m_contentHash = 0; //!< has of the content given
QMetaObject::Connection m_toggleConnection; //!< connection to switch interval from initial to periodic
private slots: