Commit Graph

25396 Commits

Author SHA1 Message Date
Jan Arve Saether
d797a04adc Speed up printing when drawing opaque primitives.
We only need to merge the rectangles into a region if we are painting
a non-opaque a primitive with alpha.

Performance measurements QT_print_speed_bug.zip:
Excluding patch: 244686 ms
Including patch:   5070 ms

This is an improvement of 48x (for debug build)

Task-number: QTBUG-48334
Change-Id: I03684c6e7d8a5fb039ea6477ed1a860f09e1b08c
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-09-23 16:38:07 +00:00
Romain Pokrzywka
68ea2f7e9b Synchronize QInputDeviceManager touch device count with QTouchDevice
This ensures that the values and signals reported by QInputDeviceManager
for touch devices always have corresponding entries in the list returned
by QTouchDevice::devices().
It also adds proper QTouchDevice unregistration when the underlying
input device gets removed by the evdevtouch QPA plugin.

Change-Id: I7bdf2f7435c775d15bddce8ba1e731afdc1d948a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-23 16:29:30 +00:00
Thiago Macieira
29bc68cf16 Add code to perform overflow-checking additions and multiplication
Most processors have carry flags which they set on addition overflow, so
it's a good idea to access them whenever possible. Most of them also
have widening multiply instructions that can be used to detect overflow
of the non-widening version.

Tested to compile on:
 Architecture     Compiler
  x86             GCC 4.9, GCC 5*, Clang 3.6*, ICC 16 beta
  x86-64          GCC 4.9, GCC 5*, Clang 3.6*, ICC 16 beta
  x86-64 ILP32    GCC 4.9, GCC 5*, Clang 3.6*
  IA-64 LP64      GCC 4.8
  ARMv7-A         GCC 4.9, Clang 3.6*
  AArch64         Clang 3.6*
  MIPS            GCC 4.9, Clang 3.6*
  MIPS64          GCC 4.9, Clang 3.6*
  PowerPC         GCC 4.9, Clang 3.6*
  PowerPC 64      GCC 4.9, Clang 3.6*
  SPARC           Clang 3.6*
  SPARCv9         Clang 3.6*

[*] supports the intrinsics

If the compiler does not offer a way to detect an overflow, we do it by
hand. For unsigned additions, that's easy, since the C++ language
specifies the behavior of the overflow. That's also the reason why this
code is implemented only for unsigned integers.

For the multiplication, if the compiler does not support widening
multiplications, we do it with a division instead. This is necessary for
GCC < 4.5 and compilers not compatible with GCC or MSVC.

Change-Id: I049a653beeb5454c9539ffff13e637de0f1338c1
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-23 16:19:45 +00:00
Albert Astals Cid
0396c7a7d8 Doc: Mention that calling parent class event() is important
If you don't deleteLater and more won't work

Change-Id: I47cbb24f8e22a7f269a0297410e4163878819f82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-23 15:59:39 +00:00
Laszlo Agocs
867fc30c7c windows: Improve error handling with EGL
When disabling the graphics adapter, things start failing
with context lost and then bad_alloc and bad_access failures
when creating contexts/window surfaces.

Swap buffers now handles context loss. This makes it possible
for Qt Quick to act when the graphics adapter goes away.

Similarly, the window surface creation failure EGL_BAD_ACCESS
is treated the same way as context loss.

Note that this will not really help the main issue, because
rendering is not possible without a GPU (reinit attempts will
fail either at context creation or window surface creation),
but proper logging and context loss reporting improves the
situation somewhat.

Also unify and prettyify the warning and debug prints.
This makes it easier to understand what is going on.

Change-Id: Iec3a9b54f1134e78e87eefcf938525283ec9412a
Task-number: QTBUG-48095
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-23 15:50:52 +00:00
Friedemann Kleint
47e4ae86a8 Polish the settings editor example.
- Set QtProject as organization.
- Remove unneeded member variables.
- Use member initialization in the constructor.
- Use new connection syntax in createActions()
  to assemble the menu there, removing the createMenus()
  function.
- Introduce a QSharedPointer to ensure settings are deleted.
  Previously, the settings were parented on the tree widget,
  which is a hack of sorts.
- Fix OS X macros.

