diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-05-06 14:05:13 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-08-13 09:03:53 +0000 |
commit | 85e64f95c8637f876ba84dcbd01e375050e76d8c (patch) | |
tree | 3c596a7bf8524bf2d2b104af9b4fbc48a956a508 /src/macdeployqt/shared/shared.cpp | |
parent | ecaca66217be76f23e80948c042bc1a2ddeed3f8 (diff) | |
download | qttools-85e64f95c8637f876ba84dcbd01e375050e76d8c.tar.gz |
Add option for skipping use of private API.
The qsqlodbc and qsqlpsql are known to cause rejections
from the Mac App store due to use of private/deprecated
API.
The plugins are deployed whenever the SQL module is used.
Due to this corse granularity of plugin selection apps
may find themselves rejected for plugins which they
are not actually using.
Make macdeployqt print a warning when sqlodbc or sqlpsql
is deployed. Add "-appstore-compliant" which will
skip deployment of the plugins.
Task-number: QTBUG-37835
Task-number: QTBUG-38607
Change-Id: I7325156ffaf228a97d7ceeb12f329b3f10db4ff2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/macdeployqt/shared/shared.cpp')
-rw-r--r-- | src/macdeployqt/shared/shared.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index d6dcfb637..c5eb9f9d0 100644 --- a/src/macdeployqt/shared/shared.cpp +++ b/src/macdeployqt/shared/shared.cpp @@ -55,6 +55,7 @@ bool runStripEnabled = true; bool alwaysOwerwriteEnabled = false; bool runCodesign = false; QString codesignIdentiy; +bool appstoreCompliant = false; int logLevel = 1; using std::cout; @@ -959,8 +960,19 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl if (deploymentInfo.deployedFrameworks.contains(QStringLiteral("QtSql.framework"))) { QStringList sqlPlugins = QDir(pluginSourcePath + QStringLiteral("/sqldrivers")).entryList(QStringList() << QStringLiteral("*.dylib")); foreach (const QString &plugin, sqlPlugins) { - if (!plugin.endsWith(QStringLiteral("_debug.dylib"))) - pluginList.append(QStringLiteral("sqldrivers/") + plugin); + if (plugin.endsWith(QStringLiteral("_debug.dylib"))) + continue; + + // Some sql plugins are known to cause app store rejections. Skip or warn for these plugins. + if (plugin.startsWith(QStringLiteral("libqsqlodbc")) || plugin.startsWith(QStringLiteral("libqsqlpsql"))) { + LogWarning() << "Plugin" << plugin << "uses private API and is not Mac App store compliant."; + if (appstoreCompliant) { + LogWarning() << "Skip plugin" << plugin; + continue; + } + } + + pluginList.append(QStringLiteral("sqldrivers/") + plugin); } } |