Commit Graph

23912 Commits

Author SHA1 Message Date
Ulf Hermann
5ab74ffca1 Namespace copy of QFileSystemIterator in QDirIterator benchmark
Otherwise you cannot link it statically against QtCore.

Change-Id: I4ac35602cea2192974f3e96ecad35edac976ce27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-12 13:52:55 +00:00
Ulf Hermann
53b83ac413 Don't try to load opengl extensions or functions without QLibrary
Change-Id: If77ca6e04c83d94fd3063b68963b1bcd90980d99
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-12 12:36:42 +00:00
Holger Hans Peter Freyther
8b81f89dff Delete the d_ptr in the destructor
The d_ptr variable is introduced by QGLCustomShaderStage and
needs to be fully handled by it. Delete the d_ptr in the dtor

Fixes Coverity CID #10995.

Change-Id: I76bf05206acf23363419afc95094f5593e808a2e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-12 12:18:03 +00:00
Andreas Hartmetz
ef21a8dea3 evdevtouch driver: fix indentation.
Change-Id: If9ef172bda6488c4516a5e0577d6b233bd2ed1ad
Reviewed-by: Mikko Harju <mikko.harju@jolla.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-12 12:14:41 +00:00
Ulf Hermann
2cbd318f1d Don't try to load plugins if QT_NO_LIBRARY is set.
Any plugin loading is impossible then and the code won't even compile.

Change-Id: I81e49ff87ae1a609521d526f5098a0d44cc28f7c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-12 11:57:07 +00:00
Olivier Goffart
7f85fb4654 Allow types with a comma in Q_PROPERTY
This allows for example properties with QMap<Foo, Bar>

[ChangeLog][QtCore] Types in the Q_PROPERTY macro can now contain commas
(for example, QMap<Foo, Bar>)

Change-Id: Ibf5c8c9cf20a7c8b3dfec9e891fb8a9ca1bdba7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-12 11:36:32 +00:00
Morten Johan Sørvig
55df2e54a5 Fix Qt-in-namespace build breakage.
Objective-C classes must be forward declared in the
global namespace.

Change-Id: Ic4818cef4b61f1578c478da9c30b77237262b283
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-06-12 08:17:52 +00:00
Ulf Hermann
0ff3bbe293 Mark unused parameters with Q_UNUSED
This prevents compiler warnings on less common branches of certain
ifdefs.

Change-Id: I89bae68491151b21cf6887a854cc4c9f68838cf9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-12 08:09:21 +00:00
Marc Mutz
e593891b15 Add qHash(QSizePolicy)
Size policies can be compared for equality,
so qHash should be overloaded, too.

[ChangeLog][QtWidgets][QSizePolicy] Added qHash(QSizePolicy).

Change-Id: Id219f47ac6cb236efdd73cad7b892c8efd034d5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-06-12 07:48:24 +00:00
Friedemann Kleint
d0f64542c8 Output registered enumeration names in QCOMPARE.
Produces output:

FAIL!  : tst_qquickwindow::cursor() Compared values are not the same
   Actual   (clippedItem.cursor().shape()): ForbiddenCursor
   Expected (Qt::ArrowCursor)             : ArrowCursor
   Loc: [tst_qquickwindow.cpp(1465)]

Change-Id: I8a9dfa099a6011cbe0c07da683d4be3d07e22d5d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-06-12 07:48:22 +00:00
Marc Mutz
ca22a02296 QTouchDevicePrivate: deal in const QTouchDevice*s
Avoids the copying of the contents when returning devices().

Remove an unneeded #include (already includes by public
header; unneeded there, too, but leaving for SC purposes).

Change-Id: Ifa9a3dc2c7fada01fb624527dd4d16d0cb32a658
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-12 07:48:19 +00:00
Sérgio Martins
552fba2386 core: Add several QList::reserve() calls.
Reduces reallocations.

Change-Id: Ib63539fb690a80245d8fe81ff8468e79ffa8e57c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-11 13:36:15 +00:00
Jorgen Lind
6b5029199d Add QCocoaWindowFunctions and add a function to find the clip offset
Change-Id: I0f9cd1f923867f6f24b3bc54e442a16b5d2a11e4
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-06-11 10:36:14 +00:00
Friedemann Kleint
898ce1dcf5 networkselftest: Fix handling of the smbclient process.
When the server could not be reached, the test previously,
produced:

FAIL!  : tst_NetworkSelfTest::smbServer() 'smbclient.waitForFinished(5000)' returned FALSE. ()
-   Loc: [tst_networkselftest.cpp(992)]
QWARN  : tst_NetworkSelfTest::smbServer() QProcess: Destroyed while process ("smbclient") is still running.

Fix this by:
- Using QStandardPaths::findExecutable to locate the binary instead
  of test-wise starting it.
- Add a function to ensure process termination.
- Pass a timeout argument to smbclient and pass an interval
  depending on it to waitForFinished(), which should prevent
  having to kill the process in most cases.
- Add proper error message

Change-Id: I1cbc76ca69aec7d1e0e880685bed54b0ba7f21c7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-10 12:50:12 +00:00
Caroline Chao
9545bee98a QTestLib: Add data parameter to SKIP message if any
When using GPU_BLACKLIST, a blacklisted test is volontary skipped
early in the process to avoid crashes or undefined bahaviors. Thus
the name of the running test only contains the slot name and doesn't
show which data was eventually used.

If a test is skipped while running with different data, the skip message
currently doesn't tell which data was run either.

To identify the skipped test, when the test is run with data, the data
is now amended to the slot name in the skip message.

Change-Id: I7acdc8951fa2c60d170cc77c0fbd842255746b35
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-10 12:47:22 +00:00
Caroline Chao
1dfc16f6da QTestLib: Add data support to GPU_BLACKLIST
Follows the change 4fe68ffbe5.

Test cases run while using a given data can now also be skipped.
The data follows the test function to skip in the features line:
"features": [ "disable_functionToSkip:dataToSkip" ]

Change-Id: I46445e3bed34d7d6507e7ccaaed4b83ab9b9a092
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-10 12:47:18 +00:00
Martin Smith
d884420b94 qdoc: Improve documentation for properties
This update changes how qdoc handles getter, setter, resetter,
and notifier functions for properties. With this update, if you
provide documentation for any of these functions associated with
a property, links to that function will go to the documentation
for that function, instead of to the associated property.

Additionally, the documentation for the function will have a note
added, e.g. "Note: Notifier signal for property fubar," where the
fubar property name is a link to the documentation for property
fubar.

Change-Id: I1f821fd4a6c2de142da4718ef3bdde314dc59627
Task-number: QTBUG-45620
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-06-10 12:47:02 +00:00
Martin Smith
9b58fe5c26 qdoc: Related non-members are now linked correctly
It was harder to fix this tan you might think, but the
fix cleans up the overload mechanism a lot, so if no
regressions are introduced by the fix, the code will
be easier to manage.

The related non-members are now added to the class
node's list of secondary (overload) functions. This
way, they get an overload number just like overloaded
member functions.

Change-Id: I68d7a314b0bb5ec0fbba15dc1fd40a5b870c659d
Task-number: QTBUG-46148
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-06-10 12:46:53 +00:00
Martin Smith
0ec550c748 qdoc: Always try to use the declaration location
qdoc now always tries to use an element's declaration location
for the "location," "filepath," and "lineno" attributes in the
index file, when it makes sense to use the declaration location.
That's pretty much everything in C++.

qdoc records both the declaration location and the definition
location in the element's tree node. When it writes the element
to the index file, it asks for the declaration location.

Change-Id: I2d169a0f028bb0d46717e6f822dacc6dd20673b2
Task-number: QTBUG-46034
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-06-09 10:10:23 +00:00
Allan Sandfeld Jensen
d12b09edd8 Remove unused and unneeded subimage scaling
Removes the feature of scaling only a clipped area of the input
which was unused and only made the code harder to read and
maintain.

Change-Id: I296a804a5bd083016fbc47543e00eb586b530d71
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-06-09 09:14:27 +00:00
Caroline Chao
eacfbbf64e Testlib: Export blacklist functions
So they can be used in QtQuickTest.

Change-Id: I64925feb243fb27234951276d81119bc1f6d5a56
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-08 10:54:35 +00:00
Sérgio Martins
af75a27de7 itemsviews: Add 15 QList::reserve() calls
Change-Id: I4ed8872ecd560d51c00cb3d2b93e082c5abdd8dc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-08 10:50:56 +00:00
Joerg Bornemann
896da75550 make the enums of QProcess known to the meta object system
This enables users to construct enum values from strings
and provides useful qDebug operators.

Task-number: QTBUG-10777
Change-Id: Ia3592f00d559b980b4875ee8fb5e8ffb4328d464
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-08 08:44:24 +00:00
Friedemann Kleint
4bb00d9d06 Export class QAccessible::ActivationObserver.
Change a21dfab54e de-inlined its
destructor, so, the class needs to be exported.

