summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Widgets: use const (and const APIs) moreAnton Kudryavtsev2016-07-054-39/+39
| | | | | | | | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: Ia6cad50a10facf6fd4f73d1390edb8642a0aed32 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | And blacklisted a few tests in tst_QUdpSocket. Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtNative.java src/corelib/global/qglobal.cpp src/corelib/global/qsystemdetection.h src/corelib/io/qfileselector.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp tests/auto/network/socket/qudpsocket/BLACKLIST Task-number: QTBUG-54205 Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
| * Fixed developer build for MinGWOliver Wolff2016-06-151-2/+2
| | | | | | | | | | | | | | 0 must not be used as a null pointer constant Change-Id: I082d0e99c105fb02980b9cf390e7f6e4c9ad0869 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-043-10/+11
|\| | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| * QGraphicsView: clarify documentation for viewportTransformGiuseppe D'Angelo2016-04-021-1/+1
| | | | | | | | | | | | | | | | d->matrix holds the scene->viewport transform, not vice versa. Change-Id: I997cbdfbf519f39f242cd0dbbd00621e59ec9307 Task-number: QTBUG-48705 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * QGraphics*Layout: fix memory leaksGiuseppe D'Angelo2016-04-012-9/+10
| | | | | | | | | | | | | | Change-Id: I5f9d2ccc8912e3fa08e376b5f6b6450d22913406 Task-number: QTBUG-10768 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-214-0/+8
|\| | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| * QtWidgets: includemocsMarc Mutz2016-03-184-0/+8
| | | | | | | | | | | | | | | | A very simple way to save ~3KiB in test size and 440b in data size on GCC 5.3 Linux AMD64 release builds. Change-Id: I6619148cc497116b9772a00e1bc30d573a2b2534 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Use QFlags::setFlag where prudent in qtbaseAndre Somers2016-02-123-29/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFlags::setFlag is most useful to replace explicit constructs like if (condition) { someFlags |= TheConditionFlag; } else { someFlags &= ~TheConditionFlag; } with someFlags.setFlag(TheConditionFlag, condition); Change-Id: Ie4586681c83e0af812d5bbf14965aad51941a960 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Suppress memory allocation due to temporary containerSérgio Martins2016-02-111-1/+1
| | | | | | | | | | | | Change-Id: I337c3f7ed63444ac0950a30298eb619f462b7a16 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-0/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * Doc: corrected minor link issuesNico Vertriest2016-02-051-0/+1
| | | | | | | | | | | | Task-number: QTBUG-43810 Change-Id: I98eafe0c7ed55f309640e8495c83ffcef355aa08 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | QGraphicsItemAnimationPrivate::linearValueForStep(): pass vector by const-&Marc Mutz2016-02-081-21/+21
| | | | | | | | | | | | | | | | | | It's only read from. Avoids detach attempts in the many uses of front()/back(). Change-Id: I0fd5df77a6d3a9a37872e0ce28f5a2354aa8f957 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-021-2/+2
|\| | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
| * Fix GCC 6 valid warnings about misleading indendationsThiago Macieira2016-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | It's currently producing a lot of false positives, but a few are actually valid. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69029, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69122 and some others. Change-Id: I24a735698d3c4a719fc9ffff1425f29d7b5a3458 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsAnchorLayout: return a struct instead of a QListMarc Mutz2016-01-292-27/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... of QLists. The returned list was only ever exactly of size one or two, and two only if a local QList in the getGraphParts() function was not empty. Instead of using a QList to return those QLists, use a small struct of two QLists. This way, we avoid copying, memory allocations, and the code becomes a lot clearer, because we can give the members of the struct meaningful names, instead of at(0) and at(1). As a consequence, at the call site, the loop over the result can now be collapsed into an if. Saves ~1200b in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I5c2a3b3be0edcc418b310551abca51c410aca7c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QGraphicsAnchorLayout: remove a misguided use of QLinkedListMarc Mutz2016-01-191-24/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSimplexConstraints are held in QList everywhere, yet one single function, getGraphParts(), used a temporary QLinkedList. It did so because the function repeatedly walks the list, erasing elements from it until no more elements have been removed. Thus, in O-terms, QLinkedList is the correct choice here. Sadly, O-notation completely ignores the per-element cost, and this is where QLinkedList suffers. By the time a QList has shifted all of its elements left once, the QLinkedList probably has just finished allocating its first node. So, use a QList instead. That, however, turns the it = erase(it) loop quadratic, so re-formulate the processing part as a lambda and use std::remove_if. Don't even erase until we know how many items to erase. As a benefit, we save the final conversion of the remaining items back to a QList, and we can use QList::op+ to build the initial list, reducing the number of allocations performed by that container to one. Also saves ~770b in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: Iecf9e7961dd2b6b20039b9b0d472e32b3fae6994 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtWidgets: replace uses of inefficient QList<QPair>s with QVectorsMarc Mutz2016-01-182-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | These QPairs are larger than a void*, so holding them in QLists is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by holding them in QVector instead. Change-Id: I3c205f5326cfd96482563078bdca1747d718457f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsView: Graph: don't allocate QHashes on the heapMarc Mutz2016-01-171-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | ... just so you can observe their absence with QHash::value() returning nullptr. Instead, use find() + comparison to end() to detect presence or absence. Simplifies quite a bit of code. Change-Id: Ifd7921bfc8102677ea345ae37d38da31b8105426 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsView: Graph: remove faulty const_iterator::op=Marc Mutz2016-01-171-1/+0
| | | | | | | | | | | | | | | | | | It failed to copy 'g'. Fix by letting the compiler generate one. Change-Id: Ie19fdacb8f27aef821be58c0b727c802d71bfe64 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsView: Graph: don't compare pointers with op<Marc Mutz2016-01-171-2/+3
| | | | | | | | | | | | | | | | It's undefined behavior. Use std::less, which has defined behavior. Change-Id: I990d197590cf535c1cb5c055d0b6798e602446dc Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated license headersJani Heikkinen2016-01-1553-742/+1060
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-1/+1
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * Unbreak ubsan developer-buildMarc Mutz2016-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 5.3's undefined-behavior sanitizer checks that the declared type of the object is a base class of the dynamic type of the object on each access to a member of a class type. It therefore requires the typeinfo for these types, which for polymorphic types is emitted in the TU where the vtable is emitted, too. QFileDialogPrivate is a polymorphic non-exported class, so this failed at link-time. Ditto for the other cases. Fix by autotest-exporting the classs. Also, where applicable, de-inline the dtors, so the vtable (and typeinfo) are pinned to one TU, and the ctor, just because it's the correct thing to do. Change-Id: I2b7dba776282a2809c80eb2bc36440d7d698f926 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsView: replace some Q_FOREACH loops over const locals with C++11 ↵Marc Mutz2015-12-233-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | range-for This needs to be handled a bit carefully, because Qt containers will detach upon being iterated over using range-for. In the cases of this patch, that cannot happen, because all containers are local and marked as const (either by this patch or before). Separate patches will deal with other situations. Range-for loops are much more efficient than foreach loops. This patch shaves ~1.8KiB of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I5c58658937ac4323594161bf94a2fce3c5667914 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsView: replace some Q_FOREACH loops over rvalues with C++11 range-forMarc Mutz2015-12-236-45/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs to be handled a bit carefully, because Qt containers will detach upon being iterated over using range-for. In the cases of this patch, that trivially cannot happen, because all containers are marked as const when being assigned the rvalues previously found on the rhs of the Q_FOREACH. The new code thus does exactly what the old code did: take a const copy, then iterate over it. Separate patches will deal with other situations. Range-for loops are much more efficient than foreach loops. This patch shaves almost 4K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: Ida868b77d078cbfa0516d17e98e6f0a86fcdb7a3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Optimize a code path in QGraphicsScenePrivate::cancelGesturesForChildren()Marc Mutz2015-12-221-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If ev.isAccepted(), since list is gestures.toList(), the first foreach loop would clear 'gestures', one item at a time. The second foreach loop would then not execute at all. Make this case clearer by not executing either loop if ev.isAccepted(). Make it more performant by not iterating twice, but once, simply skipping those gestures in the second (remaining) loop which would have been removed by the first one. Also iterate over the equivalent QList instead of the QSet, because the former is way more efficient. Text size savings are present, but minimal. The runtime savings are signficant, of course. Change-Id: I3d5bfe99c5d3fcbe4c98816577846551c632f315 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsSceneBspTreeIndex: simplify the code of items()Marc Mutz2015-12-221-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code dealt with a lot of special cases, probably to avoid detaching. But the only case where deep copies are avoided is if a) there're no freeItemIndexes b) there're no unindexedItems c) the sort order is neither AcendingOrder nor DescendingOrder, which is funny, since those are the only two values for Qt::SortOrder. The code checks for SortOrder(-1), but nowhere in Qt is such a sort order created. Ergo, the deep copy was _never_ avoided. So simplify the code by always building the result list from the two input lists by copying all non-null items. Saves over 2KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I8e739fb78896b2ad0bec45d05e86a76fe1ede04a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsScene: don't build a temporary QList just to iterate over itMarc Mutz2015-12-221-7/+4
| | | | | | | | | | | | | | Iterate over the original list instead. Change-Id: I7be154c0e19074033df6f6e01f68d21a8904d2ee Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | QGraphicsScene: prevent lots of detaching d/t editing of copiesMarc Mutz2015-12-221-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTouchEvent::touchPoints() returns a const-&, but the old code took a copy, over which it then iterated, modifying the touch points, causing (necessary) detaches of both the list and the touch points. Befriend QTouchEvent and modify the list in-place, avoiding all detaches in the likely case that QTouchPoint contains the only copy of the touch point list. This is all the more important as the function is called once for every item-under-mouse in sendTouchBeginEvent(). Port to C++11 range-for as a drive-by. Change-Id: I2f74d19845711d97e3566886123b5d18d55db74c Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | QtWidgets: de-inline some more virtual dtorsMarc Mutz2015-12-212-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helps pinning the vtable to a single TU, which can prevent false negative RTTI (incl. dynamic_cast and catch()). But mostly because it's rather pointless to have dtors of polymophic function inline. Most of the time, the code will be called through the vtable indirection, anyway (which also means that an out-of-line copy of the code needs to exist in any case). The inline method will only be used when the compiler can prove the dynamic type of an object. Saves ~1.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: Ic4ce96da559252c8abc29d880530c84035db2306 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtWidgets: de-inline some Private ctorsMarc Mutz2015-12-216-97/+113
| | | | | | | | | | | | | | | | | | | | | | | | Saves ~7KiB text size on optimized GCC 4.9 Linux AMD64 builds. Drive-by fix: properly init QGraphicsProxyWidgetPrivate::proxyIsGivingFocus. Change-Id: Iac923f0f2a9cdc0349f706c5760883a210be36f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | De-duplicate QGraphicsItemPrivate vtableMarc Mutz2015-12-182-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Since QGraphicsItemPrivate is already exported, users of this class 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. Also saves ~2.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Task-number: QTBUG-45582 Change-Id: Ibb404a43d5464e8e280ccebd5f95719852f5a986 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsScene: replace QList::prepend()s with appends()Marc Mutz2015-12-171-3/+3
| | | | | | | | | | | | | | | | | | Use the new reverse_iterator support in QList to avoid building a QList with prepend()ing, using append() instead. Change-Id: Ia1f6d0ecc08a824f11d93a6fd4077b11b1b0f786 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QGraphicsAnchorLayout: replace three loops over QHash::keys() with ↵Marc Mutz2015-12-162-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | QHash::const_iterator loops Quite obviously faster (doesn't need to populate a QList first, just to iterate over it). Also saves 1.5KiB text on optimized GCC 4.9 Linux AMD64 builds. Change-Id: If4c7af80165a6027d39359bac22df30e7ca09815 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QGraphicsAnchorLayout: replace a Q_FOREACH with std::accumulateMarc Mutz2015-12-161-4/+2
| | | | | | | | | | | | | | | | Saves ~0.5KiB in text size on optimized Linux AMD64 GCC 4.9 builds. Change-Id: Iba2c02eed44f1ee3521bc49fe7afae9c2e916fdc Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QGraphicsAnchorLayout: own includes go firstMarc Mutz2015-12-161-1/+2
| | | | | | | | | | | | | | ... to check that they compile stand-alone. Change-Id: I10f651125c17ea64c631f2bede4332ea71d50a10 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtWidgets: replace some index-based for loops with C++11 range-forMarc Mutz2015-12-161-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs to be handled a bit carefully, because Qt containers will detach upon being iteratoed over using range-for. In the cases of this patch, that cannot happen, because all containers are marked as const (either by this patch or before). Separate patches will deal with other situations. Apart from being more readable, range-for loops are also the most efficient for loop. This patch shaves almost 2K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I53810c7b25420b4fd449d20c90c07503c5e76a66 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtWidgets: replace some Q_FOREACH loops with C++11 range-forMarc Mutz2015-12-161-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs to be handled a bit carefully, because Qt containers will detach upon being iterated over using range-for. In the cases of this patch, that cannot happen, because all containers are marked as const (either by this patch or before). Separate patches will deal with other situations. Range-for loops are much more efficient than foreach loops. This patch shaves almost 3K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I7b1d41db4d9b5db8b515cb75686dc5135177da68 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | widgets: Pass non-trivially-copyable or large types by const-refSérgio Martins2015-12-125-4/+9
| | | | | | | | | | Change-Id: I912c6a9ee7b27350ac3d1fe147b697338e76f53c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Clean up QGraphicsItemCache::purge()Marc Mutz2015-12-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code assigned an empty QPoint to elements contained by value in a QHash that was cleared out in the very next step. That makes no sense, because the operations in the loop cannot possibly cause a re-entrancy into QGraphicsItemCache, which would be the only explanation for modifying the state of a death-row object. While at it, replace the use of the highly inefficient (and no longer needed) QMutableHashIterator with C++11 range-for, taking care to iterate over a const reference to avoid detaches. Change-Id: Ie3eba0f954644a27932666bc9e97f1ca8f36a578 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QtWidgets: use new qUtf16Printable() instead of qPrintable()Marc Mutz2015-11-211-1/+1
| | | | | | | | | | | | | | | | This is more efficient and works even with non-US-ASCII QStrings. Change-Id: I4ca19de60347ded03022ef8540a6708c563bc9d7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-044-16/+16
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/ptrsize.test configure src/corelib/global/qnamespace.h src/network/socket/qabstractsocket.cpp tests/auto/other/networkselftest/networkselftest.pro Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
| * QtWidgets: use printf-style qWarning/qDebug where possible (I)Marc Mutz2015-10-274-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "..."; with qWarning("..."); Change-Id: I1f6869b024103c98262f1deae014e0d7337a541c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | qevent.h: Add fixme comments to remove include directives for Qt 6.Friedemann Kleint2015-10-021-0/+1
|/ | | | | | | | Mark include directives in qevent.h for removal and preemptively add missing headers in code base. Change-Id: I81011d7bfad4a09d80deeda6d1bed67b5c0e63c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QGraphicsProxyWidget: forward touch events to QWidgetRafael Roquetto2015-09-221-0/+13
| | | | | | | | | | | | | | | | When working with QGraphicsView/QGraphicsScene, touch events are sent to QGraphicsView's viewport() event handler, which then dispatches it to the corresponding QGraphicsItem, if any. In the case of QGraphicsProxyWidget, we need to forward these touch events to the encapsulated QWidget, otherwise it will never receive them (i.e. the event chain for touch events terminates at QGraphicsProxyWidget). This also enables QWidgets associated with QGraphicsProxyWidget to grab gestures. Task-id: QTBUG-45737 Change-Id: Ia441d3576afb6c97376be6f2ff073901e6e928a5 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-261-4/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * Fix crash when mixing widgets with QtQuick 1 and Qt Quick 2Simon Hausmann2015-08-061-4/+7
| | | | | | | | | | | | | | | | | | Apply the fix from commit 313a74cc4a9a5d200b2059d3d8767fe1a274c50d also to the QWidget and the QGraphicsObject destructor. Task-number: QTCREATORBUG-10273 Change-Id: I47983b49cc4d9b75a2e1ee838e13403bc4b95a59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>