Commit Graph

6956 Commits

Author SHA1 Message Date
David Faure
f163912b5d QMimeMagicRule: endianness fixes
* apply endianness to the mask as well
* do not apply endianness to "host" entries, they were wrongly behaving
exactly like "big endian" entries.

The issue with the mask was detected by the audio/aac magic
 <match type="big16" value="0xFFF0" mask="0xFFF6" offset="0"/>
which failed to identify the test file ct_faac-adts.aac since it was
applying the mask 0xFFF6 instead of 0xF6FF (on a little-endian machine).

Not yet detected by tst_qmimedatabase which is based on shared-mime-info 1.0,
will be covered by the upgrade to 1.8 in dev.

Change-Id: I4fb7af2d367099817e712b14f2a031066d0ac432
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-27 11:28:55 +00:00
David Faure
7322c65ba7 QMimeMagicRule: fix off by one in the number of bytes checked
Since the loop says p <= e, no +1 should be added to e.

Testcase:

The magic for application/x-gameboy-rom says
<match type="byte" value="0x0" mask="0x80" offset="323"/>
and this code was checking both byte 323 and byte 324, finding a match
at pos 324, returning application/x-gameboy-rom erroneously.

Given the magic for application/x-gameboy-color-rom:
<match type="byte" value="0x80" mask="0x80" offset="323"/>
the expected result for game-boy-color-test.gbc is application/x-gameboy-color-rom

Not yet detected by tst_qmimedatabase which is based on shared-mime-info 1.0,
will be covered by the upgrade to 1.8.

Change-Id: I2396cb1ccfb26db5a24d5551fef493cc0b98a247
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-27 08:44:32 +00:00
Oswald Buddenhagen
8f49da6c18 ... and so configureapp.exe disappeareth
Change-Id: I3fd9f2b0d4cf05a625484fce21532da8563cd62c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-23 13:45:59 +00:00
Oswald Buddenhagen
a71b53d600 fix sysrootification of install paths
initially, the idea was that QLibraryInfo would receive a
pre-sysrootified ExtPrefix from the builtin qt.conf. matching this
against the sysroot would then tell us whether to sysrootify the Prefix
from a "regular" qt.conf as well.
however, this would have lead to some major ugliness and inconsistency
between the code paths, so i changed my mind.
unfortunately, i failed to adjust the remaining code, leading to
169a40d51 entirely breaking sysrootification ...

the proper (and nicely consistent) solution is to introduce a
SysrootifyPrefix key to qt.conf. this is user-accessible as well, so as
a bonus it is now possible to adjust the setting at qmake installation
time. incidentally, this omission was the last thing that prevented
using the same qmake host build for any imaginable configuration of the
same qt version ... i think.

Change-Id: Ic0eebf21f93651f6374628c0ad8b206d696a4a7e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-12-22 11:48:05 +00:00
David Faure
b9edbb5d54 QLockFile: make sure we encode the hostname as UTF-8 in the lock file
We chose to use UTF-8 as it allows us to ensure there's no mistaking the
hostname in case the locale is changed, if the host name contains
characters outside of US-ASCII.

But this didn't work because the code that wrote the hostname always
used the local 8-bit codec instead of UTF-8. On Unix, we used the
result of gethostname(3) directly, which is supposedly on the locale codec.
This commit doesn't fix Windows, which requires _wgetenv, the plan being
to encapsulate that with a qEnvironmentVariable() method.

[ChangeLog][QtCore][QLockFile] Fixed a bug that caused QLockFile not to
recognize a stale lock file if the machine's hostname contained non-US-
ASCII characters, on Unix. A Windows fix is still pending.

Task-number: QTBUG-49640
Change-Id: Ib9d045544ff370ec901626658a84ec4e6575fe21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-21 15:57:40 +00:00
Stephen Kelly
baad82d242 QIPM: Persist model indexes after emitting layoutChange, not before
Callers can persist a QModelIndex which was not persisted before in a
slot connected to the signal, and such a persisted index must be updated
in the course of the layoutChange.

Store the indexes to persist after emitting the signal.

Task-number: QTBUG-32981
Change-Id: Ibee4c0d84817d72603a03fe5b22fdeefeac0695e
Reviewed-by: David Faure <david.faure@kdab.com>
2016-12-21 01:37:50 +00:00
Stephen Kelly
0874861bcc QSFPM: Remove data manipulation from move handlers
Similar to the fix in the parent commit, incorrect updating of the
internal data structures during layout changes can lead to dangling
pointers being dereferenced later.  Moves are treated as layoutChanges
by this proxy by forwarding to the appropriate method.  However, data is
incorrectly cleared prior to that forwarding.  Remove that, and let the
layoutChange handling take appropriate action.

