Commit Graph

15235 Commits

Author SHA1 Message Date
Marko Kangas
3056b825bd Fix styled vertical dockwidget title cut off bug and elide text if long
Change common stylesheet to elide text correctly for both direction.

Change-Id: I045f6f74733ca8fa67b3e4fbb9d3845a1bea777d
Task-number: QTBUG-41466
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
2014-10-23 08:30:32 +02:00
Marc Mutz
c399e4b7ea Q{Sequential,Associative}Iterable: fix const_iterator assignment
The code didn't properly clean up the current state before
assigning the new state.

Change-Id: If56cf43bace976203ff186759b2a81705b2b22d2
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-10-23 08:28:00 +02:00
Jan Arve Saether
bf200fc948 Adjust the layout if a QGraphicsWidget is explicitly hidden
Since layout items can now be hidden, this also makes sure we respect
the QSizePolicy::retainSizeWhenHidden

Task-number: QTBUG-20132
Change-Id: Iab59fc9b61d4ca1bb2208c479a027da6eb0283a9
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-10-23 07:17:50 +02:00
Axel Rasmussen
e5c1572e7e Fix uninitialized value warning in QFontEngineFT.
When running an application which called e.g. QPainter::drawText under
Valgrind, it would produce "Conditional jump or move depends on
uninitialized value(s)" warnings, since we were allocating a buffer for
a FreeType bitmap without initializing its contents. FreeType,
apparently, does not set the value of all bytes in a bitmap buffer when
it is used as a FT_Bitmap, so we were left with some uninitialized
memory which was still being used.

This commit fixes these warnings, and prevents any potential undefined
behavior.

[ChangeLog][QtGui][General] fixed use of uninitialized memory in the
FreeType font engine

Change-Id: Ia7b3595c78310ce41f76cb4546fc36016c0000a8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-10-23 07:09:33 +02:00
Friedemann Kleint
c30ccb0ecd Fix title font of Vista-style wizards.
Reverse invalid check.

Task-number: QTBUG-41878
Change-Id: I05015407e5cfad94aca65594962b897a1d0a0cbd
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-23 06:34:26 +02:00
Friedemann Kleint
ed0245e145 Fix QWidget::mapTo/FromGlobal() when embedded in QGraphicsView.
Map the positions via QGraphicsScene and the first QGraphicsView
(as is done in existing code). Fall back to the previous code
path when no QGraphicsView exists, which is hit in the tests.

Change-Id: I0754765d05cded6bc1b64045f2513fef8afde337
Task-number: QTBUG-41135
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-23 06:33:10 +02:00
Christoph Schleifenbaum
f3699510d4 Cocoa: Fix icon size calculation for system tray.
The Overall goal is to make it possible to use correctly-
sized pixmaps in a predictable way, while still doing
something reasonable with small and large pixmaps.
(The recommended pixmap height is up to 18 points.)

Enable use of rectangular icons by selecting pixmaps
based on pixmap height.

Draw a low-resolution pixmap on retina displays if
there is no high-resolution pixmap available. Scale
large pixmaps to fit the available menu bar area.

Add a manual-test with various pixmap sizes

Task-number: QTBUG-33441
Change-Id: I1926181fe27cae526bae58022df3240bae9f8ac8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2014-10-22 23:32:17 +02:00
Morten Johan Sørvig
ad66fa0dc1 Cocoa: Delay QMimeData requests for DnD events.
We were delaying the conversion from Qt to OS X types,
but not the data request to the application.

Introduce "Eager" and "Lazy" pasteboard promises:

Eager promises request the application data immediately
and can continue to use the existing commit-promises-
on-app-exit logic. Eager promises are the default
type and will be used for copy/paste.

Lazy promises delay requesting the data from the application
for as long as possible, specifically until when 
promiseKeeper() is called. Lazy promises are used for
drag-and-drop and are not committed on application
exit.

This brings OS X DnD behavior in line with the 
Windows behavior.

[ChangeLog][OS X] Drag-and-drop QMimeData requests are
now delayed until drop time.

Task-number: QTBUG-31301
Change-Id: I8ddbba41593251f4c0c49c29492dce990066e20d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2014-10-22 23:31:35 +02:00
Ruslan Nigmatullin
449b62ed43 XCB: Don't trigger less specific shortcuts
Without this patch some keycodes like Ctrl+Shift+= may generate several
similar key sequences like Ctrl++ and + but only more specific keys
should be returned by QXcbKeyboard::possibleKeys.

Task-number: QTBUG-38137
Change-Id: I23f6522eefaa3b83cfa639f76bdc6a19b450c6f9
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-10-22 23:18:00 +02:00
Morten Johan Sørvig
1510411a38 Revert "Cocoa: Send obscure events on OcclusionStateHidden"
This caused instability in the CI and testing system:
Tests that expected expose and paint events no longer
got them due to window placement/visibility, including:
	tst_QGraphicsProxyWidget::paintEvent
	tst_QMdiArea::tileSubWindows
	tst_QSizeGrip::hideAndShowOnWindowStateChange

This reverts commit f5cf06f4af.

Change-Id: I017fbf24f3ad99cce6602eddafc3a67f8edc494d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-22 22:22:09 +02:00
Frederik Gladhorn
024f595d11 Build with -no-accessibility on OS X
This build will have broken tool button style. I also do not see a reason why
someone would purposefully leave behind people that could otherwise use their applications.
The build with this flag will be completely unsupported as configure states.

Task-number: QTBUG-32551
Change-Id: Ie33269a49ecc10258c9f8611542f7cf99a698bb5
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-10-22 16:19:40 +02:00
Jeff Tranter
4c144d006d Fix spelling errors in method names in QStorageInfo.
The methods retreiveVolumeInfo() and retreiveDiskFreeSpace() should be
retrieveVolumeInfo() and retrieveDiskFreeSpace().

Task-number: QTBUG-42068
Change-Id: I86137fbff26c42c8cc8bad366a4733118d6ca292
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-10-22 14:29:12 +02:00
Jeongmin Kim
1ff6c575ce QNetworkDiskCache: Fix QNetworkDiskCache don't handle to set CookieHeader.
QNetworkDiskCache don't handle to set CookieHeader. so All Set-Cookie's value is invalid.
The root of cause is that metaDataChanged() don't work because of no slot for it.
Add the slot for it and renamed to _q_metaDataChanged.

Task-number: QTBUG-41514
Change-Id: I5cec017e59a1de69c6e89c0bc7209a73dcdc11da
Reviewed-by: Jeongmin Kim <jm86.kim@lge.com>
Reviewed-by: Jung Dong-Heon <clamp03@gmail.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-10-22 09:20:10 +02:00
Alexander Volkov
b5bbfad0a4 Doc: Fix obsoleteness of some QStyle::PixelMetric enum items
The enum items PM_ScrollView_ScrollBarSpacing, PM_ScrollView_ScrollBarOverlap
and PM_SubMenuOverlap were mistakenly put together with obsolete enum items.
Move them up to fix it.

Change-Id: I90bd3a8ab68c99db27134d976fe69df56c9af2b8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-10-22 09:14:13 +02:00
Alessandro Portale
4fbd2dd4a6 Windows: Initialize the mouse cursor resources
Initializing resources is required for static Qt builds on Windows.

Task-number: QTBUG-42075
Change-Id: I3074fd8ab57ac48762f589eb3776ed5cc7e2e31d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-22 09:04:23 +02:00
Friedemann Kleint
763a48fe1a Windows XP style: Fix size calculation of QScrollBar's grip.
Factor out function to calculate the geometry for the styles >= XP.

Task-number: QTBUG-41944
Task-number: QTBUG-40277
Change-Id: Ifad1519b99fd587158c790dd241cb3e4bac3bfc3
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-22 08:58:42 +02:00
aavit
ff98c44060 Doc: Improved explanation of quality setting in QImageReader/Writer
Explanation was somewhat inprecise and incomplete.

