Commit Graph

23277 Commits

Author SHA1 Message Date
Konstantin Ritt
237cb0d082 [QFontEngineFT::loadGlyph] Consolidate paths for fetchMetricsOnly cases
Use GlyphInfo as a temporary buffer for storing the glyph metrics
and go through the same code for fetchMetricsOnly and !fetchMetricsOnly.

Change-Id: If8bb85056e5f09588cc3956b43dc51a54d5aecfe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:09:27 +00:00
Konstantin Ritt
550fb85b65 [QFontEngineFT] Move code around to improve readability (no-op)
Move some variables initialization closer to the usage context.

Change-Id: I0f1de0ddc9f0fbe3ec4a56455ccc14f9e8d94e5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:09:00 +00:00
Konstantin Ritt
037ad03182 [QFontEngineFT] Avoid double-negation of info.x
Make it consistent with fetchMetricsOnly path.

Change-Id: I6a2d2568d5579255582217515a4e598722547c60
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:08:02 +00:00
Konstantin Ritt
95d034a14f Introduce QQuaternion::fromDirection()
...which constructs a quaternion using specified forward and upward
directions, so that the resulting Z axis "faces" a given forward direction.

Change-Id: Ib77b8ab5c359a4880b0d946face87026acdc6f0b
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:07:48 +00:00
Konstantin Ritt
3fb6014ce7 [QFontEngineFT] Guarantee correct metrics for alphamap and its bounding box
...for both cached and non-cached modes, by disabling hinting
for transformed glyphs in loadGlyphFor().

Change-Id: I13766a653ebd72cbed0f5c38ca3536d042aed762
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:07:40 +00:00
Konstantin Ritt
134c6db858 [QFontEngineFT] Consolidate .*lpha.*MapForGlyph() behavior
...and decrease code duplication.

Change-Id: I5eb3c0694dde9030405a3bd3d410ff9784ed7717
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:06:55 +00:00
Marc Mutz
51028d1472 QQueue: unhide QList::swap(int, int)
Task-number: QTBUG-34197
Change-Id: I0b405ab0fabff8852b2705d651848fbff74fc4c2
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-04-07 13:05:50 +00:00
Oliver Wolff
32849f4997 qmake: Rework dll deployment
QT_INSTALL_LIBS is not the right place to check for Qt dlls, as they
cannot be found there in a non-developer build. In order to be able
to find the dlls and make adding dll locations easier for the user,
QMAKE_DLLS_PATHS was added. On Windows, the variable points to Qt's
bin directory by default.

Task-number: QTBUG-44960
Change-Id: Ie4e5beeaadee798a055599387e842d7c0502c27a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-07 12:55:24 +00:00
Andy Shaw
e7e580412e Windows: Fix -no-widgets build
Change-Id: I0a79a61ffe8b6c6f66895dbeb988e653e11c9661
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 11:27:13 +00:00
Joerg Bornemann
43b1df18c2 fix dependencies for generated headers from TYPELIBS
Dependencies to all header files generated by dumpcpp are now added to
every object file. This fixes parallel builds of projects that use
TYPELIBS.

Change-Id: I3c0456c7b182a42296ec6999aa86d1293ffd2e42
Task-number: QTBUG-45118
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-04 07:07:16 +00:00
Sérgio Martins
20c651d8b8 Fix QNX and Blackberry -qtnamespace build
Task-number: QTBUG-43569
Change-Id: I81a560d1508de4d808a807f1febdc17619cf4dda
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-04-01 10:24:24 +00:00
Daniel Molkentin
c1a67e7dc3 Windows: Do not crash if SSL context is gone after root cert lookup
On Windows, we perform an extra certificate lookup for root CAs that
are not in Windows' (minimal) root store. This check can take up to
15 seconds. The SSL context can already be gone once we return. Hence
we now check for a non-null SSL context on Windows before proceeding.

Change-Id: I1951569d9b17da33fa604f7c9d8b33255acf200d
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-04-01 07:33:20 +00:00
Albert Astals Cid
1458d1b31d Use allConfigurations instead of onlineConfigurations in isOnline()
We need it because otherwise code like
  QNetworkConfigurationManager ncm;
  qDebug() << "ONLINE" << ncm->isOnline();