Change-Id: Ibbc6bfb03eb5c7eda077b1a3aa3f1707667f7f13
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-23 13:28:02 +00:00
Morten Johan Sørvig
2e02130e39 Close QWidgetWindows by closing the window
Close the window instead of closing the widget. This will
run the QWidget close implementation followed by the
QWindow close implementation.

Change-Id: Iaba3cf0359410def858363a02fceaeddb7095aaa
Task-number: QTBUG-43344
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-23 13:02:10 +00:00
Morten Johan Sørvig
470c8b68df QWidgetWindow: call base class close event impl
Call the QWindow close event handler when processing
close events in QWidgetWindow.

Change-Id: I2b8691735962f6a222a30a847bb18cc6c86b55d4
Task-number: QTBUG-43344
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-23 13:02:07 +00:00
Serge Lysenko
a4897c224a Implement the QImageIOHandler::ImageFormat option for ico files.
We need a method to check image format of .ico with QImageReader loader.
That is very useful to filter out low resolution icons.

Change-Id: I2dfe3aa49cbc1e05836be846ae3da30786b98ff4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-23 12:59:29 +00:00
Christian Kandeler
a6e2213e00 QDateTime: Remove redundant check.
Change-Id: I1a027526f24707f9431fe60ad08e41b5b07ffea3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-23 12:57:25 +00:00
Thiago Macieira
113a51b615 Update the Qt 5.5.1 changelog for qtbase
Change-Id: I42e7ef1a481840699a8dffff1405e4154dd6b5dc
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-23 06:49:28 +00:00
Thiago Macieira
dc716f2dc2 ICC on Windows: Disable ref-qualified member functions in MSVC <= 2013
Like MSVC, ICC on Windows in debug mode always makes calls to
dllexported functions instead of inlining them. Since MSVC 2013 doesn't
know about ref-qualification of member functions, this creates an
incompatibility between DLL creation and DLL use.

Task-number: QTBUG-48349
Change-Id: I42e7ef1a481840699a8dffff14053b594810fb42
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-23 06:49:20 +00:00
Christian Kandeler
c619d2daac QDateTime: Ensure a valid timezone when using the "offset constructor".
The timeZone() function used to assert when called on such an object
(or, for a release build, return an invalid time zone).

Change-Id: I6ae8316b2ad76f1f868e2498f7ce8aa3fcabf4a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-23 06:46:44 +00:00
jian liang
be2e0f75ae Free the QFreeList object allocated memory on exit
This memory allocation was introduced in
314c83c0c2. With a compiler without thread
safe statics support mutex.cpp use a function named freelist() to create
the global QFreeList object. it will be created when the first time it was
accessed, but will never be released. This patch use Q_DESTRUCTOR_FUNCTION
to delete this object.

Task-number: QTBUG-48359
Change-Id: I4e4716930930aa98630101a1f96de6a7672af9cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-22 23:32:05 +00:00
Thiago Macieira
e01fa5f152 Mark QHostAddress relocatable
Change-Id: Iee8cbc07c4434ce9b560ffff13ca3fb80be56be6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-09-22 22:47:19 +00:00
Thiago Macieira
af6467c532 Fix some -Wcast-qual warnings
This is happening in code I don't usually test (32-bit, non-ICU, etc.)

KeccakF-1600-opt32.c:481:22: error: cast from type 'const unsigned char*' to type 'UINT32* {aka unsigned int*}' casts away qualifiers [-Werror=cast-qual]
KeccakF-1600-opt32.c:217:62: note: in definition of macro 'extractLanes'

Change-Id: I42e7ef1a481840699a8dffff140209823301a07a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-09-22 22:46:27 +00:00
Thiago Macieira
3d7586b760 Auto-detect whether 64-bit std::atomic really works
The C++ standard says it must, but some badly-configured toolchains seem
to be lacking support.

In particular, for some 32-bit platforms without native support for
them, GCC implements 64-bit atomics via out-of-line functions in
libatomic. If that library is missing... well, then std::atomic 64-bit
doesn't work and we mustn't try to use it.

This was found when trying to compile Qt 5.6 for MIPS 32-bit:

Linking library libQt5Core.so.5.6.0
.obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
/opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:500: undefined reference to `__atomic_load_8'
.obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
/opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:478: undefined reference to `__atomic_store_8'

