[license] Simplify isLocal() by using Qt method

This commit is contained in:
Adriaan de Groot 2019-04-23 08:16:54 -04:00
parent ddf541774b
commit 92a3666dce

View File

@ -81,7 +81,7 @@ LicenseEntry::LicenseEntry(const QVariantMap& conf)
bool bool
LicenseEntry::isLocal() const LicenseEntry::isLocal() const
{ {
return ( m_url.scheme() == "file" ) && return m_url.isLocalFile() &&
( []( const QString&& r ){ return r.endsWith( ".html" ) || r.endsWith( ".txt" ); }( m_url.toString() ) ); ( []( const QString&& r ){ return r.endsWith( ".html" ) || r.endsWith( ".txt" ); }( m_url.toString() ) );
} }