forked from qt-creator/qt-creator
Utils: Fix FileUtils::copyRecursively with user interaction
CopyAskingForOverwrite got passed around as value, thus it got copied. The messagebox results were stored into the fields of such copies, and therefore had not the expected values across the recursion. This change wraps the copy helper function into a lambda and the lambda is passed around instead of the object. It may still be a bit much decoupling architecture for a single use-case, but it works now (for me). Fixes: QTCREATORBUG-31174 Change-Id: I5444d18d7bf4ef59ab879e31e5233eadf1c935e4 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -281,17 +281,17 @@ void CreateAndroidManifestWizard::createAndroidTemplateFiles()
|
||||
FileUtils::copyRecursively(version->prefix() / "src/android/java/AndroidManifest.xml",
|
||||
m_directory / "AndroidManifest.xml",
|
||||
nullptr,
|
||||
copy);
|
||||
copy());
|
||||
} else {
|
||||
FileUtils::copyRecursively(version->prefix() / "src/android/templates",
|
||||
m_directory,
|
||||
nullptr,
|
||||
copy);
|
||||
copy());
|
||||
|
||||
if (m_copyGradle) {
|
||||
FilePath gradlePath = version->prefix() / "src/3rdparty/gradle";
|
||||
QTC_ASSERT(gradlePath.exists(), return);
|
||||
FileUtils::copyRecursively(gradlePath, m_directory, nullptr, copy);
|
||||
FileUtils::copyRecursively(gradlePath, m_directory, nullptr, copy());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user