Commit Graph

22956 Commits

Author SHA1 Message Date
Joni Poikelin
f1b3244ac1 Fix undefined symbols in grid layout engine with -no-widgets option
Task-number: QTBUG-44980
Change-Id: I2bf7a3f8814e10daafb703ed365caac1e13d3704
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-16 09:32:59 +00:00
Jan Arve Saether
d99938472c Add missing \since 5.5 for QSpacerItem::sizePolicy()
Change-Id: I2091a22e08bc010c3c69f12b8f5c242a2d5fb8f2
Task-number: QTBUG-38518
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-16 09:32:40 +00:00
Simon Hausmann
198606f6db Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbnativeinterface.cpp
	src/plugins/platforms/xcb/qxcbnativeinterface.h

Change-Id: I31b38ba439b9341d51a01c0fd54bea33f7410076
2015-03-16 10:31:07 +01:00
Ulf Hermann
5c2df051cd Always overwrite QPixmap data on loadFromData
Reusing the previous QPlatformPixmap breaks implicit sharing. It changes
the contents for all QPixmaps using the sample QPlatformPixmap.

Task-number: QTBUG-43384
Change-Id: Ic0792088daa8c2dcb5d7d311a0fd7415d7b5e097
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-03-16 09:11:56 +00:00
David Faure
88851fb3b0 QLockFile: use QCoreApplication::applicationName.
Unlike qAppName, it doesn't require a QCoreApplication instance,
making QLockFile usable in destructors of global statics.
This also uses the value passed to setApplicationName if called
rather than always argv[0].

Change-Id: I40446aba410db42d7cfe6b4408878faf435246f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-16 08:38:32 +00:00
Olivier Goffart
77c0c1ca65 Fix C++14 compilation in QRgba64
QRgba64 has Q_DECL_RELAXED_CONSTEXPR that builds a QRgba64, but
it has no constructor that can be used in a constexpr.

Change-Id: Ia032b65151243d071440c05479e8f2549c8b9503
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-16 06:47:18 +00:00
David Schulz
0d5ffd67a4 Add auto detection for tslib support when using Windows configure.
Change-Id: I83fb53ed23813e572d924b4c3d5da4aae6f32775
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-16 05:39:44 +00:00
Thiago Macieira
97f489e7b9 Network tests: don't try to test against disabled network interfaces
Other parts of tst_qudpsocket.cpp already did this check.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca545a03c9596a
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-16 05:30:44 +00:00
Richard Moe Gustavsen
ba60722b46 iOS: convert directory in qiosfiledialog to local file before checking filename
The directory URL will now have the scheme "file". So we need to convert
it to a local file before we inspect the file name

Change-Id: Ib50f879501f560a4d0fec41dce6d7d9f78f06a3c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-15 23:05:18 +00:00
Richard Moe Gustavsen
a273ca9c43 iOS: return file urls rather than asset urls from file dialog
We need to pass the asset url around as a file url in the
application, so that QUrl::fromLocalFile()/toLocalFile()
works.
Note that QUrl::fromLocalFile() will remove double slashes.
We therefore need to check for this, and restore missing
slashes, when loading files in the file engine.

Change-Id: I2de6b91d7a112354590cf2981f7b403eacf92a59
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-15 23:05:09 +00:00
Richard Moe Gustavsen
3806dc3571 iOS: enable QMAKE_EXTRA_TARGETS
Don't clear QMAKE_EXTRA_TARGETS when creating makefiles.
Clearing it seems unnecessary, since it doesn't cause any
harm to make the functionality available to projects.

Change-Id: I470106b28124baf9df7000a7a70ee7159236c77a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-15 23:04:57 +00:00
Alex Richardson
eea7791fd4 Fix build of forkfd_qt.cpp on FreeBSD
It no longer compiled after 614f37c8b5 due to
the following:
- forkfd_qt.cpp set _XOPEN_SOURCE to 500
- It then includes qatomic.h which include sys/cdefs.h (the FreeBSD header
  that parses and sets _POSIX_C_SOURCE, _XOPEN_SOURCE and other macros)
- sys/cdefs.h redefines _POSIX_C_SOURCE to 199506 due to _XOPEN_SOURCE's
  value
- Several libc symbols expected to exist by libc++ are hidden due to
  _POSIX_C_SOURCE's value and the build fails

Setting _XOPEN_SOURCE to 700 ensures that _POSIX_C_SOURCE is set to
200809 which is required for libc++ to work correctly

Task-number: QTBUG-45006
Change-Id: Iac93220d19ca5ab9ba8ac61a79748252283c3c47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-15 22:26:40 +00:00
Thiago Macieira
cd1e045b3b QString: Don't force unrolling of the tail loop if optimizing for size
This is quite good if space isn't a constraint: the unrolling ensures
faster execution and limits the number of iterations. But it's long.