may give the wrong value because the queued signals that have been just connected a few lines above
may not have been processed yet

Change-Id: I959db75ed17497ab91eeba2669ee2c8947244f00
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-04-01 07:22:10 +00:00
Alex Trotsenko
633b950bd4 QSslSocket: try to send all data on close()
Takes care about unencrypted data in the socket writeBuffer when
close() flushes the output.

Change-Id: I301f41ea709817e215ee4246a3951e3182d94fbd
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-04-01 06:04:07 +00:00
Alexander Volkov
19a91b4a35 Doc: Fix using Apple-related terminology in Qt Core
Use the name "OS X" instead of "Mac OS X", "Mac OS" and "OSX",
and mention iOS. Replace "Carbon Preferences API" by
"CFPreferences API" in the QSettings documentation.

Change-Id: Ia7f9fb874276c7c445a1649df521b96ff43daa0c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-31 12:49:01 +00:00
Andy Shaw
180ee8a8de Explicitly cast to a uint to fix a compile error
When using QtTest inside the notification example for QtAndroidExtras
there as a problem with the compilation as it saw it as being an ambiguous
check. Therefore doing an explicit case to uint ensures it is not a
problem.

Change-Id: Ibc9ce4c64292bf5ae7c501c592d8c42a66934b8b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-31 12:03:47 +00:00
Andy Shaw
d64f776a9a Windows: Fallback to 0 samples if ARB::choosePixelFormat() fails with 1
This solves a problem when using a Qt application over remote desktop as
if it failed with even 1 sample then it would fallback to GDI which causes
an error if the software OpenGL option is used.

Change-Id: Ib311a7a657f92aab15277461bc8e040bebbe4753
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-31 11:42:08 +00:00
Ludger Krämer
9ea8082658 fix high memory usage on large download
previously the whole response was cached in a NSMutableData which leads
to high memory usage on large responses (e.g. downloading a large file).
With this patch only the part of the answer that has not yet been read
by the caller is cached.

Task-number: QTBUG-41356
Change-Id: Ic2fe822552620d8835a2c81f8c76dd170fe6ec97
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-31 06:24:07 +00:00
Alexander Volkov
7baaec17ed Fix use of the window geometry specification
Until now we applied the geometry in QWidget::setVisible() by
calling QWidget::move() and QWidget::resize(). But these
methods are unreliable when the window is created but not
visible yet. For example, specifying the window position by
"-geometry +0+0" will take no effect.

Apply the geometry directly to QWindow in QWindow::setVisible().
QWidget will update its geometry after the response of the window
system. Besides it allows to specify the geometry for QML
applications.

Task-number: QTBUG-44713
Change-Id: I9a0e110e81e569c81da802729707fec104fef887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-27 08:00:01 +00:00
Alexander Volkov
c0e4f24336 xcb: Determine the window gravity just before the window is shown
It may change after the window has been created.

Change-Id: Ib81a7ad7353b1909cc42684fc70d6b7d2556106f
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-27 07:59:38 +00:00
Martin Gräßlin
9f1f8aaa92 Handle SelectionWindowDestroy in QXcbClipboard
This change is related to 6a7ee92b39
which added handling for SelectionClientClose. Further testing showed
that with e.g. Qt 4 applications the SelectionClientClose is not
emitted, but the selection window seems to be destroyed before the
client is destroyed.

Fur a destroyed selection window the same applies: the clipboard
content is no longer valid and we should emit the changed signal.

Change-Id: Id3778a28b9f5601bf2c6e0106981316e0efa6e7c
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2015-03-26 15:22:44 +00:00
Sérgio Martins
f451d48005 Windows: Add support for horizontal scroll on some touchpads.
While most (all?) touchpads send WM_MOUSEWHEEL for vertical scroll
the story is quite different for horizontal scroll. Some of them
send WM_HSCROLL instead of WM_MOUSEHWHEEL.

Some of them even send left/right key event but those are lost cases.

Task-number: QTBUG-45120
Change-Id: I3bf86e25a6f4f3ba03ac7e89a23f4b7bc432f2de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-26 14:57:45 +00:00
Shawn Rutledge
eea5a6ea15 Android MessageDialog: order buttons according to OS X button layout
At least the dismissive action should be on the left, but we can take
the OS X rules as reasonable in cases where a lot of buttons are in use.

