summaryrefslogtreecommitdiffstats
path: root/src/printsupport
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-11-04 13:39:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-07 10:00:19 +0100
commit96d74313fe722ed55f67a89633033ed49c3dc3a7 (patch)
tree49951d3b10e980d3394a046b7b8c5f08651c44f6 /src/printsupport
parentaa9ca5749f53b4aa3df93beaa05f16676941f4ce (diff)
Add missing Q_INIT_RESOURCE
The library needs to do Q_INIT_RESOURCE for all resources it uses internally, otherwise static linking will fail, and the user has no idea how to rectify it as the name of the missing resource is not known. The Q_INIT_RESOURCE needs to happen outside of any namespace, hence the use of static initResources() functions. Change-Id: I8f7d36b440b05809d97dd489cf8789f345633cec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/printsupport')
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 0214c97e24..fe7e43814c 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -103,6 +103,11 @@ Print dialog class declarations
Layout in qprintpropertieswidget.ui
*/
+static void initResources()
+{
+ Q_INIT_RESOURCE(qprintdialog);
+}
+
QT_BEGIN_NAMESPACE
class QOptionTreeItem;
@@ -306,6 +311,7 @@ void QPrintPropertiesDialog::showEvent(QShowEvent* event)
QPrintDialogPrivate::QPrintDialogPrivate()
: top(0), bottom(0), buttons(0), collapseButton(0)
{
+ initResources();
}
QPrintDialogPrivate::~QPrintDialogPrivate()