summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2019-03-18 10:54:46 +0100
committerKirill Burtsev <kirill.burtsev@qt.io>2019-03-18 10:53:38 +0000
commit5abd561be65fd560aafe1d20a40f426c62221592 (patch)
tree539c63e194a75be06c29abf1f97725c358a45e41
parent31fe2e8c1eda4a805882df79bb8cb33f06f1c799 (diff)
downloadqtwebengine-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.cpp2
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;
}