Font styleName support was disconnected since Qt switched to QPA
fontdatabase. Now add the code from Qt 4.8 back to enable this in
QPA.
Change-Id: Iab2cbfd5468f87542183348c2123ca4b2c270692
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
(cherry picked from commit fa7661d8b2)
Use localized family name and style name when selecting font with
non-English locale
Task-number: QTBUG-27415
Change-Id: Ie81507ed011fc096e0f5edad146e97c392e86494
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
(cherry picked from commit 3c09f6bc9a)
Due to preparation for GTK3 support, QGtkStyle::drawXxx() no longer
creates a local instance of QGtkPainter upon every call, but
QGtkStylePrivate::gtkPainter() will (in the future) dynamically choose
between QGtk[2|3]Painter. The same painter instance is now re-used
between the calls, but wasn't properly reseted between.
Task-number: QTBUG-28557
Change-Id: I29be318dbb54d97ed23dfb88d406a3a833db4369
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
(cherry picked from commit 0b0b74a563)
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Avoid QHash randomization so that the order of the XML attributes is stable
This was causing intermittent failures.
Change-Id: I4cc0dba4b0c2ec36601f3b06fb17ff80005cc9fb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Linguist examples are now in qttools.
Change-Id: I8abfff50d81cda143a080711bf9583e7be777009
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Remove docs and images for Multiple Inheritance and Text Finder
examples that were moved to qttools/uitools.
Change-Id: I29e8f76b2512e329c354a6d3676c9b2e09e35726
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Add Display and QDebug() of Qt::MouseButtons values. (I.e., Buttons
believed to be in 'Pressed' State by Qt.) Assists in platform plugin
mouse software debug.
Task-number: QTBUG-28603
Change-Id: I4a7a3ac44a8cc7eb1eceb9f348493b58b12dbd69
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Font styleName support was disconnected since Qt switched to QPA
fontdatabase. Now add the code from Qt 4.8 back to enable this in
QPA.
Change-Id: Iab2cbfd5468f87542183348c2123ca4b2c270692
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Use localized family name and style name when selecting font with
non-English locale
Task-number: QTBUG-27415
Change-Id: Ie81507ed011fc096e0f5edad146e97c392e86494
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
QGLTextureCache::remove(qint64 key) locks the QGLContextGroupList mutex
before removing a texture. Removing the texture might cause the
QGLShareContextScope construct to be invoked, which calls
QGLContext::currentContext(), which will wrap a current QOpenGLContext
in a newly created QGLContext. That also triggers the creation of a
QGLContextGroup object, which will register itself with the
QGLContextGroupList, an operation that again will lock the
QGLContextGroupList mutex. To prevent this from deadlocking we make the
mutex recursive. The whole QGLShareContextScope approach is really
broken and should be replaced, but for now it's what we have in QtOpenGL
(QtGui has the replacement QOpenGLSharedResource).
Change-Id: Id1ff69035af3f31b690892c03f74748d052a278b
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The QX11Info class needs this.
This required adding the missing nativeResourceFunctionForScreen
in QPlatformNativeInterface.
Change-Id: I2c6e91c7f122f3ecdf769a177deafd2aa3896e2f
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This increases consistency a lot: all windows and dialogs from a Qt
application will show the app display name in the caption, on Windows and X11.
This helps identifying which app a dialog belongs to, which is especially
useful when the dialog is very generic and shows up unexpectedly.
For compatibility reasons, the app name is added to the caption only
if setApplicationDisplayName() was called -- or if the caption would be
completely empty. The standard Qt4 case (setWindowTitle + no display name)
is unchanged.
Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
translateMouseButtons() was only able to correctly handle the left,
right, and mid mouse buttons. Thus, if any buttons outside of those were
pressed, the motion notify event would basically unset the mouse button
mask, leading to a release event being sent instead. Later on, when the
actual release event arrives, that button gets xor'ed into the empty
button mask generating another press, and later another motion event
will generate a release. In the end that means two press-release
sequences are sent for any extra mouse buttons.
Instead of getting the mask of the buttons currently being pressed from
the event, we need to keep track of the mask ourselves.
Task-number: QTBUG-28561
Change-Id: Iaa67e784a13d792deef8fc29dbd5456a5471a861
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This test fails on some setups and a pending critical change
causes the existing bug to trigger in CI. To avoid blocking
other changes because of this bug, it's been marked as
insignificant until such a time when it can be fixed.
Change-Id: Ide41f7b1c76209f9c05f95f996b2364d5dea5e67
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
We also need to detach() the taken value in case the compaction triggers and
modifies the underlaying data.
Change-Id: Idcdeba4236b8e208d107d41be2decbdfc5721300
Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Change-Id: I6565bda336c152dfdc0cb49f168d90bdceacb2b1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
These tests have been failing on certain setups for a while,
but some new critical changes causes the failure to trigger
on the CI system as well. We mark them as insignificant until
they can be fixed.
Change-Id: I467e7030c55d6f23515275b4062c17068d2b688c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Due to preparation for GTK3 support, QGtkStyle::drawXxx() no longer
creates a local instance of QGtkPainter upon every call, but
QGtkStylePrivate::gtkPainter() will (in the future) dynamically choose
between QGtk[2|3]Painter. The same painter instance is now re-used
between the calls, but wasn't properly reseted between.
Task-number: QTBUG-28557
Change-Id: I29be318dbb54d97ed23dfb88d406a3a833db4369
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
the source paths need to be made relative to the main source dir
Change-Id: I98d74eca7e54d1179ab602bb87b96b66f3193ce4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Pass opacity from the QWidget to QWindow and to the platform
windows.
Task-number: QTBUG-28477
Change-Id: If5a85d9183bd1ca33dac2052936ecd1e6c0b5f6c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
When clicking at the bottom-right corner of a menu in a menu
bar, it appears at the wrong position. Add test and stabilize
RTL-tests by making sure the layout direction is cleared should
they fail.
Task-number: QTBUG-28031
Task-number: QTBUG-2596
Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The stepSize property was missing in Qt 4 and is
a sensible addition to the value interface.
Change-Id: I7571800d50ee7e4194c09c4db40300809a1ce45a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
The file qwindowsfontenginedirectwrite.cpp uses the Win32 API function
GetUserDefaultLocaleName which requires _WIN32_WINNT to be set to 0x0600
as it only became available in Windows Vista
Change-Id: I704705d3fc729bb0167121de991d01c957e1e7e4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The configure.exe already supported the -directwrite flag for some time.
This commit adds this flag to the configure script as well so
environments which use MinGW as cross-compiler can now also
optionally enable DirectWrite support.
The original configure.exe pieces were added in commit
c0fed43b04dec8bd549043d3ea5e28908128082c of the Qt4 repository.
The directwrite argument which this commit adds to the configure
script and the behaviour of it should be exactly the same as the
current configure.exe.
To get Qt built with DirectWrite support using the MinGW-w64 toolchain
at least mingw-w64 trunk revision 5451 (Nov 10 2012) is needed
Change-Id: I519718068cf5732c7ebcbf0a0fafb6b747db0bcf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This was introduced in patch 8534bb3d, then overwritten by c85ca8d1.
Change-Id: I6b7489e2b2f3311822c282f50c74bd68c787229d
Reviewed-by: hjk <qthjk@ovi.com>
If we don't do this, we can have binary compatibility issues later.
For example https://codereview.qt-project.org/#change,41700 will change
the behavior of setWidth and setHeight to call setSize instead of
setGeometry, because we don't want changing the height to also set
the position of a window; if x and y are left uninitialized it needs
to remember that fact. But if setWidth is left as an inline method,
calling setGeometry, then an application which was built with 5.0
would behave differently than an application built with 5.1, even if
Qt is upgraded after the application was built. To generalize,
setters should never be inlined.
Change-Id: I1ec42cb61a45fe541b3f3bb99d1b1ca24ad2a517
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
\target sets up a unique target that should be
accessible with \l across module boundaries.
This was not working across module boundaries.
Now it has been fixed, and it is one way of
handling the problem described in the referenced
bug report.
Task-number: QTBUG-28244
Change-Id: I541f409b998f84b2b8dcf66751762cf07f9f108b
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Ported the rather trivial implementation from Qt 4.
Task-number: QTBUG-28477
Change-Id: I44e14a3c150af43c6b9b880242b655fe06084fd7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QSpanData did not properly check that whether the matrix is an affine
transformation or not. Therefore, qt paint engine chose the wrong
algorithm for drawing in case of a perpective matrix.
Change-Id: If0523bd45e86679a08874713da3fbe33a9852551
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
In src/3rdparty/xcb/xcb-util-image/xcb_image.c, the includes require all
this directories, or otherwise compiliation fails when -qt-xcb is used
in the configure step.
Change-Id: I8566bea662eced144cb9a2b1ce1dbfdb65654dea
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
We ask grayscale or mono bitmaps from FreeType but in some cases treat
the output as ARGB without conversion. This surfaces using QGLWidget as
a viewport to QDeclarative content. The offending glyphs are then
generated through QTextureGlyphCache::textureMapForGlyph. This adds a
fix for converting to the expected ARGB32 data.
Change-Id: Ia219582ebd76b7e4e9379111a42312b4d97718de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Loading both the debug and release version of the cocoa
plugins causes the objective-c runtime to print "duplicate
class definitions" warnings.
Fix this by directing the plugin loader to only load
one of the cocoa plugins if both are available. Implement
this as a special case directly in QFactoryLoader.
Define QT_NO_DEBUG_PLUGIN_CHECK to allow mixing
debug and release builds.
Task-number: QTBUG-28155
Change-Id: Ie1927b219cc501a821f91b7e4b56f0589e0acbf5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For two reasons: 1) those operators are gone and 2) the ones that remain
are atomic.
Task-number: QTBUG-28532
Task-number: QTBUG-24627
Change-Id: I1e9d1b076d923546c1ee3d45f312066590f97416
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Make tst_qquickview::resizemodeitem pass.
Returning on equal geometry breaks for non-top-level
windows.
Change-Id: I3b361655e25b6cf2d5e29410dc1f3567ab8f54d9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The crash could happen if a QWidget in the UI got deleted, and
the AT client later tried to access the widget through the cache
(qAccessibleRecentSentEvents()).
Solution: Use a QPointer as a guard.
Task-number: QTBUG-26187
Change-Id: I1aa716766626cf171757e76ba255a6d5ae4fd854
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Manifests must be embedded into DLLs with the resource id 2, not 1.
This fixes a regression introduced in commit c9406bcf.
Task-number: QTBUG-28524
Change-Id: I93b1dfe4614d0535f47fd881b8688a23e83e845f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Ismo Haataja <ismo.haataja@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Task-number: QTBUG-28389
Task-number: QTBUG-28380
Change-Id: I91edd9c8aba60118d722bbf9ad5b85f994398823
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QWindowsStyle considers QStyle::State_On as pressed, whereas
QMacStyle uses the same state for transient scrollbars. Thus,
to indicate transient scrollbars, QScrollBar::initStyleOption()
must set QStyle::State_On only when the current style actually
supports transient scrollbars.
Task-number: QTBUG-28523
Change-Id: I94d207b1e8c5c4bd6f4b99e8b4f1661197fbe9dd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>