Change-Id: Iee951e37152328a4e6a5fb8e5385c32a2fe4c0bd
Reviewed-by: David Faure <david.faure@kdab.com>
2016-12-21 01:37:40 +00:00
Stephen Kelly
3bd0fd8f97 QSFPM: Fix handling of source model layout change
In sourceLayoutAboutToBeChanged the source model update is ignored if
the affected parents are filtered out anyway.  The same logic is
attempted in the sourceLayoutChanged slot, but there the early-return
logic is applied too late - the mapping is cleared before performing the
early-return.  Because pointers into the mapping are used in the
internalPointer of QModelIndexes in this class, persistent indexes used
later will segfault when attempting to dereference it.

Additionally, if a parent becomes invalid as a result of the
layoutChange, it would be filtered out by the condition in the loop,
resulting in a different result in the comparison of emptiness of the
parents container.

Fix that by persisting the parent's container, and performing the test
for early-return before clearing the mapping.

Task-number: QTBUG-47711
Task-number: QTBUG-32981
Change-Id: If45e8a1c97d39454160f52041bc9ae7e337dce97
Reviewed-by: David Faure <david.faure@kdab.com>
2016-12-21 01:37:31 +00:00
Thiago Macieira
7ca66b1e66 Fix race condition in QFactoryLoader: lock the mutex we already have
The process of loading a plugin is examplified by the qLoadPlugin
function (though not all users of QFactoryLoader use this function, they
all do something similar):

    const int index = loader->indexOf(key);
    if (index != -1) {
        QObject *factoryObject = loader->instance(index);
        if (FactoryInterface *factory = qobject_cast<FactoryInterface *>(factoryObject))
            if (PluginInterface *result = factory->create(key, std::forward<Args>(args)...))
                return result;
    }

QFactoryLoader::indexOf already locked the mutex, but not
QFactoryLoader::instance. This commit fixes that.

Note that calling the virtual create() in the plugin's factory is not
protected by the mutex. Each plugin's factory must be thread-safe and
also create an object that works on any thread too. It's also the
responsibility of the caller of qLoadPlugin to ensure that it's called
thread-safely.

Task-number: QTBUG-42855
Change-Id: I63e21df51c7448bc8b5ffffd148ebee33d4c47de
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-12-17 04:11:09 +00:00
Liang Qi
9bfe3ab71e Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/plugins/platforms/android/qandroidplatformopenglcontext.h
	src/plugins/platforms/android/qandroidplatformtheme.h

Change-Id: I13d51cc66f708138ff4d667ceea7d515992e58a4
2016-12-16 09:45:16 +01:00
Thiago Macieira
9f96e4f431 Work around old Clang bug parsing of NSDMI referring to members
Clang pre-3.4 didn't like this and it's used in Xcode 5.1 (which we need
to support for 5.8).

error: 'this' cannot be implicitly captured in this context
    typename T::const_iterator i = c.begin(), e = c.end();
                                   ^

Task-number: QTBUG-57488
Change-Id: I63e21df51c7448bc8b5ffffd148e688d7c9b89d6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-12-16 04:05:56 +00:00
Oliver Wolff
56a167d30c winrt: Check for removed timers after sending events
After all the check makes sense here. If a timer was removed as a result
of sendEvent and it was not at the end of the list the list is not
shrunk but the timer info's id is just set to INVALID_TIMER_ID.

Additionally the timer's object should be fetched before we unlock the
locker as timerIdToObject is changed in removeTimer and we might access
a nullptr if the timer has been removed.

Reverts c83ba01f7b

Task-number: QTBUG-56756
Change-Id: Ib1a04c02fbfcf4c939b4891d42f954dc9e87149e
(cherry picked from commit 8f2088db17)
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-12-15 05:20:45 +00:00
Topi Reinio
cfbe5df48c qdoc: Define Q_COMPILER_UNICODE_STRINGS
Some public functions in QString and QDebug are declared inside
Q_COMPILER_UNICODE_STRINGS. This commit defines it for QDoc, and
adds documentation for QDebug functions that are now visible to
QDoc.

Change-Id: Ia7f2501c1dc7b8244dcc3ce4adcd2019fdbffcb6
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-15 05:20:24 +00:00
Alexander Volkov
b57e7c0963 doc: Replace Q_DECL_OVERRIDE by override in snippets
And remove redundant virtual.

Change-Id: If0650409b88ad962f6713d082d9095675f4c68e8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-12-14 16:49:23 +00:00
Oswald Buddenhagen
169a40d511 move generation of qconfig.cpp (and qt.conf) to qmake-based configure
this moves us another step towards the "outer" configure doing just
minimal bootstrapping of qmake.

