Commit Graph

16899 Commits

Author SHA1 Message Date
Friedemann Kleint
fa83803119 QColorDialog: Streamline painting code of QColorLuminancePicker.
Task-number: QTBUG-36078
Change-Id: Iea7dcb1fdae955615345aa835dc0b1a67840f39d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-01-29 08:22:36 +01:00
Olivier Goffart
e13b0cc4a0 Fix usage of QObjectPrivate::connect when q_func() is private.
q_func() which is declared in Q_DECLARE_PUBLIC is usually private.
We should use q_ptr directly in QObjectPrivate::connect, otherwise
it does not compile when trying to access the private q_func

Change-Id: I235165a0994327102dbb31c390c2cafdffe806dc
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-29 00:18:15 +01:00
Oswald Buddenhagen
b4c31488a7 resolve include paths against source dir
this hasn't happened yet at this point of processing, so we'd pass bogus
paths when shadow-building.

Change-Id: I9f9633c0dbc2aadeff1eb555a8e598ddb0837e37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-29 00:18:15 +01:00
Oswald Buddenhagen
bfbc17159f shell-quote include paths when not using a response file
Change-Id: I7557480dcd8ba1e0b5ecf88318c53cdfb3519f92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-29 00:18:15 +01:00
Oswald Buddenhagen
30efc99c67 use the response file also for the default incdirs
Change-Id: I328cdd32d43f263992af206c66b502564e954d53
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-29 00:18:15 +01:00
Oswald Buddenhagen
6d5df33d58 use write_file() to create the response file with the includes
it's much shorter and faster.

Change-Id: I6a37e9ece4ac550d1887fa53523b85046d398c8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-29 00:18:15 +01:00
Friedemann Kleint
dbda292d2f Windows: Simplify cursor code.
Streamline code, remove unused arrays
(Qt::PointingHandCursor is handled in other switch-clause).

Task-number: QTBUG-36266

Change-Id: I533965ca4910230deefa8150d50b3ac677baaf1a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-29 00:18:15 +01:00
Allan Sandfeld Jensen
85fa39cf79 Document Qt::NoFormatConversion
The Qt::ImageConversionFlag Qt::NoFormatConversion is necessary to
generate QPixmaps not in ARGB32PM which can be useful when not used
as a paint device.

Task-number: QTBUG-36031
Change-Id: Ic2d3ccd59285dd18890f07f3205a2a219ce3aa40
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-29 00:18:15 +01:00
Fabian Bumberger
fc24452fbf [QNX] Implement the requestActivate function
This allows manually transferring focus from one window to another, if the
application has focus.

Change-Id: If73ddca6ffbb735eaf4ee9fd322d978f9366fb4c
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-01-29 00:18:15 +01:00
Allan Sandfeld Jensen
b7396dc39f Tests for semi transparent blend on opaque formats
This patch adds tests for the consistent handling of transparent
drawing results on opaque formats that was introduced with commit
6f7d370ade

Change-Id: If5d11d0f2e111ef88490a4dc20a64b0858ad5426
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-29 00:18:15 +01:00
Allan Sandfeld Jensen
433ea5eb0c Fix performance regression in mirroring QBitmap
The recent split of qimage.cpp meant mirror_horizonal_bitmap had
to access the bitflip array using a function call. The function call
was placed in the inner loop, but should have been moved out of the loop
as it can not be inlined.

Change-Id: Id771b2fb7e6c2bfa59670ee96a857a529da13c0b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-29 00:18:15 +01:00
Bernd Weimer
b709d07c34 QNX: Cleanup some issues in QPA
* Avoided crash, if root window is reparented
* Corrected video window name
* Made parent window member private again

Change-Id: Icef9fad5495413e0de87c4366f25dad6c4fd5775
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-01-29 00:18:15 +01:00
Friedemann Kleint
6ab6ab73fe Fix tst_QLocale::windowsDefaultLocale().
Adapt to Windows-version-specific changes.

Task-number: QTBUG-36306
Task-number: QTBUG-33718

Change-Id: I8275423f6f79ede3c3903a646b731eba2182e83c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-28 19:33:29 +01:00
Friedemann Kleint
8545ba9366 Fixed Drag and Drop driven by touch-synthesized mouse events.
When dragging by touch driven by synthesized mouse events, the cursor
is suppressed. Use a popup window to show the drag cursor instead.

[ChangeLog][QDrag][Windows] Fixed Drag and Drop driven by touch-synthesized mouse events.

