Improve plugin install wizard on macOS

Downloaded files get a quarantine flag on macOS, which prevents loading
them as a plugin in Qt Creator. Remove the quarantine flag when copying
the plugin.

Change-Id: I3edef3ddfbab299be750e728a9fac0536634ba1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2021-02-12 16:06:24 +01:00
parent 5168af3144
commit 27300c66fe
3 changed files with 25 additions and 4 deletions

View File

@@ -990,8 +990,10 @@ QTextStream &operator<<(QTextStream &s, const FilePath &fn)
}
#ifdef QT_GUI_LIB
FileUtils::CopyAskingForOverwrite::CopyAskingForOverwrite(QWidget *dialogParent)
FileUtils::CopyAskingForOverwrite::CopyAskingForOverwrite(
QWidget *dialogParent, const std::function<void(QFileInfo)> &postOperation)
: m_parent(dialogParent)
, m_postOperation(postOperation)
{}
bool FileUtils::CopyAskingForOverwrite::operator()(const QFileInfo &src,
@@ -1036,6 +1038,8 @@ bool FileUtils::CopyAskingForOverwrite::operator()(const QFileInfo &src,
}
return false;
}
if (m_postOperation)
m_postOperation(dest);
}
m_files.append(dest.absoluteFilePath());
return true;