Task-number: QTBUG-42808
Change-Id: If45f991a068d47009e02d39fbb3886ff4b31c8e1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-03-26 14:49:31 +00:00
Venugopal Shivashankar
06ecfb6fde Doc: Added the missing description for WindowShadeButtonHint
Task-number: QTBUG-44017
Change-Id: I024faa6214a041403f23fd91f0c8c38eabeef31e
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-03-25 12:15:40 +00:00
Friedemann Kleint
619a0f14dc Re-add documentation for QStandardPaths::GenericDataLocation.
The text was accidentally removed in
1afe110b8f.

Fixes qdoc warning:
qtbase/src/corelib/io/qstandardpaths.cpp:60: warning: Undocumented enum item GenericDataLocation in QStandardPaths::StandardLocation

Change-Id: I7f236c01d85ebf76b67ab7af7e61b8cbedee4c36
Reviewed-by: David Faure <david.faure@kdab.com>
2015-03-25 09:26:31 +00:00
Morten Johan Sørvig
f8cb4ee310 Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Topi Reinio
b929006513 qdoc: Use the title instead of plain name when listing groups
When listing group nodes, for example, with \annotatedlist command,
QDoc created a link with the plain name (the string that was passed
to \group command as parameter) as the link text.

This change makes QDoc use the group \title, if one exists.

Change-Id: I30b7f9eefc60c12f67b1e579bbc4c5cebe84474b
Task-number: QTBUG-45420
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-04-07 11:49:13 +00:00
Morten Johan Sørvig
6cd32e218d Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Timur Pocheptsov
9b134f4e72 Add Q_UNUSED for parameter (OS X)
Ifdefs exclude the code on OS X, but there is still unused parameter
and annoying compiler (either warning or error, depending on ...).

Change-Id: I913c25b4f96ebe275a6b1d15873bccf4aebe9e7a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-04-07 10:39:46 +00:00
Alex Trotsenko
add3c14a28 QAbstractSocket: fix some 64-bit issues in debug code
Change-Id: I78b307b2841353f84b033a815035436ec3eef3b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-07 06:42:42 +00:00
Morten Johan Sørvig
0b6bfe8c44 Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Thiago Macieira
9eb0b09abc Removed unused code on QT_STRING_UCS4 macro
This isn't defined or used anywhere else.

Change-Id: I9a75ad8521ae4e5cbbe5ffff13d2356883b82dbc
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-04-05 19:40:04 +00:00
Morten Johan Sørvig
d9437af198 Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Kai Koehne
1db3de6a1e QVLA: Add operator= for initializer lists
Add a dedicated operator=(std::initializer_list) that
first resizes the QCLA, and then replaces the elements
one by one.

This should be usually faster than creating a temporary
QCLA and then copying it, except for the case where the
new array does not fit into the allocated stack - but this
is IMO nothing to optimize for.

Task-number: QTBUG-45041
Change-Id: I147d6d01186b1ca3c635b2c8365d8f6e638ce6fe
GPush-Base: 08de3113051e1289f0de0651ec5647c9ee6feb27
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-04 15:48:13 +00:00
Allan Sandfeld Jensen
c51240ca75 Optimize fetching pixel values for SSE2 bilinear sampling
Most of the CPU time was spending in fetching pixel values instead of
calculating the bilinear sample. The access to vectors unions turns
out to be very slow, and should be avoided. This patch removes the
uses of vector,int array union in the bilinear sampling for SSE2.

Change-Id: Ie765a80963c4899db59a583ea9a59d15e05f2b13
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-04 15:42:22 +00:00
Morten Johan Sørvig
22b5e178e5 Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
David Faure
5aa40e5b00 QComboBox: also adjust size on model reset, with AdjustToContents
When the size adjust policy is QComboBox::AdjustToContents, the combobox
sizeHint was recalculated on dataChanged, rowsInserted, rowsRemoved,
and setModel, but not when the model was reset. This led to truncated
items in the combobox when models are filled asynchronously.