Task-number: QTBUG-41358
Change-Id: Iae52c30868ca48a49eac76d6979a9b02c24a7d49
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-22 08:39:23 +02:00
Mitch Curtis
d0402bed6f Improve QLoggingCategory's detailed description.
Change-Id: I40527890fb752c3a1c0f8d8a8fa4ca2b19e4fc08
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-22 08:32:40 +02:00
Shawn Rutledge
28857e7ad0 Windows: QWindowsPrintDevice::printableMargins avoids leaking the DC
MSDN says if the DC was created by calling CreateDC, it must be freed
by DeleteDC not ReleaseDC.

Task-number: QTBUG-41941
Change-Id: I4c60b5d2587f1c4d3332fce74224cbc8b756eb2a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-22 08:11:37 +02:00
Morten Johan Sørvig
56bb02ade3 Improve iOS https error handling.
Set the reply state to "finished" also on errors.
Do a proper string compare to correctly translate
the error codes.

Task-number: QTBUG-42023
Change-Id: I222cc06a47b1f9f89095e8f935f316bf94fd0cd6
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-22 08:11:20 +02:00
Shawn Rutledge
2580192def Windows native socket: handle WSAENETRESET the same as WSAECONNRESET
Task-number: QTBUG-41934
Change-Id: Ib92d8a83965e11e2706ef0daba945cb00692d2c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-10-22 08:11:20 +02:00
Weitian Leung
9518b7e0f1 Avoid adding empty parent icon theme
"Icon Theme/Inherits" may assign an empty value, e.g. Flattr icon
theme

Change-Id: I90713b3eb67e39d6a49a49d1f5b3d7a75a8f30f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-22 08:03:49 +02:00
Laszlo Agocs
1c6b9955a5 Document QOpenGLPixelTransferOptions
Task-number: QTBUG-35576
Change-Id: I178f5db5f1075b6a395cf8ff73b75fe1765540aa
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-10-22 07:43:34 +02:00
Laszlo Agocs
f4144034af Fix badly laid out docs for AA_UseHighDpiPixmaps
Leaving an empty line causes the last sentence go outside the table,
causing a break before the subsequent enum values.

Change-Id: I7477010a259497f8063997d2122a954d1799c1ee
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-22 07:43:12 +02:00
Lars Knoll
bd4a19963e Respect contents margins when calculating the size hint
Without this part of the calendar widget get cut off when put
in a layout and the contentsMargins are non zero.

Task-number: QTBUG-40352
Change-Id: I9ce90476c59c270d92e876a5dc81ea8ce325848c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-10-22 07:23:37 +02:00
Paul Olav Tvete
c5bc66df2f Respect minimum size of heightForWidth layouts
Since we cannot support heightForWidth constraints on toplevel
windows, it is impossible to solve this perfectly: if the
window is resizable at all, the user will be able to resize it
too small. Our old solution was just to give up and allow
completely free resizing, even down to 0x0. This makes
very little sense. It is clearly better to use the minimum
size that we have already computed, even though it is not
perfect.

This reverts a behavior change introduced in commit
36e9516f85fbb9c9a236f5ca034d5a0126d86c12 (September 9th, 2002)

[ChangeLog][QtWidgets][QLayout] Widgets and dialogs containing
layouts with heightForWidth (such as a label with word wrap)
will no longer get a minimum size of 0x0.

Task-number: QTBUG-37673
Change-Id: If26b7ef9c80edbf9d54c6519b36646df408b7652
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-10-22 07:23:28 +02:00
Timur Pocheptsov
2fcc88d021 OS X: drag and drop and auto-scrolling
Cocoa sens periodic drag updated events even if there is no
actuall mouse movement (or any other updates).
This breaks animations in different
views/widgets supporting our own auto-scroll (done with timers).
This patch kindly asks Cocoa _not_ to send us these events.

Task-number: QTBUG-32761
Change-Id: I5dad4ceb0a490e2f3cb34a806a5bdb1045b4dac3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-22 06:59:57 +02:00
Friedemann Kleint
963037d86b Fix helper function call in QWindowsVistaStyle::pixelMetric().
Task-number: QTBUG-41944
Task-number: QTBUG-40277
Change-Id: I1da9ffddce8edfcaa87d27058ed73ac7ec63d081
Reviewed-by: Adam Light <aclight@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-22 06:23:47 +02:00
Friedemann Kleint
7614d734c4 Windows: Implement Qt::WA_ShowWithoutActivating.
Set dynamic property for all platforms and query it
in QWindowsWindow::show_sys().

Task-number: QTBUG-19194
Task-number: QTBUG-34504
Change-Id: I4199a2ed835d3de928405d470a81c54da93cc768
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-10-22 06:22:36 +02:00
Friedemann Kleint
ab556d6b32 Fix height of combo popup when the list view has non-zero spacing.
QListView::spacing() is the space around the item (layout margin),
so the effective spacing is twice as big.
This differs conceptionally from QTableView, which has a spacing of 1
and a line on top/bottom. Split up QComboBoxPrivateContainer::spacing()
into functions return spacing and top/bottom margins to reflect this.

Task-number: QTBUG-37865
Change-Id: I1ff812e7856e00a53f1119ef3304956cbb7cbfca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-10-22 06:21:54 +02:00
Laszlo Agocs
1a097dc139 eglfs: Do not flush input events when updating the cursor
Task-number: QTBUG-42079
Change-Id: Ica806a090db74b4a1c34421334a28d7efd002b35
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-22 05:53:54 +02:00
Morten Johan Sørvig
dafd1ffa2c QPA: Flush window system events with flags.
Add a QEventLoop::ProcessEventsFlags argument to
flushWindowSystemEvents(). This gives the platform
plugins more control over which events to flush.

Task-number: QTBUG-39842
Change-Id: Id9c01948b22e297b22503d38ec4e726f9f880fd5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jonathan Liu <net147@gmail.com>
2014-10-22 05:53:15 +02:00
Lars Knoll
42bdbed7ce Correctly apply miter limits when stroking lines
The PDF generator was in many cases not correctly
applying miter limits to the generated strokes leading
to drawing artifacts for very sharp edges.

Task-number: QTBUG-37903
Change-Id: Ie93b0f4a56775729105a375ba3bcdb5b58993433
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-21 08:42:23 +02:00
Lars Knoll
90a4c69b25 Produce more correct clip path for QGraphicsShapeItem
If no pen is set on the item, we can completely ignore the
pen for the creation of the items shape. This both speeds
up the creation of the shape and applying it as a clip mask
as well as creating more correct results.

Task-number: QTBUG-32846
Change-Id: I5f6f690256c71309713d8f746e67599af3088dd7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-21 08:42:12 +02:00
Timur Pocheptsov
dc267036e3 OS X: Retina displays and blurry QToolButton
Checkable QToolButton has a special pixmap in the background,
painted with a 'smooth pixmaps' hint. This hint also affects
how an icon on a toolbutton itself is painted later. The difference
can be quite visible on a Retina display, so this patch makes the toolbutton's
image always look the same in checked/unchecked state.

Task-number: QTBUG-35162
Change-Id: I2adc8006371fa10d89d4b77da6b3aa168aa5abc8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-21 07:36:57 +02:00
Timur Pocheptsov
ae5f3df59b OS X - unified toolbar and AA_NativeWindows
In some cases QToolBar creates a child window (a child borderless NSWindow)
placed on top of the toolbar's  main window. As a result it's not possible
to drag this main window using its toolbar - the window "jumps" on the screen.
The reason is quite subtle - QNSView -handleMouseEvent: uses
[NSEvent mouseLocation] and this location is invalid:

