qprintdialog_unix: small optimization, no need to extract a substring
Change-Id: Ie5fdfd6aa3866c14b6fbfabf4533327f5c73c5a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
5919edc523
commit
ee8c09f7c2
@ -805,7 +805,7 @@ void QUnixPrintWidgetPrivate::applyPrinterProperties()
|
||||
home += QLatin1Char('/');
|
||||
if (!cur.isEmpty() && cur.at(cur.length()-1) != QLatin1Char('/'))
|
||||
cur += QLatin1Char('/');
|
||||
if (cur.left(home.length()) != home)
|
||||
if (!cur.startsWith(home))
|
||||
cur = home;
|
||||
if (QGuiApplication::platformName() == QLatin1String("xcb")) {
|
||||
if (printer->docName().isEmpty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user