Both Clang and GCC set the predefined macro __OPTIMIZE_SIZE__ if -Os is
in effect. ICC does not; MSVC is untested but there are no macros for
this effect listed in its documentation.

Change-Id: I1a800c709d3543699131ffff13c48919a9a79ec3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-15 19:00:38 +00:00
Thiago Macieira
d1cd75e81a QNativeSocketEngine: merge the get/setsockopt level constants
No point in having them separate, as that's a recipe for mistakes.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca4132cd1879ed
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-15 19:00:11 +00:00
Marc Mutz
fd76e02e95 QString: further optimize multiArg
This improves the previous algorithm in two aspects:

1. It parses the format string in a single pass instead of
   two, as was previously the case, storing all the
   information the result construction pass needs in a
   pair<QStringRef, int>.

This alone would slow the algorithm down, but without it, it's
hard to make the following work:

2. It avoids reallocations by calculating the size of the
   result and using the Qt::Uninitialized QString ctor.

This speeds up the following test case

    QString str("%1 %2 %3 %4 %5 %6 %7 %8 %9 foo %10 %11 bar"); // not timed
    // (arguments converted to QString outside loop)
    str = str.arg("one", "2", "3", "4", "5", "6", "7", "8", "9");
    str = str.arg("ahoy", "there");

from tst_qstring, which heavily favors the previous result
construction loop due to the tiny (but non-zero) amount of
verbatim text in between placeholders, by 25%:

  Qt 5.4:      1.50µs
  no map:      0.77µs (7b5ba56b0a)
  this change: 0.58µs

Change-Id: I41ec86b7a21b4b25b3bc669ff2e3b2cc73513597
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-14 20:31:53 +00:00
Alberto Mardegan
748abf9347 Add QDBusMessage::createTargetedSignal()
The QDBusMessage::createSignal() static method doesn't take a parameter
for specifying the destination service of the signal. While this is not
a widely used feature, it can be useful to avoid waking up all connected
clients when the service knows what are the clients which are interested
in the signal.

This commit adds a QDBusMessage::createTargetedSignal() method which
also takes the destination service as its first parameter.

Change-Id: I9fdca53673a6944c39c93c1efd69a9d02859684e
Task-number: QTBUG-44704
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-14 19:01:49 +00:00
Laszlo Agocs
f925c13c01 eglfs: Report the QScreen refresh rate from eglfs
For KMS we can always know the correct rate so report it from the backend's custom
screen implementation.

For the rest, query from the framebuffer. If the fb driver publishes the timings then
we can calculate the vertical refresh rate from them. If not, default to 60.

Task-number: QTBUG-44971
Change-Id: I854a34e7c0d652790cc2ac967715828ec76f5733
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-03-14 17:33:21 +00:00
Martin Smith
4da66d5dbf qdoc: ignores .pragma and .import in javascript files
For some reason, the QML/JS parser doesn't like them,
so they must be removed when qdoc parses JavaScript
code. This update handles every case I could find
except jquery.min.js, which is a different problem.

Change-Id: Iacbc4eda554516496a642189368d63d6560e3571
Task-number: QTBUG-44817
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-14 10:02:21 +00:00
Allan Sandfeld Jensen
32d1803d60 Please valgrind by not accessing uninitialized memory
Fix access or uninitialized memory. It is safe in this case, but causes
valgrind's memcheck to complain unnecessarily.

Change-Id: I01ad09d282b07f7099ad6bed85f4327b3c7c677f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-14 09:54:24 +00:00
Laszlo Agocs
12e88e486b Disable DSA on Radeon
Try to prevent crashes on Windows and broken textures on Linux.

Task-number: QTBUG-40653
Task-number: QTBUG-44988
Change-Id: I1fd259ba5ca3980c3087411e1dae1ae56bb2c2e4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-03-14 09:25:07 +00:00
Laszlo Agocs
dc6d353a29 linuxfb: Add support for QCursor::setPos()
Task-number: QTBUG-44856
Change-Id: I102137b3ccdfbea23eb470c38a47c807572d232d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-03-14 09:24:51 +00:00
Laszlo Agocs
3bf655e596 Support QCursor::setPos() properly for eglfs
The internal state of the input handlers need updating too. This was not possible
in the past due to the one way communication from the input handlers (that are
potentially loaded as interface-less generic plugins), but using our new private
QInputDeviceManager in QtGui we can now easily implement "talking back" from QtGui
to the input handlers, regardless of them being plugins or compiled in.

The rest of setPos() is in place already for eglfs.

linuxfb will be handled in follow-up patches.