- we have an NSWindow (parent)
- we have a child NSWindow ([parent addChildWindow:child ....]
- we handle drag event in a child window
- we move a parent window as a result of drag event
- Cocoa also moves a child window for us
- when handling the  next drag event, location [NSEvent mouseLocation]
  differs from the real event's location.

Task-number: QTBUG-40106
Change-Id: Ic68cb92ab4233a1e0746b478820c1e33fd37a462
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-21 07:36:34 +02:00
Timur Pocheptsov
a6ebc9b34a OS X - maximize app's window from the Dock or using cmd-tab
On OS X it's possible to maximize app's window by clicking on an app's
icon in the Dock.
Another trick is to use cmd-tab to select an app +,
while still holding the 'cmd' key, press the 'option' key -
this should also maximize a window.
None of these works at the moment, and to enable these features app
delegate should return YES from the

-applicationShouldHandleRepopen:hasVisibleWindows:.

method.

Task-number: QTBUG-40084
Change-Id: I33ba9e74d55d41d23deb429612519b746d461d9e
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-21 07:34:56 +02:00
Friedemann Kleint
6c7a348cf8 Set correct transient parent in q_createNativeChildrenAndSetParent().
Fix warning:
void QWindow::setTransientParent(QWindow*) ... must be a top level window.
which occurred for example when parenting a QMenu onto a native child
widget.

Task-number: QTBUG-41898
Change-Id: Icc25fb2108bd68b2d9c0e551949b90fc7a82d358
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-21 06:30:15 +02:00
Lorn Potter
520b10be4c Add better mobile connections to QtBearer NetworkManager backend.
Task-number: QTBUG-41807

Change-Id: Ifb5904d4887111416b4bb1a32d6d056029186f5c
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2014-10-21 01:01:12 +02:00
Lorn Potter
151061ad4a update QtBearer NetworkManager backend API
Task-number: QTBUG-41747

Change-Id: Idb4afea0215b94957a11895c7db97a72ae680804
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2014-10-21 01:01:06 +02:00
Frederik Gladhorn
3361fcbc28 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
2014-10-20 19:12:25 +02:00
Josh Faust
929d6d6b9b Fix ShortcutOverride for QtQuick on OSX
tryShortcutOverride on OSX gets called via
QWindowSystemInterface::tryHandleShortcutEvent. This change
fixes that to use the QWindow's focus object.

Task-number: QTBUG-32928
Change-Id: I51beb774e1fb91e0d8e2c12d087176d917357311
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-20 14:23:25 +02:00
Tor Arne Vestbø
ae89aa330f logging: Fix qCleanupFuncinfo to not mangle Objective-C message names
Change-Id: I823566ba72668c611d225aa92c4d09a53cabe8fc
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-10-20 13:34:37 +02:00
hjk
0c71cbea54 Add a hint on application window positioning with QProcess::start
Task-number: QTBUG-30999
Change-Id: I65c80917c9bad067bb7d8e69e2431dd1c4886b08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-20 12:47:25 +02:00
Leena Miettinen
2679c5f7e0 Doc: add info about letter spacing type to function desc
Task-number: QTBUG-41222
Change-Id: I18168dfa503feac07ee1b7bc349b9f14b7351518
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-20 11:59:31 +02:00
Leena Miettinen
9dc246c5cc Doc: removed unnecessary text
Added some commas.

Task-number: QTBUG-41928
Change-Id: I52ad75f895f41b109f0496863930ffaa1650447c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
2014-10-20 11:45:12 +02:00
Tor Arne Vestbø
e260e1bcae Always report focusObjectChanged on QWidget::clearFocus()
The focusObject() of a QWidgetWindow is based on the focusWidget() of the
top level widget of the window, which is resolved through the focus_child
chain of the widget. This is not the same thing as the focusWidget of the
application. The hasFocus() function of a QWidget queries the latter, so
we can't put the focusObjectChanged signal inside hasFocus() when we
unconditionally clear the focus_child chain (and hence the focusObject)
earlier in the function.

Change-Id: Iae39da5d6031d22b21e9dc9f18e5fe6e6fd11a5c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-10-20 11:42:59 +02:00
Tor Arne Vestbø
0f98d36ff6 Clear specific QWindow::focusObject() on QWindowPrivate::clearFocusObject()
The focusObject of a QWidgetWindow is the focusWidget() of the top level
widget, so when clearing the focus object of the window we should clear
focus of the same focusWidget, not the application-wide focus widget,
which may live in another window.

Change-Id: Ib9162418865c225e23aac7987e119b3b651983eb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-20 11:42:48 +02:00
Tor Arne Vestbø
3ab4e869e2 iOS: Don't auto-activate popup windows unless they are standalone
We try to emulate a traditional window manager by activating windows
on touch press (before delivering the event), and on showing/hiding
windows, but this logic should not apply to popup windows (including
tooltips and tool windows), as they are in most cases already active
through their parent or transient parent, and should not steal keyboard
focus and bring the virtual keyboard down.

Change-Id: If10082bd48cdf1a9e1c41d8809066e86dafd7ffc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-20 11:42:30 +02:00
Tor Arne Vestbø
31e987f8f0 iOS: Remove unused and duplicated functions from QIOSWindow
Change-Id: I29a2345bddc9ec9577bdc398e4df9914406e5367
QIOSWindow::windowType() is the same as window()->type()
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-20 11:42:20 +02:00
Tor Arne Vestbø
e7239e1ce3 iOS: Fade out statusbar when scrolling view due to VKB
Change-Id: I86923a2b2aa2d17d79ba3a11cabf37e615eaf4cc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-20 11:42:10 +02:00
Tor Arne Vestbø
cc1058a278 iOS: Move UIView helpers to once place
Change-Id: I9e20d23ad813503ea5c6bef3303ebc0f6b9e99cd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-20 11:42:01 +02:00
Alex Blasche
cc73cc9a4c Remove old Trolltech feature string from QXmlSimpleReader docs
This makes it even more unlikely that anybody uses them.

Change-Id: I6b3a3902687a7fcde2d771617837f738001eeb0a
Task-number: QTBUG-25023
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-20 11:24:59 +02:00
Paul Olav Tvete
1fe8a708cb Android: deadlock avoidance
This change adds deadlock protection to all places where we lock
one thread while waiting for the other to do something. If we
detect that the other thread is going to block, we abort the
operation. This could cause unexpected problems, such as painting
errors, text input errors, or even crashes, but the alternative is
a guaranteed deadlock.

Task-number: QTBUG-41369
Change-Id: I2627a955cfafc4bce54eb9d0d38e19b768b06956
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-10-20 10:23:47 +02:00
Paul Olav Tvete
1faba97683 Delay showing keyboard until application is active
Android starts asking lots of questions when the software keyboard
pops up, so let's wait until the application is initialized. This
works around a deadlock on startup.

Task-number: QTBUG-41369
Change-Id: I1c79e32d08c7cc11748ec55efbff3bc25e40f4b2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-10-20 10:23:41 +02:00
Mitch Curtis
096d0ef02b Correct QPainter::clipPath() documentation.
Change-Id: Ie8ea01eee23e28378eadca0e87dc89fd62aec14f
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-20 10:13:43 +02:00
Jocelyn Turcotte
c762c8accc Remove QOpenGLContextPrivate::globalShareContext
This has previously been replaced with qt_gl_global_share_context
and all using code has been ported to the new name at this point.

Change-Id: I13832f583456891dd057a7b414f45ec3e83f5698
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-20 10:11:31 +02:00
Jørgen Lind
c231694949 Fix QOpenGLWindow tests when devicePixelRatio != 1
Change-Id: I83d71de8b9d735cd649a6c514e41a9ff23625005
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-20 10:11:25 +02:00
Marc Mutz
9dcc38b566 QEasingCurve: fix mem leak in operator>>
The code ignored that the QEasingCurve passed in to op>>
might already have a QEasingCurveFunction set, overwriting
it with a new pointer without deleting the old.

Change-Id: Ic14cf7e4b97c7c8c7edb64cde08fbf22c07ac8f3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-19 13:18:18 +02:00
Marc Mutz
ef1027b824 qdatetime.h: include correct header
QExplicitlySharedDataPointer is defined in qshareddata.h, not qsharedpointer.h.

Change-Id: If81f6615681068a8e8c38817044ea3a0433c42ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-19 13:17:24 +02:00
BogDan Vatra
c5b0308dc5 Android: Update Ministro's requirements.
Task-number: QTBUG-41968
Change-Id: Ia0c204dd87b9de3cbb7bb388099c435b855ad4d5
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-10-19 11:38:33 +02:00
Richard Moe Gustavsen
e5f48c63d2 Widgets: only update IM if the widget is the current focus object
QInputMethod works on focusObject, not focusWidget. These two
are not always the same, and sometimes the focusObject is also
NULL. In either case, we should not tell QInputMethod to
commit, reset or otherwise emit signals based on the internal
state of widgets that are not the focus object.

This led to a crash on iOS, since we got a call to
cursorRectangleChanged when focus object was NULL, which
the code didn't (and shouldn't need to) take into account.

