[license] Allow more things locally

- If it says file:, it's local (don't require a specific file
   extension).
 - Report actual path loaded.
This commit is contained in:
Adriaan de Groot 2019-04-24 07:04:38 -04:00
parent ca870a6d41
commit 58770037f4
2 changed files with 2 additions and 3 deletions

View File

@ -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();
}

View File

@ -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();
}