summaryrefslogtreecommitdiff
path: root/qutebrowser/misc
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/misc')
-rw-r--r--qutebrowser/misc/guiprocess.py2
-rw-r--r--qutebrowser/misc/ipc.py7
-rw-r--r--qutebrowser/misc/miscwidgets.py4
3 files changed, 6 insertions, 7 deletions
diff --git a/qutebrowser/misc/guiprocess.py b/qutebrowser/misc/guiprocess.py
index 9f3b272f6..ac7290ef4 100644
--- a/qutebrowser/misc/guiprocess.py
+++ b/qutebrowser/misc/guiprocess.py
@@ -394,7 +394,7 @@ class GUIProcess(QObject):
log.procs.debug("Starting process.")
self._pre_start(cmd, args)
self._proc.start(
- qtutils.allow_none(self.resolved_cmd),
+ qtutils.remove_optional(self.resolved_cmd),
args,
)
self._post_start()
diff --git a/qutebrowser/misc/ipc.py b/qutebrowser/misc/ipc.py
index 05d9a6a33..b809394f1 100644
--- a/qutebrowser/misc/ipc.py
+++ b/qutebrowser/misc/ipc.py
@@ -259,10 +259,9 @@ class IPCServer(QObject):
"still handling another one (0x{:x}).".format(
id(self._socket)))
return
- socket = self._server.nextPendingConnection()
- if not qtutils.is_not_none(socket):
- log.ipc.debug(
- "No new connection to handle.")
+ socket = qtutils.add_optional(self._server.nextPendingConnection())
+ if socket is None:
+ log.ipc.debug("No new connection to handle.")
return
log.ipc.debug("Client connected (socket 0x{:x}).".format(id(socket)))
self._socket = socket
diff --git a/qutebrowser/misc/miscwidgets.py b/qutebrowser/misc/miscwidgets.py
index f41cb9df4..1e90ac75a 100644
--- a/qutebrowser/misc/miscwidgets.py
+++ b/qutebrowser/misc/miscwidgets.py
@@ -244,10 +244,10 @@ class WrapperLayout(QLayout):
if self._widget is None:
return
assert self._container is not None
- self._widget.setParent(qtutils.allow_none(None))
+ self._widget.setParent(qtutils.QT_NONE)
self._widget.deleteLater()
self._widget = None
- self._container.setFocusProxy(qtutils.allow_none(None))
+ self._container.setFocusProxy(qtutils.QT_NONE)
class FullscreenNotification(QLabel):