Change-Id: I54e40d7ec35210ba6599a78c5a8c7f982a1c3dbb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-19 09:57:45 +02:00
Marc Mutz
32dfbd6dbf Add qHash(QSslError) overload
qsslsocket_winrt.cpp defined it locally, which runs the risk of
clashes with a potential user-defined qHash(QSslError), so
make it public.

Also included both .error() and .certificate() in the hash, as
both of these are used to determine equality (the WinRT version
only used .error()).

[ChangeLog][QtNetwork][QSslError] Can now be used in QSet/QHash.

Change-Id: Ieb7995bed491ff011d4be9dad544248b56fd4f73
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-10-19 07:32:41 +02:00
Marc Mutz
e8bdc949fc Add qHash(QSslCertificate) overload
qsslsocket_winrt.cpp defined it locally, which runs the risk of
clashes with a potential user-defined qHash(QSslCertificate), so
make it public.

Also, the implementation in qsslsocket_winrt.cpp simply hashed
the handle(), which violates the principle that equal instances
must hash to the same value. Also, for some platforms, the
implementation returns nullptr unconditionally, which, while not
violating the above-mentioned principle, will make all users of
the hash have worst-case complexity.

To calculate a meaningful hash, therefore, the certificate needs
to be inspected deeper than just the handle.

For OpenSSL, we use X509::sha1_hash, which also X509_cmp uses
internally to determine inequality (it checks more stuff, but
if X059::sha1_hash is different, X509_cmp() returns non-zero,
which is sufficient for the purposes of qHash()). sha1_hash may
not be up-to-date, though, so we call X509_cmp to make it valid.
Ugh.

For WinRT/Qt, we use the DER encoding, as that is the native
storage format used in QSslCertificate. This is not equivalent
to the implementation used in qsslsocket_winrt.cpp before, but
since handle() == handle() => toDer() == toDer(), it should not
be a problem.

[ChangeLog][QtNetwork][QSslCertificate] Can now be used as a key in QSet/QHash.

Change-Id: I10858fe648c70fc9535af6913dd3b7f3b2cf0eba
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-10-19 07:32:37 +02:00
Marc Mutz
adadb5e870 QSizePolicy: remind to mark as Q_PRIMITIVE_TYPE in Qt 6
Change-Id: I1f18b4cd99f37aadf199e70d3acade9c8f5f9799
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-19 07:32:21 +02:00
Richard Moe Gustavsen
e57153b082 iOS: ensure we have a valid focusObject before sending it IM events
Should not really happen, but since we don't store the focus
object given to us, we should do a check.

A crash was seen from this when running the "Application"
example for widgets.

Change-Id: I9c4121766d7028a4eceede7d7b15c8c53d34e16e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-19 00:57:29 +02:00
Richard Moe Gustavsen
0ed65a6513 iOS: ignore sender of actions for edit menu
The reason is that the sender is sometimes 'NULL', so
we cannot rely on it. But the current test with our
prefix should suffice.

Change-Id: Ie58bf062cbade08feda622bda753d63e1d811a8d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-19 00:56:18 +02:00
Richard Moe Gustavsen
3797ee7747 CoreText font database: Use dynamic type on iOS to resolve theme fonts
Use Dynamic Type to resolve theme fonts, so that we get the
correct font sizes and styling based on user preferences
in Settings app.

Change-Id: I2222199a5ba21badb2e3696993eee503e720c476
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-19 00:56:04 +02:00
Richard Moe Gustavsen
fc567acefb iOS: ensure edit menu works on iOS6
Method "- (id)targetForAction:(SEL)action withSender:(id)sender" is
only available from iOS7. So change implementation to use
whats available on iOS 6.

Change-Id: I4e21495073364e83ef396dfab47a7ea2a23bbead
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-19 00:55:49 +02:00
Dyami Caliri
1cfd457826 OS X: Emit QClipboard::dataChanged when activating application
The QClipboard documentation states that on OS X it will emit
dataChanged() when activating the application, if the system clipboard
had changed. It wasn't doing this in Qt5.

Task-number: QTBUG-34941
Change-Id: I7f34e757876757691f0a6c94dd2ae76a60146291
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-10-18 18:35:49 +02:00
Gabriel de Dietrich
59ebcdc540 Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-10-18 13:24:33 +02:00
Gabriel de Dietrich
cb2e65eea2 QMacStyle: Fix QSlider appearance on Yosemite
First, we adjust the min and max positions, which HITheme has been
unable to render properly for years. This involves separating the
knob and track rendering. Also, on Yosemite, the tickmarks-less
slider shows a blue progress fill in the track, on the knob's left
side. Finaly, and this is valid for all versions, the tickmarks are
being drawn before the knob (or the whole slider for OS X versions
before 10.10)

Change-Id: I6fce2e298a80858a18fd9fe1e799b65265a8aefd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-18 13:24:21 +02:00
Gabriel de Dietrich
8dd15fd955 QMacStyle: Add optional block parameter to drawNSViewInRect()
In some cases we want to do something different than just calling
- [NSView drawRect:].

Change-Id: I7db704daa39611f33f270b0192c4301de62ec1bf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-18 13:24:13 +02:00
Alexander Volkov
4de382f4a2 Make font hinting and antialiasing size dependent when using FontConfig
Add the pixel size of the font to the search pattern to get size dependent
font settings. This patch allows to take into account KDE settings for
font sizes which should be excluded from antialiasing.

Change-Id: I8bd8b7b3d585009d0a39db631cd02b7970537f5c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-10-17 22:48:37 +02:00
Mitch Curtis
06e706bdbb Fix QAbstractListModel's detailed description.
Change-Id: I3f3e6b9d4e021620505c03458e78856326dcd859
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-17 22:14:00 +02:00
Louai Al-Khanji
1c91ce375e eglfs: try to query real cursor size instead of hardcoding 64x64
We still fall back to 64x64 if the query fails for either width or height.

Change-Id: I39682f30c94cfd9932667a9bb15947e50ee0de1d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-17 15:48:18 +02:00
Louai Al-Khanji
d63e012fcd eglfs: Make KMS hooks compile on older systems
drmModeSetCursor2 has not been available for very long and doesn't
actually buy us much, so don't use it. Also one more missing cast.

Change-Id: I1120b933759bbabf73edd23bfc837a2a27a93a0c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-17 15:48:14 +02:00
Christian Strømme
3d94a564f4 Android: Improve cache logic in findClass()
This change adds guards to ensure that we only do a class
look-up once when calling QJNIEnvironmentPrivate::findClass().
IF someone calls findClass() with an environment that does not contain
a "valid" class loader, we should fallback to loadClass(),
but only once.

Change-Id: If5fc82956db889f3269bb33c98a16c49cae55def
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-10-17 14:58:23 +02:00
Topi Reinio
cf8f369f85 Move Qt Core examples under a common subdirectory
Qt Core examples were scattered into several subdirectories under
qtbase/examples. This caused an issue with the example manifest
file generated by QDoc; it expects to find all examples under a
common directory in order to produde correct paths to the example
.pro files. Qt Creator will not find the examples without a valid
manifest file.

This change moves the examples and edits the documentation files
accordingly.

