Commit Graph

12882 Commits

Author SHA1 Message Date
Debao Zhang
dd4220b6e6 QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I48c83fa0c5eccd86a5242fc8ed51ac6d7623f7f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:42 +01:00
Debao Zhang
670aae7d8d QtConcurrent tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: Ia0c4751b891ae81a66b072bc504b555d81625172
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:25 +01:00
Debao Zhang
495f7cafdb QtTest tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: Id67ab0ea3be47d3b365aa01a354829b8745b7250
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:20 +01:00
Joerg Bornemann
925fd32a2d qmake/Win: disable "find highest lib version" feature by default
The undocumented feature of linking the library with the highest
version number is more confusing than helpful.
We're changing the default from on to off now.
Users who still need this feature can turn it on with:
    CONFIG += link_highest_lib_version

Task-number: QTBUG-15596

Change-Id: Ic998c1685003caa6f57e27dccf83c8b4a2a09553
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 21:44:15 +01:00
Morten Johan Sørvig
d616915b0a Support high-dpi images.
When Qt::AA_UseHighDPIImages is set images and pixmaps
may be of the high-dpi type.

Account for this when calculating layout sizes by
clamping the size or dividing by devicePixelRatio()
to go from device pixels to device-independent pixels.

Change-Id: I7b7f4c36ebd83d72ecdf6fbe0ae20e20ed6540bb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-26 21:44:15 +01:00
Morten Johan Sørvig
491dcbfac8 Cocoa: Make retina desktop components work.
Scale non-widget paint devices as well.

Change-Id: Ic68fb166058e9b162f8baeab81196ee254f30b2e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-26 21:44:15 +01:00
Michael Brasser
87b3aa9f4f Revert "eglfs: Disable eglfs when evdev is not present"
evdev support in eglfs is now guarded by QT_NO_EVDEV, so this
check is no longer required. This allows eglfs + tslib to be
a supported combination.

This reverts commit a95e396a83.

Change-Id: Icf7c15121b7eca1131d412b05b956cd5d7f189ae
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 21:44:15 +01:00
Michael Brasser
bb4e2e4faf Allow tslib to be specified at configure time.
Change-Id: I0ebf0eeea7e6a0b8136fb805f34f04082bc58c5e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 21:44:15 +01:00
Thiago Macieira
bafd3fdf1c Make the inline CPU detection functions also static
Since qCpuHasFeature() checks the static qCompilerCpuFeatures variable
and that variable's value might change depending on the compiler flags,
it's best to ensure that the function is not subject to link-time
merging. That would be bad if it happened when qCpuHasFeature() was used
from a file with higher CPU compiler settings than the default, as it
would incorrectly conclude that certain features are always available.

Change-Id: I8bacde056fb89869ec1d306a163742e72522315e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-03-26 21:44:15 +01:00
Morten Johan Sørvig
03d057ff01 Cocoa: Make touch events work again.
Bring back the ref-counted enable on enter/leave
workaround we had in Qt 4: If any widget in a
window sets WA_AcceptTouchEvents then that window
will start processing touch events.

Enabling touch events has implications for delivery
of other events, for example by causing scrolling
event lag.

Change-Id: I307488937f417612eff624bf9892b82a7f69c1b7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-26 19:22:01 +01:00
Morten Johan Sørvig
b2c73c73cd Cocoa: Correct enter/leave event handling.
Make top-level windows generate enter/leave events
for sub-windows. Keep track of the current "under mouse"
window in mouseMoved and send EnterLeave events when
it changes.

mouseEntered/mouseExited handles enters and leaves
from the top-level window.

Add tests/manual/cocoa/nativewidgets.

Task-number: QTBUG-27550
Task-number: QTBUG-29751

Change-Id: If4b9f9e0f39d9fb05fdab45a100ffdcf107965ad
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-26 19:21:38 +01:00
Konstantin Ritt
a2fc37044c Fix font stretching issue
We're treating fontDef.pixelSize as a box height everywhere but in
harfbuzzFont initialization code the logic was opposite.

Change-Id: I4eecf7861a6084c7f2dbe1df85a71f2e251da845
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-26 19:14:16 +01:00
El Mehdi Fekari
f1d8987b82 Fix a bug in QSystemLocale on BB10
Call qt_safe_open in the constructor
to avoid opening the pps files several times.

Change-Id: I1bf79284850353a47ee1fc17797cd667536e17b1
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-03-26 18:58:29 +01:00
Rafael Roquetto
6131f79e4e QNX: Code cleanup: normalize 'if' macro usage
Always use "if defined" instead of "ifdef". The same is valid for
"ifndef" macros

