summaryrefslogtreecommitdiff
path: root/qutebrowser/misc/backendproblem.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/misc/backendproblem.py')
-rw-r--r--qutebrowser/misc/backendproblem.py40
1 files changed, 29 insertions, 11 deletions
diff --git a/qutebrowser/misc/backendproblem.py b/qutebrowser/misc/backendproblem.py
index 4c0e184ac..84eb120be 100644
--- a/qutebrowser/misc/backendproblem.py
+++ b/qutebrowser/misc/backendproblem.py
@@ -25,10 +25,12 @@ import functools
import html
import enum
import shutil
+import os.path
import argparse
import dataclasses
from typing import Any, Optional, Sequence, Tuple
+from qutebrowser.qt import machinery
from qutebrowser.qt.core import Qt
from qutebrowser.qt.widgets import (QDialog, QPushButton, QHBoxLayout, QVBoxLayout, QLabel,
QMessageBox, QWidget)
@@ -97,6 +99,8 @@ def _error_text(
f"setting the <i>backend = '{other_setting}'</i> option "
f"(if you have a <i>config.py</i> file, you'll need to set "
f"this manually). {warning}</p>")
+
+ text += f"<p>{machinery.INFO.to_html()}</p>"
return text
@@ -260,9 +264,11 @@ class _BackendProblemChecker:
"<p>The errors encountered were:<ul>"
"<li><b>QtWebKit:</b> {webkit_error}"
"<li><b>QtWebEngine:</b> {webengine_error}"
- "</ul></p>".format(
+ "</ul></p><p>{info}</p>".format(
webkit_error=html.escape(imports.webkit_error),
- webengine_error=html.escape(imports.webengine_error)))
+ webengine_error=html.escape(imports.webengine_error),
+ info=machinery.INFO.to_html(),
+ ))
errbox = msgbox.msgbox(parent=None,
title="No backend library found!",
text=text,
@@ -328,28 +334,40 @@ class _BackendProblemChecker:
"""Ask if there are Chromium downgrades or a Qt 5 -> 6 upgrade."""
versions = version.qtwebengine_versions(avoid_init=True)
change = configfiles.state.chromium_version_changed
+ info = f"<br><br>{machinery.INFO.to_html()}"
+ if machinery.INFO.reason == machinery.SelectionReason.auto:
+ info += (
+ "<br><br>"
+ "You can use <tt>--qt-wrapper</tt> or set <tt>QUTE_QT_WRAPPER</tt> "
+ "in your environment to override this."
+ )
+ webengine_data_dir = os.path.join(standarddir.data(), "webengine")
+
if change == configfiles.VersionChange.major:
- # FIXME:qt6 Remove this before the release, as it typically should
- # not concern users?
+ icon = QMessageBox.Icon.Information
text = (
"Chromium/QtWebEngine upgrade detected:<br>"
f"You are <b>upgrading to QtWebEngine {versions.webengine}</b> but "
"used Qt 5 for the last qutebrowser launch.<br><br>"
"Data managed by Chromium will be upgraded. This is a <b>one-way "
"operation:</b> If you open qutebrowser with Qt 5 again later, any "
- "Chromium data will be invalid and discarded.<br><br>"
+ "Chromium data will be <b>invalid and discarded</b>.<br><br>"
"This affects page data such as cookies, but not data managed by "
- "qutebrowser, such as your configuration or <tt>:open</tt> history."
- )
+ "qutebrowser, such as your configuration or <tt>:open</tt> history.<br>"
+ f"The affected data is in <tt>{webengine_data_dir}</tt>."
+ ) + info
elif change == configfiles.VersionChange.downgrade:
+ icon = QMessageBox.Icon.Warning
text = (
"Chromium/QtWebEngine downgrade detected:<br>"
f"You are <b>downgrading to QtWebEngine {versions.webengine}</b>."
"<br><br>"
- "Data managed by Chromium will be discarded if you continue.<br><br>"
+ "Data managed by Chromium <b>will be discarded</b> if you continue."
+ "<br><br>"
"This affects page data such as cookies, but not data managed by "
- "qutebrowser, such as your configuration or <tt>:open</tt> history."
- )
+ "qutebrowser, such as your configuration or <tt>:open</tt> history.<br>"
+ f"The affected data is in <tt>{webengine_data_dir}</tt>."
+ ) + info
else:
return
@@ -357,7 +375,7 @@ class _BackendProblemChecker:
parent=None,
title="QtWebEngine version change",
text=text,
- icon=QMessageBox.Icon.Warning,
+ icon=icon,
plain_text=False,
buttons=QMessageBox.StandardButton.Ok | QMessageBox.StandardButton.Abort,
)