Don't send QCloseEvents to QWidgetWindows during
cmd-q application shutdown, since widgets will
will already have received close events from
QApplication close event handling.
Task-number: QTBUG-39398
Change-Id: I7f6e892b0042361bed7a3bc5fac8518eabfc8e4e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The availablePrinters() method can be slow as it gets all info for every
printer which may be slow with many network printers.
Change-Id: I4bc5ef46ed4867326b60b66371178b84204639ce
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
The previous implementation used [NSApp orderedWindows]
which does not return NSPanel subclasses, which is
used by Qt dialogs and pops.
Use [NSWidow windowNumberAtPoint:belowWindowWithWindowNumber]
instead, which hit-tests on all window types. This
can potentially include windows from other processes
and non-Qt windows which needs to be filtered out.
Add EXPECT_FAIL to tst_MacGui::nonModalOrder. The
correct topLevelAt() implementation now exposes that
this test is failing.
Task-number: QTBUG-39322
Change-Id: I81afa3da964e08fe682802220d8fe81e9284205e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Make sure all members of the IA2Locale we return are properly
initialized. Only accProbe provoked this bug, and I have no idea why
this haven't crashed earlier.
nvda probably does not query the locale, therefore it was unaffected.
Change-Id: I5a9d98eed5af56fd2a75f6cb7035ed613fd802d5
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Some keyboard layouts (German and Czech for example) have comma instead
of period on the numpad, so this key should also be considered when
setting the Qt::KeypadModifer state.
Task-number: QTBUG-38248
Change-Id: I06847a02a9334c21784790eae6fd7e1bc6de4099
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The fallback for QStringLiteral in case C++11 features are not enabled
is QString::fromUtf8(), not QLatin1String().
Also, the result of a QStringLiteral expression _is_ a QString.
Change-Id: Ib9c2f4c13fff237de3acb2e0f64027bacea6271c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If the application calls "reset" or "commit" on the input
method (or forces active focus on some other item) from a text
changed or key pressed handler, iOS will sometimes throw
an exception. It does so because we try to change the state
of UITextInput (by calling textDidChange) while processing a
callback from the same place (insertText).
Optimally this should not happen since we would normally
post such events to Qt, not send them directly. But with
text input we cannot do this since UITextInput expects us
to update immediately upon receiving text input callbacks.
If not, word completion and spell checking will stop working.
This change will guard against recursive callbacks by delaying
callbacks to UITextInput when text/selection/first responder
changes.
Change-Id: I099f30adf1c5aba241fc833a45b423016f4ed8d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
When a relative path was specified as the output then it would be in both
Option::output_dir and Option::output. Therefore in that case
Option::output should be just the filename as Option::output_dir has the
correct path to output to.
Task-number: QTBUG-39460
Change-Id: Idc988e6bad94f34b89660fb5e8d6fa3a39dc623b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
A vectorized codepath for rotating transforms were added in 5.3.0, but
was only properly tested for SSE2. The NEON version remains unfinished.
Since it was never working, this patch reverts the NEON version.
Task-number: QTBUG-39445
Change-Id: Ifbce0e03781d217ad976c6b18ac88381055cba66
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
QWidget::resize() or QWidget::move() set the new size/position values
and send events. The spontaneous events generated by the platform
should be ignored in that case.
Task-number: QTBUG-30744
Task-number: QTBUG-38768
Task-number: QTBUG-32590
Change-Id: I9c0ae38842ed76a8a88ca64fdc9bbe106b2766b7
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
A better fix is to check whether the widget already has the requested
geometry when receiving the spontaneous event from the platform in
QWidgetWindow and to suppress that.
This reverts commit 72259baa76.
Task-number: QTBUG-32590
Change-Id: I4d7a9b4c340c2d6a427727ecb8de50c3d199f7a9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Remove return in mouseMove depending on variable mousePressed which
is not present in Qt 4. The variable was true in Qt versions
before 5.3 due to an additional mouse press event received before
a double click.
Task-number: QTBUG-39023
Task-number: QTBUG-25831
Change-Id: I57ed9284961195c71df9e9b9d697b1cfbad7c228
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Prevents a shutdown crash in the Qt Mfc migration solution.
Task-number: QTBUG-39317
Change-Id: I7f0aa40715baed57ff59682a477084347dfd45bc
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Like the EGL + xcb configuration, the -no-opengl is broken too when
it comes to translucent windows: Requesting an alpha channel is futile
since the xcb_create_window call always uses the root's depth and visual.
This is now corrected by picking a 32-bit visual.
This will make translucent windows and drag pixmaps appear correctly again.
Task-number: QTBUG-35126
Change-Id: I00e7d6e08b5fcc055ef3ea6d822561740a1f5457
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Using a 24-bit visual for 8888 configs is wrong since we loose the
alpha channel. This breaks translucent windows and, among others,
leads to not showing drag pixmaps (that typically have transparent
areas) properly.
Change-Id: I516c84327680b76996b622831e431c29d840471e
Task-number: QTBUG-35126
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Many windowing functions are not supported (since they do not make sense)
on the embedded platforms. Provide empty implementations for a few more
to avoid showing useless warnings, in particular for widget apps. The
user cannot do anything about it and these are not errors.
Task-number: QTBUG-39081
Change-Id: I29afd981e037d1e6772bcdfc33497e6d0ae02008
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Some drivers are reported to get confused when passing different
sample counts (requested vs. actual) to the color and depth/stencil
attachments. To overcome this, pass the requested sample count to all
the attachments.
Task-number: QTBUG-33406
Change-Id: I17b0e3dbbd78de2ab0f45e95164b4f326d47aeff
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@digia.com>
QNX 6.5 does not have readdir64_r, which is selected by current
qplatformdefs.h. There is only a reentrant version (readdir_r) which
does not support large files and a large file version (readdir64) which
is not reentrant. The reentrant version (readdir_r) will be chosen now.
In summary, the following versions will be used:
QNX 6.5: readdir_r (postfix '_r': reentrant version)
QNX 6.6: _readdir_r (prefix '_' : extra stat info included)
BB 10: _readdir64_r (infix '64': large file support)
Change-Id: I00739f0e2054a32f52555309d03463a6c52e3d99
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
This was the only place where we didn't use the exceptionCheck()
function. Besides being more consistent, it's also more verbose if an
exception occurs.
Change-Id: Ib1e3dba82b0730cf189ec725f4da425d7ac85cdc
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
- fix build on 10.6
- actually build it at all
Change-Id: Ib929f8b56e55f00191f7fcfb2be25975e46a1af2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
qml2 needs QML2_IMPORT_PATH.
this didn't affect non-prefix builds (which most developers use), so
it wasn't too serious.
Change-Id: I435dca151348669b66f091f9a9324cd69394284e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
a) qmlimportscanner has no built-in -importPath, so it can't be omitted
even for non-prefix builds, and b) the QMLPATHS variable is also used
further down, so we can't just do away with it.
amends a658fa40.
Change-Id: I42a47a82fe13694fbac3c4a3962ebbe1d7e7865b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
it helps enormously to use the flag correctly.
amends f0c34eb08f.
Change-Id: I04a63cc59e133169d9f6677f2f88ef98fd5c524c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
the condition is now consistent with that of the target itself (which
means that by setting target.CONFIG=no_dll one can actually suppress
installing the target itself even if it's not a dll, but anyway).
Task-number: QTBUG-39253
Change-Id: Id4684a550a33b463594ab537eaa9e1cbfb61e4ff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
qdoc uses the indexes as "precompiled headers" to obtain type info
necessary to properly parse sources.
the indexes needed are the ones the module actually depends on
(publically).
Change-Id: I6aad0b511d2534d584f7947c8d800300eede94ff
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
the doc/ dirs in the build dir won't be created until the docs have been
built, so of course checking whether they are there during the qmake
phase is counterproductive.
this also means that we'll get some complaints about non-existing
directories (for repos that don't create any docs). there is no
reasonable way to query qmake which repos are affected, and writing
shell-specific code to query it at make time seems a bit overengineered.
Task-number: QTBUG-38862
Change-Id: Ie0588e75bfc39718fffd46f0df6785428e396eb2
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
the install dir may contain indexes from previous builds. a build must
never refer to previous builds.
Change-Id: I67c04df8f3f82bdbebb67e280f70795ed0a76ccf
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
even if we are not doing a top-level build, we still need to specify an
index dir. that may be the install dir or the qtbase build dir,
depending on whether we are building against an installed prefix build
or a non-prefix build (building against non-installed prefix builds
outside a top-level build is inherently impossible).
Task-number: QTBUG-35596
Change-Id: Ia37d429855480d3bfe36b7ee29e087029861bfc5
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
instead of adding all possible plugin paths (for which QMAKEMODULES
wouldn't have been a reliable source anyway), only add the paths of
plugins of the necessary types.
this necessitates that we create qt_plugin_<foo>.pri files also in shared
builds of qt when making a prefix build. we don't install them unless it's
a static build, though.
Change-Id: Ib56b009562a7131d4dc4dfc259b34ec6581b0f77
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Adds QApplicationPrivate::usesNativeStyle to check whether the
QApplication is using the native platform style.
This can be needed internally to decided whether to let the platform
plugins do stuff or do it interally, style dependent. E.g. letting the
platform plugin popup a QMenu vs. letting the style draw one.
Change-Id: Ibb5e11a4d9d1d2824685ff146786a9354ceef43c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Some codecs can't handle the range outside ascii properly and would then
fail to read the data back in correctly.
Task-number: QTBUG-15543
Change-Id: I4c02921e787a939eeec0c7a11603b5896d756aef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Store the value of QMessageBoxPrivate::autoAddOkButton
temporarily when automatically adding the "Show Details..."
button.
Task-number: QTBUG-39334
Change-Id: I173c83893548ee83b3d8ea2743f87686c32657e7
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
There are no automatic updates of the window when it moves, since
this is not required on most platforms. This broke drag and drop on
Android, because drag and drop creates a temporary window containing
a pixmap with a snapshot of its content. We need to make sure the old
and new location of the window is repainted when it has moved.
[ChangeLog][Android] Fixed repaint issues in drag and drop.
Task-number: QTBUG-35975
Change-Id: I7b043d728551d9963fb5acec804fb90aec5b50ff
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This is pretty much the same thing that eglfs does.
Task-number: QTBUG-38960
Change-Id: Ibf310ca8e3a4e31e5310ab3a3d3e851eae31a4ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
There were several issues on startup of the application which
were caused by the fact that we would get the wrong
available screen geometry on startup, set this as the
initial surface size and then expose native windows with this
size. This would cause first a flicker of white on the early
expose and the window contents to jump around as the window was
resized to the actual available space on screen.
The fix for this is to postpone the first expose until we have
actually got a proper screen size from the main layout. We use
width,height = 0 as an indicator that the available geometry
is not yet known, and we skip posting any expose events before
this is set by the layout.
In addition, since we removed the surface before we shut down
the application, it was by a white rectangle before the
shutdown transition happens, and this white rectangle will
be animated instead of application contents.
To rectify this, we make sure the last surface in the stack
remains in the layout until it is either replaced by a different
surface or until the application has shut down. This way, the
shutdown animation will work on this surface instead.
[ChangeLog][Android] Fixed regression where there would be flickering
on startup and shutdown of the application.
Task-number: QTBUG-38960
Change-Id: Ia1579ca8c522d8beeab066f78070ad49009d0238
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
QCocoaEventDispatcher stores user input events in a queue in certain
cases. If the target of those events is destroyed, the events are later
sent to the stale window, causing a crash.
Task-number: QTBUG-39211
Change-Id: Ie55d2df5697c742bcb644ebf8c5028015a0b8148
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Don't interrupt the Qt event loop if the Qt event
loop isn't running (meaning processEvents has not/
will not be called). This can happen in the QMacNativeWidget
or plugin case where the native code calls [NSApp run]
and QApplication::exec() is never called.
In Qt 4 this was not necessary since UI event
processing was more direct: QCocoaView would call
QCoreApplication::sendMouseEvent/sendSpontaneousEvent
directly on mouse events.
Task-number: QTBUG-36225
Change-Id: I2894cbbca66a902652c9f8bc916e94ad8ce0e18e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Block flush until all bits have been flushed. This prevents Qt from trying to
draw over the buffer while it is still being cleared.
Change-Id: I49b90a7653ec3768411a1a94837bb31fec4d44e8
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
If QNX does not have inotify there is no native engine.
Change-Id: I042efd0b59f916f9e0b55bbe5c7f3fe7bb6914c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
CRT dependencies should contain "Phone" in the name.
Change-Id: I1b0de01df6a016c20b59232f6068e9bb87e3f18c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
HSTRING needs to be released or handles will be leaked.
Instead use HString which takes care of resource management
on its own.
Task-Number: QTBUG-38115
Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>