Commit Graph

18949 Commits

Author SHA1 Message Date
Martin Gräßlin
075c36e39b Do not overwrite existing event mask of root window
QXcbScreen installs its own event mask on the screen's root window.
This overwrites any existing event mask already set and by that
breaks applications when a new screen is added.

By first fetching the existing event mask and adding it to the newly
installed event mask, Qt does no longer break applications also
installing an event mask on the root window.

Task-number: QTBUG-39648
Change-Id: I8686dd6ae49d0e807c6fe1ea4a231ff728bfcf25
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-06-20 11:25:24 +02:00
Andy Shaw
47b3ecf3f4 Remove the widget from the stylesheet cache before polishing
If the widget exists in the style rules cache before it polishes for the
first time then it should be removed from styleSheetCache too so that the
latest set stylesheet is used for the polishing.

Task-number: QTBUG-39427
Change-Id: Ic1e7988afe530f16ea9996bae56543ed554d6be9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-20 07:10:21 +02:00
Fatih Aşıcı
6bec36dd38 QDnsLookup: Fix build with uClibc
uClibc doesn't have a nsmap member in __res_state. Since it also doesn't have
res_nquery() which is mandatory for QDnsLookup, we can simply disable the code
to fix the build.

Change-Id: Ia872f535519aca3a2de763548c6dd0e3e0ee20d4
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Mandeep Sandhu <mandeepsandhu.chd@gmail.com>
2014-06-20 03:05:54 +02:00
Jędrzej Nowacki
7e62b10cc1 Remove unused define XCB_USE_IBUS.
Change-Id: Ife95a822ed24b29e9bff0612cd0dc265192c49d8
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-06-19 17:25:22 +02:00
Jędrzej Nowacki
1a034ac218 Attempt to fix intel compiler build error.
qtbase/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h(625): error #68: integer conversion resulted in a change of sign

Task-number: QTBUG-39678
Change-Id: Ifb175bdcad820aa58cc0a1bcf6985a164376baf5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-19 17:25:12 +02:00
Friedemann Kleint
3fd184b663 Use QModelIndex to get the data from underlying model
Change-Id: Ibeb70079afd566c78289168540296b926f36d1af
Initial-patch-by: Irfan Omair <irfan.omair@gmail.com>
Task-number: QTBUG-27597
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-19 17:23:30 +02:00
Friedemann Kleint
5af8a46bc1 QGuiApplication: Document -plugin command line argument.
Task-number: QTBUG-38972
Change-Id: Ie4dd6d70e60822a5a3626b10cd90d081897d646d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-19 17:23:24 +02:00
Friedemann Kleint
feda990ae8 QEventDispatcherWin32: Use a shared class name for the message window.
Introduce a global-static struct storing atom and class name for
the message window to be shared between threads. This prevents
RegisterWindow()/UnregisterWindow() of different threads (using exec())
from interfering and silently failing.

Task-number: QTBUG-39471
Change-Id: I9bc1106a41f64749c55825a96973921bb831458f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-06-19 17:23:16 +02:00
Friedemann Kleint
54a2206bba Windows: Mark only mouse events synthesized by touch as such.
Pass on mouse events from pen.

