[license] Allow more things locally

- If it says file:, it's local (don't require a specific file
   extension).
 - Report actual path loaded.
main
Adriaan de Groot 6 years ago
parent ca870a6d41
commit 58770037f4

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

@ -39,7 +39,7 @@ loadLocalFile( const QUrl& u )
QFile file( u.path() );
if ( !file.open(QIODevice::ReadOnly | QIODevice::Text) )
{
cWarning() << "Could not load license file" << u;
cWarning() << "Could not load license file" << u.path();
return QString();
}

Loading…
Cancel
Save