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
@@ -307,10 +307,12 @@ void PluginDumper::qmlPluginTypeDumpDone(int exitCode)
|
||||
return;
|
||||
const Snapshot snapshot = m_modelManager->snapshot();
|
||||
LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath);
|
||||
bool privatePlugin = libraryPath.endsWith(QLatin1String("private"));
|
||||
|
||||
if (exitCode != 0) {
|
||||
const QString errorMessages = qmlPluginDumpErrorMessage(process);
|
||||
ModelManagerInterface::writeWarning(qmldumpErrorMessage(libraryPath, errorMessages));
|
||||
if (!privatePlugin)
|
||||
ModelManagerInterface::writeWarning(qmldumpErrorMessage(libraryPath, errorMessages));
|
||||
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, qmldumpFailedMessage(libraryPath, errorMessages));
|
||||
}
|
||||
|
||||
@@ -325,7 +327,8 @@ void PluginDumper::qmlPluginTypeDumpDone(int exitCode)
|
||||
if (!error.isEmpty()) {
|
||||
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError,
|
||||
qmldumpErrorMessage(libraryPath, error));
|
||||
printParseWarnings(libraryPath, libraryInfo.pluginTypeInfoError());
|
||||
if (!privatePlugin)
|
||||
printParseWarnings(libraryPath, libraryInfo.pluginTypeInfoError());
|
||||
} else {
|
||||
libraryInfo.setMetaObjects(objectsList.values());
|
||||
libraryInfo.setModuleApis(moduleApis);
|
||||
@@ -350,16 +353,14 @@ void PluginDumper::qmlPluginTypeDumpError(QProcess::ProcessError)
|
||||
const QString libraryPath = m_runningQmldumps.take(process);
|
||||
if (libraryPath.isEmpty())
|
||||
return;
|
||||
|
||||
const QString errorMessages = qmlPluginDumpErrorMessage(process);
|
||||
ModelManagerInterface::writeWarning(qmldumpErrorMessage(libraryPath, errorMessages));
|
||||
if (!libraryPath.isEmpty()) {
|
||||
const Snapshot snapshot = m_modelManager->snapshot();
|
||||
LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath);
|
||||
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, qmldumpFailedMessage(libraryPath, errorMessages));
|
||||
libraryInfo.updateFingerprint();
|
||||
m_modelManager->updateLibraryInfo(libraryPath, libraryInfo);
|
||||
}
|
||||
const Snapshot snapshot = m_modelManager->snapshot();
|
||||
LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath);
|
||||
if (!libraryPath.endsWith(QLatin1String("private"), Qt::CaseInsensitive))
|
||||
ModelManagerInterface::writeWarning(qmldumpErrorMessage(libraryPath, errorMessages));
|
||||
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, qmldumpFailedMessage(libraryPath, errorMessages));
|
||||
libraryInfo.updateFingerprint();
|
||||
m_modelManager->updateLibraryInfo(libraryPath, libraryInfo);
|
||||
}
|
||||
|
||||
void PluginDumper::pluginChanged(const QString &pluginLibrary)
|
||||
|
||||
Reference in New Issue
Block a user