Commit Graph

6956 Commits

Author SHA1 Message Date
Kai Koehne
60054b5940 QSettings: Replace deprecated Win32 SHGetSpecialFolderPath
SHGetSpecialFolderPath is declared 'unsupported' by Microsoft, and has
problems with non-ASCII characters. Replace it by the newer
SHGetKnownFolderPath.

Task-number: QTBUG-50570
Change-Id: I8b2dfa10fa5dc30e6c3be094a2ba8d7c3504f2ca
GPush-Base: 4d181bd93234a3747b520d10417825a0147bfeb1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2016-11-23 13:48:46 +00:00
Lars Knoll
5d9413ab35 Remove Mac specific code paths from qiconvcodec
The code is dead, as the codec is never used on macOS.

Change-Id: I86138f1c95e5564256b4d592f0044e83658def93
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 10:31:03 +00:00
Lars Knoll
fd9e5d9033 Clean up iconv configuration
Turn iconv off if ICU is being used (in line with codecs.pri)
and get rid of the DEFINES += GNU_LIBICONV in the pri file.

Change-Id: I6fbca975498adbb3e67f913ae9b1dd5cc53ee8da
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 10:30:57 +00:00
Lars Knoll
7e9aca683a De-duplicate the systemsemaphore entry
Change-Id: Id015cfe60956d899bbb58597b88204738578b7fe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 10:30:45 +00:00
Kai Koehne
ae93a76c93 Document The Public Suffix List
Change-Id: I3c8b00e04ed30209b0de0927b473ba2b9a4f0c87
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-23 09:35:35 +00:00
Edward Welbourne
a32424b46c AreArgumentsNarrowedBase: Correct logic for narrowing connect() casts
The prior test deemed there to be narrowing if source and destination
integral-or-enum types didn't have the same signedness; but all values
of an unsigned source type can be represented in a larger signed
destination type, so there is no narrowing in this case.
Updated QObject test-case to match.

Change-Id: I517a5997adcad70e185d7469a8d26788e463cb75
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-11-23 09:24:40 +00:00
Liang Qi
38c1057f69 Merge remote-tracking branch 'origin/5.6' into 5.7
This also reverts commit 0d2f0164f4.

Conflicts:
	header.BSD-NEW
	qmake/Makefile.win32
	src/openglextensions/qopenglextensions.cpp
	src/openglextensions/qopenglextensions.h
	src/winmain/qtmain_win.cpp
	src/winmain/qtmain_winrt.cpp
	tools/configure/configureapp.cpp
	util/glgen/qopenglextensions.cpp.header
	util/glgen/qopenglextensions.h.header

Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
2016-11-23 09:24:36 +01:00
Anton Kudryavtsev
be94fc445a QString: optimize remove(QChar, Qt::CaseSensitivity)
remove(int, int) with O(N) was used in a loop.
We had a quadratic complexity.

Use erase-remove idiom to fix it.

Change-Id: I643a2a75619ec5ea2bf99e48a25f64a7f69ba156
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-11-23 05:27:05 +00:00
Friedemann Kleint
b5222307af Fix some qdoc-warnings
qtbase/src/corelib/kernel/qdeadlinetimer.cpp:343: warning: Cannot find 'setPreciseRemainingTime(...)' in '\fn' void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, unsigned nsecs, Qt::TimerType type)
qtbase/src/corelib/kernel/qdeadlinetimer.cpp:459: warning: Overrides a previous doc
qtbase/src/corelib/kernel/qelapsedtimer.cpp:86: warning: Unknown command '\ref'
qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_2' in QSysInfo::MacVersion
qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_3_0' in QSysInfo::MacVersion
qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS' in QSysInfo::MacVersion
qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_1' in QSysInfo::MacVersion
qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_0' in QSysInfo::MacVersion
qtbase/src/corelib/kernel/qdeadlinetimer.cpp:175: warning: Missing parameter name
qtbase/src/corelib/kernel/qdeadlinetimer.cpp:175: warning: No such parameter 'ForeverConstant' in QDeadlineTimer::QDeadlineTimer()
qtbase/src/corelib/kernel/qdeadlinetimer.h:156: warning: No documentation for 'QDeadlineTimer::remainingTimeAsDuration()'
qtbase/src/gui/painting/qcolor.cpp:796: warning: Undocumented parameter 'name' in QColor::QColor()
qtbase/src/gui/painting/qcolor.cpp:802: warning: Undocumented parameter 'name' in QColor::QColor()

Some errors in QDeadlineTimer remain due to qdoc not fully supporting templates.

Change-Id: Ie7afd91c48048748eeda23c32056583c31fd7490
Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-23 05:24:02 +00:00
Timur Pocheptsov
e2b856d562 QDir::tempPath - use NSTemporaryDirectory on Darwin
Instead of hardcoded "/tmp".

