mirror of https://github.com/qt/qtdoc.git
MediaPlayer: Add return type annotation to validateUrl
Add return type annotation to validateUrl() function to get rid of a warning when running the MediaPlayer demo. Pick-to: 6.7 Change-Id: I2e0ac48f111e90d37d46dc8cd39adb3bcd228ca5 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
This commit is contained in:
parent
691a8b9bc3
commit
8e97daa0ca
|
@ -29,7 +29,7 @@ Popup {
|
|||
urlPopup.close()
|
||||
}
|
||||
|
||||
function validateUrl(urlText: string) {
|
||||
function validateUrl(urlText: string) : bool {
|
||||
const urlPattern = /^((http)|(https)|(rtp)|(rtsp)|(udp)):\/\//
|
||||
return urlPattern.test(urlText)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue