Commit Graph

23076 Commits

Author SHA1 Message Date
Caroline Chao
3ed6f74fb2 Tests: Blacklist tests for ubuntu 14.04
Instead of making insignificant the all platform for
QtBase 5.5 integration.

Change-Id: Ief3f29c094bdbc90e684f19c1077ee595fb7d581
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-04-01 13:59:04 +00:00
Friedemann Kleint
85f9478227 Fix debug stream operators.
- Use QDebugStateSaver to restore space setting in stream operators
  instead of returning dbg.space() which breaks formatting on streams
  that already have nospace() set.
- Fix some single character string constants.

Change-Id: I0fe86bb1adbdd4a76ab6d2f8c19e063b45ddcf3b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-04-01 13:49:32 +00:00
Allan Sandfeld Jensen
8299e408df Fix clang release with debuginfo builds
The variables used for release with debuginfo was set in g++-base.conf
which is not included by clang builds.

Change-Id: Iec3b23c371c113ff934d2c7f5134ef78b1cf939e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-01 13:07:13 +00:00
Morten Johan Sørvig
57c399c3e6 Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Friedemann Kleint
2012c8e866 Improve debug operator for QGraphicsItem/QGraphicsObject.
Introduce QDebugStateSaver, use new formatting helpers and
output parent, flags and z only when necessary. Output the
widget contained in QGraphicsProxyWidget.

For example,

QGraphicsProxyWidget (this = 0x1877550 , parent = 0x0 , pos = QPointF(870,491) , z = 1e+30 , flags =  ( ItemIsFocusable | ItemUsesExtendedStyleOpton | ItemSendsGeometryChanges | ItemIsPanel ) )

becomes:

QGraphicsProxyWidget(0x1877550, widget=ItemDialog(0x1e29dc0), pos=870,491, z=1e+30, flags=(ItemIsFocusable|ItemUsesExtendedStyleOption|ItemSendsGeometryChanges|ItemIsPanel))

Change-Id: Ia554dc3e2eb6f16d9d9220d1067194a4424b7cf5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-04-01 11:58:20 +00:00
Kai Koehne
cbf28577ef Force length of prefix path to be calculated at runtime
Prevent compilers from calculating strlen at compile time
by using a volatile pointer. This corrupted paths if the
installation path is patched for the binary SDK installer.

Task-number: QTBUG-45307
Change-Id: I624b0409e8b27299475a88eb1cbf03ffef9589c6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-01 11:32:28 +00:00
Allan Sandfeld Jensen
b716216fc0 Fix a few clang warning
Clang likes to complain when override is not used consistently.

Change-Id: I0fad18a7c3eb068aa1b6786243969aef53d1f42c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-01 11:29:09 +00:00
Liang Qi
26a9783d55 Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5 2015-04-01 11:27:03 +00:00
Friedemann Kleint
f53621af05 Update documentation snippets related to QDebug.
Use QDebugStateSaver to store the formatting state and fix the return
statement to return the unmodified stream.

Change-Id: I476d13c5487a89f263dcc11334fc67c85d9433f5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-04-01 04:28:08 +00:00
Friedemann Kleint
7c2360b762 Split out some inline qdebug formatting helpers to qdebug_p.h.
Extract helpers to be able to format classes without type names
and use those for formatting QEvents to reduce clutter.

For example:

QWidgetWindow/"MainWindowClassWindow" QMouseEvent(QEvent::Type(MouseMove), buttons=QFlags<Qt::MouseButtons>(LeftButton), localPos=QPointF(50,116), screenPos=QPointF(948,652))
QWidget/"qt_scrollarea_viewport" QMouseEvent(QEvent::Type(MouseMove), buttons=QFlags<Qt::MouseButtons>(LeftButton), localPos=QPointF(45,32), screenPos=QPointF(948,652))

becomes

QWidgetWindow/"MainWindowClassWindow" QMouseEvent(MouseMove, LeftButton, localPos=50,116, screenPos=948,652)
QWidget/"qt_scrollarea_viewport" QMouseEvent(MouseMove, LeftButton, localPos=45,32, screenPos=948,652)

Change-Id: Ie5441d922962a05caed6b7079a74ea8a2b8a64fb
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-04-01 04:26:50 +00:00
Liang Qi
ce9519593a Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
	mkspecs/android-g++/qmake.conf
	qmake/generators/unix/unixmake2.cpp
	src/gui/image/qimage_conversions.cpp

Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
2015-03-31 10:03:31 +02:00
Martin Smith
17294c5e4d doc: Correct error in QProxyStyle() doc.
Constructing the QProxyStle object with a null QStyle
pointer causes the QProxyStyle to use the default native
style.

Change-Id: If624ed7a805aef839ca8a51242d12b2f6d777e83
Task-number: QTBUG-42231
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-03-31 07:13:26 +00:00
Thiago Macieira
00f5d26499 Make Creator happy with qobjectdefs_impl.h parsing
This is just so the Q_COMPILER_xxx macros get defined properly.

Change-Id: Iee8cbc07c4434ce9b560ffff13d066aa0a8671cc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-31 07:05:47 +00:00
Thiago Macieira
26edd5a3b1 Use QStringLiteral where applicable in QtDBus
Move to qdbusutil_p.h the string constants that are used often and in
multiple places; use QStringLiteral in qdbusintegrator.cpp for the
strings that are used often.

Change-Id: I8e1325b9ba015bda91bf01c42175d8032ea32f62
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-03-31 06:50:42 +00:00
Kai Koehne
635f95846e Windows: Fix QT_NO_OPENGL build
Change-Id: Ieb99dce5389c37fb28a28691c75bf879740398e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-31 06:27:23 +00:00
Shawn Rutledge
641b8d2b84 xcb: set WM_NAME window property
Some older window managers and utilities still ignore _NET_WM_NAME.

Task-number: QTBUG-42209
Change-Id: Iff93c8188a0a73b04cdf361add153cd818ac670f
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-31 06:15:09 +00:00
Shawn Rutledge
be242ed094 D-Bus system tray: emit activated on middle and right click
The ActivationReason provides the type of click.  If the icon has a
D-Bus menu, then QStatusNotifierItemAdaptor::ContextMenu will not be
called: the tray is responsible for opening the context menu.  But
an application can alternatively do something different with a
right-click by not providing a menu, and instead handling the
QSystemTrayIcon::activated signal with the Context reason.
Simplified the code by emitting the signal directly in
QStatusNotifierItemAdaptor.

Task-number: QTBUG-44929
Change-Id: Ia062a9a2fd99554418d58a1ff6ecd4e862035198
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-31 06:14:53 +00:00
Shawn Rutledge
0e55d8dfad D-Bus system tray: emit QPlatformSystemTrayIcon::activated on click
This was incomplete functionality in
38abd65377

Task-number: QTBUG-44929
Change-Id: I7120a3de011c5df57ef5a9fbdfe056eee42d572b
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-31 06:14:28 +00:00
Thiago Macieira
9212244294 Fix running of dbus-send on some systems
It was printing the following error:

arguments to dbus_validate_bus_name() were incorrect, assertion "name !=
NULL" failed in file dbus-syntax.c line 248.
This is normally a bug in some application using the D-Bus library.

Change-Id: Iee8cbc07c4434ce9b560ffff13d0586189ba3a79
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-31 05:55:55 +00:00
Shawn Rutledge
509f77cca2 D-Bus tray icon menus: support submenus
In this case GetLayout will be called with the D-Bus menu ID of the
menu item which contains the submenu.

Task-number: QTBUG-45191
Change-Id: Ia8108272910eac10f040db5865ec4e070da80edb
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-30 22:01:16 +00:00
Thiago Macieira
ffc74e6d70 Use Q_NULLPTR for the null pointers used in macros
User code should build with -Werror=zero-as-null-pointer-constant

Task-number: QTBUG-45291
Change-Id: Iee8cbc07c4434ce9b560ffff13d0031979b4c2fe
Reviewed-by: Matthew Woehlke <mw_triad@users.sourceforge.net>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-30 21:22:20 +00:00
Alexander Volkov
7baaec17ed Fix use of the window geometry specification
Until now we applied the geometry in QWidget::setVisible() by
calling QWidget::move() and QWidget::resize(). But these
methods are unreliable when the window is created but not
visible yet. For example, specifying the window position by
"-geometry +0+0" will take no effect.

Apply the geometry directly to QWindow in QWindow::setVisible().
QWidget will update its geometry after the response of the window
system. Besides it allows to specify the geometry for QML
applications.

Task-number: QTBUG-44713
Change-Id: I9a0e110e81e569c81da802729707fec104fef887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-27 08:00:01 +00:00
Alexander Volkov
c0e4f24336 xcb: Determine the window gravity just before the window is shown
It may change after the window has been created.

Change-Id: Ib81a7ad7353b1909cc42684fc70d6b7d2556106f
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-27 07:59:38 +00:00
Martin Gräßlin
9f1f8aaa92 Handle SelectionWindowDestroy in QXcbClipboard
This change is related to 6a7ee92b39
which added handling for SelectionClientClose. Further testing showed
that with e.g. Qt 4 applications the SelectionClientClose is not
emitted, but the selection window seems to be destroyed before the
client is destroyed.

Fur a destroyed selection window the same applies: the clipboard
content is no longer valid and we should emit the changed signal.

Change-Id: Id3778a28b9f5601bf2c6e0106981316e0efa6e7c
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2015-03-26 15:22:44 +00:00
Sérgio Martins
f451d48005 Windows: Add support for horizontal scroll on some touchpads.
While most (all?) touchpads send WM_MOUSEWHEEL for vertical scroll
the story is quite different for horizontal scroll. Some of them
send WM_HSCROLL instead of WM_MOUSEHWHEEL.

Some of them even send left/right key event but those are lost cases.

Task-number: QTBUG-45120
Change-Id: I3bf86e25a6f4f3ba03ac7e89a23f4b7bc432f2de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-26 14:57:45 +00:00
Shawn Rutledge
eea5a6ea15 Android MessageDialog: order buttons according to OS X button layout
At least the dismissive action should be on the left, but we can take
the OS X rules as reasonable in cases where a lot of buttons are in use.

Task-number: QTBUG-42808
Change-Id: If45f991a068d47009e02d39fbb3886ff4b31c8e1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-03-26 14:49:31 +00:00
Venugopal Shivashankar
06ecfb6fde Doc: Added the missing description for WindowShadeButtonHint
Task-number: QTBUG-44017
Change-Id: I024faa6214a041403f23fd91f0c8c38eabeef31e
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-03-25 12:15:40 +00:00
Friedemann Kleint
619a0f14dc Re-add documentation for QStandardPaths::GenericDataLocation.
The text was accidentally removed in
1afe110b8f.

Fixes qdoc warning:
qtbase/src/corelib/io/qstandardpaths.cpp:60: warning: Undocumented enum item GenericDataLocation in QStandardPaths::StandardLocation

Change-Id: I7f236c01d85ebf76b67ab7af7e61b8cbedee4c36
Reviewed-by: David Faure <david.faure@kdab.com>
2015-03-25 09:26:31 +00:00
Morten Johan Sørvig
0b440e1498 Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Laszlo Agocs
2266f51922 Fix incorrect FBO bindings with QOpenGLWidget
QOpenGLContext::defaultFramebufferObject() knows nothing about QOpenGLWidget
and QQuickWidget. The problem is that this function (and others that rely on it)
is expected to give the widget's backing FBO in paintGL() and friends.

To overcome this, we have to provide a way for such widgets that indicate what is
the expected "default fbo".

Task-number: QTBUG-43269
Change-Id: I43f439f8609382b9f7004707ab0ef9f091952b4f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-30 20:48:07 +00:00
Maks Naumov
2c1d597b65 Fix invalid characters count in QBig5hkscsCodec::convertFromUnicode()
Change-Id: I3b06361f93e7ab6a3336b2c432e0a163a34ccb43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-03-30 18:03:32 +00:00
Gabriel de Dietrich
ea47d152b3 QTabBar: Disable wheel events on Mac
Many people complain about this unexpected behavior. We
may consider introducing a style hint later for those
few people that may want it.

Change-Id: Ifab663b4b5c3a78a3544ab4408cf34f672df8c05
Task-number: QTBUG-8428
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-03-30 17:53:11 +00:00
Gabriel de Dietrich
08cc9b9991 QCocoaMenu: Queue 'activated' signal emission
Allows catching exceptions without quitting the application.
The behavior change should be unnoticeable since we can't
activate the menu item from within the Qt application.

Tested that the keyboard modifiers are still set when we get
to the action signal handler.

Change-Id: I43d0c377834450344bd3a3678e07b6631ba0b768
Task-number: QTBUG-15197
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-03-30 17:52:56 +00:00
Tor Arne Vestbø
dce3561aa9 testlib: Don't limit linking to XCTest to Xcode projects
Applications built using the regular makefile generator also need to
link to XCTest, as the library is referenced from qxctestlogger.mm

Change-Id: Iedbb5c6a2811fd904d75abc20f4e39440e44e748
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-03-30 13:26:58 +00:00
Christian Strømme
6b19eec631 Android: Only take ownership of threads we explicitly attach to.
Previously we would take ownership of all threads when attempting to
attach it to the VM, regardless if it was already attached or not, to
avoid expensive re-attachments in our own code. The downside of this
approach is that we might hijack threads the user wants to control
themselves, and the later detach the thread while it still in use, e.g.,
after the QApplication instance is destroyed.

This change does not add any infrastructure to enable more advanced
management of attached threads, so threads might still be hijacked if
the user make a call directly or indirectly through the QJNI API's on
a thread that's not attached.

Task-number: QTBUG-45110
Change-Id: I30f7faa2d8c2c35151e2ac8875ebf839bcd6c7c6
Reviewed-by: Sergey Galin <s.galin@2gis.ru>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-30 13:12:51 +00:00
Friedemann Kleint
a68b03d6a9 Fix qdoc warning in qopengltexture.cpp.
qtbase/src/gui/opengl/qopengltexture.cpp:3652: warning: Cannot find 'ComparisonFunction' specified with '\enum' in any header file

Change-Id: I92e808310f2d775cda30c1f1b6aaf0ed739b02f1
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-30 13:06:35 +00:00
Friedemann Kleint
bde0e2d009 Remove compression of posted input method events.
Input method events contain attributes, etc. and cannot
be compressed.

Change-Id: Ib9a2a80f1efec53f9d843684f8227e1f2e245853
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-03-30 13:06:29 +00:00
Friedemann Kleint
61101bd958 Windows: Remove duplicated color masks in qt_write/write_dibv5.
They are apparently a relic of some old bitmap header that
did not contain them (superseded by BITMAPV5HEADER).

Task-number: QTBUG-45265
Change-Id: I993dda7d409f7963c9fabd42b0fac5f5586c6248
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-03-30 13:06:23 +00:00
Friedemann Kleint
3203ac3f4e Use QDebugStateSaver to restore space setting in stream operators.
Returning dbg.space() breaks formatting on streams that already
have nospace() set.

Change-Id: I55e38b018679a67eb40be6b4664505483a3a7d8e
Reviewed-by: David Faure <david.faure@kdab.com>
2015-03-30 12:59:58 +00:00
Jørgen Lind
c7b003ea3b Use Xlib to resolve font cursor if possible
before fallingback to uploading a bitmap cursor

Task-number: QTBUG-30016
Change-Id: I53eeda6bb5f6cab66e3bc10a2e5382ce55cc1bab
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-30 12:55:56 +00:00
Andy Shaw
21d7ec80f0 Windows: Send the input method event when the focus object is valid
Change-Id: I072d4b0bc754f73507c2de96d7e155f13a993594
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-30 12:33:59 +00:00
Laszlo Agocs
6fe60cd9f2 xcb: Fix bgr888 VNC sessions
Introduce a slow path for 24 and 32 bit BGR. We don't care about
performance here but it has to show the correct colors.

Task-number: QTBUG-42776
Change-Id: Ic73e8ca3950b2b956f06643165dcfac51e7540f3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-30 08:41:49 +00:00
Caroline Chao
1a542f2544 testlib: Detect distribution name/release for blacklisting tests
Add possibility to blacklist distributions using the syntax:
"<productType>" and "<productType>-<productVersion>".

productType and productVersion are the values returned by
QSysInfo::productType() and QSysInfo::productVersion() (in lower case).

Change-Id: Iefd948127dd2133c2f2ab7aeb5b0c9749c3df6c5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-30 08:41:49 +00:00
Andrew Knight
d1ee1c52d1 Fix "'QCss::Property' is not a class or namespace"
As reported by GCC 4.9.2 x86_64-linux-gnu. The error message is correct;
QCss::Property is the name of an enum.

Change-Id: I9fb29d39ac11a644b7b08227f102594b3f3017f0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Debao Zhang <hello@debao.me>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-03-30 06:12:59 +00:00
Debao Zhang
f624220b10 fix C4275 warnings for MSVC 2010 build
This issue had been fixed by SHA: a12a2fdf68
but re-introduced by SHA: c23d1c7695 again.

Task-number: QTBUG-45085
Change-Id: If98ee108335d80035179a83b1b28f384395d8373
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-28 02:34:06 +00:00
Morten Johan Sørvig
17e750d53a Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Konstantin Ritt
f2486adc1b Build bundled freetype as qt_helper_lib
And thus do not disable warnings for the whole module when
configured with -qt-freetype.

Change-Id: I601a7c2990c8e3377531a28078db73800c138ec1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-27 21:54:22 +00:00
Stephen Kelly
ebafb2f14b QItemSelectionModel: Make selectedIndexes a Q_PROPERTY.
With reasoning similar to commit v5.5.0-alpha1~124 (Make the
QItemSelectionModel::selection a property., 2015-02-25), this should
be a property instead of a Q_INVOKABLE so that it can participate in
persistent bindings.

Change-Id: Ib9a7900dfa3acbd6f9f7df7b6f00deb6e05c3937
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-03-27 21:13:28 +00:00
Morten Johan Sørvig
1a1c2b6aaa Add tests for detach on setDevicePixelRatio()
Change-Id: I414ff0b794e0202a7f8c931b59b973cb1e7dc148

Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-24 11:22:36 +00:00
Caroline Chao
096ac429e7 Tests: remove insignificant flag for dbus tests on osx
Tests are now passing in CI.

Change-Id: I0051fb7070c1c1027c557eba9dde6367ad59ac7a
Task-number: QTQAINFRA-837
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-27 18:37:30 +00:00