Task-number: QTBUG-41963
Change-Id: I51d86782e0ba21c5c9bae5f15401ec774abe5cf8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-10-17 14:57:13 +02:00
Marc Mutz
45485d9eb4 Fix undefined behavior in QLoggingRegistry::defaultCategoryFilter()
Report by asan:

  READ of size 2 at 0x00000041dd40 thread T0
    #0 0x2af097b84da6 in QLoggingRegistry::defaultCategoryFilter(QLoggingCategory*) (lib/libQt5Core.so.5+0x566da6)
    #1 0x2af097b8387b in QLoggingRegistry::registerCategory(QLoggingCategory*, QtMsgType) (lib/libQt5Core.so.5+0x56587b)
    #2 0x4067f7 in tst_QLogging::QLoggingCategory_categoryName() tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp:238
    <snip>

  0x00000041dd41 is located 0 bytes to the right of global variable '*.LC115' defined in 'tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp' (0x41dd40) of size 1
    '*.LC115' is ascii string ''

At face value, memcmp("", "qt", 2) should not return 0, but since
the code invokes undefined behavior, the compiler can do whatever
it wants, including returning 0 here, further proving the fact
that there are *no* benign cases of undefined behavior.

Change-Id: I0c38622c47d1dcea450ea549370be1673b47b18d
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-17 14:56:07 +02:00
Friedemann Kleint
db069e7f30 XCB: Always set X window attributes in QXcbWindow::setWindowFlags().
QDockWidget and QToolBar set the Qt::BypassWindowManagerHint window flag
when unplugging and clear it in the endDrag() methods. This does not have
any effect since the attribute is not taken into account in
QXcbWindow::setWindowFlags(). Change the method to always set the attributes,
which should also make it possible to set/clear Qt::WindowTransparentForInput.

Task-number: QTBUG-41189
Task-number: QTBUG-38964
Change-Id: Id9eddc642489d18f44c7597f8fc1a1df71971306
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-10-17 14:56:05 +02:00
Kai Koehne
16df1ad322 Export QFSFileEngine symbols
Although it's private API the symbols are used e.g. in the
Qt Installer Framework.

Change-Id: I557d3b86dbf87cb1b712bae09c3e8fecf6f15e67
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-10-17 14:55:59 +02:00
Friedemann Kleint
0368b24a7f QSettings: Prevent assert when passing empty keys.
[ChangeLog][Important behavior changes][QSettings]
QSettings::value() now returns an invalid QVariant
when passing an empty key. The code path ran into
an assert, which was only noticeable in debug
builds.

Task-number: QTBUG-41812
Change-Id: I5cc32be3aa267a132e9d6639ecd6cb0bbafc15b0
Reviewed-by: Stéphane Fabry, Cutesoft <stephane.fabry@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-17 14:55:45 +02:00
Martin Smith
4f1de1432c qdoc: Generate QA pages
qdoc has a new command line option, -write-qa-pages. Using this
flag on the command line will tell qdoc to generate a QA html page
in each module's output directory. The QA page contains information
that is useful for Quality Assurance checking of the module's docs.
The QA file name begins with "aaa" so it will always be listed at
the top of the output directory. The file name for the QA file for
QtCore, for example, is aaa-qtcore-qa-page.html.

Currently, the QA page only contains a report listing the intermodule
link count for each module that is the target of links from the
documented module.

The link report can be used to optimize the search order qdoc uses
when resolving inter-module links. By default, the search order
is the same as the ordering of the modules in the depends list
in the .qdocconf file. Using the report, the user can reorder
that list according to the number of links found in each module.
i.e. in descending order of link count.

The modules are listed in descending order of link count.
Additionally, an actual depends variable is printed. It can
be cut and pasted into the module's qdocconf file.

Change-Id: I442596aeb54dcdd5db4a0821096a5273c15627e6
Task-number: QTBUG-41850
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-17 10:43:05 +02:00
Martin Smith
77165553af qdoc: qdoc was too slow
The hard-coded search order is now removed. The search order
is now constructed from the depends variable in the qdocconf
file.

The basic idea is that qdoc is run once. It gets a list of all the
qdocconf files for the modules in Qt5.
First, qdoc runs in -prepare mode for each qdocconf file in the list. It
generates the index file for each module, but these index files are
never used. At the end of the -prepare phase for each module, qdoc keeps
the tree structure for the module in a collection of trees.
Second, qdoc runs in -generate mode for each qdocconf file in the list.
But now it uses the existing tree for that module, so it doesn't have to
read the sources files again, and it doesn't have to read any index
files. Now it generates the docs for each module.

The runtime for qdoc has been reduced
by 90% when running qdoc for all of Qt5 on a not so new iMac.
Before this update, qdoc took about 10 minutes to generate
docs for Qt5. Now it takes a little over 1 minute. The new
way to run qdoc is described in the Qt bug report referenced
here.

Note that running qdoc this new (old) way also generates
fewer qdoc errors than when running qdoc the old way. This
indicates that the index files qdoc uses when running the
old way are incomplete.

Note also that the old way of running qdoc is not affected
by this update. The old way is still required for running
qdoc in the current qmake/make system. That process must be
changed to be able to use the faster qdoc. The details are
provided in the Qt bug report.

Change-Id: Ibec41d6fbaa9fc8cd070a05d04357bd02c4478f0
Task-number: QTBUG-41705
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-17 10:42:56 +02:00
Ulf Hermann
880986be23 Check for integer overflows in places where qAllocMore is used
Task-number: QTBUG-41230
Change-Id: I5e932c2540c0bd67f13fab3ae20975d459f82c08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-17 10:09:18 +02:00
Ulf Hermann
9eb2b25300 Don't dereference pointers on QArrayData deallocation
If the allocation fails the pointer will be 0. That is OK for free(),
but we shouldn't try to check for static data then.

Change-Id: I0a8860c9e04833e3be79f7a8a39bdaffeb488f35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-17 10:00:42 +02:00
Ulf Hermann
9d44645eae Do Q_CHECK_PTR on all results of QArrayData::allocate()
QArrayData::allocate() uses malloc() which can return 0. We need to
check for that when using it inside other containers. The containers
might otherwise return a seemingly valid result from some allocating
operation which is actually corrupt.

Task-number: QTBUG-41231
Change-Id: I16cc6035e4f495f519bd38bf29cee080ee0637f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-10-17 09:58:56 +02:00
Marc Mutz
f93870ed44 QtDBus: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().

Change-Id: Ib0c0f903531a3a656919e87df8065a9c6c7a666c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-17 09:51:11 +02:00
Laszlo Agocs
47870f02f7 Simplify using tslib with eglfs
tslib support can now be built-in into eglfs, like evdev.

Set QT_QPA_EGLFS_TSLIB to 1 to use tslib instead of evdevtouch.

The input device can be controlled via TSLIB_TSDEVICE.

Change-Id: Iff6bdbb4d133f73eca5528705844862236f8752b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-17 08:08:47 +02:00
Alexander Volkov
1b8c5f450b xcb: Fix a type of variables for xkb modifiers masks
Change-Id: I05c7c6a649a55fc0648b1cb84e1c402160c9d998
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-10-16 21:51:31 +02:00
Alexander Volkov
50398708cd Accessibility Linux: Make a full copy of a key event
Otherwise native values (scan code, modifiers, virtual key) of the key event
will be lost if an event listener is registered.

Change-Id: I5eebb1f91ad7de6801f7efb0bf0891c4430f9cf5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-16 21:51:05 +02:00
Alexander Volkov
e8e1616cf2 Reduce code duplication in QFontconfigDatabase
Extract common part from fontEngine() methods to setupFontEngine().

Change-Id: Id4aee43b2a477f9fd40dc564d96a2335bfde9e22
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-10-16 21:49:21 +02:00
Alexander Volkov
d904533acb xcb: Don't return 0 as a possible key for a shortcut
QXcbKeyboard::keysymToQtKey() may return a value of 0 for keysyms
that are not supported by Qt (e.g. for XK_ISO_Next_Group).
It is then translated to an empty QKeySequence which in turn is
detected as a partial match for any shortcut.
The behavior of QShortcutMap::nextState() becomes broken because
it sets current state to QKeySequence::PartialMatch while there is
no match at all.