Task-number: QTBUG-57165
Change-Id: I9d3ae157c22ce131281b8279149eea87a26244e8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-11-22 19:10:05 +00:00
Marc Mutz
d6c8fab880 QMutex: make sure we try_lock_for no shorter than the duration passed
By templating on the <chrono> types and unconditionally using
duration_cast to coerce the duration into a milliseconds, we
allowed code such as

   mutex.try_lock_for(10us)

to compile, which is misleading, since it's actually a zero-
timeout try_lock().

Feedback from the std-discussions mailing list is that the
wait_for functions should wait for _at least_ the duration
given, because that is the natural direction of variance
(tasks becoming ready to run might not get a CPU immediately,
causing delays), while an interface that documents to wait
_no more_ than the given duration is promising something it
cannot fulfill.

Fix by converting the given duration to the smallest number
of milliseconds not less than the original duration. If that
is not representable in an int, use INT_MAX, emulating the
effect of a spurious wakeup, which are allowed to happen if
the function returns false in that case.

In the above example, the try_lock_for call is now equivalent
to

  mutex.tryLock(1);

The tryLock() docs state that the actual waiting time does
not exceed the given milliseconds, but fixing that is a
separate issue.

Change-Id: Id4cbbea0ecc6fd2f94bb5aef28a1658be3728e52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-22 11:32:35 +00:00
Andy Shaw
3cd457bdad Handle RemovePath correctly when calling matches()
Change-Id: Ied324a537df127e676fad26b42e658a9d5aeec9b
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-22 07:05:30 +00:00
Oliver Wolff
9f17c24589 Enable constexpr support for Visual Studio 2017
Change-Id: I894789c41cc2c1a327c14d0526e658520d096085
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-22 06:07:25 +00:00
Oliver Wolff
38675e18fc Add support for Visual Studio 2017
Tested with RC

Task-number: QTBUG-57086
Change-Id: I21f56edca3852b52edd2c5fdcce76817141e8d4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-22 06:07:23 +00:00
Simon Hausmann
d207738245 Fix missing last modification time stamp in qrc content
The time stamp is added at the end of the node information and
consequently this also bumps the version.

Task-number: QTBUG-57182
Change-Id: Ia10e006f28c0b168b2bcd74ed8b7098f84d10af3
Reviewed-by: hjk <hjk@qt.io>
2016-11-22 04:57:02 +00:00
Marc Mutz
3691f7ca0c QFutureInterface: make accesses to 'state' thread-safe
Introduce helper functions switch_{on,off,from_to} to make
the code more readable, and prepare everything for later
optimizations reducing the sizes of critical sections (by
locking the mutex later, or even never).

This commit, however, is only concerned with shutting up
tsan.

In waitForResult(), simplified the code by removing an
unneeded if guard: the condition is checked in the while
loop immediately following in the then-block, and the
local variable declaration that precedes the loop is not
worth guarding.

Change-Id: I24bfd864ca96f862302536ad8662065e6f366fa8
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-20 15:48:05 +00:00
Kai Koehne
4b1c343e5e Doc: Add missing reference to qInfo()
Change-Id: I7438aa8ff9fddf2e0155ffe0d442f96d4d9265d4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-11-18 16:19:49 +00:00
Marc Mutz
1a3a8cf87b QDeadlineTimer: mark more functions nothrow
Change-Id: I3be9c69b46901311e9150a7f718707d8ff523e9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-18 07:43:42 +00:00
Edward Welbourne
658c8370e4 QDateTimeParser: localize variable to avoid shadowing
The outer scope it was in had a later clause with its own pos
variable.

Change-Id: I8d083d3d5935416ef82a78890ed145f02d6d6ded
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-17 14:22:44 +00:00
Alexander Volkov
48d7db6b31 QtCore: Add missing override
Change-Id: Ifdec31aabdd0371f36abbb382e49f52f5b58ee94
Reviewed-by: hjk <hjk@qt.io>
2016-11-16 22:57:22 +00:00
Liang Qi
b39adf8945 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-16 13:54:01 +00:00
Liang Qi
90c425642d Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/common/linux-android.conf
	src/gui/opengl/qopengl.h
	src/network/socket/qnativesocketengine_winrt.cpp
	src/network/socket/qnativesocketengine_winrt_p.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	sync.profile

Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
2016-11-16 12:35:36 +01:00
Kai Koehne
a6fbfea24a Doc: Mention qtmain library in Qt Core overview
The documentation for the qtmain license is right now pretty hidden.
The library is added by qmake independent of the Qt module that are
linked to, but it seems safe to assume people at least link against
Qt Core.