Yocto bug report: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8274

Change-Id: I42e7ef1a481840699a8dffff140224d6614e5c36
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-22 22:46:08 +00:00
Samuel Gaist
847d5d1309 Implement sessionId/key generation on Windows
sessionId and sessionKey generation on Windows was lost in the
transition of Qt 4 to Qt 5. During the reimplementation of the
QSessionManagement feature, that part has been missed. This patch fixes
that.

Based on Qt 4

[ChangeLog][QtGui][Windows] Fixed a regression where both
sessionId/sessionKey were empty

Task-number: QTBUG-47690
Change-Id: I17b5fbee9d0979d292d30b94b3a2cc3107fc54fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-22 21:40:21 +00:00
Samuel Gaist
843199f303 Add shader files to examples documentation file list
Currently the shader code is not accessible from the examples
documentation page. This patch fixes this by adding .glsl to the file
extensions list for examples

Change-Id: Iafe327d1bd99b78641a89863f9dbaf8112651c45
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-22 21:40:13 +00:00
Samuel Gaist
8a0be4007d Doc: update QFileDialog::setSideBarUrls code snippet
The example code uses QDesktopServices::storageLocation which has been
replaced by QStandardPaths. This patch fixes this.

Change-Id: Ifff25fcb9d85b37ef8247cb4cd9c4c1c8d368780
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-22 21:40:07 +00:00
Tor Arne Vestbø
9c71f55ef9 QFontEngine: Read minimum left and right glyph bearings from 'hhea' table
This table has values precomputed based on every single glyph in
the font, not just the subset we use as a fallback, which should
improve both performance and correctness.

The fallback codepath of computing the minimum values based on a
subset of the characters in the font is left in, as we still need
that for bitmap fonts, and some font tables that have invalid
values.

Change-Id: I71aac1e09c9f9de80446b023ba15a9e2afe7d226
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-09-22 21:19:12 +00:00
Tor Arne Vestbø
5f3529be32 Silence warnings about missing dbus-send command not found
Without piping the output to /dev/null, we'd get the following:

  sh: dbus-send: command not found

And if dbus support is only limited to runtime support, we don't
treat it as a fatal error and only notice the user.

Change-Id: Ia7750a074b8d563bf9694fa8fa628b4017e8bb68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-22 21:19:04 +00:00
Rafael Roquetto
f5b682d320 QGraphicsProxyWidget: forward touch events to QWidget
When working with QGraphicsView/QGraphicsScene, touch events are sent to
QGraphicsView's viewport() event handler, which then dispatches it to the
corresponding QGraphicsItem, if any. In the case of QGraphicsProxyWidget, we
need to forward these touch events to the encapsulated QWidget, otherwise it
will never receive them (i.e. the event chain for touch events terminates at
QGraphicsProxyWidget).

This also enables QWidgets associated with QGraphicsProxyWidget to grab
gestures.

