summaryrefslogtreecommitdiff
path: root/qutebrowser
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2024-04-30 17:33:12 +0200
committerFlorian Bruhin <me@the-compiler.org>2024-04-30 23:31:25 +0200
commit40f6193cc735e069386a50c2e8efcbcdd1da5961 (patch)
tree2b9183c222766778d8e8002f2ba640ea52bf2332 /qutebrowser
parent5152296f7f9d3a656e5b1fac5b5af648863c6224 (diff)
downloadqutebrowser-40f6193cc735e069386a50c2e8efcbcdd1da5961.tar.gz
qutebrowser-40f6193cc735e069386a50c2e8efcbcdd1da5961.zip
Split QtWebEngine version across multiple lines
More readable now that we have more information in it. Also always show the source, now that we have the space for it, and "UA" isn't the obvious default anymore anyways.
Diffstat (limited to 'qutebrowser')
-rw-r--r--qutebrowser/utils/version.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py
index 32d5357db..30585eb0c 100644
--- a/qutebrowser/utils/version.py
+++ b/qutebrowser/utils/version.py
@@ -636,14 +636,13 @@ class WebEngineVersions:
self.chromium_major = int(self.chromium.split('.')[0])
def __str__(self) -> str:
- s = f'QtWebEngine {self.webengine}'
+ lines = [f'QtWebEngine {self.webengine}']
if self.chromium is not None:
- s += f', based on Chromium {self.chromium}'
+ lines.append(f' based on Chromium {self.chromium}')
if self.chromium_security is not None:
- s += f', with security patches up to {self.chromium_security} (plus any distribution patches)'
- if self.source != 'UA':
- s += f' (from {self.source})'
- return s
+ lines.append(f' with security patches up to {self.chromium_security} (plus any distribution patches)')
+ lines.append(f' (source: {self.source})')
+ return "\n".join(lines)
@classmethod
def from_ua(cls, ua: 'websettings.UserAgent') -> 'WebEngineVersions':