From ed32af3506c42689001d9b7267897405c02d3c39 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Thu, 30 Jun 2016 10:16:35 +0200 Subject: winrt: fix conditional Seems the previous check was a leftover from debugging. Tests still pass and loop checks properly now. Change-Id: Ic12cd49881f6d146687e257794b3028f6c8e874c Reviewed-by: Friedemann Kleint --- src/corelib/io/qsettings_winrt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qsettings_winrt.cpp b/src/corelib/io/qsettings_winrt.cpp index 02c3c7624e..85ef64cbd4 100644 --- a/src/corelib/io/qsettings_winrt.cpp +++ b/src/corelib/io/qsettings_winrt.cpp @@ -86,7 +86,7 @@ static IApplicationDataContainer *subContainer(IApplicationDataContainer *parent if (FAILED(hr)) return 0; - while (SUCCEEDED(S_OK) && current) { + while (SUCCEEDED(hr) && current) { ComPtr item; hr = iterator->get_Current(&item); if (FAILED(hr)) -- cgit v1.2.3 From c376e3fbf0cbeb60be9db8903f9a2998b8311ed6 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Mon, 27 Jun 2016 18:52:30 +0300 Subject: QDir: Remove redundant QString wrapping Change-Id: I8368b137d15509cdec575a17f5dae3c0c343400f Reviewed-by: Oswald Buddenhagen --- src/corelib/io/qdir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index d0527282b5..3004711571 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -686,7 +686,7 @@ QString QDir::filePath(const QString &fileName) const { const QDirPrivate* d = d_ptr.constData(); if (isAbsolutePath(fileName)) - return QString(fileName); + return fileName; QString ret = d->dirEntry.filePath(); if (!fileName.isEmpty()) { -- cgit v1.2.3 From 4f3eb6617331ba2634206064512ae68a4fbd793e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 30 Jun 2016 15:48:52 -0700 Subject: QUrl: Test that we do correctly accept valid schemes ... and reject invalid ones. There was one error: we accepted schemes starting with pluses, dashes and dots. Change-Id: Ie585843cfb684bc3b6e3fffd145cfe12227ec4ad Reviewed-by: David Faure --- src/corelib/io/qurl.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index fb2f4ba918..2672de24f2 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -978,10 +978,12 @@ inline bool QUrlPrivate::setScheme(const QString &value, int len, bool doSetErro needsLowercasing = i; continue; } - if (p[i] >= '0' && p[i] <= '9' && i > 0) - continue; - if (p[i] == '+' || p[i] == '-' || p[i] == '.') - continue; + if (i) { + if (p[i] >= '0' && p[i] <= '9') + continue; + if (p[i] == '+' || p[i] == '-' || p[i] == '.') + continue; + } // found something else // don't call setError needlessly: -- cgit v1.2.3