summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8Liang Qi2016-10-1133-121/+274
|\
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-1133-121/+274
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpixmap.cpp src/widgets/kernel/qformlayout.cpp Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
| | * Revert "QCocoaKeyMapper - correctly update key layouts"Timur Pocheptsov2016-10-101-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 26961e32f34c06f083fe441c23be6874f03446a3. This patch was apparently a bit ill-considered and while fixed one problem introduced others. Task-number: QTBUG-50865 Change-Id: I2e3569d16c8fc47b4a492d4aed6e747d7ff93a55 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-0832-112/+267
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttpnetworkconnection.cpp src/network/access/qhttpnetworkconnection_p.h Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
| | | * QEvent: fix typo in apidocFrederik Schwarzer2016-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I43911d781024b5e76ff5065964a570663de6e33c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * dbustray: Support replacing menu on QDBusTrayIconDmitry Shachnev2016-10-073-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a new menu is set via the updateMenu() method, properly unregister the old menu and register the new one. Task-number: QTBUG-53676 Change-Id: I8c1ea2d171caec01488f0fe8a565bc9b2f7e431e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * QAbstractItemView: use only a 1x1 QRect for selecting on mouse pressFrank Reininghaus2016-10-072-2/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit f1e90768095be37419ba4bf3c69ec5c860bdbcb6, mousePressEvent called the virtual method setSelection(const QRect&, SelectionFlags) with the 1x1 rectangle which contains only the clicked QPoint, unless the SelectionFlag "Current" was set because Shift was pressed during the mouse press. Since that commit, the behavior has been changed such that the rectangle is the one that is spanned by the center of the clicked item and the clicked pixel. In theory, the result should be the same (i.e., only the clicked item should be selected), but * the code path in QListView::setSelection for 1x1 QRects is more efficient, and * using a larger QRect can cause problems with custom views, see the comments in QTBUG-18009 This commit ensures that the 1x1 QRect is used again, unless the SelectionFlag "Current" is used. Change-Id: I70dd70c083c20a3af6cd6095aa89a489756b505f Task-number: QTBUG-18009 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | | * Fix multimedia print key mappingAllan Sandfeld Jensen2016-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt::Key_Print is the PrintScreen key-mapping. Instead use Qt::Key_Printer which is also what VK_PRINT is mapped to. Change-Id: I60a0181ed118253b6681ae0e5847812f73d63119 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * Darwin: correct state restore when FSEventsStream starting failsErik Verbruggen2016-10-072-45/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous state was not restored completely when adding/removing paths resulted in a stream start failure. It also removes an autoreleasepool in restartStream, because both stopStream and startStream do already create an autoreleasepool of their own. (So, this pool will always be empty.) Change-Id: Idc674e9c040f346703ab3ec256957e787a0ade73 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * Link to topLevelChanged() in the docs of QDockWidget::floatingSergio Martins2016-10-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | topLevelChanged() is emitted when the floating property changes. It's not very well named, it's easy to miss. Change-Id: Iabaa4fb3dc6190df43d719ed7565f0586816c6de Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
| | | * Skip chmod for separate_debug_info when cross compiling on WindowsSamuli Piippo2016-10-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-56289 Change-Id: If6dd07182ed77e87865004c14240bf7f0c764772 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | | * QTemporaryFile's setFileTemplate operates not only on XXXXXX in the endSune Vuorela2016-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Is even covered by unit tests. Change-Id: I7b22da2a338868fdb99c6238925f944bfea88190 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Handle short reads in the local sockets exampleSérgio Martins2016-10-063-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Protection against short reads was already half implemented, blockSize was being sent by the server but never used by the client. Also, blockSize was bumped to quint32: If you're in a position where short reads can happen then quint16 is probably not enough to hold the size of your data. On Linux I could only reproduce short reads for messages > 500K. Change-Id: I191a3d781da1d8a119debbdafae641c8340a1da2 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * QPixmap::load: ensure QBitmap stays a QBitmap even on failureMarc Mutz2016-10-062-26/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and avoid detach()ing potentially large data for just preserving the QPlatformPixmap::pixelType(). A QBitmap differs from a QPixmap (its base class, urgh) by always having a data != nullptr and a Bitmap pixel type, yet load() was unconditionally setting 'data' to nullptr on failure, turning a QBitmap into a non-QBitmap. Fix by move-assigning a null QBitmap instead of resetting 'data'. Add some tests. Change-Id: Ida58b3b24d96472a5f9d0f18f81cc763edcf3c16 Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | | * QGraphicsWidget: Fix UB (invalid member calls) in destruction sequenceMarc Mutz2016-10-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qgraphicswidget_p.h:72:5: runtime error: downcast of address 0x2ab6a8021400 which does not point to an object of type 'QGraphicsWidget' 0x2ab6a8021400: note: object is of type 'QGraphicsObject' 00 00 00 00 70 93 5c 91 b6 2a 00 00 f0 c0 01 a8 b6 2a 00 00 e8 81 5c 91 b6 2a 00 00 10 bf 01 a8 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsObject' #0 0x2ab68f2fdd7c in QGraphicsWidgetPrivate::q_func() qgraphicswidget_p.h:72 #1 0x2ab68f2fdd7c in QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget*, QGraphicsScene*, QGraphicsScene*) qgraphicswidget_p.cpp:775 #2 0x2ab68f020d2a in QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem*, QVariant const*, QVariant const*) qgraphicsitem.cpp:1181 #3 0x2ab68f024f73 in QGraphicsItem::setParentItem(QGraphicsItem*) qgraphicsitem.cpp:1781 #4 0x2ab68f168401 in QGraphicsScenePrivate::removeItemHelper(QGraphicsItem*) qgraphicsscene.cpp:620 #5 0x2ab68f02c166 in QGraphicsItem::~QGraphicsItem() qgraphicsitem.cpp:1555 #6 0x2ab68f02ebb8 in QGraphicsObject::~QGraphicsObject() qgraphicsitem.cpp:7766 #7 0x2ab68f2d8888 in QGraphicsWidget::~QGraphicsWidget() qgraphicswidget.cpp:231 #8 0x4bce62 in SubQGraphicsWidget::~SubQGraphicsWidget() /tst_qgraphicswidget.cpp:175 #9 0x4bce62 in SubQGraphicsWidget::~SubQGraphicsWidget() /tst_qgraphicswidget.cpp:175 #10 0x2ab68f02c9ec in QGraphicsItem::~QGraphicsItem() qgraphicsitem.cpp:1550 #11 0x2ab68f02ebb8 in QGraphicsObject::~QGraphicsObject() qgraphicsitem.cpp:7766 #12 0x2ab68f2d8888 in QGraphicsWidget::~QGraphicsWidget() qgraphicswidget.cpp:231 #13 0x4bce62 in SubQGraphicsWidget::~SubQGraphicsWidget() /tst_qgraphicswidget.cpp:175 #14 0x4bce62 in SubQGraphicsWidget::~SubQGraphicsWidget() /tst_qgraphicswidget.cpp:175 #15 0x2ab68f128da4 in QGraphicsScene::clear() qgraphicsscene.cpp:2388 #16 0x2ab68f12936c in QGraphicsScene::~QGraphicsScene() qgraphicsscene.cpp:1682 #17 0x44d44c in tst_QGraphicsWidget::focusWidget() /tst_qgraphicswidget.cpp:435 qgraphicswidget_p.cpp:805:24: runtime error: member call on address 0x2ab6a8021400 which does not point to an object of type 'QGraphicsWidget' 0x2ab6a8021400: note: object is of type 'QGraphicsObject' 00 00 00 00 70 93 5c 91 b6 2a 00 00 f0 c0 01 a8 b6 2a 00 00 e8 81 5c 91 b6 2a 00 00 10 bf 01 a8 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsObject' #0 0x2ab68f2fdc68 in QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget*, QGraphicsScene*, QGraphicsScene*) qgraphicswidget_p.cpp:805 #1 0x2ab68f020d2a in QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem*, QVariant const*, QVariant const*) qgraphicsitem.cpp:1181 [... identical lines omitted ...] qgraphicswidget_p.cpp:806:23: runtime error: member call on address 0x2ab6a8021400 which does not point to an object of type 'QGraphicsWidget' 0x2ab6a8021400: note: object is of type 'QGraphicsObject' 00 00 00 00 70 93 5c 91 b6 2a 00 00 f0 c0 01 a8 b6 2a 00 00 e8 81 5c 91 b6 2a 00 00 10 bf 01 a8 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsObject' #0 0x2ab68f2fdb6b in QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget*, QGraphicsScene*, QGraphicsScene*) qgraphicswidget_p.cpp:806 #1 0x2ab68f020d2a in QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem*, QVariant const*, QVariant const*) qgraphicsitem.cpp:1181 [... identical lines omitted ...] qgraphicswidget_p.cpp:827:26: runtime error: member call on address 0x2ab6a8021400 which does not point to an object of type 'QGraphicsWidget' 0x2ab6a8021400: note: object is of type 'QGraphicsObject' 00 00 00 00 70 93 5c 91 b6 2a 00 00 f0 c0 01 a8 b6 2a 00 00 e8 81 5c 91 b6 2a 00 00 10 bf 01 a8 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QGraphicsObject' #0 0x2ab68f2fdf91 in QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget*, QGraphicsScene*, QGraphicsScene*) qgraphicswidget_p.cpp:827 #1 0x2ab68f020d2a in QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem*, QVariant const*, QVariant const*) qgraphicsitem.cpp:1181 [... identical lines omitted ...] Fix by moving the setParentItem(nullptr) call up the call stack into ~QGraphicsWidget(), ensuring that the object is still a QGraphicsWidget when these calls are made. Change-Id: I264779e33098e9752de9a312a146fb203578a3cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * Plug leak in QFormLayout::setWidget()Marc Mutz2016-10-061-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike layouts and spacer items, a QWidget is-not-a QLayoutItem. QWidgetItem simply wraps the QWidget, so in QFormLayout::setWidget(), we allocate a widget item for the widget passed, and hand that down to Private::setItem() for adding to the various data structures. Private::setItem() has a bunch of guard clauses, though, that return without deleting the item. A test triggered this code path and made asan complain. This is just one part of a larger problem: QFormLayout::setLayout() normally takes ownership of the layout passed, because QLayouts own their QLayoutItems, and QLayout is-a QLayoutItem. But setLayout() fails to live up to the owner role when it fails to add a layout, and there's no easy way for the API user to check for success. A fix for this breaks tst_qformlayout, and while those checks that break deserve to be broken, I'll refrain from proposing the larger fix for 5.6 LTS, but will propose it for 5.8 or 5.9 instead. This fix here only fixes the leak in setWidget() by adding a bool return to Private::setItem() informing Private::setWidget() of the need to manually delete the item it allocated for the widget. Change-Id: I81409c260f9bee2e95c9a98542d8c60bc19a1332 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * QDBusDemarshaller: use RAII in duplicate()Marc Mutz2016-10-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtDBus is compiled with exceptions disabled, but checkers don't know that, and it's not 100% certain it will stay that way until eternity. So do the simple change and hold the new'ed pointer in a QScopedPointer until handing it off to create(). Coverity-Id: 154477 Change-Id: I91a763ca4e93585c97cb9e794312b53046971161 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Use the same object in description as in described codeFrederik Schwarzer2016-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If52ecfc8d29a83cb2949fbbf4672ae386ae5d739 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | | * QTextEdit: don't show placeholder text while composing textRichard Moe Gustavsen2016-10-063-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If using IM to compose text in QTextEdit, the placeholder text will show underneath until the text is committed. This patch will additionally check if the user is currently composing preedit text before deciding whether or not to draw the placeholder text. Task-number: QTBUG-55758 Change-Id: If7943c6c94fb96d46514a81caa118829e6e6a0f9 Reviewed-by: Liang Qi <liang.qi@qt.io>
| | | * Doc: Document that by default, QTimer is not single-shotKai Koehne2016-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I586997ddb5ed55d68f53ddfe9302b961296cc4eb Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | | * Add QMAKE_LFLAGS_SONAME to linker flags for Android pluginsBogDan Vatra2016-10-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's needed to shut up Android 6+ warnings Task-number: QTBUG-52112 Change-Id: I21ff53d687bf545250ec7fcdc059db16d4cecbc9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * Make sure SSL configuration is correct in QNetworkReply::encrypted.Vladimir Prus2016-10-053-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, when QNetworkReply::encrypted is emitted, QNetworkReply::sslConfiguration is not yet initialized, in particular certificate chain is empty, which breaks the documented usage of 'encrypted' to perform additional checks on certificate chain. It looks to be caused by the fact that QHttpNetworkReply is originally associated with 0th QHttpNetworkConnectionChannel, and this association is not updated if HTTP pipelining is not used. Therefore, a reply on channel >0 might arrive before reply on channel 0, and then using ssl configuration from channel 0, which not made it through handshake, is not usable. Task-number: QTBUG-49554 Change-Id: Ie5d4b5a0c503d5bdc44761ce8581f6ffe4e3bac2 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
| | | * tst_QShortcut: Fix UB (invalid cast) in shortcutDestroyed()Marc Mutz2016-10-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The slot is invoked from QObject::destroyed(), which is emitted from ~QObject. By that time the object is no longer a QShortcut, so the static_cast it invalid. Found by UBSan: tst_qshortcut.cpp:1210:53: runtime error: downcast of address 0x6020000289d0 which does not point to an object of type 'QShortcut' 0x6020000289d0: note: object is of type 'QObject' 10 00 80 17 c0 ce 63 df 93 2b 00 00 b0 02 00 00 d0 60 00 00 02 00 00 00 ff ff ff 04 04 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' #0 0x42b3bb in tst_QShortcut::shortcutDestroyed(QObject*) tst_qshortcut.cpp:1210 #1 0x446cc9 in tst_QShortcut::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) .moc/tst_qshortcut.moc:186 #2 0x2b93dba52c86 in QMetaObject::activate(QObject*, int, int, void**) qobject.cpp:3787 #3 0x2b93dba55400 in QObject::destroyed(QObject*) .moc/moc_qobject.cpp:213 #4 0x2b93dba8d80d in QObject::~QObject() qobject.cpp:967 #5 0x2b93c6b6e032 in QShortcut::~QShortcut() qshortcut.cpp:476 #6 0x2b93c6b6e370 in QShortcut::~QShortcut() qshortcut.cpp:481 #7 0x42a5de in void qDeleteAll<QList<QShortcut*>::const_iterator>(QList<QShortcut*>::const_iterator, QList<QShortcut*>::const_iterator) qalgorithms.h:317 #8 0x42a5de in void qDeleteAll<QList<QShortcut*> >(QList<QShortcut*> const&) qalgorithms.h:325 #9 0x42a5de in tst_QShortcut::clearAllShortcuts() tst_qshortcut.cpp:1136 Fix by replacing QVector::replaceAll() with the erase-remove idiom, which does not require the cast, because it can perform mixed-type lookups. Change-Id: I4251c1895fa4398023f489dbfd7108d90c1a6c94 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * Plug memleak in tst_QStackedWidgetMarc Mutz2016-10-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To keep the change minimal, keep 'sw' as a pointer variable, but back it by a stack-allocated QStackedWidget instead of a heap-allocated one that's never deleted. Change-Id: I9e2a8c07979b861eb7e7040c144d8e75c90d0bc9 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | | eglfs: Add Virtual and DSI connector types for DRMLaszlo Agocs2016-10-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, VMWare's vmgfx exposes a Virtual connector. Recognize this properly instead of falling back to UNKNOWN. Change-Id: Iee4f980ca0dfbbf3433fea1515fab27392250093 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | | winrt: Enable usage of static manifest filesMaurice Kalinowski2016-10-111-121/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, manifest files always got processed to perform, e.g., variable expansion. This change introduces the 'verbatim' flag for WINRT_MANIFEST.CONFIG to disable those steps and perform a simple copy of the source manifest. Task-number: QTBUG-43468 Change-Id: Ie7d4d27376efb3bcf5bc38163496f0a1f1319742 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | | Direct2D platform plugin: Fix developer build with MSVC2015Friedemann Kleint2016-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error: qwindowsdirect2dbitmap.cpp(84): error C2220: warning treated as error - no 'object' file generated qwindowsdirect2dbitmap.cpp(84): warning C4838: conversion from 'int' to 'UINT32' requires a narrowing conversion Change-Id: I191f3300cd22715001eebc113b672ceac49c825d Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | | Fix crash in QPainter benchmark testAllan Sandfeld Jensen2016-10-111-22/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds missing image-formats so it doesn't segfault. Also changes the exclusion of rare formats to lists of included ones Change-Id: I1d00562cf8e96baa03121a0b996764224911e06a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Avoid auto-vectorization of epilogues of manual vectorizationAllan Sandfeld Jensen2016-10-118-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defines a structure that tells the compiler in no uncertain terms the maximum number of times a loop can be run. The reduces the size of qdrawhelper_avx2.o from 22kbytes to 11kbytes. Change-Id: Ie3d6281b04b4be3332497c15f3dfe9f185e20507 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QColor: unbreak mingw buildMarc Mutz2016-10-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usual: inline functions not declared inline, but defined as such give mingw errors: qcolor.h:280:8: error: 'QColor::QColor(QLatin1String)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror] Fix by declaring the functions inline, not only at the definition. Task-number: QTBUG-56459 Change-Id: I3f05e5e3597f6aa0ed318c7e7a11afdefc4c1d2f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | unbreak direct2d testOswald Buddenhagen2016-10-111-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | amends c0cc5052. Change-Id: Icdf157d0711d9de85b108ab2ff1da0e1fc2e4a9d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Save 100k by not using bloated sha3 codeLars Knoll2016-10-112-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Probably makes sha3 calculations somewhat slower. Change-Id: Ie082c163b91d4e2282ad68b810e56b2437a1eb8a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | | Fix build with statemachine feature disabledLars Knoll2016-10-1138-146/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sources of the state machine are excluded completely at the build system level instead of littering them with #ifs. All remaining usages of QT_NO_STATEMACHINE are converted to QT_CONFIG(statemachine) or a QT_REQUIRE_CONFIG(statemachine). Also make the qeventtransition feature dependent on statemachine. Change-Id: Ib05c7ca263a02042523fff8f794fa87342df1069 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | | Clean up building of bootstrap lib and toolsLars Knoll2016-10-119-33/+108
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a qconfig-bootstrap.h, which contains all the defines required to build the bootstrapped tools. This will be required anyway when moving more code over to use QT_CONFIG(foo) instead of QT_NO_FOO. Change-Id: I783d0aa0100b9190fe2d422bee4a95b05720aebe Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Extracted cleanup from QCoreApplication::exec() into separate functionJørn Bersvendsen2016-10-102-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all Qt integration points can call QCoreApplication::exec(), in particular, ActiveQt. When an ActiveQt server is loaded, it tries to mimic the behavior of calling QCoreApplication::exec() by setting QCoreApplicationPrivate::in_exec = true. However, when unloading the DLL it is necessary to call the same clean-up (e.g. deferred delete) that QCoreApplication::exec() does. Extracting the cleanup in a separate function means implementation does not have to be duplicated. Task-number: QTBUG-56172 Change-Id: I061f1c06f38881032ad7044416c12c91e536478a Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Q_FALLTHROUGH: use GCC extensions in non-C++17-codeMarc Mutz2016-10-101-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC defines the [[gnu::fallthrough]] attribute for C++11 and C++14 code, as well as __attribute__((fallthrough)) for C++98 and C code. Use them. Change-Id: I66aa178c2a96e2ff9ac3f6f02821c978b4ec3696 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | xcb: Drop libXi version checkLaszlo Agocs2016-10-102-20/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...because we cannot support it in a robust way. Querying the version via pkg-config only works when xi2 is picked up via pkg-config. Also, having a version at build time does not mean we'll have the same at runtime. Modern distros (e.g. Ubuntu 15.04 and newer) will have libXi 1.7.4 or newer. Task-number: QTBUG-56017 Change-Id: Ia4a3b0dc47f2b92bcc953f462c95602a8ea2efd6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Migrate libinput support away from QT_LIBRARY_VERSIONLaszlo Agocs2016-10-104-1/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | There may not be a version when libinput is not picked up via pkg-config. Add a config test instead. Task-number: QTBUG-56017 Change-Id: I421af4cef1b896413a4ebda561809a8b2a3386b3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | fix build of examples subdir with -no-guiOswald Buddenhagen2016-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | the opengl feature is defined in the gui module. Change-Id: Ibf63395729540092ca82ee4ffc4e2ff4971c2a29 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Make sure flags from library detections go to the right placesThiago Macieira2016-10-104-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split them and add -I flags to INCLUDEPATH and -D flags to DEFINES. Anything else gets reported as a problem and dropped. This has the benefit that qmake will automatically use -isystem for those paths if they lie in a system directory. As a consequence of that, we won't get any warnings in headers located there. There are multiple cases of glib, gtk, etc. headers producing warnings (such as enums ending in comma). This does not fix warnings produced by use of macros declared in system headers, though... Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I4b844cb518dbae5ea499811221f9015af985110a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Allow granular synchronous and asynchronous delivery of QPA eventsTor Arne Vestbø2016-10-103-74/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setSynchronousWindowSystemEvents() API of QWindowSystemInterface is supposed to be set globally by the platform plugin, not switched on and off to trigger async/sync deliver of events for a specific event. We introduce processWindowSystemEvent() in QWindowSystemInterfacePrivate to match postWindowSystemEvent(), where the former is synchronous and the latter is asynchronous. This is then coupled with a templated version of handleWindowSystemEvent() that then calls out to one of the two depending on the specialization that's used. The default specialization will decide based on the state set by setSynchronousWindowSystemEvents(), as before. This allows templated versions of handleMouseEvent, handleKeyEvent, etc to be added without maintaining two code paths, one for synchronous and one for asynchronous delivery, which in the end allows us to get away from using setSynchronousWindowSystemEvents() as a temporary switch to synchronous mode. The templates are defined in the QWindowSystemInterface source file, with explicit instantiations of the three supported modes of delivery, as having the definition in the header file would both require inlining, as well as qwindowsysteminterface.h having access to the private parts of QWindowSystemInterfacePrivate for the template function bodies. Task-number: QTBUG-56274 Change-Id: I54c34da1ad90ff243f11905529874695f556cfcd Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | tst_QSettings: Don't assume the presence of a key means isWritableTor Arne Vestbø2016-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous sync() of the specific scope and domain may have failed due to not having the necessary permissions, but the saved value may still be cached, so we need to check both. This was observed on macOS Sierra, where a failed sync() will result in marking the CFPrefsPlistSource as read-only, eg: 2016-10-04 13:14:11.713271 tst_qsettings[88537:767733] [User Defaults] attempt to set <private> for key in <private> in read-only (due to a previous failed write) preferences domain CFPrefsPlistSource<0x6180000e1780> (Domain: org.software.KillerAPP, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null)) Change-Id: I8976c1c4acfe2cb0d5510298d5c585faca9607f6 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | tst_QSettings: Fix tests on sandboxed platforms such as iOSTor Arne Vestbø2016-10-101-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WinRT is not the only sandboxed platform. Since it doesn't hurt to keep the test data in a well known location, we enable the code for all platforms. We also make sure to mkpath the location, since writableLocation doesn't guarantee that the location exists. Change-Id: Ie8d90c5fbdf3b7fbf85ba6be25372b0ef7c4da55 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | macOS: Get rid of m_qtView member in QCocoaWindow that aliased m_viewTor Arne Vestbø2016-10-109-49/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The member was mirroring m_view in all cases except for foreign windows. Instead of a member we now check window()->type() != Qt::ForeignWindow, which is more explicit, especially for people not normally working on the macOS platform. To call methods that are only implemented for our QNSView subclass, a new qnsview_cast() function has been introduced. Change-Id: I0a2cfe1a5e4502250c17e1c3ebdce19e9ee5e572 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | fix build with QT_NO_CAST_FROM_ASCIIOswald Buddenhagen2016-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | necessary for use outside qmake itself. amends f137957e08. Change-Id: Ie069f7b6efc969ab112e1f0ecd966eb06248fb94 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | move dbusmenu and dbustray under themes/genericunixOswald Buddenhagen2016-10-0724-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | that's the only place where they are used, and this clarifies the structure. Change-Id: I874beb7f049b34cc73079609b8baabcc1bd3cd39 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Make sure X11 paths are properly set in pluginsKai Koehne2016-10-062-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMAKE_X11_PREFIX and QMAKE_XKB_CONFIG_ROOT are now configured in qtgui, so we need to include qtgui-config.pri before accessing them in plugins. Task-number: QTBUG-56351 Change-Id: I2e18f0b03f826a93a9d9a1965bd024ee89656ae8 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8Liang Qi2016-10-0668-196/+189476
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-0668-196/+189476
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/mac/default_pre.prf mkspecs/features/qpa/genericunixfontdatabase.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf src/corelib/io/qiodevice.cpp Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-0518-83/+85
| | |\| | | | | | | | | | | | | Change-Id: I34b5e290233d0869fbafac094a939aec2bf83fd5