diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-09-25 15:39:12 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-10-08 10:31:08 +0000 |
commit | a45f6fc3e1016a223a4b235cc61b033f8665c853 (patch) | |
tree | 66ee5d1d819493a8875a6638b11bdf8e44f11f86 /src/core/user_script.cpp | |
parent | f681793c6895d390fe7a5f57718e25a4fcd10ed0 (diff) |
Keep order of scripts added to QWebEngineScriptCollection
Use a QList instead of a QSet to store the scripts in the collection.
This avoids situations where two scripts injected depend on each other,
and fail or succeed depending on the semi-random order that QSet imposes.
Change-Id: I44d5d89866ff2431544cc91afb1c102d93daa5da
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/user_script.cpp')
-rw-r--r-- | src/core/user_script.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/core/user_script.cpp b/src/core/user_script.cpp index fb293c56a..179febc48 100644 --- a/src/core/user_script.cpp +++ b/src/core/user_script.cpp @@ -168,14 +168,3 @@ UserScriptData &UserScript::data() const } } // namespace QtWebEngineCore - -QT_BEGIN_NAMESPACE -uint qHash(const QtWebEngineCore::UserScript &script, uint seed) -{ - if (script.isNull()) - return 0; - return qHash(script.sourceCode(), seed) ^ qHash(script.name(), seed) - ^ (script.injectionPoint() | (script.runsOnSubFrames() << 4)) - ^ script.worldId(); -} -QT_END_NAMESPACE |