Printsupport: use _L1 for for creating Latin-1 string literals
Task-number: QTBUG-98434 Change-Id: I415132ed381c25313e7fcccd050e522667eb6c22 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>bb10
parent
24d2a00ce2
commit
42c8f56acc
|
|
@ -45,6 +45,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
class QCupsPrinterSupportPlugin : public QPlatformPrinterSupportPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -62,7 +64,7 @@ QStringList QCupsPrinterSupportPlugin::keys() const
|
|||
|
||||
QPlatformPrinterSupport *QCupsPrinterSupportPlugin::create(const QString &key)
|
||||
{
|
||||
if (key.compare(key, QLatin1String("cupsprintersupport"), Qt::CaseInsensitive) == 0)
|
||||
if (key.compare(key, "cupsprintersupport"_L1, Qt::CaseInsensitive) == 0)
|
||||
return new QCupsPrinterSupport;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
extern QMarginsF qt_convertMargins(const QMarginsF &margins, QPageLayout::Unit fromUnits, QPageLayout::Unit toUnits);
|
||||
|
||||
// Disabled until we have support for papersources on unix
|
||||
|
|
@ -157,7 +159,7 @@ protected:
|
|||
font.setPointSizeF(font.pointSizeF()*0.25);
|
||||
p.setFont(font);
|
||||
p.setPen(palette().color(QPalette::Dark));
|
||||
QString text(QLatin1String("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."));
|
||||
QString text("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."_L1);
|
||||
for (int i=0; i<3; ++i)
|
||||
text += text;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
extern qreal qt_pointMultiplier(QPageLayout::Unit unit);
|
||||
|
||||
class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
|
||||
|
|
@ -135,7 +137,7 @@ QT_USE_NAMESPACE
|
|||
UInt8 localFile[2048]; // Assuming there's a POSIX file system here.
|
||||
CFURLGetFileSystemRepresentation(file, true, localFile, sizeof(localFile));
|
||||
auto outputFile = QFileInfo(QString::fromUtf8(reinterpret_cast<const char *>(localFile)));
|
||||
if (outputFile.suffix() == QLatin1String("pdf"))
|
||||
if (outputFile.suffix() == "pdf"_L1)
|
||||
printer->setOutputFileName(outputFile.absoluteFilePath());
|
||||
else
|
||||
qWarning() << "Can not print to file type" << outputFile.suffix();
|
||||
|
|
@ -144,7 +146,7 @@ QT_USE_NAMESPACE
|
|||
auto documentName = printer->docName();
|
||||
if (documentName.isEmpty())
|
||||
documentName = QGuiApplication::applicationDisplayName();
|
||||
auto fileName = printPreviews.filePath(QString(QLatin1String("%1.pdf")).arg(documentName));
|
||||
auto fileName = printPreviews.filePath(QString("%1.pdf"_L1).arg(documentName));
|
||||
printer->setOutputFileName(fileName);
|
||||
// Ideally we would have a callback when the PDF engine is done writing
|
||||
// to the file, and open Preview in response to that. Lacking that, we
|
||||
|
|
|
|||
|
|
@ -126,6 +126,8 @@ static void initResources()
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
class QPrintPropertiesDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -633,9 +635,9 @@ void QPrintDialogPrivate::init()
|
|||
bottom = new QWidget(q);
|
||||
options.setupUi(bottom);
|
||||
options.color->setIconSize(QSize(32, 32));
|
||||
options.color->setIcon(QIcon(QLatin1String(":/qt-project.org/dialogs/qprintdialog/images/status-color.png")));
|
||||
options.color->setIcon(QIcon(":/qt-project.org/dialogs/qprintdialog/images/status-color.png"_L1));
|
||||
options.grayscale->setIconSize(QSize(32, 32));
|
||||
options.grayscale->setIcon(QIcon(QLatin1String(":/qt-project.org/dialogs/qprintdialog/images/status-gray-scale.png")));
|
||||
options.grayscale->setIcon(QIcon(":/qt-project.org/dialogs/qprintdialog/images/status-gray-scale.png"_L1));
|
||||
|
||||
#if QT_CONFIG(cups)
|
||||
// Add Page Set widget if CUPS is available
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
//extern void qt_win_eatMouseMove();
|
||||
|
||||
class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
|
||||
|
|
@ -164,8 +166,8 @@ static void qt_win_read_back_PRINTDLGEX(PRINTDLGEX *pd, QPrintDialog *pdlg, QPri
|
|||
d->engine->setGlobalDevMode(pd->hDevNames, pd->hDevMode);
|
||||
|
||||
if (d->ep->printToFile && d->ep->fileName.isEmpty())
|
||||
d->ep->fileName = QLatin1String("FILE:");
|
||||
else if (!d->ep->printToFile && d->ep->fileName == QLatin1String("FILE:"))
|
||||
d->ep->fileName = "FILE:"_L1;
|
||||
else if (!d->ep->printToFile && d->ep->fileName == "FILE:"_L1)
|
||||
d->ep->fileName.clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ static void initResources()
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
namespace {
|
||||
class QPrintPreviewMainWindow : public QMainWindow
|
||||
{
|
||||
|
|
@ -338,7 +340,7 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer)
|
|||
|
||||
QString caption = QCoreApplication::translate("QPrintPreviewDialog", "Print Preview");
|
||||
if (!printer->docName().isEmpty())
|
||||
caption += QLatin1String(": ") + printer->docName();
|
||||
caption += ": "_L1 + printer->docName();
|
||||
q->setWindowTitle(caption);
|
||||
|
||||
if (!printer->isValid()
|
||||
|
|
@ -352,10 +354,10 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer)
|
|||
|
||||
static inline void qt_setupActionIcon(QAction *action, QLatin1String name)
|
||||
{
|
||||
QLatin1String imagePrefix(":/qt-project.org/dialogs/qprintpreviewdialog/images/");
|
||||
const auto imagePrefix = ":/qt-project.org/dialogs/qprintpreviewdialog/images/"_L1;
|
||||
QIcon icon = QIcon::fromTheme(name);
|
||||
icon.addFile(imagePrefix + name + QLatin1String("-24.png"), QSize(24, 24));
|
||||
icon.addFile(imagePrefix + name + QLatin1String("-32.png"), QSize(32, 32));
|
||||
icon.addFile(imagePrefix + name + "-24.png"_L1, QSize(24, 24));
|
||||
icon.addFile(imagePrefix + name + "-32.png"_L1, QSize(32, 32));
|
||||
action->setIcon(icon);
|
||||
}
|
||||
|
||||
|
|
@ -370,30 +372,30 @@ void QPrintPreviewDialogPrivate::setupActions()
|
|||
prevPageAction = navGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Previous page"));
|
||||
firstPageAction = navGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "First page"));
|
||||
lastPageAction = navGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Last page"));
|
||||
qt_setupActionIcon(nextPageAction, QLatin1String("go-next"));
|
||||
qt_setupActionIcon(prevPageAction, QLatin1String("go-previous"));
|
||||
qt_setupActionIcon(firstPageAction, QLatin1String("go-first"));
|
||||
qt_setupActionIcon(lastPageAction, QLatin1String("go-last"));
|
||||
qt_setupActionIcon(nextPageAction, "go-next"_L1);
|
||||
qt_setupActionIcon(prevPageAction, "go-previous"_L1);
|
||||
qt_setupActionIcon(firstPageAction, "go-first"_L1);
|
||||
qt_setupActionIcon(lastPageAction, "go-last"_L1);
|
||||
QObject::connect(navGroup, SIGNAL(triggered(QAction*)), q, SLOT(_q_navigate(QAction*)));
|
||||
|
||||
|
||||
fitGroup = new QActionGroup(q);
|
||||
fitWidthAction = fitGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Fit width"));
|
||||
fitPageAction = fitGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Fit page"));
|
||||
fitWidthAction->setObjectName(QLatin1String("fitWidthAction"));
|
||||
fitPageAction->setObjectName(QLatin1String("fitPageAction"));
|
||||
fitWidthAction->setObjectName("fitWidthAction"_L1);
|
||||
fitPageAction->setObjectName("fitPageAction"_L1);
|
||||
fitWidthAction->setCheckable(true);
|
||||
fitPageAction->setCheckable(true);
|
||||
qt_setupActionIcon(fitWidthAction, QLatin1String("zoom-fit-width"));
|
||||
qt_setupActionIcon(fitPageAction, QLatin1String("zoom-fit-page"));
|
||||
qt_setupActionIcon(fitWidthAction, "zoom-fit-width"_L1);
|
||||
qt_setupActionIcon(fitPageAction, "zoom-fit-page"_L1);
|
||||
QObject::connect(fitGroup, SIGNAL(triggered(QAction*)), q, SLOT(_q_fit(QAction*)));
|
||||
|
||||
// Zoom
|
||||
zoomGroup = new QActionGroup(q);
|
||||
zoomInAction = zoomGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Zoom in"));
|
||||
zoomOutAction = zoomGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Zoom out"));
|
||||
qt_setupActionIcon(zoomInAction, QLatin1String("zoom-in"));
|
||||
qt_setupActionIcon(zoomOutAction, QLatin1String("zoom-out"));
|
||||
qt_setupActionIcon(zoomInAction, "zoom-in"_L1);
|
||||
qt_setupActionIcon(zoomOutAction, "zoom-out"_L1);
|
||||
|
||||
// Portrait/Landscape
|
||||
orientationGroup = new QActionGroup(q);
|
||||
|
|
@ -401,8 +403,8 @@ void QPrintPreviewDialogPrivate::setupActions()
|
|||
landscapeAction = orientationGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Landscape"));
|
||||
portraitAction->setCheckable(true);
|
||||
landscapeAction->setCheckable(true);
|
||||
qt_setupActionIcon(portraitAction, QLatin1String("layout-portrait"));
|
||||
qt_setupActionIcon(landscapeAction, QLatin1String("layout-landscape"));
|
||||
qt_setupActionIcon(portraitAction, "layout-portrait"_L1);
|
||||
qt_setupActionIcon(landscapeAction, "layout-landscape"_L1);
|
||||
QObject::connect(portraitAction, SIGNAL(triggered(bool)), preview, SLOT(setPortraitOrientation()));
|
||||
QObject::connect(landscapeAction, SIGNAL(triggered(bool)), preview, SLOT(setLandscapeOrientation()));
|
||||
|
||||
|
|
@ -411,12 +413,12 @@ void QPrintPreviewDialogPrivate::setupActions()
|
|||
singleModeAction = modeGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Show single page"));
|
||||
facingModeAction = modeGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Show facing pages"));
|
||||
overviewModeAction = modeGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Show overview of all pages"));
|
||||
qt_setupActionIcon(singleModeAction, QLatin1String("view-pages-single"));
|
||||
qt_setupActionIcon(facingModeAction, QLatin1String("view-pages-facing"));
|
||||
qt_setupActionIcon(overviewModeAction, QLatin1String("view-pages-overview"));
|
||||
singleModeAction->setObjectName(QLatin1String("singleModeAction"));
|
||||
facingModeAction->setObjectName(QLatin1String("facingModeAction"));
|
||||
overviewModeAction->setObjectName(QLatin1String("overviewModeAction"));
|
||||
qt_setupActionIcon(singleModeAction, "view-pages-single"_L1);
|
||||
qt_setupActionIcon(facingModeAction, "view-pages-facing"_L1);
|
||||
qt_setupActionIcon(overviewModeAction, "view-pages-overview"_L1);
|
||||
singleModeAction->setObjectName("singleModeAction"_L1);
|
||||
facingModeAction->setObjectName("facingModeAction"_L1);
|
||||
overviewModeAction->setObjectName("overviewModeAction"_L1);
|
||||
|
||||
singleModeAction->setCheckable(true);
|
||||
facingModeAction->setCheckable(true);
|
||||
|
|
@ -427,8 +429,8 @@ void QPrintPreviewDialogPrivate::setupActions()
|
|||
printerGroup = new QActionGroup(q);
|
||||
printAction = printerGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Print"));
|
||||
pageSetupAction = printerGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Page setup"));
|
||||
qt_setupActionIcon(printAction, QLatin1String("printer"));
|
||||
qt_setupActionIcon(pageSetupAction, QLatin1String("page-setup"));
|
||||
qt_setupActionIcon(printAction, "printer"_L1);
|
||||
qt_setupActionIcon(pageSetupAction, "page-setup"_L1);
|
||||
QObject::connect(printAction, SIGNAL(triggered(bool)), q, SLOT(_q_print()));
|
||||
QObject::connect(pageSetupAction, SIGNAL(triggered(bool)), q, SLOT(_q_pageSetup()));
|
||||
|
||||
|
|
@ -574,7 +576,7 @@ void QPrintPreviewDialogPrivate::_q_print()
|
|||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
if (printer->outputFormat() != QPrinter::NativeFormat) {
|
||||
QString title = QCoreApplication::translate("QPrintPreviewDialog", "Export to PDF");
|
||||
QString suffix = QLatin1String(".pdf");
|
||||
QString suffix = ".pdf"_L1;
|
||||
QString fileName;
|
||||
#if QT_CONFIG(filedialog)
|
||||
fileName = QFileDialog::getSaveFileName(q, title, printer->outputFileName(), u'*' + suffix);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
QT_IMPL_METATYPE_EXTERN_TAGGED(QCUPSSupport::JobHoldUntil,
|
||||
QCUPSSupport__JobHoldUntil)
|
||||
QT_IMPL_METATYPE_EXTERN_TAGGED(QCUPSSupport::BannerPage,
|
||||
|
|
@ -129,17 +131,17 @@ static inline QString jobHoldToString(const QCUPSSupport::JobHoldUntil jobHold,
|
|||
|
||||
QCUPSSupport::JobHoldUntilWithTime QCUPSSupport::parseJobHoldUntil(const QString &jobHoldUntil)
|
||||
{
|
||||
if (jobHoldUntil == QLatin1String("indefinite")) {
|
||||
if (jobHoldUntil == "indefinite"_L1) {
|
||||
return { QCUPSSupport::Indefinite, QTime() };
|
||||
} else if (jobHoldUntil == QLatin1String("day-time")) {
|
||||
} else if (jobHoldUntil == "day-time"_L1) {
|
||||
return { QCUPSSupport::DayTime, QTime() };
|
||||
} else if (jobHoldUntil == QLatin1String("night")) {
|
||||
} else if (jobHoldUntil == "night"_L1) {
|
||||
return { QCUPSSupport::Night, QTime() };
|
||||
} else if (jobHoldUntil == QLatin1String("second-shift")) {
|
||||
} else if (jobHoldUntil == "second-shift"_L1) {
|
||||
return { QCUPSSupport::SecondShift, QTime() };
|
||||
} else if (jobHoldUntil == QLatin1String("third-shift")) {
|
||||
} else if (jobHoldUntil == "third-shift"_L1) {
|
||||
return { QCUPSSupport::ThirdShift, QTime() };
|
||||
} else if (jobHoldUntil == QLatin1String("weekend")) {
|
||||
} else if (jobHoldUntil == "weekend"_L1) {
|
||||
return { QCUPSSupport::Weekend, QTime() };
|
||||
}
|
||||
|
||||
|
|
@ -216,13 +218,13 @@ static inline QString bannerPageToString(const QCUPSSupport::BannerPage bannerPa
|
|||
|
||||
static inline QCUPSSupport::BannerPage stringToBannerPage(const QString &bannerPage)
|
||||
{
|
||||
if (bannerPage == QLatin1String("none")) return QCUPSSupport::NoBanner;
|
||||
else if (bannerPage == QLatin1String("standard")) return QCUPSSupport::Standard;
|
||||
else if (bannerPage == QLatin1String("unclassified")) return QCUPSSupport::Unclassified;
|
||||
else if (bannerPage == QLatin1String("confidential")) return QCUPSSupport::Confidential;
|
||||
else if (bannerPage == QLatin1String("classified")) return QCUPSSupport::Classified;
|
||||
else if (bannerPage == QLatin1String("secret")) return QCUPSSupport::Secret;
|
||||
else if (bannerPage == QLatin1String("topsecret")) return QCUPSSupport::TopSecret;
|
||||
if (bannerPage == "none"_L1) return QCUPSSupport::NoBanner;
|
||||
else if (bannerPage == "standard"_L1) return QCUPSSupport::Standard;
|
||||
else if (bannerPage == "unclassified"_L1) return QCUPSSupport::Unclassified;
|
||||
else if (bannerPage == "confidential"_L1) return QCUPSSupport::Confidential;
|
||||
else if (bannerPage == "classified"_L1) return QCUPSSupport::Classified;
|
||||
else if (bannerPage == "secret"_L1) return QCUPSSupport::Secret;
|
||||
else if (bannerPage == "topsecret"_L1) return QCUPSSupport::TopSecret;
|
||||
|
||||
return QCUPSSupport::NoBanner;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
Q_IMPORT_PLUGIN(QCocoaPrinterSupportPlugin)
|
||||
#elif defined(Q_OS_WIN)
|
||||
|
|
@ -55,7 +57,7 @@ Q_IMPORT_PLUGIN(QWindowsPrinterSupportPlugin)
|
|||
#endif
|
||||
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
||||
(QPlatformPrinterSupportFactoryInterface_iid, QLatin1String("/printsupport"), Qt::CaseInsensitive))
|
||||
(QPlatformPrinterSupportFactoryInterface_iid, "/printsupport"_L1, Qt::CaseInsensitive))
|
||||
|
||||
QPlatformPrinterSupportPlugin::QPlatformPrinterSupportPlugin(QObject *parent)
|
||||
: QObject(parent)
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
#define ABORT_IF_ACTIVE(location) \
|
||||
if (d->printEngine->printerState() == QPrinter::Active) { \
|
||||
qWarning("%s: Cannot be changed while printer is active", location); \
|
||||
|
|
@ -749,7 +751,7 @@ void QPrinter::setOutputFileName(const QString &fileName)
|
|||
ABORT_IF_ACTIVE("QPrinter::setOutputFileName");
|
||||
|
||||
QFileInfo fi(fileName);
|
||||
if (!fi.suffix().compare(QLatin1String("pdf"), Qt::CaseInsensitive))
|
||||
if (!fi.suffix().compare("pdf"_L1, Qt::CaseInsensitive))
|
||||
setOutputFormat(QPrinter::PdfFormat);
|
||||
else if (fileName.isEmpty())
|
||||
setOutputFormat(QPrinter::NativeFormat);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
QCocoaPrinterSupport::QCocoaPrinterSupport()
|
||||
{ }
|
||||
|
||||
|
|
@ -122,7 +124,7 @@ public:
|
|||
|
||||
QPlatformPrinterSupport *QCocoaPrinterSupportPlugin::create(const QString &key)
|
||||
{
|
||||
if (key.compare(key, QLatin1String("cocoaprintersupport"), Qt::CaseInsensitive) != 0)
|
||||
if (key.compare(key, "cocoaprintersupport"_L1, Qt::CaseInsensitive) != 0)
|
||||
return 0;
|
||||
|
||||
return new QCocoaPrinterSupport();
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
||||
extern QPrinter::PaperSize mapDevmodePaperSize(int s);
|
||||
|
|
@ -78,7 +80,7 @@ extern QPrinter::PaperSize mapDevmodePaperSize(int s);
|
|||
|
||||
//QPrinterInfo QPrinterInfo::defaultPrinter()
|
||||
//{
|
||||
// QString noPrinters(QLatin1String("qt_no_printers"));
|
||||
// QString noPrinters("qt_no_printers"_L1);
|
||||
// wchar_t buffer[256];
|
||||
// GetProfileString(L"windows", L"device", (wchar_t*)noPrinters.utf16(), buffer, 256);
|
||||
// QString output = QString::fromWCharArray(buffer);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
QWindowsPrinterSupport::QWindowsPrinterSupport()
|
||||
: QPlatformPrinterSupport()
|
||||
{
|
||||
|
|
@ -98,7 +100,7 @@ public:
|
|||
|
||||
QPlatformPrinterSupport *QWindowsPrinterSupportPlugin::create(const QString &key)
|
||||
{
|
||||
if (key.compare(key, QLatin1String("windowsprintsupport"), Qt::CaseInsensitive) == 0)
|
||||
if (key.compare(key, "windowsprintsupport"_L1, Qt::CaseInsensitive) == 0)
|
||||
return new QWindowsPrinterSupport;
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue