printsupport: use string view types more
sizeof(QStringView) == 16 sizeof(QString) == 24 Change-Id: I3edf0d6869e92c47472980e5f99b9bf9c8a3b7cd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
ae6a3fd26c
commit
c0e5464d28
@ -1328,9 +1328,9 @@ QUnixPrintWidget::QUnixPrintWidget(QPrinter *printer, QWidget *parent)
|
|||||||
cur = home;
|
cur = home;
|
||||||
else if (!cur.endsWith(u'/'))
|
else if (!cur.endsWith(u'/'))
|
||||||
cur += u'/';
|
cur += u'/';
|
||||||
if (QGuiApplication::platformName() == QStringLiteral("xcb")) {
|
if (QGuiApplication::platformName() == "xcb"_L1) {
|
||||||
if (printer->docName().isEmpty()) {
|
if (printer->docName().isEmpty()) {
|
||||||
cur += QStringLiteral("print.pdf");
|
cur += "print.pdf"_L1;
|
||||||
} else {
|
} else {
|
||||||
#if QT_CONFIG(regularexpression)
|
#if QT_CONFIG(regularexpression)
|
||||||
const QRegularExpression re(QStringLiteral("(.*)\\.\\S+"));
|
const QRegularExpression re(QStringLiteral("(.*)\\.\\S+"));
|
||||||
@ -1340,7 +1340,7 @@ QUnixPrintWidget::QUnixPrintWidget(QPrinter *printer, QWidget *parent)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
cur += printer->docName();
|
cur += printer->docName();
|
||||||
cur += QStringLiteral(".pdf");
|
cur += ".pdf"_L1;
|
||||||
}
|
}
|
||||||
} // xcb
|
} // xcb
|
||||||
|
|
||||||
|
@ -109,9 +109,9 @@ QCUPSSupport::JobHoldUntilWithTime QCUPSSupport::parseJobHoldUntil(const QString
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QTime parsedTime = QTime::fromString(jobHoldUntil, QStringLiteral("h:m:s"));
|
QTime parsedTime = QTime::fromString(jobHoldUntil, u"h:m:s");
|
||||||
if (!parsedTime.isValid())
|
if (!parsedTime.isValid())
|
||||||
parsedTime = QTime::fromString(jobHoldUntil, QStringLiteral("h:m"));
|
parsedTime = QTime::fromString(jobHoldUntil, u"h:m");
|
||||||
if (parsedTime.isValid()) {
|
if (parsedTime.isValid()) {
|
||||||
// CUPS time is in UTC, user expects local time, so get the equivalent
|
// CUPS time is in UTC, user expects local time, so get the equivalent
|
||||||
QDateTime dateTimeUtc = QDateTime::currentDateTimeUtc();
|
QDateTime dateTimeUtc = QDateTime::currentDateTimeUtc();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user