[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:
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…
Reference in New Issue
Block a user