Change-Id: Id474990edde45feab6727bada2bc6a28946216cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-16 11:32:10 +00:00
Oswald Buddenhagen
4d90bd55a5 re-arrange QLibraryInfo::rawLocation() for comprehensibility
swap the branches for (not) reading from qt.conf, and use a state
variable instead of an 'else' for mutual exclusion. this is somewhat
more self-documenting, and allows for a saner handling of the mkspec
fallbacks (which really should have been in a separate [QMake] section
along with Host* and Sysroot, but changing that now is way too much
hassle downstream).

Change-Id: I80a73294022fd1e8d84fe501b737c4fc7758662f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:36 +00:00
Oswald Buddenhagen
712a041eb8 qmake: don't look for qrc-based qt.conf
we know there is none.

Change-Id: I75bc39f8b900525e7db29664f7dd2117d2bd33d2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:14 +00:00
Allan Sandfeld Jensen
e133f0cca4 Improve error offset in JSON parsing
Do not consume white-space after a token before the token has been
parsed, otherwise we end up with misleading offsets. This also fixes
a wrong error of illegal number in several cases.

Change-Id: I492ca4de0346a1d0ab73b1c23d7a72dba812664c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-15 14:19:23 +00:00
Liang Qi
9808b53fde Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/plugins/platforms/eglfs/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp

Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
2016-11-15 09:58:16 +01:00
Marc Mutz
80842959c4 Revert "Optimize QJsonObject::operator=="
This reverts commit 862fa24179,
which attempted to optimize QJsonObject::operator== under the
assumption that the entries it holds are lexicographically
sorted. They should be, because Object::indexOf() finds them
by binary search, but apparently both fromJson(), as well as
construction through op[] leave (some) entries unsorted.

This behavior should be fixed, because other code relies on
sorted entries, too, but until the problem is more fully under-
stood, revert the patch to unbreak equality comparisons.

Task-number: QTBUG-56843
Change-Id: I5b608c16d1bbcb4f01b75ce93bd58b49ff050be2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-14 16:49:39 +00:00
Lars Knoll
0038b40053 Unbreak a couple of configurations
Fix compilation with topleveldomain, textodfwriter
and cssparser features disabled.

Change-Id: I3f061fb09eef36cd640256a46cf77dde85a54d3d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-11 17:04:47 +00:00
Lars Knoll
bfaa8925d5 Improve the validation algorithm for binary JSON
Add better boundary checks and catch (hopefully all)
cases where invalid binary JSON could cause crashes.

Change-Id: I206510b7c5e3ba953802a5f46645878e65704ecc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-11-11 12:34:27 +00:00
Allan Sandfeld Jensen
9512d97c90 Remove a few unnecessary recalculations of hash
When we already have the hash-value we can give it to findNode to avoid
recalculating it, and if don't need it later, we don't need to request
it.

Removes around 1% of qHash calls when running QtCreator.

Change-Id: I0e5e61e26a407f4ac7e029a3ac13ddd553e4994b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-09 14:42:43 +00:00
Paul Olav Tvete
49680fe0bb Fix misspelled QT_NO_ features
Change-Id: I77ca4139cb8437b781f082195bf4c92034f55512
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-09 13:13:22 +00:00
Edward Welbourne
8ee65cd1f2 Correct a Q_CHECK_PTR()'s parameter
Someone cut-and-pasted but forgot one of the changes.

Change-Id: I647dc8117ebfe8ce3d4b26d468b80c15d4e533e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-09 09:41:15 +00:00
Kai Koehne
615270a300 Rename QtPrivate::is_[un]signed to QtPrivate::Is[Un]signedEnum
Any other use than for enums should use std::is_[un]signed. Make this
explicit by renaming the type traits.

Change-Id: I494158563c95c710e710d0d337f4e547006df171
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-09 09:13:29 +00:00
Kai Koehne
5c3b16706f Remove compiler-specific implementations of Q_IS_ENUM
Since the macro is now just a wrapper for std::is_enum,
its use is also deprecated.

[ChangeLog][QtCore][Global] Q_IS_ENUM is deprecated.
Use std::is_enum<>::value instead.

Change-Id: I09b9f4559c02c81f338cace927873318f2acafde
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-09 09:13:01 +00:00
Maurice Kalinowski
c83ba01f7b winrt: remove superfluous code
We do not need to check for an invalid timer id, as this can only happen
if the above check is already true. Hence, this was doing the same check
twice.

Task-number: QTBUG-56756
Change-Id: Icca9b26c32ce88eab76dd02c6c10b24af07bfad7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-09 07:03:31 +00:00
Maurice Kalinowski
0383d0be33 winrt: Do not copy into a reference
The intention has probably been to reset a reference, which is not
required.

Task-number: QTBUG-56756
Change-Id: I1ef44b6c9b8365ac5c8d48234137e518558e9398
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-09 07:03:28 +00:00
Kai Koehne
ed7f77071d Replace custom type traits with std one's
Remove most type traits from qtypetraits.h, but keep the custom
implementation of is_signed/is_unsigned. This gets rid of
BSD-3 licensed code from Google in a public header (hugh!).