Task-number: QTBUG-44856
Change-Id: Id72fdb8b1ea176ddfe082e466e7a538a2a98a005
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-03-14 09:24:31 +00:00
Rafael Roquetto
00c09aaf5b Fix build of tests on QNX.
Change-Id: Ib28e42e3eb10e26555fe392c55534f715bee5f8b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-03-14 07:05:34 +00:00
Thiago Macieira
614f37c8b5 forkfd: make only one of forkfd or spawnfd be compiled
We only ever use one, never both.

Change-Id: Iee8cbc07c4434ce9b560ffff13caf94c05dba338
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-14 02:17:36 +00:00
Laszlo Agocs
048918d4bd eglfs: Generate enter and leave events
In addition the logic in QGuiApplication that picks the target window for input
events with a null window has to be enhanced to be compatible with how real windowing
systems work: mouse events following a press are delivered to the same window until the
release, even if the cursor has left the original target window.

Task-number: QTBUG-44814
Change-Id: I3fea84ac77a5ccebeae5def64f92d8d2e03d13ff
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-14 02:14:00 +00:00
Thiago Macieira
f5edf2b6fb IPv6 scope IDs are unsigned
We need to make sure that a large scope ID saved in a QString does get
converted properly back to an integer.

Change-Id: Iee8cbc07c4434ce9b560ffff13c9bd0e9008bd9c
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-14 01:15:21 +00:00
Thiago Macieira
bc59424ed4 QNativeSocketEngine: merge duplicated code for sin6_scope_id
Let's make sure we don't accidentally have it wrong in one of the three
versions.

Change-Id: Iee8cbc07c4434ce9b560ffff13c9bcf75ba66a66
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-14 01:15:18 +00:00
Thiago Macieira
61929c30fc tst_QUrl: Add extra testcases
Task-number: QTBUG-44921
Task-number: QTBUG-44920
Change-Id: Iee8cbc07c4434ce9b560ffff13ca303803916c2d
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-14 01:15:05 +00:00
Gabriel de Dietrich
35819dc764 QFileIconEngine: Use closest area when resolving the actual size
This is similar to what QPixmapIconEngine does.

Change-Id: I00b9e4083fa03fa0602b8e363055a612791bd149
Task-number: QTBUG-44981
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-14 00:50:43 +00:00
Gabriel de Dietrich
d09f81864e Don't use QFileIconEngine if the platform theme won't support it
Change-Id: I6ccbfc5e8bc25018231a6924be12d74955e12337
Task-number: QTBUG-44981
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-14 00:50:37 +00:00
Konstantin Ritt
6c372d46f8 Introduce src/3rdparty/freetype.pri for better maintenance
This deduplicates qmake rules in platformsupport and platform plugins.

Change-Id: Ie9c7d933c4433b96bf502e9753a12faa238b4569
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-14 00:18:24 +00:00
Allan Sandfeld Jensen
2f4a99d1a1 Fix separate_debug_info silent builds
To make echo hide all the commands of making the debug file it needs
to use && to separate commands instead of newline.

Change-Id: I6c9b408b897a285b769a402fa4d923c110334504
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-13 23:26:54 +00:00
Boris Dušek
b873043fc4 Accessibility Linux: Fix text attributes
Orca expects text attributes with different names (and sometimes also
different values) than IAccessible2 ones (which Qt uses). So adapt the names
and values accordingly.

[ChangeLog][Accessibility] We now report text attributes correctly on Linux,
so ORCA+F now works properly in QTextEdit and other text controls.

Change-Id: I55ead0e87e7e298f4fae14a197716f86494334b0
Task-number: QTBUG-44479
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-03-13 16:02:07 +00:00
Boris Dušek
62bcb1f4ba OS X Accessibility: Make checkboxes etc. checkable with VoiceOver
NSAccessibility has no explicit analog for
QAccessibleActionInterface::toggleAction(), checking checkboxes/radio
buttons is handled by NSAccessibilityPressAction. So ensure exposing
the action properly on OS X so that VoiceOver users can check/uncheck
checkboxes, select radio buttons etc.

Change-Id: I54b47515cc4882ecf0544c7351bd3c9046023a44
Task-number: QTBUG-44852
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-03-13 15:54:44 +00:00
Friedemann Kleint
3994ea1979 Add a verbosity setting to QDebug.
Add setters for an int verbosity to QDebug. The streaming operators
can check on the setting and output more information accordingly.

[ChangeLog][QtCore][QDebug] How verbose a single debug output should be
can now be fine-tuned by setting a verbosity on the debug stream.

Change-Id: I77001fcf1ef090a580d1a137bb5a667fc1bf1e1b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-13 13:24:36 +00:00
Marc Mutz
d2f418e98f QVector: remove brittle c2m() function
The c2m() function converts a const_iterator into an iterator, but
is a broken concept for an implicitly shared container such as
QVector, because the act of calling begin() as the starting point
already detaches and invalidates the c2m argument.

