Commit Graph

907 Commits

Author SHA1 Message Date
Thiago Macieira
f62768d046 QUrl: re-fix the setPath("//path") case leading to scheme://path
Commits aba336c2b4 (in Qt 5.2) and
aba336c2b4 (in 5.6) both tried to deal
with this problem, with different levels of success. This is the third
attempt (and hopefully the charm).

Instead of modifying the path that the user provides, go straight ahead
and declare it invalid. This is supported by RFC 3986, which declares
this expansion impossible:

   relative-part = "//" authority path-abempty
                 / path-absolute
                 / path-noscheme
                 / path-empty
   path-abempty  = *( "/" segment )
   path-absolute = "/" [ segment-nz *( "/" segment ) ]
   path-noscheme = segment-nz-nc *( "/" segment )

The "path-abempty" and "path-noscheme" cases are the two issues we
already handle. This commit adds the third one: path-absolute, which
requires that the first segment of the path be of non-zero length.

That is, it is now possible again to have http://example.com//path
constructed piece-wise, without it producing http://example.com/path.
Additionally, it catches the case of http://example.com//path parsed
from full URL then followed by setAuthority("").

Change-Id: I69f37f9304f24709a823fffd14e67a5e7212ddcd
Reviewed-by: David Faure <david.faure@kdab.com>
2017-10-06 03:49:40 +00:00
Jake Petroules
83122b1932 Remove unnecessary VxWorks ifdef
Change-Id: Ie655bdff9a09c6060f66e4346b94ba52443241f4
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-18 21:06:25 +00:00
Jake Petroules
7127202358 Exclude tst_QDir::mkdirOnSymlink on Unix platforms without symlinks
One example is VxWorks.

Change-Id: I253df715a9417c1f9cede79b1e1860924e0da8a9
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-09-15 11:20:32 +00:00
Orgad Shaneh
ced0f54ec3 Fix resolution of relative links on Windows
[ChangeLog][QtCore][QFileInfo] Relative symbolic links on Windows are
now resolved to their absolute path by symLinkTarget().

Task-number: QTBUG-62802
Change-Id: I5826517130bd389aef994bf3f4b6d99b2a91b409
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-09-04 07:35:09 +00:00
Orgad Shaneh
0f11fab6f7 Fix resolution of relative symlinks from relative path on unix
Consider the following:
/root/target - a file
/root/path/link -> ../target
/root/path/other/exe - executable

Running from /root/path/other.

exe is:

#include <QDebug>
#include <QFileInfo>

int main()
{
    qDebug() << QFileInfo("../link").symLinkTarget()
    return 0;
}

The link references /root/target, but the current output is
/root/path/target.

The link doesn't depend on the PWD. It depends on its own directory.

Change-Id: I61e95018154a75e0e0d795ee801068e18870a5df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-27 02:39:57 +00:00
Thiago Macieira
10b46fe474 Autotest: Fix test when running on a non-Unicode-capable locale
Like my default FreeBSD environment.

Change-Id: I3868166e5efc45538544fffd14d8a7f2dffa6ac9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-12 07:56:39 +00:00
Oswald Buddenhagen
d61ac601d8 unbreak tst_qresourceengine for prefix builds
don't try to execute a binary from the install dir.

amends 8e776d39f.

Change-Id: I37990bc83b295379f0c93f4ca712e1bbf980fd44
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-08-03 04:54:56 +00:00
Friedemann Kleint
3bdd59920f Refactor tst_qdir::entryList()
Split the test in two: one test that requires the symlinks
and test files and one that does not need them.
In the test with test files, verify each step and the deletion
of the files.

Task-number: QTBUG-58654
Task-number: QTBUG-50835
Change-Id: I14de57ce7a1df2d834d5a7565c804dead1d89088
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-29 09:51:50 +00:00
Thiago Macieira
7c45c6a3c4 Revert "Make QFile::open fail when using an invalid file name"
This reverts commit 346cd79192. The bug
report was incorrect, since the suggested file name is actually valid,
it just happens to name an Alternate Data Stream (ADS) "20:803Z.txt" in
file "testLog-03".

[ChangeLog][QtCore][QFile] Reverted an incorrect change from Qt 5.9.0
that forbade the creation and access to Alternate Data Streams on NTFS
on Windows. This means that file names containing a colon (':') are
allowed again, but note that they are not regular files.

