is the only sane thing, and now that there are no dependencies on
anything else any more (in particular anything slow or side effect
laden), we can actually do it.
this removes some nasty OPT_HELP checks spread throughout the code, thus
further reducing data dependencies.
Change-Id: Ib0a00e1514e2aa25ec3b527ba9f5719e3214640b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
QBBSystemLocaleData emits qwarnings when it fails to open or read a pps object.
If the user code installs a message handler that will invoke QLocale API again
(i.e QDate, QDateTime, ...) which leads to a deadlock situation, since
the QBBSystemLocaleData global static object's ctor() is not yet done.
This patch logs the QBBSystemLocale's warnings to stderr and
skips the Qt message handler.
Change-Id: I3d51f85761253e09b14a44179dd14a887733b392
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This mechanism is used by QtWebEngine to extract the platform GL
context. In the QNX case, the platform context is an EGL context, so
the resource you need to ask for is the "eglcontext". Compare to the
xcb native interface which has a similar implementation already.
Change-Id: I873eaadf96898abb24de347ac624c88cd54254cb
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
When you move a dockwidget from one screen to another then it needs to
be kept at the same position on the new screen, i.e. with the mouse
pointer. This fix ensures that this is happening including when the
screens may not 100% align up with each other.
Task-number: QTBUG-33369
Change-Id: If414effdd0e0415629ca31a86f8bbe382dd29f80
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Whenever a window gets blocked, then the qt_button_down variable should
be reset as it is not going to receive the release event for the mouse.
This fixes problems with the mouse cursor not being updated when moving
over widgets (such as QLineEdit) after a dialog is shown in response to
a press event.
Change-Id: Idfd072eaf36f51b816a0b2a0391cdc447d7a5d9d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
the help would echo the defaults adjusted by command line overrides and
environment variables for some options. this was entirely pointless.
it also printed the result of the os detection, which was mostly
useless.
but the primary reason for doing this is reducing data dependencies,
so the code can be moved up.
not touching the windows configure, as it's a lot harder and currently
that behavior isn't in the way of what i need to do.
Change-Id: Ide62119091c8494fb3bea2b607f140268f057919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
it's counterproductive to do it earlier: it's passed down to configure
tests, which then log less info than they could.
but primarily, this serves the purpose of minimizing the amount of code
executed before platform detection.
Change-Id: Iff19b8555de19d048ea6d9341af965871b314c54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
minimizing the amount of code executed before platform detection.
Change-Id: Ib2c0d97ce5040ced8c4c41d74f428fe7d0f75664
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
it's entirely pointless to flood the user with information and force him
to scroll back when he most likely just made a typo.
apart from that, this reduces the data dependencies, thus easing further
refactoring.
Change-Id: I7b24274d453de54a4f02481a66d77e27d4ab0657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
moving dead code out of the way of further refactoring.
Change-Id: If558406cdf13d61478634dd7eff644dc67b0e53d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
have this option independent code out of the way before starting option
processing.
Change-Id: I5a08caeb25689b155c256ef82505c000112f5039
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Give processes a more complete environment (openSUSE
requires more variables to start an X11-process),
add test column indicating whether a test is
supposed to crash. If it is not, report crash reason.
Change-Id: I1e0ad59824963f69ee425f331d845741be2b3928
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
The code was using the "long" type when a 32 bit type was actually
needed. This can cause bugs in those systems where "long" is 64 bits
wide, such as Linux x86-64 (which is LP64).
Task-number: QTBUG-34861
Change-Id: Iab289b2af3847dd62d8b4ecea51896936ca4c7a2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
... so it will be found when included. That file was added with
commit 3b6b615334,
"export QT_NO_<foo> equivalents to the build system"
Change-Id: I38208aafe5b274d5976cec5d5149a41e6a963798
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
When clicking on a widget currently focused, w/o having Qt::ClickFocus
set as focus policy, the focus should stay on the widget and not get
propagated to the widget's parent.
Task-number: QTBUG-34042
Change-Id: I53f1153829cc7228de02a90e38125b5cf4ee5008
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We report our swap-behavior as QSurfaceFormat::DoubleBuffer, which means
there's no point in using retained backing. This was a left-over from
when we reported single-buffered swaps, which didn't work to well as
clients would wrongly assume swap was not needed at all.
Change-Id: Id26df2f8b282892c720d48cfe85eb9e010f1500d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
qWaitForWindowActive waits until the timeout for the window to receive
a non-0x0 position, even when it's active, just in case the WM sets
the position as a response to focus-in.
Change-Id: I748cce2747f406a8cdff556465175f02675fcd13
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This is an Android only patch, a proper implementation
will be pushed soon to stable branch.
Task-number: QTBUG-29462
Task-number: QTBUG-33588
Change-Id: I3447c523b4533a768d7f95e4ae60541b09a7944f
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This is an improvement over 6800728d where we only fixed it if
the window was in "normal" state (Qt::WindowNoState) before
minimizing.
With this patch, if the window was previously maximized or
full-screen it will also get the expose events when being
restored.
Change-Id: I4a30423145e0999c5d0a5ee2a989730b83f4e3f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
We claim that -1 is a special automatic value, but calling
setMinimumSectionSize with -1 is unfortunately ignored due a
regression in 524c3e05e8
Change-Id: I7d7e5dbbf78e561849d2f2352c9edb2df36aa181
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
GCC refuses to use a merely static const uint array in a constexpr function.
Fix by making the array constexpr if supported by the compiler.
Change-Id: Idd59d3f74f8f4e98aad82bc892f4a6469932df9f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This code was duplicated in every qcollator_platform.cpp and identical everywhere,
except in _icu, which uses a QByteArray m_key and the implementation used
QByteArray::operator<, which is semantically and probably code-wise identical to
what the other implementations did (after inlining).
Inlining this function removes a potential maintenance problem and increases
speed without violating encapsulation.
Change-Id: If3e9d38a7d4326b49f0611a9f4187c53960e8a03
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This enables specialisations of (std and q) swap using member-swap
and declares the types movable for efficient use in Qt containers,
and QList in particular.
This is a binary-incompatible change, so cannot wait for 5.2.1.
Change-Id: I7e90b6397ac4d00d0a7a5c42bae166c1b43e1994
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This necessitates adding d==0 checks in QCollator. By documenting that
moved-from instances can only be assigned to or destroyed, we can
limit the functions in which to check for d==0 to the assignment
operator and the destructor.
Doing otherwise would destroy all advantages of move semantics by
introducing a heap allocation to re-populate other.d.
Add a test for this (QCollator didn't have any before).
Change-Id: Ic6ff202072822bebfd5e48259c3d0fa345a63118
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Rather than breaking at column 79 precisely, break entire words,
to improve readability.
Change-Id: Ie30db00f0e6ed95cce87480c3b91804826c6076b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Vertical scrollbar may get out of sync. When this happens, the calculation of
firstVisibleItem will retrun "-1". This must be handled in ::sizeHintForColumn().
Added an auto-test for the crashes.
Task-number: QTBUG-34717
Change-Id: I867fd144ef3ce45e382337c5eafe345f573cd944
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
This is standard for (QObject*) ctors.
Change-Id: I4756ba50b1f3148d72e95e581d52a37ebd47a7ae
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This ensures that the possible window flag combinations are respected
where possible in Cocoa.
Task-number: QTBUG-34645
Task-number: QTBUG-31616
Change-Id: I6be8ca666b7cbc397575e97cd95ea298f52a7113
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Center windows on screen to avoid conflicts with Unity taskbars,
observe minimum geometry for Windows, move cursor out of the
way for Mac. Introduce QScopedPointer to ensure cleanup in
case of failures.
Change-Id: Ic169e015e795597457b8e85a28ff7fcb7b9b9430
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Task-number: QTBUG-32308
Change-Id: Ibbab3852e5cc289faa63d0a66a3816ab8062ccb9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Ensure that custom style hints returned by subclassed
QPlatformIntegration::styleHints() are used if not explicitly overridden
by subclassed QPlatformTheme::themHints().
Task-number: QTBUG-34589
Change-Id: I0a3114cb00b532d2a5cd40941eca192b32412bcf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The inplace_converter_map never had an entry for ARGB4444_Premultiplied
this leads to the possibility of accessing outside of the array, and
means the RGBA8888 formats are misplaced.
Change-Id: Ida0d94912b53a7730b8fb5f6ccc31e7879ea3d27
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
qcocoaapplication.mm:118:61: warning: cast to 'id' from smaller integer type 'int' [-Wint-to-pointer-cast]
id a1 = ([args->arg1 isKindOfClass:[NSNumber class]]) ? (id)[args->arg1 intValue] : args->arg1;
^
qcocoaapplication.mm:119:61: warning: cast to 'id' from smaller integer type 'int' [-Wint-to-pointer-cast]
id a2 = ([args->arg2 isKindOfClass:[NSNumber class]]) ? (id)[args->arg2 intValue] : args->arg2;
Change-Id: Ibcf3d5d5698ff863f3c9bd65e0388ccca147f419
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This is required for a Qt value type these days.
Change-Id: Ibd4e1581a4f4791a410caa10fede92c26b35dd9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QCollator and QLocale are not equivalent types, so there should
be no implicit conversion between them.
Change-Id: I395f8dc3c35b4202c9276c3eea0686176f8e07cc
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It was providing all possible types, but now MessageDialog is a new
native dialog type, and only on Android at the moment.
Task-number: QTBUG-34784
Change-Id: I2fb288c8d5e176ca4dafbbc310de2f29bbcfc000
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This was actually causing test failures in qtdeclarative
and blocking the CI there.
Change-Id: I4538342f16b6468ad60b283c19948863b20ad5d4
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Otherwise wheeling over disabled items won't let the wheel event
propagate to the parent.
An easy way to reproduce the problem is by having a flickable with
some disabled item in it.
Task-number: QTBUG-33477
Change-Id: Ib327cc34dd9f415617ffbc41064f689507446c05
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>