The custom implementations for is_signed/is_unsigned are kept
because the implementations in gcc's standard headers do not
work as we expect for enums - both is_signed and is_unsigned
always returns false there - see also
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027

[ChangeLog][QtCore][General] Qt now relies on type traits from
the C++ standard library.

Change-Id: I3f2188b46949f04ca4482a6ac9afd3482103f0e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-08 15:31:17 +00:00
Kai Koehne
b5fa247102 QStandardPaths: Do not check whether path exists (Windows)
It's arguably better to return a non-existing location than no location
at all. This makes it in line with the documentation for e.g.
QStandardPaths::writableLocation that says

  Note: The storage location returned can be a directory that does not
  exist; i.e., it may need to be created by the system or the user.

Finally, this was also the behavior of code that used
SHGetSpecialFolderPath before.

Change-Id: I5ee44747a38434535610e45a4d303b36ef79d42a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-08 15:30:42 +00:00
Kai Koehne
aa73a7026f QStandardPaths: Replace deprecated Win32 SHGetSpecialFolderPath
SHGetSpecialFolderPath is declared 'unsupported' by Microsoft, and has
problems with non-ASCII characters. Replace it by the newer
SHGetKnownFolderPath.

To fix compilation with MinGW, we have to link in libuuid also in
the bootstrapped tools. The alternative is redefining all GUID's
(like we did for FOLDERID_Downloads), which is arguably less elegant.

Task-number: QTBUG-50570
Change-Id: If99be559bc72de3734ae1fa4d50f960659739898
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-08 15:30:39 +00:00
Kai Koehne
aa7e764058 MinGW: Explicitly define NTDDI_VERSION
Define NTDDI_VERSION, just like _WIN32_WINNT, to be Windows Vista.
Usually NTDDI_VERSION is automatically set by MinGW headers to the value
that matches _WIN32_WINNT. However, for precompiled headers the inclusion
order is that _WIN32_WINNT is set _after_ the relevant MinGW header is
parsed, so this can fail.

The alternative would be to set _WIN32_WINNT via a compiler flag, e.g.
in the mkspecs.

Change-Id: Id59e7083f0d3e00491b54e87647c6c9fabb99795
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-08 15:30:33 +00:00
Liang Qi
ef5b4d2ada Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-08 12:16:18 +00:00
Allan Sandfeld Jensen
baebb6aa26 QVariant to QJsonValue::Null conversion
Adds a few missing parts of the conversion from QVariant to QJsonValue
after the introduction of the nullptr QVariant. The conversion the other
way is already implemented.

Change-Id: I8b25dec4b476c4761c5098a60944ff11c36f8bec
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-08 09:50:32 +00:00
Liang Qi
9d50df5511 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/corelib/tools/qalgorithms.h

Change-Id: Ib8ce4d5d9ecd5b9c166d5b8b44e58f3e4e7283ff
2016-11-08 10:01:50 +01:00
Maurice Kalinowski
fe51dbac3d winrt: Fix potential memory corruption
The timerInfo list might get accessed concurrently and cause references
to become dangling. Hence, we need to protect usages with a mutex.
According to tests/benchmark there is no impact on performance.

Task-number: QTBUG-56756
Change-Id: I4bdffccff70d2dca99f4a39defad438afe571ada
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-08 07:32:43 +00:00
Andrew Knight
b18a4de814 Register Qt::TextFlag with QT_Q_ENUM
By some unfortunate oversight, this enum was never registered.

Change-Id: I2227ccf294d2cf717187a3dcaaf4cbfacc4ac65d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-05 10:15:03 +00:00
Thiago Macieira
ea9a8672a1 Fix build with ICC on macOS: <atomic> is properly supported
I'm guess I introduced the regression in the commit
18ed6f20ad, which I wasn't sure about.

Change-Id: Ic46ff326a6ba46bc877cfffd14839f84fdf796e7
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-04 16:32:54 +00:00
Kai Koehne
dd876ccb66 Add missing QBIG5CODEC_LICENSE.txt file
Add file that was forgotten in eb96813976.

Change-Id: Ib288bfc1f1f9cb4857e42f2fa3fe750e23b56aea
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-04 11:48:47 +00:00
Liang Qi
e918605f42 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/json/qjsonparser.cpp
	src/gui/opengl/qopengl.cpp

Change-Id: Ib4d3208398399691839e6c6eaeb9006f99e3a62b
2016-11-04 11:39:15 +01:00
Lars Knoll
15df60239d Fix OOM crashes for huge json documents
Check all places where we reallocate our internal data structure
and return a DocumentTooLarge parse error if we can't get enough
memory.

