Skip to content

Commit ca603ce

Browse files
bjornTheAssassin
authored andcommitted
Don't try to deploy TLS plugins for Qt 6.0 or 6.1
They were added in Qt 6.2.
1 parent 6b9cea4 commit ca603ce

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/deployers/PluginsDeployerFactory.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ PluginsDeployerFactory::PluginsDeployerFactory(AppDir& appDir,
2626
bf::path qtInstallQmlPath,
2727
bf::path qtTranslationsPath,
2828
bf::path qtDataPath,
29-
int qtMajorVersion) : appDir(appDir),
29+
int qtMajorVersion,
30+
int qtMinorVersion) : appDir(appDir),
3031
qtPluginsPath(std::move(qtPluginsPath)),
3132
qtLibexecsPath(std::move(qtLibexecsPath)),
3233
qtInstallQmlPath(std::move(qtInstallQmlPath)),
3334
qtTranslationsPath(std::move(qtTranslationsPath)),
3435
qtDataPath(std::move(qtDataPath)),
35-
qtMajorVersion(qtMajorVersion) {}
36+
qtMajorVersion(qtMajorVersion),
37+
qtMinorVersion(qtMinorVersion) {}
3638

3739
std::vector<std::shared_ptr<PluginsDeployer>> PluginsDeployerFactory::getDeployers(const std::string& moduleName) {
3840
if (moduleName == "gui") {
@@ -46,7 +48,7 @@ std::vector<std::shared_ptr<PluginsDeployer>> PluginsDeployerFactory::getDeploye
4648
if (moduleName == "network") {
4749
if (qtMajorVersion < 6) {
4850
return {getInstance<BearerPluginsDeployer>(moduleName)};
49-
} else {
51+
} else if (qtMinorVersion >= 2) {
5052
return {getInstance<TlsBackendsDeployer>(moduleName)};
5153
}
5254
}

src/deployers/PluginsDeployerFactory.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ namespace linuxdeploy {
2424
const boost::filesystem::path qtTranslationsPath;
2525
const boost::filesystem::path qtDataPath;
2626
const int qtMajorVersion;
27+
const int qtMinorVersion;
2728

2829
template<typename T>
2930
std::shared_ptr<PluginsDeployer> getInstance(const std::string& moduleName) {
@@ -47,7 +48,8 @@ namespace linuxdeploy {
4748
boost::filesystem::path qtInstallQmlPath,
4849
boost::filesystem::path qtTranslationsPath,
4950
boost::filesystem::path qtDataPath,
50-
int qtMajorVersion);
51+
int qtMajorVersion,
52+
int qtMinorVersion);
5153

5254
std::vector<std::shared_ptr<PluginsDeployer>> getDeployers(const std::string& moduleName);
5355
};

src/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,13 @@ int main(const int argc, const char *const *const argv) {
100100
const bf::path qtInstallQmlPath = qmakeVars["QT_INSTALL_QML"];
101101
const std::string qtVersion = qmakeVars["QT_VERSION"];
102102

103-
if (qtVersion.empty()) {
103+
if (qtVersion.length() < 2) {
104104
ldLog() << LD_ERROR << "Failed to query QT_VERSION using qmake -query" << std::endl;
105105
return 1;
106106
}
107107

108108
int qtMajorVersion = std::stoi(qtVersion, nullptr, 10);
109+
int qtMinorVersion = std::stoi(qtVersion.substr(2), nullptr, 10);
109110
if (qtMajorVersion < 5) {
110111
ldLog() << std::endl << LD_WARNING << "Minimum Qt version supported is 5" << std::endl;
111112
qtMajorVersion = 5;
@@ -244,7 +245,8 @@ int main(const int argc, const char *const *const argv) {
244245
qtInstallQmlPath,
245246
qtTranslationsPath,
246247
qtDataPath,
247-
qtMajorVersion
248+
qtMajorVersion,
249+
qtMinorVersion
248250
);
249251

250252
for (const auto& module : qtModulesToDeploy) {

0 commit comments

Comments
 (0)