diff options
author | Edward Welbourne <edward.welbourne@theqtcompany.com> | 2016-03-08 12:54:15 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@theqtcompany.com> | 2016-03-10 15:00:59 +0000 |
commit | 6a2892bdef79e9787d8abe7c0121865f049c67f8 (patch) | |
tree | 1580c7dce4138b755d3294511f5444f39808abf3 /examples/network | |
parent | c9210d392ca720028a4a2be427ba13100418c5b7 (diff) | |
download | qtbase-6a2892bdef79e9787d8abe7c0121865f049c67f8.tar.gz |
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 <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'examples/network')
-rw-r--r-- | examples/network/torrent/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp index 2b87f71294..bfe221c129 100644 --- a/examples/network/torrent/mainwindow.cpp +++ b/examples/network/torrent/mainwindow.cpp @@ -702,7 +702,7 @@ void TorrentView::dragMoveEvent(QDragMoveEvent *event) { // Accept file actions with a '.torrent' extension. QUrl url(event->mimeData()->text()); - if (url.isValid() && url.scheme().toLower() == "file" + if (url.isValid() && url.scheme() == "file" && url.path().toLower().endsWith(".torrent")) event->acceptProposedAction(); } |