Task-number: QTCREATORBUG-9589
Change-Id: I1e2a4511a876dfa418db9906d10382255a2e4d62
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
2014-10-16 21:49:02 +02:00
Laszlo Agocs
6d1c4c8862 Avoid breaking BC with new virtuals in QOpenGLPaintDevice
Task-number: QTBUG-41046
Change-Id: Iab628d2d6811d528e2cc513b6f8a74baa628541d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-16 21:47:29 +02:00
Risto Avila
5701583891 Fix cast for qeglfshooks_kms
Fix cast for qeglfshooks_kms

Change-Id: Ibfc0c486d252a047e66cbd5bbe08375b994f1eb4
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
2014-10-16 14:04:56 +02:00
Laszlo Agocs
dae22ebfe4 Switch to categorized logging in all the input handlers
Use the rule qt.qpa.input (similarly to xcb).

In addition, evdevkeyboard supports qt.qpa.input.keymap to enable keymap
debug messages.

For compatibility, evdevtouch retains the QT_QPA_EVDEV_DEBUG environment variable,
this will simply turn on the associated logging rule.

Change-Id: Ia038beb827346d2573ca9a2b69b8dcc53adcf0eb
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-16 13:08:14 +02:00
Laszlo Agocs
cf046ccec0 Clean up tslib plugin
The code is now cleaned up, properly divided between platformsupport and
the actual plugin (like evdev) and categorized logging is in use.

This will allow us to use tslib as a built-in input handler in eglfs in
the future.

Change-Id: Ic87cdcfe8049bb98530e7f26ffa7a77611a8ede3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-16 13:08:06 +02:00
Laszlo Agocs
5cd6cd198c Avoid qCWarning
qCWarning messages are shown by default. This was not the intention.

Switch to qCDebug since these are not necessarily errors, just debugging
information.

Change-Id: I15f114fd07887afb687e40342b289a6463e0c93a
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-10-16 13:08:01 +02:00
Friedemann Kleint
a4ac4b3263 QWindowsGuiEventDispatcher: Register timers in constructor.
Port change 3716a76704273fdbe5ad4ec978438daeda606c26 (Qt 4)
to Qt 5. Enforce the creation of the internal window
and registering of timers in the event dispatcher constructor
for GUI applications instead of delaying it to processEvents()
is called. Move the call to virtual wakeUp() out of
createInternalHwnd().

Task-number: QTBUG-40881
Change-Id: I82a4748897da140a39feff882c75ad5ac6155148
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-10-15 15:16:38 +02:00
Friedemann Kleint
7095cdabc9 QTestLib: Remove valgrind version check.
Version 3.3 is now assumed to be widely available.

Task-number: QTBUG-41453
Change-Id: I453ce26d170b2bbb8179ddf4b91155ddd3e6379a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-10-15 15:16:29 +02:00
Topi Reinio
65b563fe57 qdoc: Fixed recursion of \sincelist command handling
QDoc uses a recursive method of resolving all the classes, QML types,
properties, functions etc. added since a specified Qt version.

The code entered the next level of recursion only if its parent had
set a \since version, which was not always the case.

Task-number: QTBUG-41862
Change-Id: I3803ed9ffa472165754358f3906955430a893de1
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-10-15 14:47:27 +02:00
Jan Arve Saether
648623ff23 Consolidate how contentDescription is calculated.
Previously, the behavior was different depending on if the
contentDescription was calculated as a result of an event, or if it was
calculated as a result of hierarchy traversal.
Refactor the functionality into one single function that will be used in
both scenarios.

'contentDescription' will now receive its value from one of the following
sources, listed in prioritised order (QAI == QAccessibleInterface):
1. QAI::text(QAccessible::Name)
2. QAI::text(QAccessible::Description)
3. QAI::text(QAccessible::Value)
4. QAI::valueInterface()->currentValue()

Change-Id: I2e4958a1e95b5f20d01da37c23ecbc09842360bc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-15 14:24:46 +02:00
Oswald Buddenhagen
29ad07d0a4 Avoid sleeping 100ms in QProcessPrivate::drainOutputPipes()
There is no point in waiting 100 milliseconds after each iteration, as
all data that we may possibly read will be already in the pipe. We only
need to give the notifier thread a chance to inform us, which is best
achieved with a yield.

Task-number: QTBUG-41282
Change-Id: Id654b688246508494a5549c11900f9ad2957f192
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-10-15 13:44:17 +02:00
Tor Arne Vestbø
3edce263fb Prevent 'recursive' update events when calling QToolButton::setMenu()
Commit bb3d2ca9f1 (QToolButton: properly reset the size hint when a
menu is set on it) didn't take the case of re-setting the same menu
into account, and the result was that we would unconditionally cause
an update, resulting in the following backtrace again and again, as
each posted update event was processed by the event loop:

    frame #0: QToolButton::setMenu(this=0x7af59500, menu=0x00000000)
    frame #1: QToolBarLayout::setUsePopupMenu(this=0x7ae65a30, set=false)
    frame #2: QToolBarLayout::checkUsePopupMenu(this=0x7ae65a30)
    frame #3: QToolBarAreaLayoutLine::fitLayout(this=0x78e5f870)
    frame #4: QToolBarAreaLayoutInfo::fitLayout(this=0x790be278)
    ...

Besides consuming needless CPU time this also uncovered a case on iOS
where Qt would starve native events and animations from being processed,
preventing eg. rotation animations from running.

Change-Id: Ib6bd4ba21d8e84ca73fb0a75b598016dbd9ae0fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-15 13:34:30 +02:00
Morten Johan Sørvig
f5cf06f4af Cocoa: Send obscure events on OcclusionStateHidden
This disables animations for windows that are
completely obscured by other windows.

On examples/quick/animation, obscured CPU usage goes
from 10% to 1%.

Change-Id: I9945431e6387e406e2064c08d5aa01d5d96ef602
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2014-10-14 18:15:04 +02:00
Laszlo Agocs
ebc835c2aa Fix QOpenGLWidget on Cocoa when used as viewport
Having a QOpenGLWidget as a graphics view viewport was not functioning
on OS X: it was showing incomplete content due to accessing the texture
attached to the framebuffer object before the rendering is complete.

On the normal path, when rendering is done via paintGL(), the flush was
there. When used as a viewport however, this path is not used. The missing
flush is now added for the other case too. For performance reasons, we will
not flush on every paint engine end(). Instead, the flush is deferred until
composition starts.

QGLWidget also featured a weird on-by-default autoFillBackground concept. To
maintain compatibility with apps that used QGLWidget as the viewport for
QGraphicsView, we will now do the same for QOpenGLWidget, but only when it
is used as a viewport. For regular QOpenGLWidgets autoFillBackground defaults
to false, like for any other widget. The docs are extended with a small section
about differences between QGLWidget and QOpenGLWidget.

Task-number: QTBUG-41046
Change-Id: I42c2033fdd2ef5815783fd640fe11373761061e0
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-14 18:14:52 +02:00
Frederik Gladhorn
b55a688b61 Merge remote-tracking branch 'origin/5.3' into 5.4
Change-Id: Ic01820f2390e419a5b286643e7351e85ae032473
2014-10-14 13:54:50 +02:00
Eskil Abrahamsen Blomfeldt
4bf0660ae4 Make QStringRef::right() consistent with QString::right()
The implementation was inconsistent with QString::right(),
and did not return the N rightmost characters but actually did
the same as QString::mid(N) (returning the rightmost size - N
characters.)

Since this function is fairly recent (Qt 5.2), is documented to
behave the same as QString::right(), and since these APIs are
meant to be interchangeable, this needs to be fixed, even though
it changes behavior.

[ChangeLog][Important Behavior Changes] Changed QStringRef::right()
to be consistent with QString::right(). The function now returns
the N right-most characters, like the documentation already claimed.

Change-Id: I2d1cd6d958dfa9354aa09f16bd27b1ed209c2d11
Task-number: QTBUG-41858
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-10-14 11:32:55 +02:00
Richard Moe Gustavsen
5d9dcac0f2 qplatformmenu: remove unused and deprecated function
Now that all platforms use the popup function that
takes a target rect, lets remove the deprecated one.