Change-Id: Id8c1aab79a091c89986ee7ee62ded44a3267fd3f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-28 19:33:16 +01:00
Fabian Bumberger
a46198a7b3 QNX: Create the egl context according to the version in QSurfaceFormat
Change-Id: Iee556d51ad1d7db2593e3996da4d90d938d13e17
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-01-28 19:33:06 +01:00
Fabian Bumberger
b8103a4e81 [QNX] Introduce proper screen error handling
This patch adds a new function which does the error handling for libscreen calls.
The patch introduces following changes:
- Libscreen errors will not crash (qFatal)the application any more but rather post a
warning message.
-With the "flush-screen-context" option the screen_context is always
flushed when a screen function is called. This enables better correlation between the
time an error happens and the time it is logged.

Change-Id: Ie2456e5b746dcf917d786f3b832847d2ebbe5f1e
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Roger Maclean <rmaclean@qnx.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-01-28 19:32:53 +01:00
Fabian Bumberger
a4ff400e25 Fix application font removal when using FontConfig
This patch fixes an issue when a font that was added with QFontDatabase::addApplicationFont
can not be removed any more.
The reason for that is that QFontconfigDatabase::addApplicationFont adds the font to the FontConfig
application set from where it cannot be removed any more and is picked up every time the font database is
repopulated (e.g. after a call to QFontDatabase::removeApplicationFont).

This also fixes the QFontDatabase autotest which unfortunately does not fail on linux, because it tries
to add "FreeMono" (which in most cases is already there as a system font). So this patch removes FreeMono and adds
LED_REAL as test font.

Change-Id: I2fa5f4df0ad2099ac28673760ea25234c725dfc6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-28 19:32:40 +01:00
Friedemann Kleint
22ec4ed866 QPrintDialog manual test: Break endless loop for invalid DPI.
Change-Id: I8684f144e27392f834f91adef17826b77de60b93
Reviewed-by: John Layt <jlayt@kde.org>
2014-01-28 13:41:10 +01:00
Friedemann Kleint
68fa04590a Add translator's comments to accessible names of dock widget buttons.
Change-Id: If18126d5b349e072d7057d4e6968d6f91c910c87
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-28 13:41:03 +01:00
Friedemann Kleint
97bc287782 QWindowsCursor: Add API for determining the cursor state.
Detect the 'suppressed' state new in Windows 8.

Change-Id: I0faa994aa7b91869cedba36b777b1784818efcce
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-28 13:40:55 +01:00
Friedemann Kleint
245e630cfd Windows: Refactor QWindowsOleDropSource.
Introduce a struct CursorEntry for the cursor map which also contains
pixmap and hotspot required for follow-up changes. Streamline code
in createCursors(). Fix cacheKey checks in GiveFeedback() to trigger
for non-zero keys only.

Change-Id: Iafcbfd9ec9e8c6ae8bbaced21667887b10b47f23
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-28 13:40:50 +01:00
Friedemann Kleint
df96862ae3 qprintengine_win.cpp: Fix assert when printing with custom page sizes.
Task-number: QTBUG-36348

Change-Id: I57c8905e007ccd9cf558af03f19f2969009b32c2
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-01-28 13:40:34 +01:00
Friedemann Kleint
0841a5e367 tst_qcolumnview: Set layout direction on widgets instead of application.
Most of the test is executed in RTL mode since it is never restored.

Task-number: QTBUG-36395
Change-Id: I110966085a5a265f093fc4479eebc1f1bf0614c1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-01-28 08:27:53 +01:00
Tor Arne Vestbø
4c980d2e9b Explicitly use libstdc++ for non-C++11 static builds
Otherwise the compiler may choose libc++ based on the deployment target,
and we'll end up with broken builds due to the mismatch between the two
libraries, eg:

Undefined symbols for architecture x86_64:
  "std::ios_base::Init::Init()", referenced from:
      __GLOBAL__I_a in libQt5Qml.a(qv4object.o)
      ...
  "std::ios_base::Init::~Init()", referenced from:
      __GLOBAL__I_a in libQt5Qml.a(qv4object.o)
      ...
  "std::__throw_length_error(char const*)", referenced from:
      ...

This problem is not iOS specific, which is why the logic is moved
to the more generic mac/default_post.prf.

Change-Id: I28b94e614f9167fc0db84bbf1c88dd97d5629938
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-28 02:33:40 +01:00
Tor Arne Vestbø
a4e0f4f80a Ensure C++11 support matches between Qt and user projects for static builds
Change-Id: Id529fb7fc52d2da312bcf17612e47c74939a617f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-28 02:33:32 +01:00
Rick Stockton
9063edef79 If DblClick, do not deliver 'duplicated' MouseButtonPress
QWidgetWIndow: In Qt4, when Qt created a MouseButtonDblClick
event, Qt would consume the causing MouseButtonPress.
It would send only the derived dblclick event to widget
windows and their children.

This change makes Qt5.3 and higher emulate Qt4 delivery
of double click-related events to widget windows and
their children. QML objects (e.g. mousearea) continue to
receive the second MouseButtonPress.