Task-number: QTBUG-57023
Change-Id: I81480fdb578d4d43b3fcfffd14d4f2147e8a0ade
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-07-27 15:42:55 +00:00
Marc Mutz
94cf203f36 Use QSharedPointer::create() more
This is the result of running the (experimental) clang-tidy check
   qt-modernize-qsharedpointer-create

Discarded changes:

- tst_qsharedpointer.cpp: not sure we want these replacements there
  (→ separate change)
- tst_collations.cpp: hit in a template specialization that is
  instantiated with both QSharedPointer and QSharedDataPointer.

Change-Id: I203c2646e91d026735d923473af3d151d19e3820
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-19 13:40:42 +00:00
Friedemann Kleint
e1d7f7dfbc QFileSystemWatcher/Windows: Recreate handle for files
QWindowsFileSystemWatcherEngine uses one change notification
per directory to watch directories or files within that
directory. Adding files and their directories in a sequence
caused the value in QWindowsFileSystemWatcherEngineThread::HandleForDirHash
to be overwritten.
Relax the check for the flags (watcher attributes) to use >= and recreate
the change notification of a directory should its flags be insufficient.
This triggers when a file is added after its directory since files
require more attributes.

Task-number: QTBUG-61792
Change-Id: I371a72f1934fa82c53aaf84beb907825031f1c81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 07:02:45 +00:00
Friedemann Kleint
d3d5c22ccb tst_QProcess/tst_QFile: Extend blacklisting to MSVC2017
Extend the blacklisting introduced by
0ebebeb983.

Task-number: QTBUG-48455
Task-number: QTBUG-48504
Change-Id: Idf44948a5ede433435a8d0b61fef6413bb0b69bc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-05 12:42:14 +00:00
Friedemann Kleint
9656e972d1 Remove remains of wince in .pro files
Task-number: QTBUG-52590
Change-Id: I444fc9eedc8a8e4ad2ede224d66e7c410bedbb48
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-03 05:32:51 +00:00
Oliver Wolff
9ed46c2853 winrt: Fix tst_qurl
Change-Id: Ia7e33e3892f888ead1357f5cd522480f514421e3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-06-19 07:06:02 +00:00
Oliver Wolff
0086bf62a2 winrt: Fix tst_qtextstream
Change-Id: I5e8076a344a50f70e9618ff7b2e9258182601957
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-06-19 07:06:01 +00:00
Oliver Wolff
096cdb3c04 Fix tst_qfile::size for configurations using builtin test data
As the files are packaged into the binary, they have to be
extracted, before they can be ::open'ed.

Change-Id: Ie83086a2b9a73b6b0de462bdb52a71bb277ae06f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-06-19 07:05:57 +00:00
Thomas Sondergaard
65a317e674 Use QMap in QProcessEnvironment so variables are sorted
The motivation for this change is to make it simple to pass a
correctly sorted environment block to Win32 CreateProcess(). It is
also nice in other contexts that the environment variables are
sorted. The change is made for all platforms. This keeps it simple and
the only ill effect is slightly slower lookups.

Concerning the environment block passed to Win32 CreateProcess:

The environment block that is passed to CreateProcess() must be sorted
case-insensitively and without regard to locale. See
 https://msdn.microsoft.com/en-us/library/windows/desktop/ms682009(v=vs.85).aspx

The need for sorting the environment block is also mentioned in the
CreateProcess() documentation, but with less details:
 https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx

Task-number: QTBUG-61315
Change-Id: Ie1edd443301de79cf5f699d45beab01b7c0f9de3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-06-13 06:09:40 +00:00
Oliver Wolff
5441f399af Fix tst_QDir::emptyDir
It is possible that tmpdir already exists as a leftover from previous
tests. That is no reason for the test to fail.

Change-Id: I010633fb92defb064093af9872ae6fd2178f07dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-06-08 07:40:16 +00:00
Oliver Wolff
8e776d39ff Fix tst_qresourceengine for platforms with embedded test data
load(resources) makes embedding the test data into the executable
fail for platforms that use builtin test data. As the load call
is only used to obtain QMAKE_RCC we can avoid that call by
assuming that rcc was not renamed and assembling the path ourself.

