Fixed initialization of QPrintPreviewDialog's image resources for static builds.
[ChangeLog][QtPrintSupport][QPrintPreviewDialog] Fixed initialization of QPrintPreviewDialog's image resources for static builds. Task-number: QTBUG-36561 Change-Id: Ibb725e7d0cd647b904371db2601161c756b99f53 Reviewed-by: Andy Shaw <andy.shaw@digia.com>bb10
parent
7409bde0eb
commit
e84875da5a
|
|
@ -65,6 +65,15 @@
|
|||
|
||||
#ifndef QT_NO_PRINTPREVIEWDIALOG
|
||||
|
||||
static void initResources()
|
||||
{
|
||||
static bool resourcesInitialized = false;
|
||||
if (!resourcesInitialized) {
|
||||
Q_INIT_RESOURCE(qprintdialog);
|
||||
resourcesInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace {
|
||||
|
|
@ -217,6 +226,8 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer)
|
|||
{
|
||||
Q_Q(QPrintPreviewDialog);
|
||||
|
||||
initResources();
|
||||
|
||||
if (_printer) {
|
||||
preview = new QPrintPreviewWidget(_printer, q);
|
||||
printer = _printer;
|
||||
|
|
|
|||
Loading…
Reference in New Issue