Change-Id: I32d21622a944a93718f549060e5e5f7e71fd2646
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-08 08:17:08 +00:00
Holger Hans Peter Freyther
7e390967f3 Fix incorrect expression in directfb keyboard code
Add missing equal sign to have the result of the OR
stored inside the modifiers variable.

Fixes Coverity CID#89071.

Change-Id: I0ee1a080f5f6757ae7646733aa3bb5cf8c6cdeed
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-08 07:22:31 +00:00
Holger Hans Peter Freyther
ae4bc7e97e Remove bogus call and comment from addressbook
QMap::empty() does not empty the list but is the STL
version to ask if the map is empty. Remove the comment
and code as operator>> of QDataStream will clear the
map.

Fixes Coverity CID#89073

Change-Id: I259e518b44afd42b698368b42aedcc3b84240aca
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-08 07:22:20 +00:00
Dmitry Shachnev
657a8cf5be Remove exec bits from files that should not be executable
Change-Id: I66f49c6db82eadc3b11cc9b1cf01375e9596a8e6
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-06-07 22:50:19 +00:00
Bjoern Breitmeyer
f21d86b747 Fix WEC2013 build of sqlite3.
Change-Id: Iaa953df941d888b8ae1a590dd728a1d819d7e604
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-06-07 09:29:16 +00:00
Lars Knoll
19ed646bce Make the test pass on high res mac displays
Change-Id: I05f156faae85abe11edc954dd358ddfcfd320c74
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:30 +00:00
Lars Knoll
83eb09d591 Wait for the window being active before sending it events
Change-Id: I2f5d6e37e630d70c4ba3ae81e807a89c447c8b26
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:25 +00:00
Lars Knoll
3658b62781 Fix the autotest on Mac
Don't hit the scrollbar with the mouse click

Change-Id: Ie82d8c5c058df9a482e7d5de2fe40681572f19ad
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:16 +00:00
Lars Knoll
73cc3db4d5 Fix qgraphicswidget::initStyleOption autotest
make sure it'll work with the new mouse handling as well.

Change-Id: Ia2d567e618b77b0fa3532ee6c335cbdf5e496241
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:00:52 +00:00
Lars Knoll
71388c37d2 Clean up the qgraphicsscene autotest
Change-Id: I8950a3eb9792dff90ed64cd3bf1d572745b05886
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:00:32 +00:00
Friedemann Kleint
d7f15e67f9 Manual touch test: Add gestures.
Add command line options for
- Grabbing gestures
- Suppressing mouse and touch events

Add gesture events to the log.
Add a hierarchy of gesture classes storing the parameters
of finished gestures with drawing functionality and
implement for pan and swipe.

Task-number: QTBUG-46195
Change-Id: I019fe5b60116316a54e11b2c30e1d34f5e72bcf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-06-06 06:26:39 +00:00
Martin Smith
275a970c30 doc: Added Q_NEVER_INLINE to ignored tokens
This helps qdoc's parser.

Change-Id: I4c7f2dff348b87659c93ddb14d012d5bf2e626f2
Task-number: QTBUG-46498
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-06-05 19:44:35 +00:00
Ulf Hermann
181ee8f9ff Keep the mouse timestamp for tests closer to the actual time
Pass on the requested delay into the mouse events. We don't care about
single msecs as the surrounding code also takes time that we don't
consider and whenever we generate a release we add 500ms of time skew
anyway.

The initial press of a double click has to increment the timestamp,
just like all other mouse events do.

Change-Id: Ifb94830f9f878ce87d92bfd86c72a16b55052f3b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-06-05 14:29:21 +00:00
Martin Smith
0dd0d2f9d5 qdoc: fix invalid memory access in HtmlGenerator
HtmlGenerator::highlightedCode() contained a potential
out-of-range- memory reference, which is prevented by
this fix.

Change-Id: I3bc87a8287e1d51c2786f5ec42384dbac04c9636
Task-number: QTBUG-45643
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-06-05 09:39:39 +00:00
Martin Smith
8b1746b09d qdoc: Just reformatting and removing dead code
Whitespace only.

Change-Id: I6e4b55ad55e22da4150530457202f144fcc7f416
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-06-05 09:39:12 +00:00
Martin Smith
e36de4bc5d doc: Remove uses of \returns
It is a doxygen command that is not recognized
by qdoc.

Change-Id: I26b0c54a1aa715fc9d8b70e411502f46fc6bc0f1
Task-number: QTBUG-46495
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-06-05 09:38:27 +00:00
Martin Smith
79a97be9f3 doc: Remove uses of \mainclass
This qdoc command is deprecated.