This is sort of important, since QtQuick controls now
uses the new version. So if a (new) platform ends up only
implementing the old version, that can end up not
working correctly.

Change-Id: I34814b3de5ea4954cf21b161e8a834e39e5534c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-13 22:13:18 +02:00
Richard Moe Gustavsen
afefc89d0f osx: let qcombobox specify target rect when showing popup
Let qcombobox use the new API for showing a native
popup menu (introduced with 1a47595).

Change-Id: Id08ef9e59fdd47b2c1df84fa72e3a2c69fe187b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-13 22:12:57 +02:00
Alex Trotsenko
350ab22885 Make QRingBuffer::ungetChar() not leave empty array in buffer list
Change-Id: Ic692693132f0c316ad068cad5423ca8fd32bd40d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-10-13 18:06:33 +02:00
Allan Sandfeld Jensen
29e679bed9 Fix access of non-existing color table
Since alphaMapForGlyph now returns images in alpha8 format, they no
longer have a colortable, so we need to fix the fallback implementation
of alphaRGBMapForGlyph from trying to access it.

Task-number: QTBUG-41855
Change-Id: I232089163cfc817d7cf16df566f05629a968bf12
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-13 18:03:40 +02:00
Laszlo Agocs
d92a9ca2d3 Update QOffscreenSurface docs regarding threads
Change-Id: Ic2e3230835aa7fc1b1c3ac0530a65cd478e1ec5f
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-13 14:00:21 +02:00
Lorn Potter
d0a6fcd925 Fix QtBearer connman backend report correctly on lte network
Task-number: QTBUG-41813
Change-Id: I977facc2ee59571d24e60ac9d5d41e957403b344
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-10-13 13:53:39 +02:00
Gabriel de Dietrich
b380bcc7e2 QMacStyle: Fix QPushButton with menu appearance on 10.10
As usual, this includes small and mini control sizes.
Flat and oversized buttons will fall back to the HITheme
rendering for now.

Task-number: QTBUG-40833
Change-Id: I08d67c48b2e72681af4dc4a37ea498f7aac1dca0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-13 13:53:34 +02:00
Maximilian Hrabowski
4cbb99c5e2 QAbstractItemView: fix CTRL+A select all behavior
The check for Qt::Key_A to handle selectAll was changed to directly
compare to QKeySequence::SelectAll as this will only match Ctrl. The
former implementation also triggered when e.g. Shift was pressed.
Added a check that selectAll is only called when selection is not
disabled, i.e. selectionMode=NoSelection.

Added a unit test for selectAll().

Task-number: QTBUG-26687
Change-Id: I721e7ab590b55d7d754b3b74ef01756fa5aa1315
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-13 13:53:28 +02:00
Dyami Caliri
2b4cda3852 QMacStyle: save context state before changing to avoid crash
qt_drawFocusRingOnPath was saving the graphics state after setting
a new context. This leads to zombie NSBitmapGraphicsContext access
with QFileDialog.

Task-number: QTBUG-41879
Change-Id: I7fc7d959d2b0f01cb3491d639023083f1b46d175
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-10-13 13:53:24 +02:00
Giuseppe D'Angelo
26fbeecfa5 Initialize QFileSystemMetaData::size_ data member
There's a code path which reads that member before it got anything
assigned to it, triggering undefined behavior.

The code path goes as follows:

1. an instance is created in QFSFileEngineIterator::advance
2. the instance is passed to QFileSystemIterator::advance, which fills in
   only some members (not size_)
3. the instance is passed to QFileInfoPrivate which does a deep copy,
   reading an uninitialized size_

Change-Id: I6835ee701a83b63ca4bad6235feeb6a23566fcd3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-13 13:53:17 +02:00
Marc Mutz
df2afcad2f QTableGenerator: replace a call to a member function with direct element access
Saves one copy of a vector.

Change-Id: I3a14c46e306c3d44a64c6e0d8cd2f120b2c208d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-13 13:50:04 +02:00
Laszlo Agocs
6c35eb5f0f eglconvenience/eglfs: Clean up warning messages
Remove the last occurrence of ifdefed debug prints and replace it with
categorized logging.

Also clean up the warning texts for some of the serious errors, the old
ones from Qt 4 times were somewhat messy.

Change-Id: I2a3e48c393d56be2511d25c3003b1f2b74ac3c8c
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-13 10:00:45 +02:00
Topi Reinio
8304c8087d Doc: Update description of QKeyEvent class
Update the description on how to use the QKeyEvent pointer
passed to key event handlers, and remove an outdated note about
multimedia key events.

Change-Id: I67a3f0054e28b84d5a0e367c02a329f4670221c7
Task-number: QTBUG-35155
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-10-13 09:33:22 +02:00
Gabriel de Dietrich
e3bfd9bea6 QMacStyle: Use NSRect instead of CGRect in drawNSViewInRect()
Change-Id: I90fd62dea377dfa9569d1730a67136c7a5dc6f82
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-10-13 02:41:42 +02:00
Tom Hirst
1910454fe0 prevent if_nametoindex being called with empty string
Calling if_nametoindex with an empty string will always return 0, but
on ARM linux platforms this call seems to be very expensive (~30ms),
adding a large overhead to calls such as QUdpSocket::writeDatagram()

Task-number: QTBUG-37092
Change-Id: Iad00867585d9534af1ddaee936dd4e4dc5e03611
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-12 10:45:50 +02:00
David Faure
cd824ee791 QAIV: speed up isRowHidden for the case where no rows are hidden.
isPersistent(index) is a linear search, which we can avoid altogether
(as well as the creation of a persistent model index, is idx is indeed persistent)
when the row-hiding feature isn't used at all.