Task-id: QTBUG-45737
Change-Id: Ia441d3576afb6c97376be6f2ff073901e6e928a5
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2015-09-22 20:54:44 +00:00
Markus Goetz
63cf5d3d26 QNAM: Assign proper channel before sslErrors() emission
There can be a race condition where another channel connects
and gets the sslErrors() from the socket first. Then the
QSslConfiguration from the wrong socket (the default
channel 0's socket) was used.

Task-number: QTBUG-18722
Change-Id: Ibbfa48c27f181563745daf540fa792a57cc09682
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-09-22 20:06:55 +00:00
Gatis Paeglis
24d0f9ef5a Silence the _COMPIZ_TOOLKIT_ACTION warning.
It is still unclear how to act on those
messages. We are already doing this for
other Compiz messages -_COMPIZ_DECOR_*.

Change-Id: I45f76b5f56ee1b07eb4c7398cc85b5d7bed86c4c
Task-number: QTBUG-46954
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-22 19:37:12 +00:00
Alexander Rössler
c28bc5f113 QNativeSocketEngine: fix SO_REUSEPORT problems on Linux
Commit d1cd75e81a introduced the usage of
the SO_REUSEPORT socket flag on Unix systems if available. However, on
Linux systems this socket option behaves differently from the previously
used SO_REUSEADDR socket option. This patch disables the use of the
SO_REUSEPORT option to fix rebinding problems on Linux. The option was
introduced to improve support on OS X and other BSDs. It is not
necessary on Linux.

[ChangeLog][QtNetwork][QUdpSocket] Fixed a bug that caused the
QAbstractSocket::ShareAddress option not to work on Linux.

Change-Id: Ice04b8b9e78400dce193e2c1d73b67e33edf8840
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-09-22 19:07:15 +00:00
Friedemann Kleint
78b2719b04 Windows: Add checks to usages of QWindow::screen().
Default to primary screen and handle situations where the screen
is null consistently. Remove unused QWindowsScreen::screenOf() method.

Task-number: QTBUG-48288
Change-Id: I91b3c2331521d9d3be8ac77606ee820cd35ebb0f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-22 14:26:43 +00:00
Friedemann Kleint
47ff3dcd08 Windows: Disable Windows input context when another context is used.
Remove QWindowsContext::instance() method and use
QPlatformIntegration::inputContext() with proper check instead.
Extract static method to disable Windows IME on a window
by associating a null context from QWindowsInputContext
and use that to disable the IME if another context is
in use.

Amends change b46fe39d94.

Change-Id: Icaad99d390cea5559167602ffbf994660d4717a5
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-22 14:26:33 +00:00
Friedemann Kleint
d417f81f28 QAbstractSpinBox::inputMethodQuery(): Consider input method hints set on the spin box.
The derived classes (QSpinBox, QDoubleSpinBox, QDateTimeEdit, QTimeEdit)
set various input method hints on the spin box in the init() methods
of their private classes which did not have any effect since
QAbstractSpinBox::inputMethodQuery() was implemented to return the
hints of the embedded QLineEdit only. Change it so that hints set
on the QAbstractSpinBox are also considered.

Change-Id: I76b7c4d3e0869589c110cf3a0b2c3f94201db5d5
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-09-22 14:26:26 +00:00
Gatis Paeglis
7edd10e6cc xcb: Compress mouse motion and touch update events
The current version of the mouse motion event compression
algorithm does not work with certain configurations -
situations where we get one XCB_GE_GENERIC event between
every XCB_MOTION_NOTIFY event.

The new implementation tries to be less fragile. The
previous approach checked "is *the next* event the same
type as the current event", the new check asks "have
we buffered more events of the same type as the current
event". We buffer events of the same type only when the
main thread is unresponsive.

This patch adds event compression for XI_TouchUpdate in
addition to the fix for motion even compression.

Change-Id: Ie215eb5969e2060e463ebe48e3d3007390a30deb
Task-number: QTBUG-40889
Task-number: QTBUG-47069
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-22 14:21:00 +00:00
Alexander Volkov
b9c5a938c0 xcb: Always send dnd events to the proxy window if it exists
The standard http://www.newplanetsoftware.com/xdnd/ says:
"The only place where the proxy window should be used is when
checking XdndAware and in the calls to XSendEvent()".

Change-Id: I62e504ba52ec7ec2a941c53a84889bb3eb4b4cc1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-22 14:20:46 +00:00
Gabriel de Dietrich
a14fadfb64 Add getter and setter for qt_qhash_seed
In some cases it's not possible to use QT_HASH_SEED, specially when
we need to set the environment variable from inside the application,
as dynamically loaded libraries or plugins may create static QHash
instances. That would set qt_qhash_seed to a value different from
-1 and skip the env var value.

For those cases, and when we still want to set qt_qhash_seed, we
provide a way to enforce its value.

Auto-tests accessing qt_qhash_seed directly have been updated
accordingly. Usage in qdoc, uic and rcc has been left as is
for the time being.

Change-Id: I3b35b4fa0223c83b1348a6508641905a2a63266f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-22 14:17:46 +00:00
Laszlo Agocs
863dfb1541 eglfs: Create input handlers only when screens are available
Some code may rely on the primary screen geometry for example.

Task-number: QTBUG-47002
Change-Id: I42fc1ccf0c1d91beb5d8e9691ac6ec4e7400e567
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-09-22 14:15:40 +00:00
Laszlo Agocs
eecc351c5d Null out QOpenGLContext::screen upon screen disconnect
Returning a dangling pointer is no good. Do what QOffscreenSurface does:
just null it out.

Task-number: QTBUG-42803
Change-Id: I01a6db9ae8974a1c78157ebc67097c8dac3a6b6e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-09-22 14:15:29 +00:00
Paul Olav Tvete
9e81fb4df6 Make QWidget::grab work with graphics effects
Change 071098b08b changed QWidget::render
to work with all paint devices. Before that change, QWidget::grab would
effectively call QWidgetPrivate::render(), since the QWidget::render
overload was just a direct call to the private class implementation.

This change fixes the regression by calling QWidgetPrivate::render()
directly from QWidget::grab().

Task-number: QTBUG-43968
Change-Id: I1aa2fa91c722374612b6cfa76fd0891d168ecac9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-22 14:13:00 +00:00
Joerg Bornemann
7a1bc0d3ff fix race in debug_and_release builds of static libs for Unix
Consider a debug_and_release build of a static library.
Set DESTDIR to different values for debug/release.
Let TARGET be the same for debug/release.
Now qmake would generate code in Unix Makefiles like this:
  rm mylib.a
  ar mylib.a ...objects...
  rm debug/mylib.a
  mv mylib.a debug/mylib.a
and for release analogous. This clashes when building in parallel.

This patch resolves this conflict by reducing the commands to:
  rm debug/mylib.a
  ar debug/mylib.a ...objects...

We believe that every ar implementation that's in use for Qt
is able to operate on files in subdirectories.

[ChangeLog][Important Behavior Changes][qmake][Unix] QMAKE_POST_LINK
steps of static libraries are now required to operate on $(TARGET) in
$(DESTDIR) instead of $$OUT_PWD. This matches the Windows backends.

Task-number: QTBUG-48287
Change-Id: I192f488ed74c56bc32862426d9e9d4237d9b8135
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-09-22 14:12:32 +00:00
Jędrzej Nowacki
f17837fbf9 Fix taskQTBUG_34717_collapseAtBottom test
The test is moved from tst_qtreeview to tst_qtreewidget as it tests
qtreewidget class.

C++ usage is fixed, there was an illegal C cast that was causing crashes

Change-Id: I80e90a9b531e87f9b133186b6f48be42f54901b5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-09-22 14:12:20 +00:00
Timur Pocheptsov
4f3379655c Add an option to skip the generic bearer engine
Add an option to skip a generic bearer engine if needed (by testing
environment variable QT_EXCLUDE_GENERIC_BEARER).

Task-number: QTBUG-41866
Change-Id: I1b53ed1d22a7b34de5c6f6d0386ed242b2ca5e00
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-22 14:06:30 +00:00
David Faure
ec6556a2b9 Fix two data races in QThread/QThreadData
* theMainThread is written by the main thread and read by
   QThreadData::~QThreadData() (any managed thread)

* QThreadData::thread is written by QThread::~QThread (in the parent thread)
  and read+written by QThreadData::~QThreadData (in the managed thread).
  This can happen because QThreadData is refcounted so the managed
  thread (which derefs it) races with the parent thread (which sets it to 0).

Change-Id: I72de793716391a0937254cda6b4328fcad5060c7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-22 07:55:03 +00:00
David Edmundson
71df75966d Set positionAutomatic when using setX setY
QWindow keeps track of whether a position has been explicitly set by use
of a flag positionAutomatic which gets set in setGeometry. This is used
to determine if position is passed to the window manager.

However calls to setX, setY via properties did not update this flag if
the caller is setting it to the default position 0,0. This patch fixes
that by making sure the flag is always updated.

Change-Id: I2c0c002fe57efa101b3ca79e6e8b3f36cc465761
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-22 14:22:59 +00:00
Oliver Wolff
a6161563e6 Fixed pageLayout, pageSize, pageOrientation, pageMargins for QPdfWriter
Task-number: QTBUG-46887
Change-Id: I8f1497a8b7ff13213879de01fcdfcabfdd471874
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-22 13:24:40 +00:00
Richard Moe Gustavsen
c7fa644c38 QFileDialog: preserve window state after delayed widget dialog creation
The widget UI for a QFileDialog is sometimes created lazily as a fallback
when the dialog is about to show (the reson being that the platform reports
that is has native dialogs, but fails showing it, perhaps because of
unsupported configuration). In that case, the widget setup code will resize
the dialog to default sizes, and as such, wipe out any explicitly set
geometry or window states.

This is especially visible on iOS, since there we show all windows
maximized by default. If the fallback triggers, the dialog will
loose the maximized state and be shown partially outside the
screen without a way to close it.

This patch will make sure that even if the widgets are created late, we
still respect any geometry or window states set by the application.

Note: The bug became visible after: 6468cf4e

Change-Id: Ib2b87cd24e959c547208aa1cf76d683b9cbc283a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-09-22 11:50:58 +00:00
Joerg Bornemann
363e6e3d52 fix error message
The error message mentioned a wrong function name.

Change-Id: Ia2258744fd9268af6b00f54e74d40476ded3b0d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-09-22 07:58:17 +00:00
Thiago Macieira
0829baf902 Expand reporting of the Intel instruction set extensions
Detection for most of them is free because we're loading the entire
registers anyway. The only exception is AVX512VBMI, which is in a new
register we hadn't yet read from.

I've also added the new GCC names so they can be used with
QT_FUNCTION_TARGET. The only two exceptions are "movbe" and "popcnt",
which are extremely restricted in use and we are not likely to have code
dedicated to using them.

Change-Id: Ib306f8f647014b399b87ffff13f1d8fd29e58be0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-22 06:22:13 +00:00
Thiago Macieira
6a8251a89b Reorganize the bits for the CPU feature detection
Instead of trying to detect one bit and set another, let's just use the
bits from the x86 CPUID instruction on x86. This makes use of the full
64-bit space now.

Since MSVC doesn't like enums bigger than 32-bit, we have to store the
bit number instead of the actual bit value in the constant. For that
reason, I also renamed the constants, to catch anyone who was using them
directly, instead of through qCpuHasFeature.

Change-Id: Ib306f8f647014b399b87ffff13f1d587692d827a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-22 06:22:07 +00:00
Thiago Macieira
09aeda21b9 Update the list of compilers we are free of warnings with
I've tested with Clang 3.7 and ICC 16 on Linux, XCode 6.4 on OS X for OS
X (not iOS).

Change-Id: Ib306f8f647014b399b87ffff13f1f4291d801a20
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-22 06:21:20 +00:00
Friedemann Kleint
28f251993a Windows: Return accepted state of XBUTTON mouse events to the OS.
Qt needs to return false in case it does not handle the "extra"
buttons (like WM_XBUTTONDOWN) which causes Windows to send the
corresponding WM_APPCOMMAND message (like APPCOMMAND_BROWSER_FORWARD).

Task-number: QTBUG-48117
Change-Id: Id2c8005ee992b0abd8af2aacbcb97c4eedcfa32f
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-09-22 06:19:31 +00:00
Friedemann Kleint
1af2b861d8 Ensure the accepted state of mouse events is passed to QWindowSystemInterface.
On Windows, Qt needs to return false in case it does not handle the "extra"
buttons (like WM_XBUTTONDOWN) which causes Windows to send the
corresponding WM_APPCOMMAND message (like APPCOMMAND_BROWSER_FORWARD).

Task-number: QTBUG-48117
Change-Id: I093cd2d8205a39c3a042dd8a0d19c7229003761f
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-09-22 06:19:24 +00:00
Jake Petroules
dc1bf3008e Clean up some Apple-related includes and declarations.
Change-Id: I92db9691c2243ae72ecd4e11dd4640afaf4bf822
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-09-22 01:58:41 +00:00
Jake Petroules
46a372e1a1 Modernize and unify filesystem code on Apple platforms.
Replace deprecated File Manager APIs with modern equivalents.

Change some Q_OS_MACX to Q_OS_DARWIN in file system related code.

All of these apply to iOS as well as OS X, and were ifdef'ed for OS X
only primarily due to legacy reasons - carryovers from Qt 4 or Carbon
APIs which have since been refactored into using CoreFoundation.

This also makes the code consistent with the documentation.

Change-Id: I414e9bdfffff731413ddf16171b1317027d87caf
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-09-22 00:09:20 +00:00