[ChangeLog][QtGui][QWidget] MouseButtonDblClick: Do not send
the 2nd MouseButtonPress event to Widgets. Restore Qt4
behavior in sequence of mouse events delivered to
widget windows and their children.

Task-number: QTBUG-25831

Change-Id: Iff0f9c592bceacb2ca844d30f8180081e136a889
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-01-27 23:55:12 +01:00
Friedemann Kleint
b7de9e7353 Use a fake directory model instead of QDirModel in item view tests.
The tests then have a predictable, stable environment and do not depend
on file system operations.

Task-number: QTBUG-23697
Change-Id: Ibbd356f8bd7419ec4a3a88d2c0b5cd0830049790
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-27 15:40:17 +01:00
Bastiaan Veelo
9ac20dc44c tst_qmdisubwindow: WindowCloseButtonHint is a standard window flag, too
Implemented that way in src/widgets/widgets/qmdisubwindow.cpp:2081.

Change-Id: I82fdf0c04f1655a130c5e6a6f1e23d325d546ab3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-01-27 15:40:17 +01:00
Tor Arne Vestbø
ce761f45fe Fix nested template declarations for non-C++11 builds
Change-Id: Ie38aae09033a47106a4a1cf2e9997f90961a4e33
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-27 13:16:53 +01:00
Friedemann Kleint
dd921b59ab moc: Make error message 'too many input files' more verbose.
Make it easier to diagnose quoting errors in scripts.

Change-Id: I17894a426faa5cdf50f5ace4ed422ab2bd202558
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-01-27 13:01:48 +01:00
Louai Al-Khanji
bd9e1f3915 Improve direct2d backing store implementation
Add a per-window swap chain to a QPlatformWindow subclass instead of tying
it to the backing store. This is needed to support native widgets (as
opposed to alien widgets).

Change the backing store to draw to an intermediate pixmap and flush to
the requested window by using the per-window swap chain. This also opens
the door for faster window presentation later on by using the swap chain
more intelligently.

Also add a changelog entry for the direct2d plugin, which was omitted
earlier.

[ChangeLog][QtGui][Windows]
Introduce experimental direct2d platform plugin for Windows. This plugin
shares most code with the current windows plugin, but substitutes a
direct2d-based paint engine for window backing stores and pixmaps.

Change-Id: I5f54e7e4c1fb15b1639bd26b712fb40ac141e4ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-01-27 09:09:13 +01:00
Kai Koehne
7d782d4cf9 Fix QArrayData check
The support for QArrayData variadic arguments without C++11 for GCC
has been removed in commit 69478da0f0 . Change the autotest to reflect
that, too.

Change-Id: I40468f5d67cb2db553fd7a7d5b604f46403ac538
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-26 20:03:34 +01:00
Tor Arne Vestbø
690761a74d Enable adding/removing application fonts on iOS
As CTFontManagerCreateFontDescriptorsFromURL is not available on iOS < 7.0
we unfortunately need to fall back to the old behavior of only adding a
single font on older iOS versions.

Task-number: QTBUG-34490

Change-Id: I9c37a5cada067a4ebfaa9f04e7a30d41b8945990
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-01-25 03:04:56 +01:00
Tor Arne Vestbø
c76a6fe2c4 Teach CoreText font db to handle application font files with multiple fonts
The ATS code path already did this, by enumerating all the fonts in the
resolved collection. The CoreText code path assumed that registering a
font URL would only add a single font.

We now use CTFontManagerRegisterFontsForURL to enumerate all fonts
that were added. This functionality is not available for fonts based
on a data provider.

As part of implementing the patch the code was simplified to re-use
logic between the different ways of resolving font descriptors from
a file or byte array.

Change-Id: I6eb15df939d03dc588a87e46f39bd54e56b50643
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-01-25 03:04:49 +01:00
Tor Arne Vestbø
5173589b79 Use shared list of application fonts in CoreText font database
Instead of three separate lists depending on the font type. This
makes enables sharing more code between the different implementations.

Change-Id: If090d1b4a32f035b6344cbadd4c5ba66e0cb99f7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-25 03:04:42 +01:00
Tor Arne Vestbø
a4a174e1a2 iOS: Disable tests for all other modules than qtbase
Instead of sprinkling '!ios' all around the various modules. This is
a bit more fine grained than the CFG_NOBUILD_PARTS += "tests" that we
had in configure.

Change-Id: I6ca2e5df118dfc0bb5d7b8495a3543f51dc0fa30
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-25 03:04:38 +01:00
Tor Arne Vestbø
af8e2308c9 Fix OS X/iOS SDK macros to be usable in combined expressions
The macros need parentheses around them so that you can use them
as #if A && B without wrapping (A) and (B).

Change-Id: I8a004eb64e8cd3f4fc0370d772565c8d84eb9f7b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-01-25 03:04:29 +01:00
Tor Arne Vestbø
f550ced3aa Don't rely on makedepend on OS X
It's not shipped as part of the default installation, but the binary
in /usr/X11R6/bin/makedepend exists and will trigger a dialog that
asks you to install X11. This is not needed when we can use the
compiler to resolve the dependencies for us.