Task-number: QTBUG-46476
Change-Id: Iee36f91bdcf500c2e88022a5f8a9c3accc6048c2
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-06-05 09:37:55 +00:00
Jorgen Lind
b3d09eceb8 Move the function helper to its own file
Also make it a class so a forward header is generated by syncqt

Change-Id: Ibab6b925dc6e9dab1b617b9b4027a4144e4a3773
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-05 07:48:17 +00:00
Simon Hausmann
bf0bdc5fbb Fix crash in tst_qfiledialog on OS X
The test aggressively shows and hides dialogs and popups, and we would end up
installing this global event monitor frequently. However we never cleaned up
properly, for example if the window didn't get hidden properly or if the
monitor was already installed for some reason.

Change-Id: I6fa28eaeb03e089ced735912dbe29b0b8ad75d58
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-06-04 05:56:24 +00:00
Simon Hausmann
80bc743406 Fix tst_qglobalstatic on OS X
OS X has an unreasonably low default for the maximum number of open
file descriptors (256). The unit test creates about 200 threads and each
thread in Qt creates at least two file descriptors (pipe), so the test
cannot execute.

Change-Id: I656367bca6d0a40fb1edb8c72914304db0f429ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-04 05:56:16 +00:00
Simon Hausmann
ccad00121d Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-06-04 05:56:06 +00:00
Simon Hausmann
dc2617f35b Fix build on QNX 650
Commit 2fa7b3b317 broke the build, the compiler
(gcc 4.4) doesn't like the mismatch between constructor declaration and
definition.

Change-Id: Ied1f3293c21871276ce8d2db3d2e6c06c75ade90
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-03 12:31:35 +00:00
Marc Mutz
a21dfab54e De-duplicate vtables III: QAccessible
By making the destructor (usually the first non-inline, non-pure,
virtual function, and therefore the trigger for most compilers to
emit the vtable and type_info structures for the class in that TU)
out-of-line, vtables and, more importantly, type_info strucures for
the class are pinned to a single TU. This prevents false negative
dynamic_cast and catch evaluation.

In this third batch, we de-inline dtors of exported public classes
from the QAccessible subsytem.

Since they are already exported, users of these classes are unaffected
by the change, but since it's public API, and the dtors may have been
de-virtualized and inlined into application code, we need to avoid
adding code to the out-of-line dtor until Qt 6.

Change-Id: I5324bd1b3b9210a3ac5cf4eee9317a34e4a3b048
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-03 12:03:11 +00:00
Marc Mutz
f0eafa5672 QAccessibleInterface: move implementation beside doc block
Adjust doc text to what's used elsewhere in QAccessible.

Change-Id: I8bd194e55374b8258361ae254817a4298c4fa3dc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-03 12:03:06 +00:00
Marc Mutz
8d9d609e63 De-duplicate vtables, part II: exported public classes
By making the destructor (usually the first non-inline, non-pure,
virtual function, and therefore the trigger for most compilers to
emit the vtable and type_info structures for the class in that TU)
out-of-line, vtables and, more importantly, type_info structures for
the class are pinned to a single TU. This prevents false negative
dynamic_cast and catch evaluation.

In this second and last batch, we de-inline destructors of exported
public classes.

Since they are already exported, users of these classes are unaffected
by the change, but since it's public API, and the dtors may have been
de-virtualized and inlined into application code, we need to avoid
adding code to the out-of-line destructor until Qt 6.

Change-Id: Ieda9553cb4b0dae7217c37cc7cde321dd7302122
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-03 12:02:59 +00:00
Marc Mutz
133e402831 De-duplicate vtables, part I: exported private classes
By making the destructor (usually the first non-inline, non-pure,
virtual function, and therefore the trigger for most compilers to
emit the vtable and type_info structures for the class in that TU)
out-of-line, vtables and, more importantly, type_info structures for
the class are pinned to a single TU. This prevents false negative
dynamic_cast and catch evaluation.

In this first batch, we de-inline destructors of exported private
classes.

Since they are already exported, users of these classes are unaffected
by the change, and since it's private API, we don't need to avoid
adding code to the out-of-line destructor until Qt 6.

Change-Id: I450707877d2cb6a77f79ae1dd355facb98d6c517
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-03 12:02:55 +00:00
Marc Mutz
b295afb064 QStaticTextUserData: declare dtor out-of-line and export class
De-duplicates vtables and enables RTTI on this class
hierarchy.

Export, as QOpenGLStaticTextUserData (QtOpenGL) inherits it.

Change-Id: I0662870538c35f23baf6bde4594ec8b9055efae7
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-06-03 12:02:49 +00:00