Change-Id: I07488dddf56e299806cc29749e633da00115fc30
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-10-12 10:37:58 +02:00
David Faure
955c9562bd QSettings: undo unintentional change of config dir on non-XDG platforms.
c99dfd8f63 only meant to be able to switch to the test mode of
QStandardPaths, not to move the default dir on OS X, iOS, BB10 and Android.
So this commit restores it to the previous behavior, to avoid migration issues.
The use of XDG_CONFIG_HOME, defaulting to ~/.config, on OS X, is even documented
in the current QSettings documentation, even though these paths are non-standard
on OS X (granted, the use of ini-style config files isn't either).

Task-number: QTBUG-41461
Change-Id: I5eb610ff7ccbdaf6f955ef7f8f7c2658cbecbb86
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-12 10:37:45 +02:00
Richard Moe Gustavsen
65c542bc87 qiosclipboard: take ownership over mime data
QClipboard is documented to take ownership over
the mime data set with "setMimeData" and the value
returned by "mimeData". So we need to implement
this to avoid memory leaks.

Change-Id: Ieb3a17368ed3a698c29a7f92c8ee87a0cca86b46
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-10-10 16:50:35 +02:00
Andy Shaw
7c90778487 Account for the country/language settings when checking for duplicates
When a file has the same alias but a different country or language setting
then it should not warn about it being a potential duplicate.

Task-number: QTBUG-19286
Change-Id: I60a9c422ff02214399bdea3791374a65c9f6c604
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-10-10 16:45:50 +02:00
Timur Pocheptsov
8c538d10da OS X: rename special menu items instead of duplicating
Two-part fix: QCocoaMenu::syncMenuItem, when selecting the "old" menu,
if an item was merged, 'applicationMenu' was always selected, but this
is wrong for any item with a role >= CutRole (such an item still can
be "merged", but it's not in the application menu).

QCocoaMenuItem::sync - item can be merged with itself: after item's
role detected, the search for an item to merge with can find exactly
the same item we've just detected the role for (since a data-member is
modified) - try to avoid this.

Task-number: QTBUG-39934
Change-Id: Ibe1df9e92973380652101143067e14922afdfb9e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-10-10 16:04:07 +02:00
Eskil Abrahamsen Blomfeldt
9bbf08fcf3 Android: Make memory handling in QClipboard consistent with iOS
On iOS we do deleteLater() on the mime data instead of deleting
it directly, in case the application should happen to use the
pointer again directly after setting it on the clipboard.
Technically it would be a bug in the application, but using
deleteLater() is safer and it's better to be consistent with
iOS so that a buggy application crashes in the same places in
both.

Change-Id: I2996d6c7816a2f83615a43609f5be207aaa72c86
Task-number: QTBUG-41853
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-10-10 14:54:27 +02:00
Oswald Buddenhagen
e4493c41b6 DPI-scale PM_SubMenuOverlap after all
This actually isn't a magic value and needs to be scaled.

This partially reverts commit be1635e2d6.

Task-number: QTBUG-41864
Change-Id: Ie03c96c8b5343386f55c3ae9b988e79f943f334e
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-10 14:31:28 +02:00
Kai Koehne
01f5ba006e Fix patching of installation date
Marking qt_eval_expiry_date alone as volatile apparently didn't stop
the compiler from optimizing away the calculation of the expiry date.

Task-number: QTBUG-41612
Change-Id: Ia51fb83f03250346952a76c8a1a641096b4ff9e7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kalle Viironen <kalle.viironen@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-10-10 14:29:52 +02:00
Shawn Rutledge
0647f24c7d QMenu: ensure that a menu item's icon can be removed dynamically
Task-number: QTBUG-41348
Change-Id: Iad3b7f000ebce51530f5e196868aefffad2e1eab
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-10-10 13:52:40 +02:00
Eskil Abrahamsen Blomfeldt
74a20b77a6 Fix memory leak in QClipboard::setMimeData()
The setMimeData() function is documented to take ownership of
the object passed in, but in the case where the platform
plugin did not support the requested mode, we would simply
return without deleting the object nor telling the application,
so it would cause a potential memory leak. We need to honor the
contract, even when we fail to set the mime data.

Test was updated to avoid verifying the leak in cases where
the platform does not support all modes.

[ChangeLog][QtGui][Clipboard] Fixed a memory leak in setMimeData()
when the platform plugin did not support the requested mode.

Task-number: QTBUG-41852
Change-Id: I2112da1613199fe1b56724e7ccf097b9e912c117
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-10 13:37:59 +02:00
Eskil Abrahamsen Blomfeldt
9685c72e37 Android: Return empty mime data instead of 0 from empty clipboard
This is consistent with other platforms such as iOS and
XCB, which return a QMimeData with an empty text when the clipboard
is empty.

[ChangeLog][Android] QClipboard::mimeData() now returns an empty
object instead of null pointer from QClipboard when clipboard is
empty for consistency with other platforms.

Change-Id: I17068f0afcb63690cf11048ffa60e19dc9b08691
Task-number: QTBUG-41817
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-10-10 13:37:51 +02:00
Eskil Abrahamsen Blomfeldt
aa00020578 Android: Support QSysInfo::productVersion()
Gets the user-readable string for the current running Android
version.

Task-number: QTBUG-41764
Change-Id: Iefea4a4f5291bfddc99bbf901676ccd33fbc23d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2014-10-10 13:37:44 +02:00
Louai Al-Khanji
97f119af14 EGLFS: Add support for multiple displays
Change-Id: Id039e0ed2d99562eb2a5cfe1e7b34013c75ff3ac
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-10 13:25:53 +02:00
Tomasz Olszak
8ddaf5c741 Gcc 4.5.* build fix.
Q_COMPILER_DEFAULT_MEMBERS and Q_COMPILER_DELETE_MEMBERS are now set
starting from gcc 4.6. Pre-4.6 compilers implement a non-final snapshot
of N2346, hence default and delete functions are supported only if they
are public. Starting from 4.6, GCC handles final version - the access
modifier is not relevant. Compiler error:

  qsharedpointer_impl.h:717:31: error:
  'QEnableSharedFromThis<T>::QEnableSharedFromThis()' declared with non-public access cannot be defaulted in the class body

Change-Id: If1d3d4696f91912a09ca72bd4aa1fb07f491a0cb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-10 13:20:30 +02:00
Gatis Paeglis
f813a3e8ad Print warning when unable to query physical screen size
This warning was removed when re-factoring code in:
328f2f9c35

Change-Id: I5a9d7fbbf2b78e6e80a79478f4e9fb08ccaec431
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-10-10 12:48:30 +02:00
Laszlo Agocs
26c104d120 Add a warning when using QOpenGLWidget as a native child
Just like it is done for QQuickWidget.

Task-number: QTBUG-41779
Change-Id: I1b27c2ed34ecb2520edf82843b675dbf6b0eab8e
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-10-10 12:48:27 +02:00
Mikołaj Siedlarek
8fc34e42a8 Add information about unsupported SSL protocol when creating context.
When creating SSL context failed due to unsupported protocol being
demanded, no explanation was given. It's because
QSslContext::fromConfiguration() extracted explanation for error message
from OpenSSL, which at that point hasn't even been called yet. This
patch adds explicit message informing that an unsupported protocol was
chosen.

Task-number: QTBUG-41775
Change-Id: I9d2710da4ba314a16837a90afcdc5d9256179bef
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-10-10 10:17:12 +02:00
Mikołaj Siedlarek
9ddf2fb376 Prevent parsing of SSL certificates from 0-size buffers.
When QSslCertificatePrivate::certificatesFromDer() was passed count ==
-1 to extract unlimied number of certificates from buffer, it also tried
to parse the 0-sized fragment after the last certificate.  This has
caused d2i_X509() to report an error on latest OpenSSL.

Task-number: QTBUG-41774
Change-Id: Ifa36b7ac5b4236bd2fb53b9d7fe53c5db3cb078c
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-10-10 10:17:07 +02:00
Eskil Abrahamsen Blomfeldt
5f1f955524 Android: Fix memory leak in QClipboard::setMimeData()
The ownership of the object passed into QClipboard::setMimeData()
is documented to be transferred to the clipboard, but we never
deleted it, thus all these objects would leak.

[ChangeLog][Android] Fixed memory leak in QClipboard::setMimeData()

Change-Id: I43e6bad1071be5f56c219cb9341584edba54d2bd
Task-number: QTBUG-41852
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-10-10 10:13:53 +02:00
Eskil Abrahamsen Blomfeldt
e31a7e46ea Android: Support QClipboard::clear()
QClipboard::clear() is implemented by calling
QPlatformClipboard::setMimeData() with a null pointer. Since we
would do nothing in this case on Android, then the clear()
function would have no effect.

[ChangeLog][Android] Added support for QClipboard::clear()

Task-number: QTBUG-41854
Change-Id: Id569b102f2e561e46967b52f89d9b54031d92456
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-10-10 10:13:45 +02:00
Paul Olav Tvete
c712ec4543 Android: Thread fix/optimization
Do the cheap test before sending an expensive query that might
use a mutex.

Task-number: QTBUG-41369
Change-Id: I78f03c84e5bbf0492f1b7ea18d1baa752a1beff2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-10-10 10:04:42 +02:00
Paul Olav Tvete
7755b4af41 Android: null pointer check
Task-number: QTBUG-41680
Change-Id: I740fb2a6df5613a8ee724b59dab08674a3337236
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2014-10-10 10:04:34 +02:00
Laszlo Agocs
7069ebd1f6 Use requestUpdate in QOpenGL and RasterWindow
Change-Id: Ibed4b8d2e2185f1bcf3430932701f81577b59408
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-10-10 08:37:04 +02:00
Laszlo Agocs
1f040d401d eglfs: Add support for systems without pbuffer support
Use a small native window and window surface in case the hooks indicate
that pbuffer support is not available.

Change-Id: I6515309041f0e1e2f5321d59941f35d6ee16dca7
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-10-10 08:36:47 +02:00
Christian Strømme
8d8000b5fe Android: Don't call requestLayout() when changing the geometry.
requestLayout() is already called when setLayoutParams() is called, so
calling it again is extremely wasteful.

Change-Id: Iddfb488830a6b7277a653a84ffacabf966baf0b5
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-10-09 22:57:19 +02:00
Frederik Gladhorn
881ceeff42 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
2014-10-09 17:56:52 +02:00