Task-number: QTBUG-5413
Change-Id: I3456c327d680dfffa58d6dcb26c79456c67b2a32
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-04 12:24:44 +00:00
Sérgio Martins
ddb0628181 Fix BlackBerry build.
BlackBerry SDK uses gcc 4.6 which supports nullptr, but by default
it uses the dinkum C++ library, which doesn't support nullptr_t.

Change-Id: Ifa95029a9bfa4dc2fc064db5d7a67012e95ac0e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-04 11:55:23 +00:00
Morten Johan Sørvig
558c9caddd Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Saytgalin Alexander
1bd07b0293 Always release surfaces when application is suspended or hidden.
It is needed to recreate surfaces and to redraw when application is
resumed because on some devices when the application is suspended
Android destroys the surfaces.

Change-Id: I8934e94af038b4ecf116d93aea223ad040b0bff1
Task-number: QTBUG-45019
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Sergey Galin <s.galin@2gis.ru>
2015-04-04 09:12:03 +00:00
Richard Moe Gustavsen
d3277bdf02 QComboBox: open popup on touch release if QStyleHints has setFocusOnTouchRelease()
If we give focus to the combobox on touch release, we need to await opening
the popup until touch release as well. Otherwise we might end up showing
a popup for an unfocused combobox.

Especially on iOS, there is a strong coupling between focus object and
popup menus, which means that we effectively require the combobox to gain
focus before it can show the popup.

Change-Id: Ifb7ba091bb39b77f325cdbf61e00ab3e8ff2e522
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-04-04 08:47:06 +00:00
Richard Moe Gustavsen
9cb38baaf8 iOS: check if Qt has an active window before scrolling to cursor
In hybrid applications an external view can be first reponder. And when
that is the case, Qt will have no active windows and focusView will return 0.
We therefore need to protect scrollToCursor from this case, so it doesn't try
to access e.g focusView().window, which will lead to a crash.

Task-number: QTBUG-45182
Change-Id: I87d470631f5beda22fd64fc1f2b0f7259344f830
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-04-04 08:46:57 +00:00
Richard Moe Gustavsen
ce4a759c3d iOS: enable changing menu items in QIOSMenu while it's showing
If the menu items change while a menu is showing, the current
implementation would crash. The current code tried to take this
scenario into account by using a copy of the item list inside
the native menus, but failed since the list contained pointers
to menu items. And those items would be deleted in a higher layer
when removed from the owning QMenu, even if the native menu was
visible.

One could argue that the list of items should not change while
the menu is visible, but from testing, other platforms handle
this scenario gracefully. So this patch will ensure we do the
same on iOS.

Task-number: QTBUG-44275
Change-Id: I5508e1d6d47039a9aa948c246b33479bd6801868
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-04-04 08:46:42 +00:00
Alex Trotsenko
f40cf77b0f QIODevice: do not change the 'pos' member for sequential devices
Concept of 'current position' exists only for random-access devices.
As documented, for sequential devices QIODevice::pos() must always
return 0. Prevent a modification of the internal 'pos' member in
QIODevice::readAll() method to follow this rule.

Change-Id: Ida2ee6a629ccfc3068d62f95ab1064ada13fdda5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-04 08:40:01 +00:00
Morten Johan Sørvig
6dcbaa487d Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Marc Mutz
1b109967c5 QUuid: add missing relational operators
QUuid has ==, !=, <, and >. Add <= and =>, too.

Change-Id: I11a0b8028be766e2d48dc7664d935df4d327b3d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-04 06:40:27 +00:00
Marc Mutz
09c1bd2eb0 QUuid: add some noexcept
Change-Id: I43647e558a761ff6e7a275e30382919ba038f467
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-04 06:40:00 +00:00
Morten Johan Sørvig
23330d498d Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Marc Mutz
2b3d3cabe1 QUuid: properly scope macros
Limit scope and undef after last use.

Change-Id: I94f0adb2b9fc3ec65dd7a3b5e6f03685bc226d3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-03 19:44:08 +00:00
Marc Mutz
650de56c7f QUuid: implement op> in terms of op<
More maintainable, and less code.

Change-Id: Ia99e5deefe4c510fe870076a03ec243ba631a7a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-03 19:43:59 +00:00