Simplify if-statement
This commit is contained in:
parent
165504c1f2
commit
89c7b0e7f8
@ -490,11 +490,8 @@ class HintManager(QObject):
|
|||||||
url: The URL to open as a QUrl.
|
url: The URL to open as a QUrl.
|
||||||
context: The HintContext to use.
|
context: The HintContext to use.
|
||||||
"""
|
"""
|
||||||
if (context.target == Target.yank_primary and
|
sel = (context.target == Target.yank_primary and
|
||||||
utils.supports_selection()):
|
utils.supports_selection())
|
||||||
sel = True
|
|
||||||
else:
|
|
||||||
sel = False
|
|
||||||
|
|
||||||
urlstr = url.toString(QUrl.FullyEncoded | QUrl.RemovePassword)
|
urlstr = url.toString(QUrl.FullyEncoded | QUrl.RemovePassword)
|
||||||
utils.set_clipboard(urlstr, selection=sel)
|
utils.set_clipboard(urlstr, selection=sel)
|
||||||
|
Loading…
Reference in New Issue
Block a user