Change-Id: I25b982d10f5617d9a213803e7e4bcc85fc66b2e7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-06-08 07:40:15 +00:00
Oliver Wolff
00d9033fa0 Fix tst_QFile for configurations without process support
Change-Id: Icca2d55f0b9402bf4bcb009d972f21075d144f87
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-05-31 13:10:04 +00:00
Sami Nurmenniemi
a1e94bcfbb Fix tests that assume system files are owned by root for qemu
If QEMU is provided sysroot with QEMU_LD_PREFIX, it opens files from there. If their
owner is the current user, testing their access rights based on assumption that they
are root fails. Skip the tests in that case similarly as is already done when the
tests are run as root.

This fixes following tests:
- tst_QTemporaryDir::nonWritableCurrentDir
- tst_QNetworkReply::getErrors(file-permissions)
- tst_qstandardpaths::testCustomRuntimeDirectory

Task-number: QTBUG-59966
Change-Id: I972ce37b4b5a7747cdd732a8e4a737ef09cbc6a5
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-26 09:12:12 +00:00
Thiago Macieira
9e2c6899e0 QUrl: fix IDN conversion when the ACE form is invalid
We guarded against the Unicode form being invalid and did not produce an
encoded form. But we did not guard against proper Punycode sequences
that decode to forms that had not passed the proper Nameprep stage. So
check for that and, if it fails, just keep the label in the form we
found it in (it's valid STD3 anyway).

[ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names
that look like Internationalized Domain Names to become corrupt in
decoded forms of QUrl, notably toString() and toDisplayString().

Task-number: QTBUG-60364
Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-25 00:51:43 +00:00
Thiago Macieira
21dd5d314a QUrl: fix IDN whitelist checking when the TLD is in Unicode
The whitelist is kept in ACE form, so if the TLD came in Unicode, we
need to run ToASCII before we can check the whitelist. This is slightly
inefficient because we'll run the same operation later in this domain.

Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
2017-04-24 19:29:57 +00:00
Marc Mutz
dfc2a4a537 QLoggingRegistry: remove rules vector
It only contained a concatenation of the individual rule sets,
probably to fix their order in a central place, as well as
simplifying iteration in defaultCategoryFilter().

Fix these two issues differently, but introducing a RuleSet
enum that lists rule sets in the order in which they should
be applied by defaultCategoryFilter(), and turn individual
rule sets vectors into a C array of vectors.

This enables two nested loops in defaultCategoryFilter to
replace the one loop over 'rules'. Apart from building up
'rules' in updateRules(), this was the only access to that
member. That leaves updateRules() with just the task of
running defaultCategoryFilter() on the new rule sets.
Consequently, a call to updateRules() can now replace the
identical loop in installFilter().

Performance should not suffer. Iterating over a fixed-size
array of vectors is hardly any slower than iterating over
a single vector, and while the construction of 'rules'
was probably a one-off task in most programs, this way
of keeping the rules also saves memory because rules are
not kept in two different vectors.

It is also more maintainable, of course.

Change-Id: Ibc132d096c8137dd02b034752646212e51208637
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-21 07:16:33 +00:00
Tor Arne Vestbø
924b02aecb Revert "Initialize QLoggingRegistry rules on first use, not qApp construction"
This reverts commit 47cc9e23a3.

We use QCoreApplication::applicationDirPath in the logging initialization to find
a possible qtlogging.ini file. Because QCoreApplication::applicationDirPath requires
a QCoreApplication instance this leads to a qWarning, which in turn leads to a
recursive call to the logging initialization, and in turn to a recursive mutex deadlock.

Task-number: QTCREATORBUG-18031
Change-Id: Ic75e1e8c062eb647991725378489bf87c9648cca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-19 22:59:43 +00:00
Tor Arne Vestbø
47cc9e23a3 Initialize QLoggingRegistry rules on first use, not qApp construction
Allows categorized logging before QCoreApplication has been created,
which otherwise would silently fail to output anything because the
category would never be enabled, despite QT_LOGGING_RULES being set.

Change-Id: Ia733105c5b6f28e22af511ced5271e45782da12b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-18 21:09:43 +00:00
Liang Qi
18934bcb0c Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/corelib/global/qglobal.cpp

Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
2017-04-18 10:46:22 +02:00
Thiago Macieira
cdc5f47aeb Restore compatibility with Qt 5.7.0 and 5.6.1
QSysInfo::productType() returned "osx" for all versions of macOS, even
10.12. Change 3e2bde3578 was incorrect.

[ChangeLog][Important Behavior Changes] QSysInfo::productType() and
QFileSelector behavior on macOS was restored to match what Qt used to
return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2,
5.7.1 and 5.8.0 is removed.

[ChangeLog][Future Compatibility Notice] The identifiers that
QSysInfo::productType() and QFileSelector will use to identify macOS
systems will change in Qt 6.0 to match the Apple naming guidelines which
will be current then.

Task-number: QTBUG-59849
Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 05:14:19 +00:00
Thiago Macieira
23d08ce2ed Fix QDir::mkpath() when the path contains "symlink/../"
It is incorrect to collapse a "symlink/.." segment because the parent
directory of the symlink's target may not be the directory where the
symlink itself is located.

[ChangeLog][QtCore][QDir] Fixed a bug that caused QDir::mkpath() to
create the wrong directory if the requested path contained a symbolic
link and "../".

Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e367730a1e24
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-04-07 20:26:02 +00:00
Thiago Macieira
795a54ff96 QDataStream: add operator<< and >> for std::nullptr_t
std::nullptr_t is nullary: it accepts only one value, nullptr. So we
don't need to read or write anything. This commit simply adds the two
operators that allow generic code to operate on std::nullptr_t if
required.

This commit also adds the actual use to QMetaType::load/save, even
though there's no change in behavior.

[ChangeLog][QtCore][QDataStream] Added operator<< and operator>>
overloads that take std::nullptr_t, to facilitate generic code.

Change-Id: Iae839f6a131a4f0784bffffd14aa37e7f62d2740
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-07 17:41:06 +00:00
Liang Qi
c50f6a8329 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-04-06 14:35:54 +00:00
Sami Nurmenniemi
60f6e4428f Fix tst_QFile for qemu
Qemu does not report /proc/self/maps size correctly. Added expected
failure for it

Change-Id: I4019884702b8f9a33717b02e79c9e0c042b2449f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-06 12:19:55 +00:00
Liang Qi
0fc569184c Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
	src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp
	src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
	src/widgets/widgets/qtabbar.cpp

Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
2017-04-06 14:16:31 +02:00
Kai Koehne
b2efaeba79 tests: Unify license to GPL-EXCEPT
Change-Id: Ic718650a8a7bddd4ee28c5650a3f5baf70886e51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-04-03 07:18:46 +00:00
Thiago Macieira
9a0d47bcf1 tst_largefile: fix the mapOffsetOverflow case to match actual behavior
Unix mmap(2) system calls do allow for mapping beyond the end of the
file, though what happens after you try to dereference the pointers it
gives is unspecified. POSIX[1] says that implementations shouldn't allow
it:
 The system shall always zero-fill any partial page at the end of an
 object. Further, the system shall never write out any modified portions
 of the last page of an object which are beyond its end. References
 within the address range starting at pa and continuing for len bytes to
 whole pages following the end of an object shall result in delivery of
 a SIGBUS signal.

However, Linux allows this in read-write mode and extends the file
(depending on the filesystem).

Windows MapViewOfFile never allows mapping beyond the end.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html

Change-Id: Ie67d35dff21147e99ad9fffd14acc8d9a1a0c38d
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-31 06:31:25 +00:00
Sami Nurmenniemi
514fff1e39 Fix largefile tests on ARM and QEMU targets
- Test tst_LargeFile::mapFile fails on Qemu for files over 4Gb.
  Fixed by limiting maxSizeBits to 28 (must be n*4 and < 32).
- Bug QTBUG-21175 is also effective on ARM targets. Fixed by
  expecting failure also on ARM.

Change-Id: I9103727e618a17259b4785ec8c284f3bb60ebea7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-28 06:55:32 +00:00
Liang Qi
7702fe8602 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
2017-03-27 10:42:08 +02:00
Ulf Hermann
329385a5d5 Build examples and tests only if their requirements are met
If the respective modules aren't available we cannot build the tests
and examples. We drop the qtConfig(opengl) requirement for the opengl
examples as
a, we would need to make the QtGui configuration available for that to
   work, and
b, we should not add too much detail to the tests and examples build
   configurations. Checking each test and example for every feature it
   uses would be too much.

Task-number: QTBUG-57255
Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-22 15:55:55 +00:00
Thiago Macieira
cd58abb1db Autotest: make tst_QDir more reliable on tests being run out of order
mkdir(data2) depended on mkdir(data1) being run before, or it would
fail. In addition, the rmdir() test required the equivalent mkdir() test
being run before. So drop these annoying dependencies and make the tests
cleaner by having clear separation of the test data and merging the two
tests into one

The entryList() test still depends on the testdir being clean: it will
fail if mkdirRmdir() previously failed.

Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e35972d2a3d8
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-22 06:40:59 +00:00
Liang Qi
65faf45655 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/plugins/platforms/eglfs/eglfs-plugin.pro

Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
2017-03-21 19:07:53 +01:00
David Faure
05924ddff9 tst_qurl: skip test with ':' in filename, on Windows
Task-number: QTBUG-59622
Change-Id: Ib4b458b5d0fc2dd9ea6758b8517a953f6d768a39
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-03-21 13:15:53 +00:00
David Faure
035e0eafa6 QUrl::fromUserInput: fix handling of files with a ':' in the name
QUrl::isRelative(str) would be false for such files, so first check for
file existence before doing any URL parsing.

Change-Id: I51b6229251ad94877ac408b2f8018456d3e10a36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-20 12:55:36 +00:00
Jesus Fernandez
346cd79192 Make QFile::open fail when using an invalid file name
Fixes the bug in QFile which allowed opening a file with reserved
characters in its name.  If the name is a long file path, CreateFile
opens a file with a truncated name instead of failing, so we have
to catch reserved characters ourselves.

[ChangeLog][Windows] Fixed a bug that caused QFile to create
files with truncated names if the file name was invalid. Now,
QFile::open correctly fails to create such files.

Task-number: QTBUG-57023
Change-Id: I01d5a7132054cecdfa839d0b8de06460039248a3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-17 11:06:43 +00:00
Liang Qi
d51c3ecf8e Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	examples/network/network.pro
	mkspecs/features/mac/default_post.prf
	src/corelib/io/qfilesystemengine_win.cpp
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess.h
	src/corelib/io/qprocess_p.h
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/thread/qmutex.cpp
	src/platformsupport/fontdatabases/windows/windows.pri
	src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
	tests/auto/corelib/io/io.pro

Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
2017-03-13 15:55:44 +01:00
Marc Mutz
75f5e2bef2 Deprecate QString::null
It's a Qt 3 compatibility vehicle, and as such inherits the now-alien
property to distinguish empty and null strings. Particularly worrisome
is the following asymmetry:

   QString("") == QString::null          // false
   QString("") == QString(QString::null) // true

Instead of fixing this behavior, recognize that people might use it as
a weird way to call isNull(), albeit one that once was idiomatic, and
simply deprecate everything that deals with QString::null.

[ChangeLog][QtCore][QString] QString::null is now deprecated. When
used to construct a QString, use QString() instead. When used to
compare to a QString, replace with QString::isNull().

Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
2017-03-12 17:41:16 +00:00
Olivier Goffart
b52b509ae4 QLockFile: Don't deadlock if the lock file has a mtime in the future
Stale Lock files in the future can happen in some situations. For exemple
two computers with different clocks access the same file system. It could
be that one of the timestamp is totaly off (several years into the future).

[ChangeLog][QtCore][QLockFile] Fixed a deadlock occurring if a corrupted
lock file's modification time is in the future.

Change-Id: I8dac98a0e898c76bcef67f8c195e126c996b6add
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-10 17:09:24 +00:00
Ulf Hermann
d6330a19b2 Use QT_CONFIG(library) instead of QT_NO_LIBRARY
For the windows file system engine, we add an extra macro to use
library loading if configured to do so, but avoid it on WinRT, as
none of the symbols would be found.

We also QT_REQUIRE_CONFIG(library) in the library headers and
exclude the sources from the build if library loading is disabled.
This, in turn, makes it necessary to clean up some header inclusions.

Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-06 11:27:20 +00:00
Joerg Bornemann
80145d556e Increase timeout of tst_QProcess::softExitInSlots even more
Commit eab7efd1 increased the timeout for this test, but apparently 10
seconds are still not enough. Set the timeout to a minute.

Task-number: QTBUG-59075
Change-Id: Iebab8e5c73c4858ca90063a82aedfbb2546a62cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-03 16:26:41 +00:00
Ulf Hermann
44af54419e Properly use the "process" feature
Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in
qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess
headers, exclude the sources from compilation when switched off, guard
header inclusions in places where compilation without QProcess seems
supported, drop some unused includes, and fix some tests that were
apparently designed to work with QT_NO_PROCESS but failed to.

Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-27 15:44:46 +00:00
Liang Qi
de49839df8 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	mkspecs/features/moc.prf

Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
2017-02-24 20:01:42 +01:00