Change-Id: I67e35a63d0f7101b7673127228df4dcefd3c1fdc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-25 03:04:24 +01:00
Friedemann Kleint
cff2b83b10 Fix MSVC 64bit warnings about int64 truncation in tests.
Change-Id: Ic98090dbc7e320df652a60fc67a5291c60f7796a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-01-24 22:06:15 +01:00
Friedemann Kleint
1fb42377a2 Fix MSVC-warnings about double to float truncation.
Change-Id: I4aef12bd8fe37dffb06fc7d0b6a330bfc42fa270
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-01-24 20:26:39 +01:00
Friedemann Kleint
558ae43b1b Fix MSVC-warnings about stray */* in sources.
Change-Id: Ifa8de548dc8df79fa2b5d884383dc120661cb45a
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-01-24 18:50:05 +01:00
Laszlo Agocs
a9f59f981d Disable terminal keyboard on eglfs and linuxfb
Unify the behavior for eglfs, linuxfb and kms. The relevant code is
now moved from kms into fbconvenience.

From now on, on all three platforms, terminal keyboard input is turned
off by default. This feature can be disabled by setting
QT_QPA_ENABLE_TERMINAL_KEYBOARD to 1. This is similar to what the
evdev-based keyboard handler did in QWS in Qt4.

[ChangeLog][QtGui] The main Embedded Linux platform plugins (eglfs,
linuxfb, kms) are changed to behave identically with regards to
terminal keyboard input: it is turned off by default on all of these
platforms. If this feature is not desired, it can be disabled by
setting the environment variable QT_QPA_ENABLE_TERMINAL_KEYBOARD.

Task-number: QTBUG-36394

Change-Id: I69e47ed7580464dc5e703e9a0e23891c7c8b7790
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-01-24 15:31:51 +01:00
Laszlo Agocs
e02bda2105 eglfs: Fix physical screen size regression for some hooks
On boards that provide their own custom ways of querying the screen size
the resolution of widget apps became somewhat incorrect after the recent
eglfs/eglconvenience refactor. This is because the physical size query
helper was not able to access the screenSize() provided by the hooks,
it was instead falling back to the default fb query which in turn returned
the default screen size (e.g. 800x600).

Change-Id: I46d487b61341d69dd9cb76d93198b1f44b64f195
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-01-24 15:20:18 +01:00
Laszlo Agocs
0c01111a80 eglfs: Upload only damaged areas into the textures
Uploading the pixel data for the entire window on every update
is not nice. Not sure why the line in question was added, it is
most likely a leftover from some debugging session.

Change-Id: I161af536c42ac24b299fc674039f2318f0fb8c4f
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-01-24 15:20:14 +01:00
Laszlo Agocs
8c3e0953a4 eglfs: Remove unused variable on raspi
Change-Id: I34749533e4279d151c8954f29a4fc7635e007b19
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-01-24 11:33:00 +01:00
Laszlo Agocs
84756d94c7 eglfs: Fix quad coordinates
Prevent artifacts on raster windows by properly mapping
the coordinates to [-1,1].

Task-number: QTBUG-36370
Change-Id: I95d0d03952f597ef4ce6a950c6533a3af2df964a
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-01-24 11:32:56 +01:00
Konstantin Ritt
717d39ac08 Defer HarfBuzz face loading up until it gets used
This didn't work for a loooong time already;
not it is possible to re-introduce this optimization once again.

Change-Id: I35c40e68933227bda6cbc038c2d8f6709db62451
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-01-24 11:32:41 +01:00
Friedemann Kleint
b87106811e Windows: Reconstruct MSG-structure properly.
The MSG structure is supposed to contain screen coordinates of the mouse
position. Use GET_X/Y_LPARAM for mouse events and transform for
client coordinates. Use GetCursorPos() for other events.

Task-number: QTBUG-36337

Change-Id: I3ad4de20e1a460ee58f22645a4339a2444d129ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-01-24 11:31:19 +01:00
Friedemann Kleint
0d95f7c0be Fix crash of tst_qaccessibilitylinux when DBus is not available.
Change-Id: I32291e4c6a5b228b42a7ec15f1dbfe4302bd31fa
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-01-24 11:30:58 +01:00
Friedemann Kleint
13cbcff097 Windows: Remove unused function QWindowsBackingStore::rasterWindow().
It was only used to access the QWindow which can be retrieved
using QPlatformBackingStore::window(), potentially causing a crash
when  QWindowsBackingStore::resize() was called before the window
is shown.

Change-Id: I7c1bfce0f2c371d5d8847fd15fd1dc760b769a8f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-01-24 11:11:18 +01:00