This could be fixed in c2m, but it's too easy for a caller to
cause iterator invalidation even before calling c2m, as QTBUG-44592
showed, so remove the function completely.

Task-number: QTBUG-44592
Change-Id: Ibde8cd1d78a412cc9fb621f743e52f74291aff4f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-13 11:37:36 +00:00
Marc Mutz
4300f6e9cc QColorDialog: move all helper classes into the unnamed namespace
Effects on Linux GCC 4.9 stripped release builds:
  text   -984B
  data    +-0B
  relocs  +-0

Change-Id: Iff914e745939f183ba51b4e625ff795d6b44023a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-13 11:37:22 +00:00
Marc Mutz
381fbbf748 QColorDialog: remove unused friendship on QColorShower
This is preparation of moving all the helper classes into the unnamed
namespace.

Change-Id: I255eded0a8c9ff864889d0d23c022012d5fc1eab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-13 11:37:15 +00:00
Marc Mutz
132d8b66cf Inline qcolordialog_p.h into qcolordialog.cpp
This is preparation of moving all the helper classes into the unnamed
namespace.

Change-Id: I1028fc0b3661a58ca678f5bd839c64109c2a4884
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-03-13 11:37:03 +00:00
Jan Arve Saether
0de90cb0fc QtWidgets now depends on the platformheaders
The dependency was introduced with change 8b0fcd87

Change-Id: I9b5eb3d30c30676313e65916f905f76596670260
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-13 11:26:24 +00:00
Allan Sandfeld Jensen
5ce218e142 Fix warning and improve the signature of parseRedirectResponse
Fixes unnecessary indirect return value and deprecated construction
of QString from QByteArray.

Change-Id: I4b654348285923ac1df39fc03784175ad6acb674
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-13 10:24:47 +00:00
Joni Poikelin
63285e3e1b Fix page size selection in QPageSetupDialog
Task-number: QTBUG-44978
Change-Id: Id0c0188d62e344fad93d9bbf57b3f90ce899405d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-03-13 08:23:16 +00:00
Gabriel de Dietrich
dde8c6f77e QVariant: Fix wrong return type in toPersistentModelIndex()
Change-Id: I53afa712d38ec6a41fce77474acccf9c587ea6a8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-03-12 21:33:55 +00:00
Friedemann Kleint
12f684ed5f Windows: Introduce delayed population to the FreeType font database.
Further Split apart Windows CE/Windows code paths to provide 2
implementations of populateFontDatabase():

- The desktop version uses a callback which only
  registers the font families using
  QPlatformFontDatabase::registerFontFamily() to be
  populated on demand later by populateFamily().

- The Windows CE version is unchanged.

Task-number: QTBUG-43774
Task-number: QTBUG-44647
Change-Id: Iad4ec849006a4daf86a5caea9afc89e83ccc7c63
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-03-12 19:26:23 +00:00
Allan Sandfeld Jensen
26e538b6db Fix installation of separate debug info
Since quoting was fixed, separate debug info has no longer installed
correctly because it relied on executing shell commands in the target
name.

This cleans up the generation and installation of separate debug info
by using resolve_target.prf.

Change-Id: I3ee47c0e4dc3de600c42f56b17315a69925c4724
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-12 18:11:13 +00:00
Jan Kundrát
5585d66ff0 xcb: Add support for obtaining default xcb connection
This is needed by qtx11extras now that we can meet a nullptr QScreen.

Change-Id: I755523cbbbbe188f454bd518d2d86a981542458f
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-12 17:11:17 +00:00
Ulf Hermann
4de80f30ee Qmake: Add newly detected OSX framework paths also if they don't exist
When building a module for the first time the paths won't exist as they
are only created when you run "make". However, if you run qmake with
'-r' you need the compiler flags to be available already before that.

Task-number: QTBUG-43175
Change-Id: Ib784c432f29bb8c62b9ef23e59ccb515e1d96f28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-12 17:02:14 +00:00
Thiago Macieira
f1a365dbd8 Make sure we also treat QAbstractSocket::AnyIPProtocol as IPv6
The native socket engine sets the socketProtocol to that when it means
it's using IPv6 with v4 compatibility on (v6only = false).

We mustn't have faced problems so far because the multicast tests set
don't test v6only = false.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca0aff60673940
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-12 16:44:27 +00:00
Andrew Knight
5544ae9eb3 Fix build with QT_NO_CURSOR
The the static cursor methods still need to be compiled.

Change-Id: Ic92eb706af67d3c2645e45cd91cb099c3263a869
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-12 14:47:52 +00:00
Andrew Knight
af90eec11c eglfs: don't build the cursor atlas when QT_NO_CURSOR is defined
Change-Id: I675bc127296c016a40ec2edfdb6602908fec4c2f
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-03-12 14:47:48 +00:00