summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2017-01-20 14:41:46 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2017-01-25 10:33:23 +0000
commit447ca99191a8659c3b4aa57847f674a49a18f41c (patch)
treecfa3ef377870ef68fbed5a950dd21b97a7a312fb /src
parent64e977cfac2fbe93fc234d3e134d126591d4c821 (diff)
Fix printsupport compilation with -no-feature...
Change-Id: I881e736aefd4068965edb2a57f4436ee43d2bb93 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/printsupport/configure.json8
-rw-r--r--src/printsupport/kernel/qplatformprintdevice.cpp8
-rw-r--r--src/printsupport/widgets/qcupsjobwidget_p.h2
-rw-r--r--src/printsupport/widgets/widgets.pri4
4 files changed, 18 insertions, 4 deletions
diff --git a/src/printsupport/configure.json b/src/printsupport/configure.json
index 439f2dbdd8..a4855212fd 100644
--- a/src/printsupport/configure.json
+++ b/src/printsupport/configure.json
@@ -31,6 +31,12 @@
"condition": "libs.cups",
"output": [ "privateFeature", "feature" ]
},
+ "cupsjobwidget": {
+ "label": "CUPS job control widget",
+ "section": "Widgets",
+ "condition": "features.cups && features.calendarwidget && features.datetimeedit && features.groupbox",
+ "output": [ "privateFeature", "feature" ]
+ },
"printer": {
"label": "QPrinter",
"purpose": "Provides a printer backend of QPainter.",
@@ -49,7 +55,7 @@
"label": "QPrintDialog",
"purpose": "Provides a dialog widget for specifying printer configuration.",
"section": "Dialogs",
- "condition": "features.printer && features.combobox && features.buttongroup && features.spinbox && features.treeview && features.tabwidget",
+ "condition": "features.printer && features.combobox && features.buttongroup && features.spinbox && features.treeview && features.tabwidget && features.datetimeedit",
"output": [ "publicFeature", "feature" ]
},
"printpreviewdialog": {
diff --git a/src/printsupport/kernel/qplatformprintdevice.cpp b/src/printsupport/kernel/qplatformprintdevice.cpp
index eabd7e7295..cbb67aefdc 100644
--- a/src/printsupport/kernel/qplatformprintdevice.cpp
+++ b/src/printsupport/kernel/qplatformprintdevice.cpp
@@ -302,7 +302,11 @@ QPrint::InputSlot QPlatformPrintDevice::defaultInputSlot() const
{
QPrint::InputSlot input;
input.key = QByteArrayLiteral("Auto");
+#if QT_CONFIG(printdialog)
input.name = QPrintDialog::tr("Automatic");
+#else
+ input.name = QString::fromLatin1("Automatic");
+#endif
input.id = QPrint::Auto;
return input;
}
@@ -322,7 +326,11 @@ QPrint::OutputBin QPlatformPrintDevice::defaultOutputBin() const
{
QPrint::OutputBin output;
output.key = QByteArrayLiteral("Auto");
+#if QT_CONFIG(printdialog)
output.name = QPrintDialog::tr("Automatic");
+#else
+ output.name = QString::fromLatin1("Automatic");
+#endif
output.id = QPrint::AutoOutputBin;
return output;
}
diff --git a/src/printsupport/widgets/qcupsjobwidget_p.h b/src/printsupport/widgets/qcupsjobwidget_p.h
index 5320818f30..288aeac1aa 100644
--- a/src/printsupport/widgets/qcupsjobwidget_p.h
+++ b/src/printsupport/widgets/qcupsjobwidget_p.h
@@ -56,7 +56,7 @@
#include <QtPrintSupport/private/qtprintsupportglobal_p.h>
#include <private/qcups_p.h>
-#if !defined(QT_NO_PRINTER) && !defined(QT_NO_CUPS)
+#if !defined(QT_NO_PRINTER) && !defined(QT_NO_CUPS) && !defined(QT_NO_DATETIMEEDIT)
#include <ui_qcupsjobwidget.h>
QT_BEGIN_NAMESPACE
diff --git a/src/printsupport/widgets/widgets.pri b/src/printsupport/widgets/widgets.pri
index 8a98da1718..505983778e 100644
--- a/src/printsupport/widgets/widgets.pri
+++ b/src/printsupport/widgets/widgets.pri
@@ -1,11 +1,11 @@
HEADERS += widgets/qprintpreviewwidget.h
SOURCES += widgets/qprintpreviewwidget.cpp
-unix:!darwin:qtConfig(cups) {
+unix:!darwin:qtConfig(cups):qtConfig(cupsjobwidget) {
HEADERS += widgets/qcupsjobwidget_p.h
SOURCES += widgets/qcupsjobwidget.cpp
FORMS += widgets/qcupsjobwidget.ui
- INCLUDEPATH += $$PWD
}
+INCLUDEPATH += $$PWD