Change-Id: I006d0170d941837220c7dad0508571b68e2cbfd7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kati Kankaanpaa <kati.kankaanpaa@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-04 07:53:39 +00:00
Thiago Macieira
4b6784b49c Stop using readdir_r: glibc deprecated it and it's not a good idea
POSIX does not require that readdir() be reentrant even for operations
on different dirent objects, but all implementations (according to the
glibc documentation) already do that. Moreover, it's not a good idea to
use readdir_r since the buffer space is limited by the caller, so
certain file names may be too long (ENAMETOOLONG) -- we had a workaround
for QNX, but for no other OS. According to the glibc documentation, it
is expected that POSIX will mark readdir_r obsolete and instead require
some form of reentrancy for readdir.

This commit makes everyone use readdir instead. The macros in
qplatformdefs.h are left behind in case someone else is using them.

With glibc 2.24, we started getting:

 qplatformdefs.h:150:35: warning: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Wdeprecated-declarations]
 qfilesystemiterator_unix.cpp:112:17: note: in expansion of macro ‘QT_READDIR_R’

Task-number: QTBUG-56088
Change-Id: I33dc971f005a4848bb8ffffd14749b4082f62e69
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2016-11-03 15:31:33 +00:00
Thiago Macieira
ca4d93d85e Stop unloading plugins in QPluginLoader and QFactoryLoader
QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we
missed the equivalent code in QFactoryLoader (which bypasses
QPluginLoader). Besides, QPluginLoader::unload() was still doing
unloading, which it won't anymore.

Not unloading plugins is Qt's policy, as decided during the 5.0
development process and reaffirmed now in 5.6. This is due to static
data in plugins leaking out and remaining in use past the unloading of
the plugin, causing crashes.

This does not affect QLibrary and QLibrary::unload(). Those are meant
for non-Qt loadable modules, so unloading them may be safe.

Task-number: QTBUG-49061
Discussed-on: http://lists.qt-project.org/pipermail/development/2015-November/023681.html
Change-Id: I461e9fc7199748faa187ffff1416070f138df8db
(cherry picked from commit 494376f980)
Discussed-again-on: http://lists.qt-project.org/pipermail/development/2016-October/027476.html
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-02 17:58:48 +00:00
Jesus Fernandez
dcedce51a6 Include intrin.h header when using MSVC
Fixes the build with MSVC15

Change-Id: I7f22938583775bb3f0767d50cf59a43cab95eede
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-02 09:49:54 +00:00
Anton Kudryavtsev
c12f42e91b QString: optimize replace(QChar, QChar, Qt::CaseSensitivity)
Only detach() if the string does contain the character to be replaced.
Save memory allocations.

Change-Id: I69c070d3f0b99f505fb6c209f657cdce31a35461
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-11-01 18:36:53 +00:00
Liang Qi
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	config.tests/win/msvc_version.cpp
	configure.pri
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	src/corelib/io/qsettings_mac.cpp
	src/corelib/json/qjsondocument.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.h
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/qiosintegration.h
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
	tests/auto/gui/painting/qpainter/tst_qpainter.cpp
	tools/configure/environment.cpp

Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
2016-11-01 06:02:55 +01:00
Martin Smith
1df45820d4 doc: Document two undocumented functions
This change provides missing documentation for two member
functions of QString.

QString QString::fromUtf16(const char16_t *str, int size)
QString QString::fromUcs4(const char32_t *str, int size)

Change-Id: I94a9437a457062e49e4457f5876e4d7c31fff24c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-10-31 14:03:58 +00:00
Kai Koehne
e5451f086b Document license for CLDR data in Qt Core
Change-Id: I21bf76a5603f3384fccad46a16b7304380a7a444
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-28 12:46:46 +00:00
Kai Koehne
e46cf80f8a Remove legalese text from QLocale
The mentioned functions are now documented in src/3rdparty/freebsd.
Anyhow, the license and copyright differs ...

Change-Id: Ib59ace624d1d8244f591668ed05993787ca65d24
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-10-28 12:46:43 +00:00
Kai Koehne
eb96813976 Document use of BSD code in Qt Core
Change-Id: I31305e40dc57ddd37e5ef35a52cc99dc7ebb3bc5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-28 12:46:39 +00:00
Liang Qi
af0d0b9c06 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileenginefactory.h
	src/plugins/platforms/ios/qiosintegration.h
	src/widgets/widgets/qcombobox.cpp
	tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
	tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp

Change-Id: Ibaee7cbbba99e7c4b1d8926e55932ffa6030ce45
2016-10-27 10:23:39 +02:00
James McDonnell
145587a521 Recontribute QUrl::fromUserInput
Recontribute QUrl::fromUserInput under the corporate license agreement;
i.e. remove the separate BSD license from the code.