Change-Id: I8e8f65e36dc636c10b3d656ce9a89ab3a664a80b
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-03-26 18:55:11 +01:00
Rafael Roquetto
17159b4500 QLocaleBlackberry - fix include statements
Change-Id: Ifb5678094806e4aab19015d3a600217b4cf9ac5f
Reviewed-by: David Faure <david.faure@kdab.com>
2013-03-26 18:54:42 +01:00
Sérgio Martins
7810ba17bc Fix documentation of QFileSystemModel::resolveSymlinks().
It's Windows only, and it defaults to true.

Change-Id: I82badbcae0fdba589b57a7dfe627b99ec6cc92c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-26 18:33:30 +01:00
Eskil Abrahamsen Blomfeldt
244cc5da55 FontConfig: Correctly report Symbol writing system support
When all the Q_WS_X11 were removed, we also removed the special
case for symbol fonts in QFontDatabase for FontConfig. This
was checkSymbolFont() in Qt 4, and this patch copies the
code and adapts it to Qt 5.

Task-number: QTBUG-30044
Change-Id: I346f208052013eae9de3c33c210bf5db1d2aef87
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-03-26 18:04:50 +01:00
Konstantin Ritt
46f3543aac Fix handling of 0x00AD code with symbol fonts (Win/QPA/QPF/fallback)
...by updating HB_Face::isSymbolFont value to make HB know that the font is a symbol font.
U+00AD is a Unicode soft hyphen character, which shouldn't be threated
like a default ignorable (invisible) when 0x00AD occurred in a symbol font.

Change-Id: Idd4760aded644f7f11a1a8d3c03c348abc69a3e4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-26 18:04:11 +01:00
Stephen Kelly
ea1b1efbc1 Revert "Don't duplicate the 'top-level' include dir in all modules."
This will likely fix some odd cmake related tests in the CI.

This reverts commit 316d8ececa.

Conflicts:
	mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
	src/corelib/Qt5CoreConfigExtras.cmake.in

Change-Id: Ib7714746f96bf12061d92242a42296d200c56c00
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-03-26 13:07:14 +01:00
Stephen Kelly
7fb3c6bf3d Fix the CMake tests with CMake release candidates.
The version number parsing needs to handle the reported version string.

Change-Id: Ifd34b2c86b21a1c5e4c91a43447468ca6feab8cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-26 13:07:08 +01:00
Stephen Kelly
be431cc50a Get more information from failing cmake tests.
Enable verbose makefile output which will appear in failure logs.

Change-Id: I005069c122f46887f6095034d9cf1a3d2fdbc750
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 10:18:02 +01:00
Peter Hartmann
b96e8ff1d2 QNetworkInterface auto test: do not abort without session
... but only if the QNetworkConfiguration manager requires one.

Change-Id: I1c69c43438f1df9080d207c8598a42201f759c5b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-03-26 10:18:02 +01:00
Debao Zhang
d0ad02a766 tst_qtreeview: Use QRect::intersected instead of QRect::intersect
Change-Id: I4579929473a408b73f3ad9014ea30ce5a602259c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-26 10:18:02 +01:00
Stephen Kelly
f8bf0081d2 Document undefined behavior regarding Qt::ItemNeverHasChildren.
Change-Id: I4c044b206ad6dd57f11d791d8a6a6f3f931acf4f
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-03-26 10:18:02 +01:00
Martin Smith
771a254d3c qdoc: Show signals inherited from abstract base types
qdoc was not including QML signals in the documentation
for a QML type, when the signals were inherited from a
QML type that had been marked abstract. This is now fixed.

Additionally, the QML type qualifier is not shown in the
header for the documentation for a member of a QML type.
The type qualifier was redundant information, and it was
incorrect for members inherited from abstract base types.

Task-number: QTBUG-30111
Change-Id: I73aef40f69a15bca6948bf36596b83800d248b1f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-03-26 10:18:02 +01:00
Cyril Oblikov
e90ce866fa Fixed shortcuts for some (e.g. Russian) layouts
If CMD modificator is active [nsevent characters] is used now to get
keyCode. In this case for example English "X" is returned instead of
Russian "Ч" even if Russian input source is selected.

Task-number:  QTBUG-30306

Change-Id: I93cd292633e68327df0c580ed74fe8ad1c9ed27d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-26 07:31:12 +01:00
Morten Johan Sørvig
badbb6fdd2 Make QGraphicsScene::touchEventhandler ignore unhandled touch events
This was not done in Qt 4 to play well with the QGesture
implementation, and may need to be revisited if/when we
bring back QGesture for Qt 5.

