diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-02-04 13:56:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-08 13:34:37 +0100 |
commit | 99eecab83d4a4c79979aa0b1fcf1f58c14dcf526 (patch) | |
tree | 78923bb290b275edf7e3c73551c1eae9a5f16266 /tools | |
parent | 9e6bb601319b48b95516afbf11796f4b78e5e0d9 (diff) |
Automatically link printsupport plugins to static applications.
Add the required printsupport plugins to the QTPLUGIN variable
as is done for the QPA plugin.
[ChangeLog][QtPrintSupport] Made the Qt buildsystem automatically include the
necessary plugins so that static applications can print.
Task-number: QTBUG-29663
Change-Id: I0e2e3b0f25dd5714bd187711c85893926b0c4e85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 14 | ||||
-rw-r--r-- | tools/configure/configureapp.h | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index e04bd57b7f..868acc7b90 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3291,8 +3291,10 @@ void Configure::generateQConfigPri() if (!dictionary["QT_NAMESPACE"].isEmpty()) configStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl; - if (dictionary[ "SHARED" ] == "no") - configStream << "QT_DEFAULT_QPA_PLUGIN = q" << qpaPlatformName() << endl; + if (dictionary[ "SHARED" ] == "no") { + configStream << "QT_DEFAULT_QPA_PLUGIN = q" << qpaPlatformName() << endl + << "QT_DEFAULT_PRINTSUPPORTPLUGIN = " << qpaPrintSupportPluginName() << endl; + } if (!configStream.flush()) dictionary[ "DONE" ] = "error"; @@ -3474,7 +3476,8 @@ void Configure::generateConfigfiles() for (int i = 0; i < qconfigList.count(); ++i) tmpStream << addDefine(qconfigList.at(i)); - tmpStream<<"#define QT_QPA_DEFAULT_PLATFORM_NAME \"" << qpaPlatformName() << "\""<<endl; + tmpStream << "#define QT_QPA_DEFAULT_PLATFORM_NAME \"" << qpaPlatformName() << "\"" << endl + << "#define QT_QPA_DEFAULT_PRINTSUPPORTPLUGIN_NAME \"" << qpaPrintSupportPluginName() << "\"" << endl; if (!tmpStream.flush()) dictionary[ "DONE" ] = "error"; @@ -4405,6 +4408,11 @@ QString Configure::qpaPlatformName() const } } +QString Configure::qpaPrintSupportPluginName() const +{ + return platform() == WINDOWS ? QStringLiteral("windowsprintersupport") : QString(); +} + int Configure::platform() const { const QString qMakeSpec = dictionary.value("QMAKESPEC"); diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index 3e0e691dab..36668f18ba 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -100,6 +100,7 @@ public: int platform() const; QString platformName() const; QString qpaPlatformName() const; + QString qpaPrintSupportPluginName() const; private: bool checkAngleAvailability(QString *errorMessage = 0) const; |