Change-Id: I1e0b4aab921fb20d2fd558fe732cea596ecbc9ca
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-27 06:22:41 +00:00
Lars Knoll
99331f661d Fix QStandardPaths::FontsLocation to be compliant with the latest XDG spec
According to the latest XDG spec, FontsLocation should point to
XDG_DATA_DIR/fonts, not ~/.fonts.

Task-number: QTBUG-55507
Change-Id: Ia62ffe172abbb93d5ce7fd58bdf038ff13954f1b
Reviewed-by: David Faure <david.faure@kdab.com>
2016-10-26 13:07:43 +00:00
Lars Knoll
04f0a69e96 Replace PKGCONFIG+=foo usages with QMAKE_USE
replace explicit pkg-config uses with the results of configure tests,
for consistency.

Change-Id: I3587db6085798ea7a49f8871fc6838eb687a6391
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-26 13:07:34 +00:00
André Somers
60dbd80e5a Document that qFuzzyCompare does not work on NaN or infinity
On a discussion in the Development mailing list it became clear that
qFuzzyCompare does not work for NaN or infinity values. That was not
mentioned in the method documentation though. This patch fixes that
hiatus. It also clarifies how to deal with the comparing to 0.0
limitation.

Change-Id: I8b6d54cc0c1136e79b0d7be1a62bc9ed394d2575
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-10-26 08:39:46 +00:00
Kai Koehne
443c9c1db5 Remove QSegfaultHandler class
The origin of the class predate git history, but it has been apparently
unused in Qt since Qt 4.5 times. Removing this relieves us from
documenting its custom license.

Change-Id: Ie91be5f0b2fbaf10dc212c44ebd37e6b9d781592
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-26 03:16:53 +00:00
Jesus Fernandez
951b34453b Include intrin.h header when using MSVC
Allows the usage of _BitScanForward, _BitScanReverse, __popcnt and
__popcnt16 functions.
Fixes part of the build with MSVC15.

Change-Id: I5ec37184209196ad19beddb4d6a36f9a9fd3b315
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-26 03:16:45 +00:00
Thiago Macieira
0cffe2135e qversiontagging.h: Don't tag binaries in static mode
Though there should have been no ill-effects, they happen.

Task-number: QTBUG-52605
Change-Id: I9093948278414644a416fffd147444078edc3183
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-25 20:21:20 +00:00
Erik Verbruggen
f6eb570c7d Darwin: normalize all watched paths to composed from
This will be done by all POSIX APIs for strings coming in that way, but
because other code (like NSWhateverViews) will most likely return
decomposed form, we make sure that those are in composed form too.

Task-number: QTBUG-55896
Change-Id: I065e11cee6b59706d4346ed20d4b59b9b95163b8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-10-24 15:10:42 +00:00
Kai Koehne
71d4aea646 Fix description of feature 'topleveldomain'
The property is 'purpose' now. Also elaborate a bit more on the feature.

Change-Id: I66aa4165044f132dff018cfd01d54b939bb64fac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-24 07:32:51 +00:00
Erik Verbruggen
30b7278c5c Remove type punning from ucstrncmp
Type punning is UB.

Change-Id: I0022d2a38136d80f5ddda21cea7dc0968c736242
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-23 11:48:20 +00:00
Liang Qi
28628a5d5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/eglfs/qeglfshooks.cpp

Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
2016-10-22 21:19:57 +02:00
Frederik Schwarzer
92df823ed6 QFileInfo: fix double sentence in apidoc
Change-Id: Ie1cf32565b2fcb828ec381c45595adad1392e2ec
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-10-21 09:06:50 +00:00
Frederik Schwarzer
ef88bf02ef Fix some typos in docs and apidocs
While "commonest" is still correct English, it's rather old-fashioned
and "most common" predominates Qt's wording style.

Change-Id: I20d72c098ee40b2a89f91e42f7208fe5b87286a2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-10-21 09:06:13 +00:00
Erik Verbruggen
49d3bb0058 Normalize realpath(3) output to composed form
All strings coming out of POSIX API calls are converted to composed form
by QFile::decodeName. Do the same for realpath(3) output. This is
especially important for HFS+, which will store file names in decomposed
form, and APIs will therefore return strings in decomposed form.

Task-number: QTBUG-55896
Change-Id: I5e51f4e5712ff26bf9644cbcf9a9603995748892
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-10-21 07:49:00 +00:00
Kai Koehne
557abfc327 QUrl effective TLDs: update table
There are more than 1000 new entries since the table has been
generated the last time. The autotest needs to be tweaked
because the rules for the .mz domains have changed; use the
.ck domain instead.

