summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* moc: Use QCommandLineParser::ParseAsLongOptions and ↵Olivier Goffart2016-04-281-0/+10
| | | | | | | | | | | QCommandLineOption::ShortOptionStyle So the command lines is more compatible with compilers flags. And new options like -isystem can be used. Change-Id: I7ad0997e5dab7d0425f12cde415abae6e9034a5b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Remove unused -license option to configureLars Knoll2016-04-271-4/+0
| | | | | Change-Id: Icb2aabb5093ddcaef867f6fbc646cc9bf28f7f65 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove support for some compatibility platform namesLars Knoll2016-04-271-42/+0
| | | | | Change-Id: I96c4d4bc3053686a3aaf48cd0e62cbe04c175eec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove unused -fpu command line argumentLars Knoll2016-04-271-10/+0
| | | | | Change-Id: I7aad73e51e6da3c39ae86ba6612f8bef2a7cbd1e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Always use the macx-clang mkspec when compiling Qt on OS XLars Knoll2016-04-271-21/+1
| | | | | | | | macx-g++ is not supported anymore. Change-Id: Ibae25768e240d6e8e27c09a345ea02a9b0477fc3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Keep QColorDialog::ShowAlphaChannel from expanding the dialog on OS X.Steve Mokris2016-04-271-1/+9
| | | | | | | | | | Workaround for Apple rdar://25792119: If you invoke -setShowsAlpha: multiple times before showing the color picker, its height grows irrevocably. Instead, only invoke it once, when we show the dialog. Task-number: QTBUG-44620 Change-Id: I8ffc803b4216cdb466a651951f9f987a7b6c1f2e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Add QLibraryInfo::version() returning the Qt version as QVersionNumberThiago Macieira2016-04-274-1/+32
| | | | | | | | | [ChangeLog][QtCore][QLibraryInfo] Added QLibraryInfo::version(), which returns the current version of the Qt library as a QVersionNumber object. Change-Id: Ifea6e497f11a461db432ffff1448d4dc84ef57b1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Rename iOS device and simulator targetsMike Krus2016-04-272-11/+11
| | | | | | | | | Use non-os specific target names in Makefiles (device as opposed to iphoneos, simulator as opposed to iphonesimulator) Change-Id: Ic8441c09a0e9a254e43f31b678025f16e9a1c440 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* QApplication: Deprecate ColorSpec, setColorSpec() and colorSpec().Friedemann Kleint2016-04-265-11/+14
| | | | | | | | The code did not have any effect even (already in Qt 4). Deprecate functions and mark as \obsolete. Change-Id: I8d85d9ee8f089f489af6263b33f7c2866e65096a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Revert "Optimize QMetaObject::activate."Milian Wolff2016-04-251-30/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andre reported issues to me which seem to arise from this patch. Most notably, he showed me a backtrace containing the following assertions. Note how the dtor of ConnectionListsRef is accessing shared data which used to be guarded by the connection lock, which got broken by my patch that is now reverted hereby. A future patch can potentially reintroduce my performance optimization but that will require more evaluation and better checks with TSan or helgrind. Sorry for this. Thread 7 (Thread 0x7fffc7fff700 (LWP 32705)): .0 0x00007ffff55ef267 in raise () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. .1 0x00007ffff55f0eca in abort () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. .2 0x00007ffff62286d7 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1647 No locals. .3 0x00007ffff622472a in QMessageLogger::fatal (this=0x7fffc7ff8650, msg=0x7ffff658c9d0 "ASSERT: \"%s\" in file %s, line %d") at global/ qlogging.cpp:792 message = {static null = {<No data fields>}, d = 0x7fffc14f5050} ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffc7ff8630, reg_save_area = 0x7fffc7ff8570}} .4 0x00007ffff621cf43 in qt_assert (assertion=0x7ffff6657ba8 "connectionLists->inUse >= 0", file=0x7ffff6656fa7 "kernel/qobject.cpp", line=3646) at global/qglobal.cpp:3036 __PRETTY_FUNCTION__ = "void qt_assert(const char*, const char*, int)" .5 0x00007ffff64db388 in QMetaObject::ConnectionListsRef::~ConnectionListsRef (this=0x7fffc7ff8710, __in_chrg=<optimized out>) at kernel/qobject.cpp:3646 No locals. .6 0x00007ffff64dbe71 in QMetaObject::activate (sender=0x9d2110, signalOffset=3, local_signal_index=1, argv=0x7fffc7ff8850) at kernel/ qobject.cpp:3685 locker = {val = 140737328754040} connectionLists = {connectionLists = 0xa9c460} lists = {0xa9c4e8, 0x7ffff64a0ceb <QMetaObjectPrivate::signalOffset(QMetaObject const*)+89>} numLists = 1 currentThreadId = 0x7fffc7fff700 signal_index = 4 empty_argv = {0x0} __PRETTY_FUNCTION__ = "static void QMetaObject::activate(QObject*, int, int, void**)" .7 0x00007ffff64db300 in QMetaObject::activate (sender=0x9d2110, m=0x7fffe2d66a80 <CppTools::CppModelManager::staticMetaObject>, local_signal_index=1, argv=0x7fffc7ff8850) at kernel/qobject.cpp:3602 No locals. <snip> Thread 4 (Thread 0x7fffc77fe700 (LWP 32712)): .0 <function called from gdb> No symbol table info available. .1 0x00007ffff55ef267 in raise () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. .2 0x00007ffff55f0eca in abort () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. .3 0x00007ffff62286d7 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1647 No locals. .4 0x00007ffff622472a in QMessageLogger::fatal (this=0x7fffc77f7500, msg=0x7ffff658c9d0 "ASSERT: \"%s\" in file %s, line %d") at global/ qlogging.cpp:792 message = {static null = {<No data fields>}, d = 0x7fffb94f14b0} ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffc77f74e0, reg_save_area = 0x7fffc77f7420}} .5 0x00007ffff621cf43 in qt_assert (assertion=0x7ffff6657ba8 "connectionLists->inUse >= 0", file=0x7ffff6656fa7 "kernel/qobject.cpp", line=3646) at global/qglobal.cpp:3036 __PRETTY_FUNCTION__ = "void qt_assert(const char*, const char*, int)" .6 0x00007ffff64db388 in QMetaObject::ConnectionListsRef::~ConnectionListsRef (this=0x7fffc77f75c0, __in_chrg=<optimized out>) at kernel/qobject.cpp:3646 No locals. .7 0x00007ffff64dbe71 in QMetaObject::activate (sender=0x9d2110, signalOffset=3, local_signal_index=1, argv=0x7fffc77f7700) at kernel/ qobject.cpp:3685 locker = {val = 140737328754040} connectionLists = {connectionLists = 0xa9c460} lists = {0xa9c4e8, 0x7ffff64a0ceb <QMetaObjectPrivate::signalOffset(QMetaObject const*)+89>} numLists = 1 currentThreadId = 0x7fffc77fe700 signal_index = 4 empty_argv = {0x0} __PRETTY_FUNCTION__ = "static void QMetaObject::activate(QObject*, int, int, void**)" .8 0x00007ffff64db300 in QMetaObject::activate (sender=0x9d2110, m=0x7fffe2d66a80 <CppTools::CppModelManager::staticMetaObject>, local_signal_index=1, argv=0x7fffc77f7700) at kernel/qobject.cpp:3602 No locals. .9 0x00007fffe2a7aa0a in CppTools::CppModelManager::documentUpdated (this=0x9d2110, _t1=...) at .moc/debug-shared/moc_cppmodelmanager.cpp:299 _a = {0x0, 0x7fffc77f7740} This reverts commit 8619214c5e76c70e32b47cd002be1adb1bc2f5bf. Change-Id: I13df84012e74a01db750a99a8e5e4bf5357c7f78 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Append the Windows OS/kernel version number in QSysInfo::prettyProductName().Jake Petroules2016-04-251-1/+11
| | | | | | | | | | | | | | | | | | | | | The rationale is to be consistent with other operating systems, all of which print a version number following their name (possibly in parenthesis if the version is typically non-numeric as is always the case with OS X so far and has been with Windows). The version number printed here is only two digits, both for consistency with OS X and because the first two digits of an operating systems's version are typically the limit in marketing materials and general presentation. This also fixes a bug where the returned string would be "Windows " (note the space) in the case where the name of a future Windows version was not known. [ChangeLog][QtCore][QSysInfo] The output of QSysInfo::prettyProductName now includes the Windows OS/kernel version number. In case of future versions of Windows, a valid string is now returned. Change-Id: I588c2e0aaae19337eb69b4645f8bccf8270c75bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractItemView - Fix docs to match behavior (SelectionMode)Thorbjørn Martsum2016-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | We can deselect the item in single selection mode. It was introduced in 28a21d98ef8d880a6dd86ee19dd803424bb5eae1 The motivation was QTBUG-8836 - and furthermore it was in many situations already possible to deselect the item by clicking in the viewport. A restore of selection by reacting on the signal QItemSelectionModel::selectionChanged is easily possible If the behavior was changed to follow the documentation, such a similar simply work-around to allow deselect would not be possible. Task-number: QTBUG-49217 Change-Id: I5466337dc547414d3e0c045ab35d618dba56c508 Reviewed-by: David Faure <david.faure@kdab.com>
* QTabBar: Add setAccessibleTabName() and accessibleTabName()Dongmei Wang2016-04-245-7/+72
| | | | | | | | | | | Currently, a tab's text is used as its accessibleName. When a tab's text is empty, there is no API to set the tab's accessibleName. The two APIs are added to set and return the accessibleName property of a tab. Task-number: QTBUG-46530 Change-Id: Idf88b5f905fe66c6365ea0eeb650e74211db90e1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* QRegion: mark boundingRect() and rectCount() nothrowMarc Mutz2016-04-232-4/+4
| | | | | | | | | With this, the operations usually called when inspecting a QRegion are now all nothrow (when using begin()/end() instead of rects()). Change-Id: I7012be2ac2350ab7d14dae58df3b8fe4956233db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Bump the minimum supported OS X and iOS versionsJake Petroules2016-04-228-8/+8
| | | | | | | | As per mailing list discussion: http://lists.qt-project.org/pipermail/development/2016-February/024889.html Change-Id: Ie4e226c454d8f736dbf1545440ca200104fd947c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Removes spacing when widget is hidden in QGridLayoutKarim Pinter2016-04-212-3/+28
| | | | | | | | | | | Removes spacing in QGridLayout when the QWidgets inside of the QGridLayout are hidden, by checking if the sibling is empty, thus duplicate spacing can be avoided. Task-number: QTBUG-52357 Change-Id: I45475e7b264f94ef3bec5f9a4b8cbaa1d53ec6dd Reviewed-by: Karim Pinter <karim.pinter@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* Adding notification feature to SQLite driverKarim Pinter2016-04-213-3/+115
| | | | | | | | | | | | This modification enables to use notification feature of SQLite with Qt SQL driver, enables to subscribe for notifications and also to remove notifications. close() is added to destructor to unregister notifications in case it is used in multiple threads. [ChangeLog][QtSql][SQLite] Adding notification feature to SQLite driver Change-Id: I8b98787f5214a406357646a98711a8ff6045a0dd Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* Remove window flags WindowOkButtonHint, WindowCancelButtonHint.Friedemann Kleint2016-04-203-14/+1
| | | | | | | | | | | They were duplicating other enumeration values (WindowTransparentForInput, WindowOverridesSystemGestures) and were only supported on Windows CE. Task-number: QTBUG-42897 Task-number: QTBUG-51673 Change-Id: I993a933ee2a3dc8a0ebd7ba6aef80b456f50a657 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Deprecate the -no-qpa-platform-guard command line argumentLars Knoll2016-04-191-28/+9
| | | | | | | | | There's no reason not to allow compiling Qt without any QPA plugins. It's enough to clearly warn about it at the end of configure instead of aborting the build. Change-Id: I52ff681b68fcbfd9c5e28e555224812e6c441dc6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove dynamic loading of functions that are present in Windows Vista onwards.Friedemann Kleint2016-04-198-129/+55
| | | | | | | | Invoke functions directly and add libraries accordingly. Task-number: QTBUG-51673 Change-Id: Ie19d1fc6aa932d6e93a7d310048e4c162fb81046 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Remove the -qconfig command line argumentLars Knoll2016-04-199-1495/+2
| | | | | | | | This functionality will get replaced by a new and more flexible system to configure Qt. Change-Id: I04cf694ab1671eeed39b79a660566595a22f54a7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove the configure notice about unknown architecturesLars Knoll2016-04-191-23/+0
| | | | | | | | With 5.7, we can rely on c++11 atomics (or the msvc ones), so the note doesn't make sense anymore. Change-Id: I10cc67f3dd840f3272ca975c2c9120a8c871a2fb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* initializeInflateStream - assert that stream is not nullTimur Pocheptsov2016-04-191-0/+2
| | | | | | | | | | | Coverity is not happy with us testing a pointer (not null) in a couple of places but not in initializeInflateStream. In fact we _always_ test this pointer _before_ calling initializeInflateStream. Anyway, let's make this pre-condition clear by Q_ASSERT()ing it. Change-Id: Ibce99ef6ff1d4e09e3a446a672fa28fc93ab832c Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Avoid nullptr deref in Q_ASSERTSTimur Pocheptsov2016-04-1924-692/+1038
| | | | | | | | | Found by Coverity, CIDs: [159014-159383]. Indeed, Q_ASSERTS can go into the block controlled by the corresponding if-statements, otherwise - why 'if' at all? Change-Id: Ibc99cd48b97287ec132e082d14f3c39350d547f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add support for initializing QSharedPointer from nullptrThiago Macieira2016-04-194-9/+69
| | | | | | | | | | std::shared_ptr supports it. To resolve an ambiguous overload when a literal 0 is passed as a parameter, the normal constructors needed to be made a template, like std::shared_ptr. Task-number: QTBUG-52569 Change-Id: Id75834dab9ed466e94c7ffff14451417892d2148 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Android: Fix crash on startupChristian Stromme2016-04-181-3/+10
| | | | | | | | | | | All internal settings are stored as strings, if the requested setting value doesn't exist, or the type conversion fails, then an exception is thrown. Instead of making use of the convenience functions we can just get the original string an convert it ourself. Task-number: QTBUG-52574 Change-Id: Ic410244a373318e167437eea4381335a907ccbf9 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Change the way we handle features that have sub-featuresLars Knoll2016-04-158-57/+42
| | | | | | | | Make sure we always set the base feature as a flag in qtconfig, and set the sub-feature in addition if it's being used. Change-Id: Icfeb0ec1ac9e1a615b5b22eb5fcce47e0e7fc153 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* OGLTextureCache::insert - make sure it did not failTimur Pocheptsov2016-04-151-1/+2
| | | | | | | | | | | QGLTextureCache is using QCache internally, QCache in theory can delete the object we are trying to insert (in case the cost > maxCost). Vague comments in the code suggest that this can never happen. Q_ASSERT assert this. Found by coverity, CID 11765 Change-Id: I34ef114b9607926cd5e7d2baed4b63051cf87cff Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Uninitialized variable in QTouchEventTouchPointPrivateJesus Fernandez2016-04-151-1/+2
| | | | | | | | Non-static class member rotation is not initialized in this constructor nor in any functions that it calls. Change-Id: I2dde99a8cd2107b0cfb4201f641d40b4d0823aa2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Implement QFormLayout row removalSamuel Gaist2016-04-143-12/+563
| | | | | | | | | | | | | | | | QFormLayout currently allows to remove a row only through takeAt, which doesn't resize the internal structure used to store the layout-related data. The implementation of rowCount uses that structure so it returns a row count that doesn't match what the user sees. The removeRow methods complement that be doing a "real" removal which will also keep the row count in sync. [ChangeLog][QtWidgets][QFormLayout] Added removeRow(), takeRow(). Task-number: QTBUG-15990 Change-Id: I204b219a837887e4bf95d1bc77407f1c53ae9819 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Windows CE cleanup.Friedemann Kleint2016-04-1413-10336/+2
| | | | | | | Remove remaining CE-specific files and #ifdefs. Change-Id: I407e14cade64c9eaa414f333764b4f82a75befde Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Improve QHttpNetworkReplyPrivate::readStatus()Alex Trotsenko2016-04-141-2/+1
| | | | | | | Check HTTP signature only once in cycle. Change-Id: I06f6b778429243ed17cd4175e532ef201f1e5551 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Take the size and the icon size for MDI buttons from a styleAlexander Volkov2016-04-135-22/+39
| | | | | | | This way they can be DPI-dependent. Change-Id: I117c337aaa3e2bf6fb85cb3b04bbbccd9db41070 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Remove tests/auto/qtest-config.h.Friedemann Kleint2016-04-1217-141/+72
| | | | | | | | | | The header defined a macro QTEST_NO_CURSOR depending QT_NO_CURSOR or obsolete platforms Windows CE and Meego. Replace usages by QT_NO_CURSOR in the tests. Change-Id: I3edac88e684d1f932dd3b721bb1c1b3fe9144237 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Implement ordered dithering for image format conversionsAllan Sandfeld Jensen2016-04-126-53/+222
| | | | | | | | | | | QImage::convertToFormat was ignoring its conversion flag argument, only performing dithering when converting to indexed formats. This patch updates the documentation and implements ordered dithering for other conversions. Change-Id: I807353d61669694185b7e595ef262d80d9fbb3f1 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* deliver stationary touchpoints which have changed velocityShawn Rutledge2016-04-121-4/+12
| | | | | | | | | | | | | When using TUIO, and the finger or token comes to a stop, the last event has a stationary touchpoint with zero velocity, but the previous event had movement, with non-zero velocity. If the UI is going to do something with the velocity values, it needs to know when that goes to zero. So this is an exception to the rule that we don't deliver stationary touchpoints. Task-number: QTBUG-52510 Change-Id: Iaa9f72a3749130f6806f2f63512a6ffddca06bce Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix documentation of qOverload with clang based qdocOlivier Goffart2016-04-121-0/+3
| | | | | Change-Id: I4c9dbefff0e51753fdd6c06a8d0cf1733b8d3d85 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* Don't set config-[minimal|small|...] in qconfig.pri anymoreLars Knoll2016-04-121-20/+10
| | | | | | | | These values are artifacts from the past and not used anymore since Qt 3 times. Change-Id: Ide2a7b3bd000ec0bc280a5467549c1a974c019e0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix the naming of the CFLAGS/LIBS for Gtk3Lars Knoll2016-04-122-8/+7
| | | | | | | | The feature is called gtk3, so the naming of the CFLAGS/LIBS should reflect that. At the same time, remove the unused QMAKE_LIBS_QGOBJECT variable. Change-Id: I565a098aaa80f380de0da534d058f315e77a33f6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QUrl documentation: fix clang parsingOlivier Goffart2016-04-111-0/+8
| | | | | | | | | | QUrl::FormattingOptions need to be declared with Q_DECLARE_FLAGS for documentation purposes. But it's actually a QUrlTwoFlags and need to be so in order to get the default arguments parsed without errors. So hack it by introducing a fake internal QFlags specific to QUrl Change-Id: I851aca2ab3fd4c10d9cb2dc4d6a0f236813d20ad Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* Cleanup conversion parametersAllan Sandfeld Jensen2016-04-119-109/+115
| | | | | | | | Removes the now unused QPixelLayout parameter, simplifies the colorTable passing and prepares for adding dithering. Change-Id: Iaf7698b248b857804d8921bf118e7cfabbabff87 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-11124-6265/+7029
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
| * xcb: Optimize non-shm backing store flushingLouai Al-Khanji2016-04-101-21/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately the functions in xcb-image are quite slow, both for the subimage generation and the byte order swapping. xcb_image_subimage is implemented as a pixel by pixel copy, and the xcb byte swapping is done manually without utilizing potential CPU instructions to accelerate the swap. Replace both with their Qt equivalents. Change-Id: I1fe1fe5d9576fdf2bab4a8c401d2a6bb842c2727 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Remove unused variables.Volker Krause2016-04-101-2/+0
| | | | | | | | | | Change-Id: I44f4e4f454d86e7a53b44a9b3eb51879f97ae9c6 Reviewed-by: David Faure <david.faure@kdab.com>
| * QDateTime: don't allocate memory in fromOffsetString()Anton Kudryavtsev2016-04-091-9/+12
| | | | | | | | | | | | | | | | Manual splitting instead of QStringRef::split() Change-Id: I27ccf1c4e44ead5b13f85f2cdbd990cb3b874a7a Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QDateTime: add some constAnton Kudryavtsev2016-04-092-2/+2
| | | | | | | | | | | | | | | | For CoW types const methods will be called. For QDate we can use new const getDate() method. Change-Id: Ie3a4fe48b3635d270a79c9ac5205b835b3442eae Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Do not clip or rasterize paths completely outside the device rectAllan Sandfeld Jensen2016-04-091-2/+6
| | | | | | | | | | | | | | | | | | | | The controlPointRect is a conservative area that is guaranteed to contain the path, if that does not intersect with the painter's device rect, the path must be fully outside the painted area, and can be ignored. Change-Id: If14d7dbaf916aa284b941d01e773da3365dce5bf Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * X11: Better support non-32bit visualsLouai Al-Khanji2016-04-0914-290/+366
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves support for non-32bit screen configurations on X. The patch mostly touches the xcb platform plugin but the changes to the glx convenience functions do affect e.g. the offscreen plugin as well. Since QWindow instances are now by default of type RasterGL instead of Raster the majority of all windows are in fact instances of QXcbGlxWindow. This means that the eventual QSurfaceFormat that we use is chosen based on the available OpenGL configurations. Here the GLX config resolution code did not do a very good job in trying to find the closest match relative to the requested QSurfaceFormat, instead preferring higher bit depths. This is an issue since many configurations support 32-bit windows even if the screen itself has a root window with depth 16. In particular, servers supporting both GLX and Render are very likely to have such visuals. Particularly affected are remote X connections - even if the application itself makes no use of OpenGL at all! The changes introduced by this patch are as follows: 1. Improve the GLX visual selection logic 2. Improve the xcb visual selection logic 3. Remove duplicated visual lookup for OpenGL-enabled windows 4. Configure the default QSurfaceFormat to match the primary screen depth Change-Id: Id1c176359e63a4581410e20350db5ac2c083e1cf Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * QtBase: use erase and std::remove_if with QList and QVectorAnton Kudryavtsev2016-04-088-51/+60
| | | | | | | | | | | | | | ... instead of using removeAt in a loop, with quadratic complexity. Change-Id: I38b49e56b12c396db9fc0f1b75d8fb43c503a7f6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * add cross-platform tablet->mouse event synth; enable on AndroidShawn Rutledge2016-04-088-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's urgent to fix the issue that on Android, it became impossible to interact with any widget or MouseArea which handles only mouse events but not tablet events, using the stylus, because stylus events are sent only as QTabletEvents. Before 5.6 (change 01d78ba86a631386a4d47b7c12d2a359da28f517) they were sent as touch events, and mouse events were synthesized from those. Whereas on other platforms, every QTabletEvent is followed by a synthesized QMouseEvent. This fix proceeds in the direction that event synthesis should be done in cross-platform code so that platform plugins don't have to repeat it, following the same pattern as for touch->mouse synthesis. Just as in that case, the application can disable it, and the platform plugin can also report that it's unnecessary for Qt to do the synthesis because the platform already does. So QTBUG-51618 is fixed, but QTBUG-47007 requires us to remove the tablet->mouse synthesis from all platform plugins, because the plugin does not know whether the tablet event was accepted or not, so it does not have enough information to decide whether to synthesize a mouse event. Synthesis has been unconditional until now, which contradicts what the documentation says: the mouse event should be sent only if the tablet event is NOT accepted. We can now gradually make this promise come true. [ChangeLog][QtCore][Tablet support] A synthetic mouse event will no longer be sent after every QTabletEvent, only after those which are not accepted (as documented). Task-number: QTBUG-47007 Task-number: QTBUG-51618 Change-Id: I99404e0c2b39bbca4377be6fd48e0c6b20338466 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>