conftypes: Check URL for SearchEngineUrl.
This commit is contained in:
parent
a81bd44850
commit
bc009ef462
@ -1025,10 +1025,12 @@ class SearchEngineUrl(BaseType):
|
|||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
raise ValidationError(value, "may not be empty!")
|
raise ValidationError(value, "may not be empty!")
|
||||||
if '{}' in value:
|
if '{}' not in value:
|
||||||
pass
|
|
||||||
else:
|
|
||||||
raise ValidationError(value, "must contain \"{}\"")
|
raise ValidationError(value, "must contain \"{}\"")
|
||||||
|
url = QUrl(value.replace('{}', 'foobar'))
|
||||||
|
if not url.isValid():
|
||||||
|
raise ValidationError(value, "invalid url, {}".format(
|
||||||
|
url.errorString()))
|
||||||
|
|
||||||
|
|
||||||
class KeyBindingName(BaseType):
|
class KeyBindingName(BaseType):
|
||||||
|
Loading…
Reference in New Issue
Block a user