From 6a2892bdef79e9787d8abe7c0121865f049c67f8 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 8 Mar 2016 12:54:15 +0100 Subject: Skip spurious .toLower() on returns of QUrl::scheme() QUrl::setScheme() parses and canonicalises the scheme, so that scheme() always returns a lower-case string anyway; no need to .toLower() it. Change-Id: Ied00814b63f159386a42552dcf06346ee56f9f97 Reviewed-by: Timur Pocheptsov --- src/platformsupport/clipboard/qmacmime.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/platformsupport/clipboard/qmacmime.mm') diff --git a/src/platformsupport/clipboard/qmacmime.mm b/src/platformsupport/clipboard/qmacmime.mm index ffa548bf83..dbb7e6f754 100644 --- a/src/platformsupport/clipboard/qmacmime.mm +++ b/src/platformsupport/clipboard/qmacmime.mm @@ -634,7 +634,7 @@ QList QMacPasteboardMimeFileUri::convertFromMime(const QString &mime QUrl url = urls.at(i).toUrl(); if (url.scheme().isEmpty()) url.setScheme(QLatin1String("file")); - if (url.scheme().toLower() == QLatin1String("file")) { + if (url.scheme() == QLatin1String("file")) { if (url.host().isEmpty()) url.setHost(QLatin1String("localhost")); url.setPath(url.path().normalized(QString::NormalizationForm_D)); @@ -713,7 +713,7 @@ QList QMacPasteboardMimeUrl::convertFromMime(const QString &mime, QV QUrl url = urls.at(i).toUrl(); if (url.scheme().isEmpty()) url.setScheme(QLatin1String("file")); - if (url.scheme().toLower() == QLatin1String("file")) { + if (url.scheme() == QLatin1String("file")) { if (url.host().isEmpty()) url.setHost(QLatin1String("localhost")); url.setPath(url.path().normalized(QString::NormalizationForm_D)); -- cgit v1.2.3