NSWindow setStyleMask can call viewDidMoveToWindow,
while setting the mask, view can have window == nil and we call 'obscure'
on this view's platform window/QWindow == 'unmapping' it.
As a result, it can happen that a child view (for example, QGLWidget's view)
never gets mapped back. This patch tries to limit this special
obscure/expose logic by the exact views it was introduced for
(c7bd85e97d, QTBUG-19840).
Change-Id: I4cc7a6b1bd3e34741ad50c2e0d2a2add242b28e4
Task-number: QTBUG-41701
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
If we set ANDROID_NDK_PLATFORM env variable, QMAKE_DEFAULT_XXXDIRS still contains
old ANDROID_PLATFORM, so we need to overwrite it.
Change-Id: I917e24caa11bd589966b3fb11be3a9f3c4370b3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
We need PIE, doesn't matter if reduce_relocations is used or not
Change-Id: I9a359b9d4443a6059980cd4c48058132ec4267fe
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section.
Length is supposed to be equal to the section items length, but the state saved might be corrupted.
Task-number: QTBUG-40462
Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Ctrl/Ctrl+Shift should not cause any characters to be input
(as opposed to AltGr(Alt+Ctrl) as used on German keyboards).
Extend the tests in QLineEdit and QPlainTextEdit to
check the modifiers, remove test from QTextEdit
since it is handled by QWidgetTextControl.
Task-number: QTBUG-35734
Change-Id: Ie0004fac68cf840c68247f27547e84b021355cd2
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Otherwise, the code triggers for top level windows in setups with
multimonitors where the primary screen is on the right and the left
monitor has negative coordinates.
Task-number: QTBUG-43879
Task-number: QTBUG-38475
Change-Id: Ied3ee6dc59bd784e11db22031d2090cc6f42ef8b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Terminating the scan thread is leading to crashes. So was the previous
solution to use wait(5000), since the scan thread may take longer than
that.
Task-number: QTBUG-36000
Change-Id: I5c37ba5ba3f5c156fca30f3dacaa998c15f76be8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
In MenuBar.qml, it's possible for __isNative to be set
after visible on a child QQuickMenu. In that case, the qcocoamenu.mm
will have set submenu to nil, only to be overridden in insertNativeMenu
when __isNative is set.
Change-Id: Id3c6bca03f937528d05b166cbd6a6d1011db43e8
Task-number: QTBUG-44168
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit fixes incorrect logic of icons' lookup if there are
fallbacks or more than one theme's directory.
According to Icon Theme Specification, Directory Layout section, theme
can be spread across several base directories by having subdirectories
of the same name. This makes possible to extend system themes by
application-specific icons without making of collisions with other
applications.
According to Icon Naming Specification, Icon Naming Guidelines section,
icon name may contain dashes to separate levels of specificity in icon
names. This makes possible to set in application very specific icon
which may be not in every theme. So it can fallback to less specific one.
Change-Id: Iafc813902a3646be56e8f1d3a2fdbf8fd32ac542
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Assign geometry in setGeometryDp() only when minimized as otherwise the
variable will be set by the handling of the resize event triggered by
setGeometry_sys()handleGeometryChange(). As it is, it suppresses
the emission of screen change signals for programmatic move operations
since the move is not detected.
Change-Id: I5cd32bb16fd41dd720c16ddf84b88df642677af7
Task-number: QTBUG-44070
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Add some parts of the qtdiag tool as a qtbase test to output the
graphics configuration to the CI log and to verify that Open GL can be
initialized for platforms on which the qopengl test is marked as
insignificant (for example, ANGLE).
Change-Id: Id445e57928e0307ad38cd433c52a62501f1097c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The three validators in QCalendarDateValidator were heap-allocated,
but the pointers were never reseated.
Allocate by-value instead.
Text size savings are minimal.
Change-Id: I99401e29cfc8371656a17fba4affd5c6ffd6ad53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Saves more than 1K text size in optimized builds.
Change-Id: I5b9ac4394f681485ef261d1c1bb7a35c4675936e
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Instead of using QString::sprintf() (and converting the result back to QByteArray),
simply do the conversion from uchar to hex digits ourselves, using QtMiscUtils.
This function is a copy of a similar (but not identical) one
in qprocess_unix.cpp, but it's not clear whether they can or
should be merged (both are only conditionally compiled), so
this patch does not attempt to do so.
Change-Id: I0be87963f78a98e35a54c98c5fb444756c57b672
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The warning was:
warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
Change-Id: I37dc13ca864d408e02c69102ba5208f8bfe70980
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The warnings were:
warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] (2x)
Change-Id: If8c2e8fab7388cb4aa7d6e7ceb5faee531e16006
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QList<int> wastes 50% space on 64-bit platforms. Use a more
fitting container. Since the storage is only used temporarily,
try to allocate it on the stack with QVarLengthArray.
Also give it better name than just 'list'.
Change-Id: I3dfb1d5927ac36f4b352b5d91ce0c9401b20705e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
If a QBrush has been created without QPixmap the texture() method will
create one. This patch avoids that in several places by checking the
type of the texture brush before accessing it, or not accessing it at
all.
Task-number: QTBUG-43766
Change-Id: If6009fe1d5bd51b239ae2c838e5c3b904b56b11a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
CppCat detected duplicate sub-expressions in the code that checked for
BottomLeftSection and BottomRightSection. It was fairly obvious to
see what the values should be.
Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
There were several leaked CFStringRefs in the new OS X bundle detection
code that is part of QFileSystemEngine.
Change-Id: Id0817e9692da411c7eb8287b9bf71b99ae28f960
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
According to GetStockObject() function docs at MSDN:
> It is not necessary (but it is not harmful) to delete
> stock objects by calling DeleteObject.
Change-Id: I755dc84c8b86ba2806e97ae41b3025aa3e633ae7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This partially reverts commit 1755038134,
which did not only fix undefined (signed left-shift), but also
implementation-defined (signed right-shift) behavior. It turned out
that code depends on a particular implementation behavior (logical
instead of arithmetic right-shift), and needs to be fixed first.
Change-Id: I9ba32d06f127d17d05e0c6f6eac3d26268587bca
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
(this is committing the new output of generate_ui from qttools)
For QLatin1String, operator== is overloaded, even for QStringRef,
so comparing to a latin-1 (C) string literal is efficient,
since strlen() is comparatively fast.
OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.
So, just compare using QLatin1String instead.
Change-Id: I5035d259085c21689ab0f62fd49819ab5223ffe8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We may receive viewWillLayoutSubviews calls for the view controller even
if QIOSScreen has released the UIWindow that retains the view controller.
Change-Id: I0cc7c50dbb5ee00224aec46d070b04efe069e85a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Now that we can rely on screen() returning 0 when the QScreen is not
available we can return early from updateProperties(). We still compute
the member variables as they may be accessed directly for the still
alive QPlatformScreen.
Change-Id: Ia7d0d29a6b50a9c932b565dc53b23d66331c275e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Change-Id: I6acac4c926fcf5459364133b6cc58baff0519074
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
We were only doing this for the size, which caused problems when moving
a window from one screen to another where the two screens had different
device pixel ratios.
Change-Id: If56df34677417369639ee8e4df05820fddd9198d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Add missing includes and reorder includes to avoid X defines breakage
Change-Id: Iaf95ae2488df3d3301436262ed79f7091b4be0a9
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
We don't yet have API compatibility, apparently, so we need to keep up
with those changes.
Dropping support for older versions is not yet acceptable since some distros
(in particular current version of some embedded ones) may ship these versions.
Change-Id: Ibea780abd76c4b89661012dfea46868b432ded42
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Applications have no public API to check for the ThreadedOpenGL flag
reported by the platform plugins. Add a static function to QOpenGLContext
to give interested applications a way to decide if they should do
rendering on separate threads.
Task-number: QTBUG-44208
Change-Id: I629332512ab31fe49f842065a911270cd6cea7aa
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Use it also in the context initialization code which also relied on pbuffers
until now.
This is safe to do since QOffscreenSurface is deliberately kept minimal: we only
support it for rendering to FBOs or uploading textures, it is quite useless for
any rendering type of operation. Therefore simply not creating a surface when
the extension is available is viable and should not break anything.
While we should have done this a long time ago, the real inspiration now is
to avoid crashes with some bad EGL implementations.
Mesa in particular tends to crash in its interal configuration handling when
trying to create a pbuffer surface with more exotic attributes, for example with
multisampling enabled. Just getting rid of those properties is not an option
since the resulting pbuffer would not be compatible with the existing context.
Therefore our only option is to avoid the pbuffer altogether.
There's a so-far-ignored patch for Mesa http://patchwork.freedesktop.org/patch/38100/
which tries to solve some of this but it turns out it is not sufficient to avoid problems
with the multisampled case. So to avoid more headache, we just stop using pbuffers
there.
[ChangeLog][QtGui] QOffscreenSurface is now relying on EGL_KHR_surfaceless_context when
available, and avoids creating a pbuffer surface when the extension is present.
Change-Id: Id18742768b8e66c8d92ce65a9bf64b0296e14db7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Add support for SSL on iOS/OS X by adding a SecureTransport based
backend.
[ChangeLog][QtNetwork][QSslSocket] A new SSL backend for iOS and OS X,
implemented with Apple's Secure Transport (Security Framework).
Change-Id: I7466db471be2a8a2170f9af9d6ad4c7b6425738b
Reviewed-by: Richard J. Moore <rich@kde.org>
it's debugging code which is used only once (if even uncommented).
Change-Id: Ie57347017dd24f4acecff2a7132f82898dea3122
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>