a challenge here was that so far, qmake itself needed qconfig.cpp. this
was replaced by usage of a qt.conf file instead of compiled-in values.
however, to make the executable still self-contained, that qt.conf is
embedded into it (by simple appending of a fixed signature and the text
file).

the qmake with the embedded qt.conf is not used for the qt build itself,
which instead relies on the qt.conf in bin/ as before. however, due to
the missing built-in values, this file now needs to contain more
information than before. but except for a minimal version that is needed
to start up qmake/configure at all, that file is now also generated with
qmake. as some of the newly set up properties are subsequently used by
configure itself, qmake gains a (deliberately undocumented) function to
reload the qt.conf after it's fully populated.

unlike the old implementations, this one doesn't emit redundant qt.conf
entries which match the hard-coded fallbacks. omitting them leads to
leaner files which are more comprehensible.

Started-by: Paolo Angelelli <paolo.angelelli@qt.io>
Change-Id: I4526ef64b3c89d9851e10f83965fe479ed7f39f6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-13 18:56:12 +00:00
Allan Sandfeld Jensen
bb0f29f82b Fix gcc 6.4 builds
The builtins clzs and ctzs have been removed. Additionally they were
never proper internal GCC builtins and shouldn't have been used in a
constexpr function in the first place. This patch removes the assumption
that they exist when BMI is available, and let GCC fall back to using
__builtin_clz and __builtin_ctz.

Change-Id: I3e0b4e246098bb9ce6ede28b311948260ef881b9
Task-number: QTBUG-56813
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-13 05:14:32 +00:00
Giuseppe D'Angelo
1da70af724 QMap: use std::less for defining an order between pointers
Reinterpret_cast()ing a pointer to a suitably sized integer is not guaranteed
to always give the same result for the same pointer (!). Therefore the
resulting integers are not comparable in a meaningful way. std::less is
supposed to be used to compare arbitrary pointers, so use it.

