diff options
author | Kirill Burtsev <kirill.burtsev@qt.io> | 2019-03-18 10:54:46 +0100 |
---|---|---|
committer | Kirill Burtsev <kirill.burtsev@qt.io> | 2019-03-18 10:53:38 +0000 |
commit | 5abd561be65fd560aafe1d20a40f426c62221592 (patch) | |
tree | 539c63e194a75be06c29abf1f97725c358a45e41 | |
parent | 31fe2e8c1eda4a805882df79bb8cb33f06f1c799 (diff) | |
download | qtwebengine-5abd561be65fd560aafe1d20a40f426c62221592.tar.gz |
Fix crash on query of next persistent notification id
Using SetInteger prevents release check: 'Trying to set pref
persistent_notifications.next_id of type integer to value of type
string'. This also mimics chromium notification service code.
Change-Id: Iaa991b06846a7a7a692a08ea8d01813da00ad30a
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r-- | src/core/platform_notification_service_qt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/platform_notification_service_qt.cpp b/src/core/platform_notification_service_qt.cpp index dff3aed61..f3457c7aa 100644 --- a/src/core/platform_notification_service_qt.cpp +++ b/src/core/platform_notification_service_qt.cpp @@ -201,7 +201,7 @@ int64_t PlatformNotificationServiceQt::ReadNextPersistentNotificationId(content: Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); auto prefs = static_cast<ProfileQt *>(browser_context)->GetPrefs(); int64_t nextId = prefs->GetInteger(prefs::kNotificationNextPersistentId) + 1; - prefs->SetInt64(prefs::kNotificationNextPersistentId, nextId); + prefs->SetInteger(prefs::kNotificationNextPersistentId, nextId); return nextId; } |