summaryrefslogtreecommitdiff
path: root/qutebrowser/browser/webengine/tabhistory.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/browser/webengine/tabhistory.py')
-rw-r--r--qutebrowser/browser/webengine/tabhistory.py21
1 files changed, 5 insertions, 16 deletions
diff --git a/qutebrowser/browser/webengine/tabhistory.py b/qutebrowser/browser/webengine/tabhistory.py
index 30f3facdb..340fab550 100644
--- a/qutebrowser/browser/webengine/tabhistory.py
+++ b/qutebrowser/browser/webengine/tabhistory.py
@@ -1,19 +1,6 @@
-# Copyright 2015-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
+# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
-# This file is part of qutebrowser.
-#
-# qutebrowser is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# qutebrowser is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
+# SPDX-License-Identifier: GPL-3.0-or-later
"""QWebHistory serializer for QtWebEngine."""
@@ -153,6 +140,8 @@ def serialize(items):
for item in items:
_serialize_item(item, stream)
- stream.device().reset()
+ dev = stream.device()
+ assert dev is not None
+ dev.reset()
qtutils.check_qdatastream(stream)
return stream, data, cur_user_data