Change-Id: Ife692afd46ac41a66604e966e5e8cb57c7aa649c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-21 06:29:53 +00:00
Tor Arne Vestbø
837781db52 Add Qt::ISODateWithMs date format, with support in QTime/Date/DateTime
The Qt::ISODate format strips milliseconds, so a new format is introduced
that keeps the milliseconds. A new format was chosen over fixing the
existing format due to the behavioral change of suddenly having ms
as part of Qt::ISODate.

Change-Id: If8b852daed068cce8eee9b61a7cd4576bc763443
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-20 15:15:40 +00:00
Marc Mutz
46078f3374 QOrderedMutexLocker: unlock in reverse order of locking
This is an improvement for the following reasons:

- Should mutex locking allocate any kind of resource,
  unlocking in reverse order will free those resources
  in inverse order, which helps typical allocators.
- If the lock pair is contended, by unlocking in the
  same order as locking, we were allowing the waiting
  thread to wake up to take the first lock just to
  find that the second lock is still held by someone
  else.

The order of unlocking has no influence on the correct-
ness of the algorithm.

Change-Id: Id16b0342aef325c14a7bd8836d3a75db68ef2588
Reviewed-by: David Faure <david.faure@kdab.com>
2016-10-19 13:25:01 +00:00
Andy Shaw
683c9bc4a8 Windows: Fix regression in QFSFileEnginePrivate::nativeWrite()
Change 0696566b1e caused the block
size to be incorrect for data > 32MB.
Since bytesToWrite changes within the do...while loop, then the block size
can potentially change too each time. So it needs to be recalculated each
time rather than just once.

Task-number: QTBUG-56616
Change-Id: I9880d0985f2d0242c30e67230be7271eb806db95
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-10-19 08:05:32 +00:00
Anton Kudryavtsev
a9835dfe55 QJsonDocument: fix repetition of 'document' in doc
Change-Id: I8909336274b2c72e526d63fe9e21368550de6678
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-19 07:34:56 +00:00
Anton Kudryavtsev
a769b34754 QLocale: optimize string usage
Use QStringBuilder more.
Avoid quadratic behavior when prepending zeros
in a loop, prepend whole string intead.
Use const API more for CoW types.

Change-Id: If114107dc3d9876b9a7c77bc0071878cb6e00892
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-18 17:45:10 +00:00
Anton Kudryavtsev
f620ad1499 QJsonDocument: enable NRVO for gcc in toJson()
Change-Id: I1b639272d38f8463b17a85a406addb74bb572756
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-18 17:42:27 +00:00
Anton Kudryavtsev
3d76031217 QJsonDocument: don't re-call QVariant::type() in if-else chain
Replace if-else chain with switch statement.

Change-Id: Idd2d0198178685bdaf8f77fa6cae5025ea9de561
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-18 17:42:02 +00:00
Marc Mutz
e80faf3db6 QTimer: don't circumvent <chrono> safety net
By templating on the <chrono> types and unconditionally using
duration_cast to coerce the duration into a milliseconds, we
violate a principal design rule of <chrono>, namely that non-
narrowing conversions are implicit, but narrowing conversions
need duration_cast. By accepting any duration, we allow non-
sensical code such as

   QTimer::singleShot(10us, ...)

to compile, which is misleading, since it's actually a zero-
timeout timer.

Overloading a non-template with a template also has adverse
effects: it breaks qOverload().

Fix by replacing the function templates with functions that
just take std::chrono::milliseconds. This way, benign code
such as

    QTimer::singleShot(10s, ...)
    QTimer::singleShot(10min, ...)
    QTimer::singleShot(1h, ...)

work as expected, but attempts to use sub-millisecond
resolution fails to compile / needs an explicit user-
provided duration_cast.

To allow future extension to more precise timers, forcibly
inline the functions, so they don't partake in the ABI of the
class and we can later support sub-millisecond resolution by
simply taking micro- or nano- instead of milliseconds.

Change-Id: I12c9a98bdabefcd8ec18a9eb09f87ad908d889de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-18 16:06:28 +00:00
Tor Arne Vestbø
4cb614c7ab Apple OS: Handle QSetting strings with embedded zero-bytes
Saving strings with embedded zero-bytes (\0) as CFStrings would
sometimes fail, and only write the part of the string leading
up to the first zero-byte, instead of all the way to the final
zero-terminator. This bug was revealed by the code-path that
falls back to storing e.g. QTime as strings, via the helper
method QSettingsPrivate::variantToString().

We now use the same approach as on platforms such as Windows
and WinRT, where the string produced by variantToString() is
checked for null-bytes, and if so, stored using a binary
representation instead of as a string. For our case that
means we fall back to CFData when detecting the null-byte.

To separate strings from regular byte arrays, new logic has
been added to variantToString() that wraps the null-byte
strings in @String(). That way we can implement a fast-path
when converting back from CFData, that doesn't go via the
slow and lossy conversion via UTF8, and the resulting QVariant
will be of type QVariant::ByteArray. The reason for using
UTF-8 as the binary representation of the string is that
in the case of storing a QByteArray("@foo") we need to
still be able to convert it back to the same byte array,
which doesn't work if the on-disk format is UTF-16.