(Hopefully and reasonably, under the hood std::less does exactly what we
were doing, so this isn't BiC.)

Change-Id: I9960b3d6e35657fe7a25b842054f5d338280e850
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-12 11:15:22 +00:00
Friedemann Kleint
101449a4cf QDir::cd(): Handle UNC server paths correctly
Add a bool *ok out parameter to qt_normalizePathSegments() and return false
when ".." are left over for an absolute path, indicating an attempt to
change above root.
Factor out static helper qt_cleanPath() to be able to pass the return value
to QDir::cd() and return on failure from there.

Amends change 63f634322b, which did
not handle UNC paths.

Task-number: QTBUG-53712
Change-Id: I3e63a5dd0259306a0b99145348d815899582f78e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-12 07:25:22 +00:00
Friedemann Kleint
f7b44f879c QDir::cleanPath(): Do not cd above root paths (UNC, WinRT)
Calling QDir::cleanPath() on "//server/path/.." resulted in "/".

Factor out a function to determine the root path part of an absolute
path for later use, and handle some special cases:
- Consider server name of "//server/path/.." as part of the prefix.
- Check on the root path for WinRT.

Task-number: QTBUG-53712
Change-Id: Ibddacf06212b6fc86fa74a5e4078df6cfd5b66f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-12 07:25:05 +00:00
Thiago Macieira
4c0760d327 Re-fix the build with ICC and cmath & math.h
Commit c35fef9d3b wasn't sufficient. The
problem is that there's a complex combination of libc headers (math.h),
C++ headers (cmath), which may be provided by three different sources on
Linux (glibc, gcc and ICC). On some combinations, the isnan macro leaks
from math.h or cmath and that's what the the commit above tried to fix.

On some other combinations, there's no macro but there's an ::isnan
function defined. When we do "using namespace std; return isnan(x);",
that causes a compilation error. This commit solves that by detecting
whether there is a macro defined.

error: more than one instance of overloaded function "isnan" matches the argument list
             function "isnan(double)"
             function "std::isnan(double)"
             argument types are: (double)

Change-Id: Iaeecaffe26af4535b416fffd148bf71826541bdd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-10 19:31:45 +00:00
Thiago Macieira
b0c321a8db Don't crash on QVLA construction from an empty std::initializer_list
The C++ standard says in [support.initlist.access]/1:

 constexpr const E* begin() const noexcept;

 Returns: A pointer to the beginning of the array. If size() == 0 the
 values of begin() and end() are unspecified but they shall be
 identical.

So we can't assume it's non-null. I didn't want to remove the Q_ASSERT,
so passing a non-null pointer to append() remains required. This patch
simply won't call append() if the initializer list is empty.

This was already tested, but the failure is with a compiler that is not
part of the Qt CI.

Task-number: QTBUG-57277
Change-Id: Iaeecaffe26af4535b416fffd1489806872b412ee
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-12-09 03:11:34 +00:00
Liang Qi
cae32bd04d Merge remote-tracking branch 'origin/5.7' into 5.8.0
Change-Id: I576187a9905802c177ae483e6c29d0f55cf7034d
2016-12-08 08:20:36 +01:00
Ulf Hermann
141be52f2f Merge the two features for shared memory
Change-Id: Ic7bd27b289b755c801e3c510c44b2afe9a253bd8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-06 17:03:26 +00:00
Thiago Macieira
32a7efe225 Fix the warning number for ICC deprecated warnings
That's what happens when you don't test and just rely on an the warning
listing. ICC has two warning numbers for deprecated warnings: one that
matches Q_DECL_DEPRECATED and one for Q_DECL_DEPRECATED_X.

Change-Id: I73fa1e59a4844c43a109fffd148ca7a05eda8f13
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-12-04 07:26:13 +00:00
Anton Kudryavtsev
fec08545ff QVariant: optimize convert() for bool case
Do not create QByteArray from const char* to compare with other
QByteArray, because there is an overloaded operator==.
So avoid needless allocations.

Reorder condition, because isEmpty() method is cheaper than
string compare.

Change-Id: I8d2c8a0fb247528d9ce485007431167372d62bff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-12-01 12:20:23 +00:00
Topi Reinio
5ac33fff0f QCommandLineOption: Remove excess close parenthesis from a warning
Change-Id: Iff197a2a00b686ad2d29a1e156389bec4639f3c0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-30 08:50:17 +00:00
Marc Mutz
feb95effc4 QDeadlineTimer: fix namespace for chrono literals in examples
Change-Id: I6d39b4fe653cf89d2bd27af4b3f606d98ac83eba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-30 08:28:35 +00:00
Lars Knoll
b82650891e Use poll related features properly
And get rid of related DEFINES in the pri file

Change-Id: I54cf25b7cb447af22b410213759044e8018939a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-30 08:11:12 +00:00
Oliver Wolff
8f2088db17 winrt: Check for removed timers after sending events
After all the check makes sense here. If a timer was removed as a result
of sendEvent and it was not at the end of the list the list is not
shrunk but the timer info's id is just set to INVALID_TIMER_ID.

Additionally the timer's object should be fetched before we unlock the
locker as timerIdToObject is changed in removeTimer and we might access
a nullptr if the timer has been removed.

Reverts c83ba01f7b

Task-number: QTBUG-56756
Change-Id: Ib1a04c02fbfcf4c939b4891d42f954dc9e87149e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-11-30 07:49:41 +00:00
Lars Knoll
e3555fe970 Properly use QT_CONFIG macro to check for ICU
And remove the QT_USE_ICU define.

Change-Id: I8134ee18af7c90ed7070926ca31b3a57b3ec37dd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-29 19:04:37 +00:00
Lars Knoll
0c8f3229de Clean up config handling of logging backends
Turn them into proper private features, and remove setting of
defines in the pri file.

Change-Id: Iafc11e93d4a9349bf15971dc1adac9a828ea03f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-29 19:04:30 +00:00
Albert Astals Cid
1155ca10f8 QSettings: Avoid unneeded sync() on destruction
... if sync() has already been called manually.

Change-Id: I11bd6810aa3c1065a72ffaa2001d1bdbf8bf9c89
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-29 15:42:25 +00:00
Marc Mutz
1710947fde QMutex: small doc fixes
Add parentheses after function names, replace
  is different -> differs

Change-Id: I6332db1d1650ed8d8320c5f20cd79d0bf1870e27
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-29 12:27:07 +00:00
Oliver Wolff
a103992f49 Fixed build using Visual Studio 2017
As _BitScanForward and friends are not marked constexpr in Visual Studio,
functions using these may not be marked either.

Task-number: QTBUG-57086
Change-Id: I29cfa4459580b5740f1011e7f39309844518ce03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-11-29 10:05:58 +00:00
Anton Kudryavtsev
7eb4be9db8 QStringRef: de-duplicate lastIndexOf code
Change-Id: Id6d804b2ab4c9c763d7ec9cb66c255ed0b4f785d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-28 13:18:45 +00:00
Thiago Macieira
534c1ce76d Remove unnecessary warning disabling
Qt 5.7 cannot be compiled in C++03 mode anymore.

Change-Id: Iaeecaffe26af4535b416fffd1489d808edc3c996
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-27 03:20:23 +00:00
Thiago Macieira
40c9e9dc5f Add a macros for disabling deprecated declaration warnings
This is the only warning we disable in a lot of places in Qt 5.8 source
code. If other warnings become common, we can add macros for them too.

Change-Id: Iaeecaffe26af4535b416fffd1489d1968e29c52a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-27 02:31:12 +00:00
Liang Qi
d34be32434 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-26 10:25:14 +00:00
Thiago Macieira
20526cb014 Make sure all pattern args get cleared when parsing a new pattern
The user can call qSetMessagePattern after program start, so we need to
be sure that the parsed argument data is properly cleared.

Task-number: QTBUG-57144
Change-Id: I1978c6b95bd84639a8c4fffd1487429b04725522
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-11-26 07:13:45 +00:00
Liang Qi
bce25a6340 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/painting/qcoregraphics.mm
	src/gui/painting/qcoregraphics_p.h
	src/plugins/platforms/cocoa/qcocoahelpers.h
	src/plugins/platforms/cocoa/qcocoahelpers.mm

Change-Id: Ibe5efcae73526b3d3931ed22730b13d372dcf54e
2016-11-25 14:41:29 +01:00
Konstantin Tokarev
5cd4001bf2 Use separate Qt5Config.cmake inside build directory
Qt5Config restricts search paths of Qt components to ${_qt5_install_prefix}
to prevent accidentally using system Qt modules in case of restricted Qt
configuration. However this does not work properly when Qt is used without
installation, in particular when building cmake-based QtWebKit as a Qt
submodule, because ${_qt5_install_prefix} resolves to QtBase and does not
contain components from other modules.

This patch changes search path from ${_qt5_install_prefix} to all qt5
subdirectories.

Change-Id: Icf01a256097710889573ad69d847b9c3bffa1449
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-25 10:46:34 +00:00
Liang Qi
50aeedd86c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/qml_module.prf
	src/corelib/tools/qdatetimeparser_p.h

Change-Id: I5382cee3ddb33107dc61ee20f7a9188c4a68a882
2016-11-25 10:32:29 +01:00
Orgad Shaneh
5bd2d6afec Remove nokia reference in example mimetype
Change-Id: I45c01fd57171f4ba6ea195d7ad3ae988a1797acb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-24 20:03:35 +00:00
Liang Qi
3966ab51ff Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-24 11:18:22 +00:00
Liang Qi
4783de0473 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/network/socket/qnativesocketengine_winrt.cpp
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp

Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
2016-11-24 10:31:21 +01:00
Lars Knoll
72ed34b792 Don't set platform specific QT_NO_FOO defines in qglobal.h
They should be enabled/disabled through the configuration system.
Remove some unused defines, and move one define from qglobal.h to
a proper feature definition in Qt Gui.

Change-Id: Ie8d5bff9712ba745af60b42ceca3f0440bed2706
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-24 08:37:38 +00:00
Simon Hausmann
dc4c647137 Clean up the resource reading code
Instead of doing the conversion from the big-endian data by hand, let's
use the convenience functions from qendian.h.

Change-Id: If3966ca94428afabb1f5c922967fb9970f976622
Reviewed-by: hjk <hjk@qt.io>
2016-11-23 20:50:37 +00:00
Edward Welbourne
7c41ced98c QDateTimeParser: introduce at least some encapsulation
Shuffled its parts to make clear which bits are public, private and
protected.  QDateTimeEditPrivate makes rather heavy use of the last.

Change-Id: Ic5f9d0c5cc85f02e57d3f31e9ac31a17428c5311
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-23 15:02:50 +00:00
Edward Welbourne
0aa3de46ca Fix two leaky uses of realloc()
If it fails, we get NULL back but haven't free()d the old pointer;
saving the NULL return over the old pointer forgets it, leaking the
memory it pointed to.  This is particularly severe in the JSON
parser's grow(), where reading a very large JSON document can lead to
the last successful realloc() in a doubling pattern being very large
indeed; the subsequent failure will leak this very last allocation.

Only worth checking for, however, when the subsequent code takes care
to handle failure: in most cases, if realloc() fails, we're about to
crash anyway.

Change-Id: Icd3a503f169be224f0a058c58e8b7c82a3241ae7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
2016-11-23 15:02:15 +00:00
Edward Welbourne
a4bd635b33 Typo fix in QDateTime::toString() documentation
Text that should simply have been naming days of the week used
Qt::Sunday rather than the simple day name.

Change-Id: I64a3cdacd854c1c9c0fbf2d11826555086d674f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-23 15:01:39 +00:00