we are in an #else of #ifndef QT_BOOTSTRAPPED here already.
Change-Id: I02c4ff2959490110c21ad1016c664b7ddcfea7c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On Windows mouse grabbing doesn't work across processes, which
means we're interacting with other windows when picking colors.
Workaround that by having a transparent 1x1 window below the cursor
at all times so we catch the mouse click. Clicking before the window is below
the cursor won't happen because our timer interval is 30ms, so it's quite fast.
It's hacky but it's what we can do for a feature which was very broken on Windows.
Task-number: QTBUG-43663
Change-Id: I295378e033ddc6d9c2230335f0953a727c21e1dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
It was not possible to determine whether Qt is being built as
a shared or static library in the config tests, as that information
was not added to QMAKE_CONFIG used in the compileTest function.
For linking to ICU on Windows, there is logic which depends on
it in config.tests/unix/icu/icu.pro, but was broken for the static
target, as the expected library name was not found (icuXX -> sicuXX).
Change-Id: I22c2d543ea14feebbad36961c9a29e99f66323ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The window size was too small on high-DPI screens.
Save the default text color instead of setting it to black.
Change-Id: I78b50624110be0cb1d077d3782d421eb323f4fb0
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
A mismatch between requiresPretransformedGlyphPositions and
shouldDrawCachedGlyphs in QRasterPaintEngine will cause the text
position to be transformed twice when using drawGlyphRun on a QPainter
with a perspective transform. Since this case falls back to drawing
text as paths there is no reason to require any special treatment.
Change-Id: Ib1c14aee4cc6774dd8feadc5748f0b0ee59633b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
On e.g. Android, the tabs will be scaled by DPI. This breaks the
logic in the QTextLayout tests for tabs. It's not possible to
just scale the expected sizes either, since the whole text layout
will be affected by font sizes and scaling, and it's difficult to
predict where characters will land on different platforms and
resolutions.
To avoid breaking this test on other platforms, we just skip them
when we know they will break. Since the code tested is
cross-platform, this will hopefully not have any significant
impact on our coverage.
Change-Id: I65d6c33c9c6724665983a17f99eadcf1baedcc20
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Include test data on Android.
Change-Id: Ic0890495c0bf8d2e38595585226a03073b043d57
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Call destroyScreen(), like other platform plugins do since
9b4fbe85d2.
Change-Id: Idbddb026d7a964f15c00acfacf70064405dc3f16
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
MSVC prints warnings if all slots are actually static methods:
moc_xxx.cpp:71: warning: C4189: '_t' : local variable is initialized but not referenced
This can be easily avoided by using Q_UNUSED.
Change-Id: Ice134a8a8d3e6aef1df1e7a89e9a2867281580fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Move compiler warning 4996 from level 3 to 4. This is needed to avoid
warnings about the use of C++ standard library functions like std::copy,
which is used e.g. in qvector.h (since c6752c5aa1):
'std::copy': Function call with parameters that may be unsafe -
this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'
Because the warning has to be disabled before any standard C++ header
is included one cannot just fix this locally in qvector.h.
Change-Id: I929f1535656bca9f5beb7fd0d557178370c232c6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Just use QT_NO_QDEBUG_MACRO, like we do already for qInfo.
Change-Id: I4b2ef68427fbe6f253fe02a3ab161fa25186e834
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add an 'info' message type that can be used for messages that are neither
warnings (QtWarningMsg), nor for debugging only (QtDebugMsg). This is
useful mainly for applications that do not have to adhere to the
'do not print anything by default' paradigm that we have for
the Qt libraries itself.
[ChangeLog][QtCore][Logging] QtInfoMsg got added as a new QtMsgType.
Use the new qInfo(), qCInfo() macros to log to it.
Change-Id: I810995d63de46c41a9a99a34d37c0d417fa87a05
Reviewed-by: Jason McDonald <macadder1@gmail.com>
ConfigLocation was erroneously inconsistent, by adding the org name
and app name on Windows (unintentionally) and not on Unix (while having
subdirs in ~/.config is actually common practice for some XDG desktops)
Therefore this adds AppConfigLocation, which always has the org name
and app name (while GenericConfigLocation never does).
[ChangeLog][QtCore][QStandardPaths] Added QStandardPaths::AppConfigLocation,
for application-specific configuration directory. ConfigLocation was inconsistent.
Task-number: QTBUG-38872
Task-number: QTBUG-38845
Change-Id: I80fb98f296436261f3996c9df87571c29b06ab35
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Using QPointers (or any type that makes a QPointer part of its identity) as a key
in any associative container is wrong. They get externally set to nullptr,
violating the associative container's class invariants, which could lead to
data corruption, even though bucket-based hash implementations are less susceptible
than binary trees.
To fix, write a new class that acts much like the old QPair<QPointer<>,QByteArray>,
but uses the QPointer only as a guard, not as part of its identity. To preseve
identity, also saves the naked pointer originally passed and uses that for op==
and qHash().
Change-Id: I4fa5a6bf86bad8fe7f5abe53d7c7f3ad3754d8d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The old code creates a RestorableId from the passed (QObject*, QByteArray)
and used it for lookup in a hash table (ok) and as a container for the
(QObject*, QByteArray), satisfying later references to those parameters
from the RestorableId instance instead of using the parameters directly.
Now, RestorableId holds the QObject* in a QPointer, so the code might have
wanted to detect the object being destroyed as part of the operation, BUT:
a) the operation is a read-only one, and b) the code didn't check for
nullness before dereferencing the QObject*.
Fix by moving the creation of the RestorableId into the scope it's used
and otherwise using the parameters directly.
Change-Id: Iaf12f722fe6841ee1a55037fe33a6115aa699aca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qHashRange() takes an (input iterator) range and hashes each element, combining
the hash values using the hash combiner from Boost/N1837 with the magic number
0x9e3779b9, as described here:
http://stackoverflow.com/questions/4948780/magic-number-in-boosthash-combine
qHashRangeCommutative() does the same but with a cummutative combiner (unsigned
addition) to create hash values that are order-independent, e.g. for hashed
containers. The obvious combiner, XOR, is a bad one because it eliminates
duplicate elements. Signed addition cannot be used, since signed overflow
leads to undefined behavior.
[ChangeLog][QtCore] Added qHashRange() and qHashRangeCommutative() functions to aid
implementing qHash() overloads for custom types.
Change-Id: I3c2bbc9ce4bd0455262a70e0cf248486525e534f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is the modern, correct way of providing a swap
operation. See http://stackoverflow.com/a/8439357/134841 for more
information. By changing this, we also fix Qt building with ICC
and libc++.
This patch also adds a noexcept() rule to match what the C++11 standard
requires.
Change-Id: I18f22fe7c92cf253e94168e1312346b4c183f536
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This is primarily to get a cleaner build of src/tools
under -Wnoexcept.
Change-Id: I0dea21e70aad56b25675fc59fac0327b55ee83e3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I22f1eaa892cba23c498ae210a9a483e468268581
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
On iOS 6 and above, [UIViewController supportedInterfaceOrientations]
needs to return 0 for [UIApplication setStatusBarOrientation] to work.
This means once you report a content orientation other than the primary
orientation, you'll disable auto-rotation. Reporting the orientation as
Qt::PrimaryOrientation restores the auto-rotation behavior.
Change-Id: I1b8c765c507728fdbc5b828e0b4215324014e221
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
If reset is disabled then POST and PUT requests can not be authenticated
as the upload device can not be reset. There shouldn't be any reason
that shouldn't be allowed if the QIODevice given supports resetting.
The disableReset feature of QNonContiguousByteDevice is removed as it
is not used anywhere else, and is redundant when reset can indicate
success or failure.
Task-number: QTBUG-43628
Change-Id: If941a98fd3f797872351c10bdca6aa6745dbefea
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
This patch is a forward-port from 4.8 branch
(d869e1ad4b0007757e97046609de2097cd9e9c5d).
Change-Id: I6ae36a5417d1176fbecf775668f6033b1cb22a94
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Adds a configure check for System V and POSIX IPC.
System V takes precedence over POSIX IPC, and if both
are not supported, QT_NO_SHAREDMEMORY and
QT_NO_SYSTEMSEMAPHORE are defined.
This patch is a forward-port from 4.8 branch
(6ef4abaa9cd7d465cbae5cbf8cb4664bef387d10).
Change-Id: I3ec20342f0f0266843479634109b67c6989dd296
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This removes one of the last references to 10.6.
Change-Id: Ie23d9aba698714460e7478a421e85d4ad50d4ec9
Task-number: QTBUG-43505
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Exposes two options from libjpeg: the optimize option and progressive scan option.
These are both lossless operations, so they do not change the image's quality.
Using these switches can result in smaller jpeg files.
Task-number: QTBUG-20075
Change-Id: I8d0bd6a712b8a365265b7bd517e136b0755b90cb
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Do not include other headers from the main qlibinputhandler_p.h that
serves as the external interface to the generic plugin for example.
This way the clients do not need to care about xkbcommon headers and
such.
Task-number: QTBUG-43498
Change-Id: I56335cb19200fee830bdf4b1d203904f741f7489
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Because carbon is dead, I merged both OSX and Windows in the same note.
Change-Id: I5d43c5fce30e187f63a1e3e5af688c344eb80d28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Change-Id: I602d8f1c9f20d3bfed4db3405460021146b546d8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Rotated screens would use the unrotated physical geometry, causing the
calculated physical DPI to be completely wrong.
In RandR, the output does not rotate, so the physical size is always for the
unrotated display. The transformation is done on the crtc.
http://www.x.org/releases/X11R7.6/doc/randrproto/randrproto.txt
Task-number: QTBUG-43688
Change-Id: Ifde192fcc99a37d0bfd6d57b4cdeac124a054ca3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Add all test data to resources.
Change-Id: I31b0dbb7546a15151f64523c86bf8eb687ff9ec0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
We must add all test data to resources.
Change-Id: I1b18415cd53a27bd23e51ac6b738d3ed94162ac9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This adds the testdata to a qrc to make them available on Android.
There are still some failures which might be actual errors, and which
will be addressed separately.
Change-Id: I1bdcfb2c6676134ca52388d49a1b2d25cf2813f9
Reviewed-by: BogDan Vatra <bogdan@kde.org>
QWidget is polished when show() is called, so unless you do this
first, QWidget::font() will return a default constructed QFont,
and not necessarily the default specified in the platform theme.
Comparing this to QPainter::font() later, which has been resolved
against the platform theme font, and not the default constructed
font, you can get a mismatch and a false test failure. This
happened on Android.
Change-Id: I41ef5b10879bbd4bb8ef8d52ecaccf5e8e894075
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Fixed a few instances of files that should be deployed to the
file system. The way we do this on Android is via qrc. We also
need a special case for the resources/test.txt, because
QFINDTESTDATA will find this in qrc, but that's not the one
we are looking for.
Change-Id: I7097e8b7795b3a8fd483adad090208f295478412
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The testdata needs to be in a qrc to be available on Android.
Note that a single test will still fail. Since this requires
a platform-independent fix, it will be committed separately.
Change-Id: Ib2438a3298d81d77b7f4f240ef045aa0500d8382
Reviewed-by: BogDan Vatra <bogdan@kde.org>
We must add all test data to resources. Write output data into a writable location.
Change-Id: I5a1c212f6108abf2a82288a2c84cfb31eda5e101
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
AppStore validation requires deployment target to be
at least 5.1.1 for 64-bit applications.
Change-Id: I4d857ad983e6d4059f541bff523dd63479aca849
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This is broken since 1f461ac45b, where
Z_PREFIX was defined to namespace the bundled zlib symbols. The
bundled zlib is used by bootstrap.pro when cross-compiling which uses
the namespaced symbols. This breaks linking of rcc when --system-zlib
is used, as it will try to link to compress2 instead of z_compress2.
To fix this, the aliases are pulled in via zconf.h and the bundled
zlib is prepended to the INCLUDEPATH (i.e. before the system zlib).
Change-Id: Iec76cbdead40f888e2ac6a887ec8f3b7bc7db501
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Using QDBusInterface causes introspection, which may not be permitted
by some platforms.
Change-Id: I953d27b9c0fc7c21d52fefeb8c7760a7235aed9d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>