Task-number: QTBUG-56124
Change-Id: Iab2f71cf96cf3225de48dc5e71870d74b6dde1e8
Cherry-picked: 764f5bf48c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-18 14:35:08 +00:00
Marc Mutz
ed5d04fcfc QOrderedMutexLocker: fix UB (pointer comparison with <) in static relock()
Comparing pointers that do not point into the same array using
operator< is UB. You need to use std::less<>.

The QOrderedMutexLocker ctor already used std::less to compare
pointers, but the static relock() function was not fixed.

Amends 5007352164.

Change-Id: I584d382391dd5a2af75020a4e77f3e42ee5d5708
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-10-18 13:46:11 +00:00
Frederik Schwarzer
cbb2ba23e2 Qt 5.7 requires C++11 so this hint is not needed anymore
Change-Id: I7e267c69ccf3835e4d69b4c612f1baaf40d8be39
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-10-18 12:14:17 +00:00
Oswald Buddenhagen
7c1d640c0c stop exporting the library versions
all users of this functionality have been removed, and not emitting the
version info saves quite some noise from the generated files.

the reason why the users have been removed is that it was unreliable in
the first place: if a dependency is found without pkg-config, no version
information would be available.

the extraction of the version via pkg-config itself is kept in place, as
configure tests could be potentially optimized by utilizing it.

this reverts much of commit 48b4e0bf6f.

Change-Id: I01917f3b2a56b747d7cc54955141d20d23d0990a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-18 05:59:14 +00:00
Liang Qi
d90b155c60 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/macx-ios-clang/features/resolve_config.prf
	src/testlib/qtestcase.qdoc

Change-Id: Icefa63056ffb37106f35299a8f19165535571799
2016-10-17 11:02:54 +02:00
Jake Petroules
5d1e5003be Explicitly mark old macros as compatibility synonyms
Change-Id: Ia471fff171b3bc3de40e166e18f30e6782581611
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2016-10-16 00:11:24 +00:00
Oswald Buddenhagen
9a088e7869 use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.

these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
  helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
  qmake -r anyway
- deps are not transitive, neither at build nor at use time

the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.

Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:10 +00:00
Erik Verbruggen
936e132122 Add optimize-for-size case to ucstrncmp
The SSE code had a case where tail-loop unrolling was disabled when
optimizing for size. What would be even shorter, is to just do a
straight-forward loop over the arrays and compare them. For anything
else, we can just go for speed.

Change-Id: Ifb31650e10e41409972a38014067dbd2927674c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-14 10:17:51 +00:00
J-P Nurmi
7740f5e98b QMimeXMLProvider: add missing out-of-line destructor
Fixes build with the latest GCC 7.

Change-Id: I4900a256ed1c6cb177d7f94d54e5b07c06ddad08
Task-number: QTBUG-56514
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-10-13 16:54:30 +00:00
Kai Koehne
d023b300b2 Document that am/pm in QDateTime::toString are locale-specific
Change-Id: I28382b25ac94cbfbad4acff1308ddd8baf5ca693
Task-number: QTBUG-55632
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-13 15:16:23 +00:00
Lars Knoll
93b78e7c61 Fix build with various features disabled
Change-Id: I95cb3cf3434306344af3f4c7556f45dbfa0b08d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:34 +00:00
Lars Knoll
369857d294 Add configure feature for QUrl::topLevelDomain
Change-Id: I237af8c60a9572c707e7004c9a284dd6cd3306ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:27 +00:00
Lars Knoll
5574a814ff Add configure feature for QCommandLineParser
Change-Id: I78c1159d29e12ad03b9a3c076a40ee533958af8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:24 +00:00
Lars Knoll
93178d26f8 Add configure feature for time zone support
Change-Id: I6ea02dab33e67e7f312a62d94d82eaf1fbe9d9bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:19 +00:00
Liang Qi
e166d7d135 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-10-11 14:14:31 +00:00
Allan Sandfeld Jensen
a6dc284869 Avoid auto-vectorization of epilogues of manual vectorization
Defines a structure that tells the compiler in no uncertain terms the
maximum number of times a loop can be run.

The reduces the size of qdrawhelper_avx2.o from 22kbytes to 11kbytes.

Change-Id: Ie3d6281b04b4be3332497c15f3dfe9f185e20507
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-11 07:38:29 +00:00
Lars Knoll
dee8b4d6b1 Save 100k by not using bloated sha3 code
Probably makes sha3 calculations somewhat slower.

Change-Id: Ie082c163b91d4e2282ad68b810e56b2437a1eb8a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-11 06:05:13 +00:00