diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-02-06 08:36:01 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2018-02-06 08:36:01 +0000 |
commit | fc37a3964db412d110e7513534b6178e154044c4 (patch) | |
tree | 911d1fa23aa8edc4d77a2b2655d3653b56338728 /tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | |
parent | f52737f60e505101d2364cd6f3713ea8303f30f0 (diff) | |
parent | 092842b5e00662ae9888a19326a9fe4cf140f4da (diff) |
Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp')
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp index 6961f3b6d..c443ee114 100644 --- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp +++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp @@ -200,9 +200,13 @@ public: } bool isSequential() const override { return true; } qint64 bytesAvailable() const override - { return m_bytesAvailable; } + { + QMutexLocker lock(&m_mutex); + return m_bytesAvailable; + } bool atEnd() const override { + QMutexLocker lock(&m_mutex); return (m_data.size() >= 1000 && m_bytesRead >= 1000); } protected: @@ -237,7 +241,7 @@ protected: } private: - QMutex m_mutex; + mutable QMutex m_mutex{QMutex::Recursive}; QByteArray m_data; QBasicTimer m_timer; int m_bytesRead; |