Change-Id: I4f5f6c8a67387039e838d1ef42ecc70c455ed8a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-26 07:28:24 +01:00
Morten Johan Sørvig
c5323959d7 Set screen position when generating synthetic mouse events from touch
QGraphicsView uses QMouseEvent::globalPos(), so we need to set
it when synthesizing mouse events in QApplication.

Change-Id: I8341e09fdd41400c5c5e1d0ee17c7323efdafaeb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-26 07:27:26 +01:00
Thiago Macieira
470f92167f Silence warning by Apple Clang 4.2 about adding an integer to a string
It gives a good suggestion on what to do and even shows us how to do
it.

doc.cpp:2681:34: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
            result += "        " + (column % tabSize);
                      ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
doc.cpp:2681:34: note: use array indexing to silence this warning
            result += "        " + (column % tabSize);
                                 ^
                      &          [                   ]

Change-Id: Idd2157ab04cd2a3e37a1336bb5e8926ddc14823a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-03-26 05:06:17 +01:00
Laszlo Papp
fff8b698ab Introduce QMAKE_CC_O_FLAG
This makes it possible to properly parametrize alternative compilers.

Change-Id: Iaf0961c47875ee16d815356f36acf5652577cdca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-25 23:11:22 +01:00
Thiago Macieira
a3c802e7e5 Make sure that we check that pkg-config knows sqlite3 before using it
Otherwise, we end up with an empty QT_LFLAGS_SQLITE and the plugin
won't link.

Change-Id: I026f60bf9cd075218dbe2888fbb7fc82782b27ca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-25 23:11:22 +01:00
Peter Hartmann
ffe45f1896 QNonContiguousByteDevice: roll back complete internal state in reset()
... otherwise we would not start reading from the beginning when the
device was reset.

Change-Id: Ida196eb40790fba56ff2eed782fd93a3015222f9
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-03-25 20:50:26 +01:00
Eskil Abrahamsen Blomfeldt
83c9d22d44 Remove dependency on QPlatformSupport in fontdatabase test
If you include a static library in the test, all symbols will
be duplicated, and this can cause nasty crashes because global
static data is also duplicated. This happened on Linux because
of a global static cache in the font engine where the two instances
of it would get out of sync, and we would reference invalid
data.

To test QPlatformSupport features, a QPlatformSupport test which
does not load any platform plugin (or uses its own platform plugin
which does not load QPlatformSupport) is needed. For now, I will
just revert adding the test, since it is broken and was added
as part of supporting Windows CE:
   f2fabf77f9.

Change-Id: I6c002d1e0880ee8e031a68eee80e781fe0c62af4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-03-25 19:21:40 +01:00
Friedemann Kleint
23051ff7ec Clean up touch window registration.
Stop processing for Qt::Desktop windows (which caused
RegisterTouchWindow() to fail with access denied) and set a
flag to cleanly unregister.

Change-Id: I3d10c93ec92536d3ab1c0503f088c40b0c08a01f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-25 10:42:01 +01:00
David Faure
a6e5ccbe22 QMdi: Don't emit subWindowActivated during StyleChange handling.
The handling of StyleChange de-maximizes the child window temporarily,
which was emitting subWindowActivated.
This would crash lokalize, because deactivating a window means deleting
the widgets associated with it, and style-change handling is done in
QApplication by looping over QApplication::allWidgets, which would then
contain dangling pointers.

Full valgrind log at https://bugs.kde.org/show_bug.cgi?id=271494#c7

Change-Id: Ifb24032cde2cd470dcae7cd553ec5ab45a919dd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-25 10:37:37 +01:00
Shawn Rutledge
5c6b2ede3b OSX: WindowTransparentForInput QNSView pass events to next responder
The default implementation (in the super class) passes the event
to the next responder.  This seems to be one valid way to handle
the Qt::WindowTransparentForInput flag.  So if a non-alien widget
for which a native NSView is created has the flag
WA_TransparentForMouseEvents, that means the window will have
Qt::WindowTransparentForInput, and the NSView which is created
on its behalf will pass on each event so that other NSViews have
a chance to handle it.  (It will also try to reject becoming
first responder, but that doesn't seem to be enough for the following
events to be passed on.)  This is a followup to
I979be9f72f7d225d7b960fc5db4c3956d2749982 which purported to
obey the WindowTransparentForInput flag, but actually doesn't.

Change-Id: Ia72a3573c2e3cbfa7ede70bee41ac36df6924598
Task-number: QTBUG-28816
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-24 18:00:44 +01:00
Peter Hartmann
795468bdc6 QHttpMultipart: reset read pointer when device is reset
... otherwise we would not read from the beginning when trying to
read again. The device is reset when we try to resend a request
(e.g. remote host closed etc.).

