summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2015-07-31 14:16:53 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-09-04 09:43:35 +0000
commitee8c09f7c219ae9b55194408ba854f81b8086cb0 (patch)
tree639f8df2464eb77349338323a06d0c4fbfad0922 /src
parent5919edc5231f58d2d7c04ea875064a368f0df254 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 502ff7d98a..880b233aef 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -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()) {