QApplicationPrivate::leaveAfterRelease was not properly cleared when
mouse event handling was interrupted by a modal dialog, which caused
every mouse move over the modal dialog to trigger enter event to the
widget under cursor.
Fixed by clearing QApplicationPrivate::leaveAfterRelease if mouse event
without any buttons pressed is handled.
Task-number: QTBUG-27643
Change-Id: I4f31daa656bc643c88e5338282a671ae2077e255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
In Windows, if the window is maximized with a doubleclick on the title
bar or resized with a doubleclick on the bottom or top frame border,
there comes no WM_LBUTTONDOWN or WM_LBUTTONDBLCLK event for the second
click, but there comes at least one WM_MOUSEMOVE with left button down
and eventual WM_LBUTTONUP.
Since QWindowSystemInterface::handleMouseEvent() can't differentiate
between actual button down event and a move event with button held
down, the move resulted in a button down event being sent to the widget
that was under cursor after resize.
Fixed by ignoring any events with left button down for which we didn't
get the initial native button down event. Since entering an application
with mouse button already held down is not generating mouse events
anyway until the button is released, this should be safe.
Task-number: QTBUG-27845
Change-Id: Ibc7abf8a127c401801e1b654a2829582f43a1ae8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
By not making this a compile time decision we ensure forward
compatibility for older xcb versions if the xcb plugin is built against
a newer xcb.
Change-Id: I744777d53bf7b8deb6eff372494f4403d19d364c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
qmake automatically appends the library's major version number to the
DLL file name on Windows, as DLL naming doesn't include the version
number on a suffix like on Unix systems.
This flag makes it so qmake skips adding. This will allow us to insert
Qt's major version number at a different position.
Change-Id: I25d471038841fb0c5a34ef6b3bd6266aa33cebd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Changed the platform leave event handling logic in QWidgetWindow to
match platform leave event handling logic in Qt4, where last mouse
receiver is used as leave target only if last mouse receiver wasn't
a native window itself. In that case it is assumed to get leave event
of its own when relevant.
Task-number: QTBUG-27639
Change-Id: Id6edcd29754a15c959f18ab38b20d66e5d446510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Those code was warpped by Q_WS_MAC and should be part of QPA already.
Change-Id: I48b751aad0509b50ccf9e82778c962ed80a2a9f9
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Before, the functor slot (or lambda expression) had to have the same amount
of arguments as the signal.
This shown to be a big problem to be able to connect to signals that had
a QPrivateSlot.
This implementation use the type of the operator() of the functor to
know how many arguments we have.
As a bonus, we also can check the arguments in a static assert.
The test comes from https://codereview.qt-project.org/#change,38703
But this patch also works without variadic template
If the compiler does not support decltype, we workaround the lack of it
by using another level of indirection.
Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Bring back code from keymapper_x11.cpp.
Task-number: QTBUG-27648
Change-Id: I2a189a0537bcd2ae0eb093576c84814b2f09933b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Check presence of Direct X SDK depending on
compiler version.
Check for presence of the headers d3dcompile.h and
intrin.h (SSE2) as well as d3d9.lib and the shader
compiler since the header d3dcompile.h is
also present in MinGW.
Change-Id: I7ee9701f4f9dc175ed2d733db79dda46de4d69f1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The library is not present on Windows XP, for which /DELAYLOAD
is used in ANGLE. However, as this causes problems with MinGW,
use dynamic resolution.
Task-number: QTBUG-27741
Change-Id: Ie4a2706d57b751fbb6fc6f3e76ef2e8ddac3b892
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Use gtk_combo_box_new_with_entry when gtk_combo_box_entry_new is not
available. The latter was deprecated since 2.24 and is no longer
available in GTK3.
Notice that gtk_combo_box_new_with_entry returns a GtkComboBox, whereas
the old gtk_combo_box_entry_new returned a GtkComboBoxEntry.
Change-Id: I4aa3c528c6e04967ed783fce72036acb6063445b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
- GtkType -> GType
- GTK_CHECK_TYPE -> G_TYPE_CHECK_INSTANCE_TYPE
Both are deprecated aliases in GTK2 and do not exist in GTK3.
Change-Id: If2dc4ba09451cabb6730f8b23e15db7554a9f829
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Destructors should be out-of-line so that the compiler doesn't generate
one per translation unit.
Apart from creating more work for the compiler, it can also lead to
duplicated vtables if the dtor is the first virtual function
(reimplementation), and all other virtuals are inline, too.
Duplicate vtables then break RTTI.
In addition, having virtual dtors de-inlined allows us to add code
to them in a BC way.
As a final argument, this change may lead to less code app-side, since
a sequence of cross-DLL calls (to member variable dtors) is replaced
by a single cross-DLL call to the new out-of-line dtor.
Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Angle, for instance, which is now the default on Windows,
does not support the GL_BGRA_EXT format as input for
glTexSubImage2D(). In the case where it's not detected, we
therefore need to flip the bytes in the input.
Change-Id: Ibe78d0223e3c2c39cb1943cdcf67103044d00aa7
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Pointer to const member function have a different signature, and hence
need their own traits code.
Change-Id: Ie4b2434a412f412444fb07ef1388a37cab105ecd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Do not access GtkWidget::style directly, it doesn't exist in GTK3.
Change-Id: I1ee4ad5ca0894c9277219fc2a70f5f1c69ec632f
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
We don't need to define pi.
Use some clearer names in navigateHierarchy.
Use smart pointers.
Change-Id: I482efe9235a3419f048baede6886d29d46e3057c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Use smart pointers.
Navigation to siblings is long gone.
Change-Id: I81a10633960eefb9738990682734dcfbdd65330c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
- Introduce function for key prompt for usage in
verifyConfiguration() and showLicense().
- Prompt only once in verifyConfiguration().
Change-Id: I7028da1bda703a424e39477bd06b2639475739a4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
The example was creating a new timer on every expose event, which
quickly leads into massive excess of timeout signals.
Fixed by only creating one timer.
Task-number: QTBUG-27836
Change-Id: Ia6ed1bd9575e296f4c6c5b12509095e4d5c016dd
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
GDI objects that are created need to be deleted once no longer needed,
instead of just released.
Task-number: QTBUG-27812
Task-number: QTBUG-27825
Change-Id: I53b04b54cea9e2aaa8fc72365c215f516c5682e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
"-no-opengl" didn't clear the default value for "OPENGL_ES_2", which
meant "opengles2" got configured in.
Task-number: QTBUG-27840
Change-Id: Id7b8e3e268571d820bebfb3700d3961ec96be7fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The line to restore it was missing, and the leftover variable
caused a warning, which was removed in
abe5a0a432 .
Task-number: QTBUG-27828
Change-Id: I00b8b89b07bec38a1660c3a9c61220b6d0d7eb48
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
This was uncovered by the linux accessibility test which
tried to call non-existing functions.
Change-Id: Iaa9640c23ee77d7c5b2321d7f8cfa6d12d61c0e9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This fixes the build when QT_NO_BIG_CODECS is defined.
Change-Id: I832fb8ba5df6c4a6c1db9bdaecc498690357a56a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Valgrind warns about the jump in qfontconfigdatabase.cpp:522 based on
uint QFondDef::hintingPreference:2 property. Surprising thing is that
the property is initialized in the default constructor, so there should
not be an issue.
The warning disappear if the property is _not_ placed on a boundary of a
two words, or if bit field is fully initialized. So I suspect that only
one bit of the two was initialized properly.
I decide to implement both solutions because of a potential minor
performance improvement, during reading the property.
I still fail to say why the value was uninitialized, I believe that this
patch simply workarounds gcc bug or valgrind bug.
Change-Id: I2e87738f66a435ef6e30b3d2db6baa73da025426
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Add a read position variable to eliminate excessive memcpy'ing when
reading a partial buffer.
Specifically, fix performance issue of reading large files from
QNetworkDiskCache in QtWebKit2.
Task-number: QTBUG-27522
Change-Id: I21edc909bf9223971b2c3db5f1fa6b89c5b61c5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Antti Harju <antti.harju@ixonos.com>
Creating and displaying a plain QGLWidget on Mac would
display "garbage" or previous frame buffer content
on screen. This looks broken and raises interesting
privacy concerns.
Fix by adding a call to glClear().
Change-Id: I507c24275e41fac0be5f518c5a70d151099ae6b8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The previously missing mapFromSource() sets the proxy model in the
returned index. Otherwise, the returned index refers incorrectly to
the source model.
Follow-up to 9dfba89c28.
Change-Id: I78ab9183820909b646a7333f28aa5ec7266fa675
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
1. Remove the code for activate application, due to Qt 5 already
has this feature
2. Update the code for power setting
Task-number: QTBUG-23267
Change-Id: Id257c2e10e8e750a4b68cd2995c2ac4b70f8910c
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
This prevents the user of moving the leftmost column.
There will be no API to allow move of the tree-structure.
It is very weird to do that, so it shouldn't be a problem.
In case it is a big problem somewhere it can be hacked with:
QTableView unused;
unused.setVerticalHeader(tree->header());
tree->header()->setParent(tree);
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));
Task-number: QTBUG-332
Change-Id: I3a251c8d0fd472ec0ad7edb20a7f3e00af7e0da8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Get rid of QWidget-centric QMacStyle::eventFilter() and implement the
fade out animations for scrollbars using QNumberStyleAnimation-based
QFadeOutAnimation.
Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
We need to add the styleoption when evaluating the small and
mini size hints.
Change-Id: I00f8709912aa2202caef4dbdeaebb5d67cc9a9b4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Documentation has been updated, changes apply to Qt5 as well as Qt4.
Change-Id: I13241a3b4c16d2cb1b24f80fe26832467621923a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
It does not make sense to add a QLayout to a QSplitter, since the
splitter manages its child widgets in the same manner as a QLayout.
The result of doing so is that the child widgets inside that layout
will lead to the splitter and the layout fighting to position the child
widgets.
QSplitter::addWidget should be used to add widgets directly to the
splitter instead.
Change-Id: I640b463cae8673f87354d28636bff4dd3cfb9679
Reviewed-by: Samu Voutilainen <samu.voutilainen@gmail.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>