Do not include qprintdialog in a kernel/ file

The only use is for ::tr so use QCoreApplication::translate

Automatic is not used in dialog/ anyway so there's no translation to
reuse

Change-Id: I0c993e87f46384a0f09d83c9b5e96de5366f1eb9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
Albert Astals Cid 2018-09-27 13:14:24 +02:00
parent 591d1fd28a
commit 8ad5967793

View File

@ -40,10 +40,8 @@
#include "qplatformprintdevice.h"
#include "qprintdevice_p.h"
#if QT_CONFIG(printdialog)
#include "qprintdialog.h"
#endif
#include <QtCore/qcoreapplication.h>
#include <QtGui/qpagelayout.h>
QT_BEGIN_NAMESPACE
@ -291,11 +289,7 @@ 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.name = QCoreApplication::translate("Print Device Input Slot", "Automatic");
input.id = QPrint::Auto;
return input;
}
@ -315,11 +309,7 @@ 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.name = QCoreApplication::translate("Print Device Output Bin", "Automatic");
output.id = QPrint::AutoOutputBin;
return output;
}