Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up the workaround mentioned in #300 #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions tools/linuxdeployqt/shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1504,14 +1504,13 @@ void deployQmlImport(const QString &appDirPath, const QSet<QString> &rpaths, con

// Skip already deployed imports. This can happen in cases like "QtQuick.Controls.Styles",
// where deploying QtQuick.Controls will also deploy the "Styles" sub-import.
// NOTE: this stops the deployment of certain imports if there is a folder in them, for example
// - if QtQuick.Controls.Styles is already there QtQuick.Controls is skipped
// - if QtQuick.Extras.Private is there QtQuick.Extras is skipped
// Because it's possible that there is already a directory in the destination path,
// we need to check if it has any files in it, simply checking if it exists is not enough.
// Some examples: QtQuick.Controls.Styles deployed before QtQuick.Controls
// QtQuick.Extras.Private deployed before there QtQuick.Extras
QDir destDir(importDestinationPath);
if (destDir.exists()) {
destDir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
if(destDir.entryInfoList().length() > 0)
return;
if (destDir.exists() && destDir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot).length() > 0) {
return;
}

recursiveCopyAndDeploy(appDirPath, rpaths, importSourcePath, importDestinationPath);
Expand Down