forked from qt-creator/qt-creator
qmljs:reduce warnings for private plugins
Private plugin are considered those whose name ends with "private". Avoid being misleading, i.e. do not declare the plugin dump as successful. Change-Id: Id181d3a09dc9c4895f6566e22ad670435bd5a7f8 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
This commit is contained in:
committed by
Fawzi Mohamed
parent
27d5e309a9
commit
fbaa9d8389
@@ -487,8 +487,10 @@ bool LinkPrivate::importLibrary(Document::Ptr doc,
|
||||
} else if (libraryInfo.pluginTypeInfoStatus() == LibraryInfo::DumpError
|
||||
|| libraryInfo.pluginTypeInfoStatus() == LibraryInfo::TypeInfoFileError) {
|
||||
// Only underline import if package isn't described in .qmltypes anyway
|
||||
// and is not a private package
|
||||
QString packageName = importInfo.name();
|
||||
if (errorLoc.isValid() && (packageName.isEmpty() || !valueOwner->cppQmlTypes().hasModule(packageName))) {
|
||||
if (errorLoc.isValid() && (packageName.isEmpty() || !valueOwner->cppQmlTypes().hasModule(packageName))
|
||||
&& !packageName.endsWith(QLatin1String("private"), Qt::CaseInsensitive)) {
|
||||
error(doc, errorLoc, libraryInfo.pluginTypeInfoError());
|
||||
import->valid = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user