Task-number: QTBUG-39353
Change-Id: I96c4e023ddb1c853d5228d00aa9604941556abb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-06-19 17:22:52 +02:00
Thiago Macieira
d88b976858 Fix compilation in under -no-c++11 mode
IndexSetter can't be passed to QObject::connect() since C++98 templates
require global types (they can't be function-local).

Change-Id: I099322f835661d4679140b7810b50dbeb0e4b9e0
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-19 17:14:05 +02:00
Thiago Macieira
2de8ef2e49 Fix compilation with the Intel compiler on certain systems
We require the intrinsics from immintrin.h, so include it
unconditioanlly with that compiler.

Change-Id: I4a17676631f9d89e2d22e486f40c9b177ca06c1e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-19 17:08:29 +02:00
Bjoern Breitmeyer
863a8bfab5 Fixes QFontDataBase addApplicationFont on WEC.
AddFontResourceExW was not implemented yet.

Change-Id: Iffa3e49bdbb0176c10324ede6161fcf8b2a63902
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-19 17:02:34 +02:00
Jani Heikkinen
540ac8fd98 Add changelog for Qt 5.3.1
Replaces https://codereview.qt-project.org/#/c/87562/
Change-Id: Id89c8b67ec47cb1d078c5325aa519daeee3cafa9
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-06-18 13:39:48 +02:00
Konstantin Ritt
302ffa5820 Fix crash when reusing HB_Face in another font engine
After 717d39ac08, if HB_Face was instantiated by QFontEngineFT A
and then used by QFontEngineFT B, whilst A already destroyed,
a crash occurs in hb_getSFntTable() due to accessing a stale pointer.

Task-number: QTBUG-39278
Change-Id: I3428669a311f49cdda1725b778f45219cbcf470d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-06-18 13:39:42 +02:00
Gabriel de Dietrich
abcea1c5f0 harfbuzz-ng: Pre-allocate enough space for CoreText buffer
This fixes an assert in OS X 10.10 Yosemite, where the pre-
allocated buffer would be too small to hold 3 successive calls
to ALLOCATE_ARRAY.

Task-number: QTBUG-39504
Change-Id: I5a0ae36170636eb97ab21c5903b96674e2a99547
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-06-18 13:39:37 +02:00
Laszlo Agocs
10ff9d5b6f Handle invalid sample counts gracefully in FBOs
Passing in a sample count of -1 should be treated as 0. This is common
when setting up framebuffer formats from a QSurfaceFormat where the
default, unset value is indicated by a value of -1.

This broke QQuickWidget which was unaware of this limitation of
QOpenGLFramebufferObject and was passing format.samples() as the sample
count without making sure it is 0 or higher.

Task-number: QTBUG-39699
Change-Id: I324b8b006eaa992c15ae932f9df305500fefeb65
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-18 13:39:32 +02:00
Oswald Buddenhagen
000d98d826 Bump version
Change-Id: I867c3b4aecc82095e65bd7f820e7fe6d14005705
2014-06-18 00:27:55 +02:00
Sergio Ahumada
cf7805d364 Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into refs/staging/5.3 2014-06-17 19:09:21 +02:00
Kai Koehne
bdd60463da Fix animations in static builds
Make sure qRegisterGuiGetInterpolator is called even for static builds.

Task-number: QTBUG-37341
Change-Id: I65735a558d5bbfaa02fa4ec47d55ddf33ca1991a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-17 15:59:29 +02:00
Sergio Ahumada
753be5af04 Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: Ibf1b8a03c5153895ec03af5844c0b6addc4a0aa0
2014-06-17 13:34:43 +02:00
Martin Pley
c92ece4518 QRasterPlatformPixmap::createPixmapForImage(): Avoid crash when QImage conversion failes
Added some checks to QRasterPlatformPixmap::createPixmapForImage() to avoid
crashes when QImage::convertToFormat() returns a null image.

Change-Id: I573505a1aff7931d9a2fb452d0a83ae93d8de7db
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-06-16 14:29:13 +02:00
Shawn Rutledge
4038f21dd0 xcb: touch device mode is either Dependent or Direct, not Rel or Abs
Change-Id: Ic0091007c95c4c307485bc2d5d3e1e967b44323e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-16 14:13:24 +02:00
Lucile Quirion
59d6871ae3 directfb: fix QThread destroyed while running
Commit cf092abdfc introduces a virtual
"void initialize()" in QPlatformIntegration class.

"void initialize()" was already implemented in QDirectFbIntegration
since commit 6534898cc6 allowing
initialization steps to be overridden by QDirectFbIntegrationEGL.

Therefore the QScopePointer "m_input" handling a QThread is reset twice.
The QThread firstly created is forcibly terminated. The application
displays the error message "QThread: Destroyed while thread is still
running" and sometimes crash with a SIGSEGV.

This commit rename QDirectFbIntegration::initialize() into
QDirectFbIntegration::connectToDirectFb() to fix this issue.

Task-number: QTBUG-38710
Change-Id: I3ca07c373af7c47abf08da2b45bbcf7a6cf573ad
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-16 13:25:53 +02:00
Oswald Buddenhagen
ad9ca60522 install .lib files for static libs again
the no_dll switch has questionable semantics: it pro-actively breaks
non-dll builds. therefore its usage needs to be limited to dll build.

Task-number: QTBUG-39594
Change-Id: I98328e502693df835af565b5ec25ada2c1c168ad
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-06-16 12:42:25 +02:00
Martin Gräßlin
a461bb1ff5 Flush xcb connection before EventDispatcher is going to block
The non-threaded QXcbEventReader invokes processXcbEvents when the
EventDispatcher is about to block. This method ensures that the xcb
connection is going to flush. Applications can use low level xcb code
in that case without having to ensure to flush the connection before
going to block again.

With the threaded QXcbEventReader this didn't work and applications
which for example changed a window property and waited for the matching
property notify event were stalled.

This change ensures that also in the threaded case the connection gets
flushed when the EventDispatcher is going to block.

Change-Id: If1dc5eb96e2f1bde10b7a40af550b0608c62f70c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-06-16 09:31:46 +02:00
Thiago Macieira
acd0dae3f4 Fix data race in accessing QDBusConnectionPrivate::serviceNames
The trick of creating a copy is not thread-safe. I'd known this since
the moment I wrote that code, but thought "what could go wrong?".

Task-number: QTBUG-39285
Change-Id: If521d4a649c06e6a34926687e85623aa25cb4c35
Reviewed-by: David Faure <david.faure@kdab.com>
2014-06-15 23:04:28 +02:00
BogDan Vatra
66bd87e5c6 Android: REG: Fix crash.
Test if the window has a handle before using it.

Change-Id: I728a129722f8ecd021998d483530a8d1687e5fe3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-06-15 05:54:11 +02:00
Sergio Ahumada
5721c0811a Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: Icd073d40ce10ab4733b997036815795dd3fbaac1
2014-06-14 18:11:52 +02:00
Jan Arve Saether
16b90bb683 QFontComboBox sometimes became too wide because of wrong fixed size
The fixed width should not be set on QFontComboBox itself, but on the
popup.

This regressed with commit bfb25c0352,
and caused assistants preferences dialog to become wider than the
desktop.

Change-Id: I2059794fc12d34837cdb7dfded80df57d102a6f0
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-06-14 11:59:16 +02:00
Eskil Abrahamsen Blomfeldt
fb3f47b638 Android: Report something sensible for screen geometry
We can't get the actual screen geometry on Android, but in Qt 5.3.0
we would always return the screen geometry minus the size of the
status bar. After the available geometry was initialized to 0x0
instead of this arbitrary value, some applications that depended
on this as a constant value would break if they collected the
information before the window surface had been initialized and they
forgot to listen to QScreen::geometryChanged().

To reduce the risk of regressions, this patch makes sure we return
the same thing as before for the screen geometry and that this is
not linked directly to the available screen geometry.

Task-number: QTBUG-39464
Change-Id: Ie63337b3b10d2eb5130e4fece6c5b144e8230164
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-13 21:54:02 +02:00
Friedemann Kleint
9c80a3be4b Revert "Suppress move/resize events if they are the result of call to move()/resize()."
This reverts commit a1c5198387.

The idea of detecting non-spontaneous events by comparing
against the widget's crect has problems when sequences
of programmatic resizes occur. In  addition, QWindowSystemInterface's
queueing of events is problematic for this.

Task-number: QTBUG-39611
Task-number: QTBUG-32590
Change-Id: I4674d8d5d5d432d938f7226b5790543335665c1f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-13 13:32:45 +02:00
Friedemann Kleint
5da108a4a7 Revert "Revert "Fixed duplicate QMoveEvent generated for each QWidget::move call""
This reverts commit c3e416296a.

The idea of detecting non-spontaneous events by comparing
against the widget's crect has problems when sequences
of programmatic resizes occur. In  addition, QWindowSystemInterface's
queueing of events is problematic for this.

Task-number: QTBUG-39611
Task-number: QTBUG-32590
Change-Id: I9ff8049add147be23e064a513e8645ae04577c6c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-13 13:31:59 +02:00
Thiago Macieira
3ccfc351fd QProcess: Handle spurious socket notifications for stdout and stderr
On Unix systems where the GUI event dispatcher uses a notification
system for socket notifiers that is out of band compared to select(),
it's possible for the QSocketNotifier to activate after the pipe has
been read from. When that happened, the ioctl(2) call with FIONREAD
might return 0 bytes available, which we interpreted to mean EOF.

Instead of doing that, always try to read at least one byte and examine
the returned byte count from read(2). If it returns 0, that's a real
EOF; if it returns -1 EWOULDBLOCK, we simply ignore the situation.

That's the case on OS X: the Cocoa event dispatcher uses CFSocket to get
notifications and those use kevent (and, apparently, an auxiliary
thread) instead of an in-thread select() or poll(). That means the event
loop would activate the QSocketNotifier even though there is nothing to
be read.

Task-number: QTBUG-39488
Change-Id: I1a58b5b1db7a47034fb36a78a005ebff96290efb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-12 17:54:11 +02:00
Thiago Macieira
6ca3ab626a Don't try to read from invalid file descriptors in QProcess
strace reveals that we do ioctl(-1, FIONREAD) and get EBADF. The only
case where this could happen is inside _q_processDied, which calls the
read functions without checking if the pipe is still open.

Change-Id: I67637fc4267be73fc03d40c444fdfea89e1ef715
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-12 17:54:11 +02:00
Thiago Macieira
25ef58fe18 QProcessPrivate: merge the functions dealing with stdout and stderr
Simplifies the code.

Change-Id: I4b3a6e725eb245d3531d1d11d959fb3b85862778
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-12 17:54:11 +02:00
Thiago Macieira
0f6b3a01e4 Rename QProcessPrivate::destroyChannel to closeChannel
The QProcessPrivate::Channel object contains some structures that may
survive the closing of the pipe, so calling this function "destroy" is
incorrect. Let it be just the closing.

For symmetry, the createChannel() function is renamed to openChannel().

Change-Id: I2899214c6e4c25835390b10ccf3931315a91589e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-12 17:54:11 +02:00
Thiago Macieira
15a0a6e8c5 Move the QProcessPrivate Windows objects into QProcessPrivate::Channel
Similar to the previous commit, this simplifies the code.

Change-Id: Ia02b9b5174b4bc6fd04ec2534231b7db5fc914fa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-12 17:54:11 +02:00
Thiago Macieira
29f92d112a Move the QProcessPrivate channel buffers into QProcessPrivate::Channel
Simplifies the code.

Change-Id: I70b26af69332f364d856042f114c37a70504d66f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-12 17:54:11 +02:00
Allan Sandfeld Jensen
da5dea807f Support hotplugging of input devices with XInput2
Since we only scan for XInput2 devices on application start, we will
currently miss any devices plugged in while the application is running.

This patch makes QXcbConnection listen for XInput2 hierachyChanged
events and use them to trigger a rescan of XInput2 devices.

This fixes a regression in Qt 5.3, where the scroll wheel on hot-
plugged mice does not work until the Qt application is restarted.

Change-Id: I2cdc7ca24d3ab00716cedc4b22355b6e4935b184
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-06-12 14:35:23 +02:00
Friedemann Kleint
3f39c0f76c Polish the image viewer example.
- Open files passed on the command line.
- Point the file dialog to the pictures location
  and use a filter string for the supported types.
- Set the window title according to file name.

Task-number: QTBUG-37203
Task-number: QTBUG-39287
Change-Id: I4e5e43875c3a7544c862c054181e75942939c1d5
Reviewed-by: David Faure <david.faure@kdab.com>
2014-06-12 14:23:48 +02:00
Zhang Xingtao
02b7b21f9b Doc: correct the format of Q_PLUGIN_METADATA macro in sample codes
Change-Id: I464a0c0a590b0b90cf0fe7ccd448ee9bf704bd4f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-12 14:11:19 +02:00
Lars Knoll
81ba16cad9 Fix case insensitive comparisons using QCollator
In ICU the strength parameter decides whether a comparison is
case sensitive or not.

Fix mac comparison code. It can't have worked before.

Added some basic automated testing for QCollator.

Change-Id: I2646c464fd22ccd3a93c461fa3dba4bd1d4c7b4b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-06-12 10:26:07 +02:00
Sergio Ahumada
490e79e39e Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into refs/staging/5.3 2014-06-11 23:06:01 +02:00
David Faure
a6d7e09e89 QWidget: fix documentation for isEnabledTo(0)
It is NOT always the same as isEnabled().
Added a unittest to prove it.

Change-Id: I7717126835923e8c091249bfcdf81767c44fb5f7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-06-11 23:06:01 +02:00
David Faure
11aaff3a57 Add missing detach() in QPixmap::convertFromImage()
Task-number: QTBUG-18519
Change-Id: I5d929cf6eda3f34130314edac95487fb00a95db5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-11 23:06:01 +02:00
Sergio Ahumada
7ffbfed7c7 Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I147a75ac74bd7b19dbeb99e1ec2836cc5bfc2806
2014-06-11 16:44:33 +02:00
Sérgio Martins
dbe6db192a Windows: Fix maximizing frameless windows on secondary screens.
They would either disappear or be positioned at bogus coordinates.

The MINMAXINFO structure works with coords from the primary screen
then uses an "interesting" algorithm to adjust to secondary screen:

Say you have a primary screen with width=1000 and secondary screen
with width=2000, here's what you get when you set ptMaxSize to:

ptMaxSize.x   | Size window gets in second screen
--------------------------------------------------
    500       |                500
    1000      |               2000
    1001      |               2001
    1100      |               2100

So basically you can't get any value between 1000 and 1999

How many people use the taskbar on a second display and maximimize
a frameless window anyway ?

Task-number: QTBUG-39537
Change-Id: Ic9b3120e7fb5a9a5d97828a2e44be02ae587b92e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-11 16:42:43 +02:00
Coursar
f65333b027 Fix Android: use fbo read back workaround with specific GPUs.
Namely, the Adreno 205. We used to enable this
workaround for Huawei Honor (Adreno 205).

Task-number: QTBUG-33951
Change-Id: Ic92a6913664f2f0954271c700d9ef83d27c238a7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-11 16:42:43 +02:00
Gatis Paeglis
d06c6d8a51 Compose key plugin: expand "%L" to full path.
According to [1] "%L" should expand to a full path for the
default (based on system's locale) Compose file.

[1] http://www.x.org/archive/current/doc/man/man5/Compose.5.xhtml

Task-number: QTBUG-35943
Change-Id: Ie803a89742d9c0aa3b2d759bea28ed403dc68c9c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-06-11 15:01:06 +02:00
Sergio Ahumada
4b43a5d528 Merge "Merge tag 'v5.3.0' into HEAD" into refs/staging/stable 2014-06-11 12:10:04 +02:00