forked from qt-creator/qt-creator
QmlDesigner: Fix stall at asset import icon creation
ProcessFinished signaling has changed so that sender() returns nullptr, so changed the processFinished handling to simply remove all finished processes. Change-Id: I6c1d37737cf7fd15840daa1c7d73f2620fab1102 Fixes: QDS-3004 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -184,12 +184,11 @@ void ItemLibraryAssetImporter::processFinished(int exitCode, QProcess::ExitStatu
|
|||||||
Q_UNUSED(exitCode)
|
Q_UNUSED(exitCode)
|
||||||
Q_UNUSED(exitStatus)
|
Q_UNUSED(exitStatus)
|
||||||
|
|
||||||
auto process = qobject_cast<QProcess *>(sender());
|
|
||||||
if (process) {
|
|
||||||
m_qmlPuppetProcesses.erase(
|
m_qmlPuppetProcesses.erase(
|
||||||
std::remove_if(m_qmlPuppetProcesses.begin(),
|
std::remove_if(m_qmlPuppetProcesses.begin(), m_qmlPuppetProcesses.end(), [&](const auto &entry) {
|
||||||
m_qmlPuppetProcesses.end(),
|
return !entry || entry->state() == QProcess::NotRunning;
|
||||||
[&](const auto &entry) { return entry.get() == process; }));
|
}));
|
||||||
|
|
||||||
const QString progressTitle = tr("Generating icons.");
|
const QString progressTitle = tr("Generating icons.");
|
||||||
if (m_qmlPuppetProcesses.empty()) {
|
if (m_qmlPuppetProcesses.empty()) {
|
||||||
notifyProgress(100, progressTitle);
|
notifyProgress(100, progressTitle);
|
||||||
@@ -199,7 +198,6 @@ void ItemLibraryAssetImporter::processFinished(int exitCode, QProcess::ExitStatu
|
|||||||
progressTitle);
|
progressTitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ItemLibraryAssetImporter::notifyFinished()
|
void ItemLibraryAssetImporter::notifyFinished()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user