Change-Id: I21d3647dd0e00ae8bc2507f08166234f21f88861
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-03-24 13:56:32 +01:00
Peter Hartmann
804a067846 QNonContiguousByteDevice: reset() instead of seek() if possible
... because e.g. QHttpMultiPartIODevice does not implement seek at all
(QTBUG-30295), which would make resetting such a device fail.

Change-Id: I0a9c0f21047baa72146690bfdf638cdffab0e25f
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-03-24 13:55:58 +01:00
Morten Johan Sørvig
7b5ad88489 Guard usage of [NSApp setDockMenu].
setDockMenu is not documented an may disappear.

Closest documented replacement seems to be
[NSApplicationDelegate applicationDockMenu:]. It can't
be used as a direct replacement since it's a "virtual"
getter that the application delegate implements.

Change-Id: Id161196018057b75cbe7d6f6d2610c0932345c5f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-24 03:42:49 +01:00
Morten Johan Sørvig
5ad615ae8c Use [NSSavePanel directoryUrl].
[NSSavePanel directory] is deprecated.

Change-Id: I3515b565a25028dc5b7c966481707e001e44a077
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-24 03:41:45 +01:00
Morten Johan Sørvig
73d4fc6219 Call [m_qtView hasMask]
hasMask is a function on QNSView, m_contentView can
be any NSView subclass.

Change-Id: I88b5acbb8aad9aa4664e0f71f37add9dfa64f1b7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-24 03:41:13 +01:00
Morten Johan Sørvig
4a1116af25 Remove unused variables in the Cocoa plugin
Change-Id: I7cdd369e2fbab02954da6ba3c05b31d93f1e7995
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-24 03:40:20 +01:00
Oswald Buddenhagen
fa62b6c73e match #ifdefs relating to arm compilation
use the same conditional around the #include as the actual code below
uses, otherwise we risk mismatches.

Change-Id: I8ca32c0178b1970928626a927948b06d4c6d31b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-24 03:24:52 +01:00
Venu
f226e7e631 Doc: Added the Q_REVISION macro to the ignore list
This should avoid QDoc warnings when the macro
is used with the signals and slots.

Task-number QTBUG-30105

Change-Id: I8d1b32854c15ff07e6ece7b326be38666ae29c3f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-03-24 03:21:09 +01:00
Frederik Gladhorn
206e8f67a0 Fix access to interface in QAccessibleEvent
Sometimes we get an invalid interface.
In that case the event should just return 0.
This avoids some potential crashes.

Change-Id: I9f166b5d5547dbe7f22c4756502aee811b0b80a6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-03-23 16:47:28 +01:00
Shawn Rutledge
f217172d6d qWaitForWindow* default timeouts are 5 seconds
A widget window can be expected to show up faster, but on a busy CI
machine, OpenGL windows can take longer than 1 second.

Change-Id: I572cc86bf4d8beebcc565db8d6f2ff78e55c2ac0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-03-23 16:47:28 +01:00
Frederik Gladhorn
52cd53a03e Fusion Style: draw toolbar lines for non-widget apps.
Change-Id: If9415cfc05f80ba4e67d9ba6a8ebb1caaa738b84
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-03-23 14:42:45 +01:00
Frederik Gladhorn
5147b1d410 Accessibility: Fix crash when updating in dtor
This happens for example when running several tests.
Widgets in destructor should be treated as invalid
since their window pointer and other properties are
no longer valid.

When deleting a window containing only a table view
there would be a table model reset update comming from
the window being destroyed.

Change-Id: Ia387c814333ce373fe132b189fc180787e36cdd5
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-03-23 14:42:45 +01:00
Mitch Curtis
a3304489e8 Ensure QTemporaryFile can create files when an identical dir exists.
When QTemporaryFile attempts to create a new file in
createFileFromTemplate, it fails if the filename exists and is a
directory. Windows returns error code 5 (ERROR_ACCESS_DENIED) in this
case - rather than ERROR_FILE_EXISTS - which is not handled.

This patch handles ERROR_ACCESS_DENIED in addition to the already
handled ERROR_FILE_EXISTS, meaning that QTemporaryFile will continue
to look for unique names when a directory with the same name exists.

Task-number: QTBUG-30058

Change-Id: I42339887d7f5483e3dc6a03a9da15111c350da8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-23 14:42:45 +01:00
Montel Laurent
0450d81190 Fix leak when fd != -1
Change-Id: I07bcf4b678460c86642436d1a69071f765ef63ca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-23 14:42:45 +01:00