summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Disallow deep or widely nested entity references.old/5.1Mitch Curtis2013-11-155-0/+159
| | | | | | | | | | | Nested entities with a depth of 2 or more will fail. Entities that fully expand to more than 1024 characters will also fail. Change-Id: I75525bc1edfa796c4db30a5109fe21011ad43a2d Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com> (cherries picked from commits 46a8885ae486e238a39efa5119c2714f328b08e4 and f1053d94f59f053ce4acad9320df14f1fbe4faac)
* Keep web fontdata alive as long as CG uses itAllan Sandfeld Jensen2013-11-141-4/+13
| | | | | | | | | | | | With OS X 10.9 font decoding appears to happen lazily, this means we have to ensure the data we provide CG is kept alive until it dereferences it itself. Task-number: QTBUG-34332 Change-Id: I8fc38fafba746b062c4ad16314b0a410fd0b668d Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> (cherry picked from qtbase/89ab2671051671ecf440ba480caf0b6b6768b1a9) Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* OAuth over XMLHttpRequest failsAllan Sandfeld Jensen2013-09-191-1/+1
| | | | | | | | We currently always generate our own Authorization header, which overrides any Authorization headers set the by user application. Change-Id: I3b11c8dd0bc708e795ff697262a383ce28cae2f3 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Fix timing issue in incremental data retrieval mechanismGatis Paeglis2013-09-192-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that we are not reading wrong PropertyNotify events. From icccm: Requestors may receive a property of type INCR in response to any target that results in selection data. This indicates that the owner will send the actual data incrementally. The selection requestor: - Waits for the SelectionNotify event. - Loops: + Retrieving data using GetProperty with the delete argument True. + Waiting for a PropertyNotify with the state argument NewValue. - Waits until the property named by the PropertyNotify event is zero-length. - Deletes the zero-length property. The issue with the current approach was that after receiving INCR we simply fetched the first PropertyNotify event from the queue, where timestamp indicates that it was generated before INCR, which is not what need. We need PropertyNotify events with a timestamp older than the one on INCR. Task-number: QTBUG-32045 Change-Id: I3b9a006f7d346f67c51e1a296d67a9dc89efadb1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Implement INCR property mechanism for large data transfers [XCB]Gatis Paeglis2013-09-193-4/+138
| | | | | | | Implement INCR property mechanism according to the icccm specification. Change-Id: Ic8f85b71cab825d70ee1b61f29acd09fa4c3e642 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix transform (rotation matrix) uniform scale testing.Balazs Domjan2013-09-191-5/+22
| | | | | | | | The rotation matrix is different according to the order of scale and rotate operations. The fix takes into account this. Task-number: QTBUG-31822 Change-Id: Ia1c9068e54966ec083af9c165af29caa87c510f6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix QFileSystemWatcher inotifyRiccardo Ferrazzo2013-09-193-5/+102
| | | | | | | | | | | On linux using QFileSystemWatcher with inotify backend when a watched file is moved and added again to the watched files its path is not replaced with the new one. This behavior prevents the emission of the fileChanged signal with the wrong file path. Task-number: QTBUG-33211 Change-Id: Ib45d8efdf5afbf8b8f6b4b26e43f3d6ee740aca6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* PNG: properly handle 1bpp greyscale images with alphaGiuseppe D'Angelo2013-09-181-0/+9
| | | | | | | | | | | | | PNG allows 1bpp greyscale images (PNG_COLOR_TYPE_GRAY) to have an alpha key; so even in this case we need to inquiry if the image has a transparency, and if so modify the color table of the monochrome image accordingly. Task-number: QTBUG-33503 Change-Id: Iab07c8f95ac8865269c48816e222645cdcb6bbc1 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Add missing initialization before requesting png data for scaled readSamuel Gaist2013-09-181-7/+8
| | | | | | | | | | Initialize all values read to sensible default in case reading them fails in read_image_scaled. It has already been done for a normal image read Task-number: QTBUG-32674 Change-Id: I19dccad7ef342f1b1bba6b513c04d3661d128a54 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Fix sigchld-HandlerH. Rittich2013-09-171-9/+31
| | | | | | | | | | Changed the sigchld-Handler such that the SA_SIGINFO flag is handeled correctly. Furthermore the signal mask is preserved such that the original signal handler is not interrupted when not allowed. Task-number: QTBUG-32979 Change-Id: Iec7663e7289ea5d95155f52cf8788ebf646cfabd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Initialize the print panel with the NSPrintInfo we have createdAndy Shaw2013-09-171-1/+1
| | | | | | | | | | | Since the Cocoa Print Panel was not initialized with the NSPrintInfo we had created, it meant that it did get any of the settings from the print dialog as it was trying to access an invalid NSPrintInfo. Task-number: QTBUG-32734 Change-Id: I23c766eb13281f4c494656a54d37c5bf28fb68fd Reviewed-by: John Layt <jlayt@kde.org>
* Keep Cocoa screen list in sync on screen connect.Morten Johan Sørvig2013-09-172-1/+9
| | | | | | | | | | | | | | The backtrace in QTBUG-33012 indicates that the screen list is getting out of sync on plugging/unplugging an external monitor. This happens on 10.9 only. Check if we are about to out of bounds access the screen list; call updateScreens() which will add the new screen. Task-number: QTBUG-33012 Change-Id: Id1acc3baca9e60e7f2a83188d66cdf9d322a582c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Doc: Define a generic thumbnail for a number of examplesTopi Reinio2013-09-171-1/+26
| | | | | | | | | | Add examples that do not have any images in their documentation into manifest-meta qdocconf file, and define a generic image to use as a thumbnail in Qt Creator Welcome mode. Task-number: QTBUG-31314 Change-Id: I1625bf15cbaa53e940a07b1828dc77ca5ba45ccc Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* HTTP authentication fails if QUrl contains password with %Allan Sandfeld Jensen2013-09-172-4/+4
| | | | | | | | | | | | Default for QUrl::password() and QUrl::userName() is in Qt 5.1 QUrl::PrettyDecoded which means the return value may contain percent-encodings. For authentication we need the real decoded result, and should instead use QUrl::FullyDecoded. Note this bug has already been fixed indirectly in Qt 5.2 since the default for the two methods was changed to QUrl::FullyDecoded. Change-Id: Ia0f38c073cb001e37ad8b3eda40b3db756bec3dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QSqlDriver::handle casting examplesGiuseppe D'Angelo2013-09-171-2/+2
| | | | | | | | QVariant::typeName() returns a const char *, so one can't use == to compare it against another string. Change-Id: Id7a4c06a9e4874459609b3749f87d39ed73e8405 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* stickman example: fix header include guardMarc Mutz2013-09-161-1/+1
| | | | | Change-Id: I65f2187b309f075035ad6c8beab40bf2a177140c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Remove duplicated Qt Concurrent overviewSze Howe Koh2013-09-167-116/+11
| | | | | | | | | - The "Concurrent Programming" page is an exact duplicate of the Qt Concurrent module landing page. - The "qtconcurrent intro" target is not referenced anywhere. Change-Id: Ice9b4360783013fe972258ca54a0004be43b8766 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Remove space between class name and method nameSze Howe Koh2013-09-161-2/+2
| | | | | | | | | | Previously, the generated documentation contained "QFutureWatcher:: progressValueChanged()". While it is legal C++, it prevented QDoc from auto-linking to the QFutureWatcher class reference. Change-Id: I2cace763f1825b0b4478b2bde95679d25df8bb5e Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* xcb: QWindow never uses XCB_GRAVITY_CENTERShawn Rutledge2013-09-162-4/+45
| | | | | | | | | | | | | Center gravity doesn't mean center the window, it only affects the method of converting between internal window bounds and decorated bounds. So wanting to have each dialog centered w.r.t. its transient parent is not a reason for using center gravity. Instead it caused the bug that when you resize a QMessageBox by clicking the Show Details button, it jumps downwards on the screen. Task-number: QTBUG-32473 Change-Id: I3fabf3caa1e4d10fd4f7508e297f73efe5cc51b6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* tst_QTextLayout: fix unhandled enum value in switch warningMarc Mutz2013-09-161-0/+2
| | | | | Change-Id: I006286487a409d492fe398a2fed5dd854f758f9f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* accessible: fix if (!foo != const) constructMarc Mutz2013-09-161-1/+1
| | | | | | | Fixes a Clang warning. Change-Id: I114cf0f84ef9a4fe4ae814cedca883945d76e86c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Make qdoc ignore the Q_DECL_DEPRECATED tokenGiuseppe D'Angelo2013-09-161-0/+1
| | | | | | Task-number: QTBUG-27829 Change-Id: Ic3d25cd7da2a2c1266dfa113b7138f4086215777 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QtDBus: fix build on MSVC2008 Debug mode.Nicolás Alvarez2013-09-152-0/+12
| | | | | | | | | | | | | | | Normally, searching for a V in a container of T using std::lower_bound only needs an operator<(T,V). But in MSVC2008 debug mode, STL algorithms perform some extra checks, such as ensuring the range passed to std::lower_bound is sorted. This adds a requirement for operator<(T,T) and operator<(V,T). QtDBus didn't compile on MSVC2008+Debug since 1e37d854 (Sept 2012!) because it missed those operator overloads for some private types. Task-number: QTBUG-33473 Change-Id: I18902d86e6c58349eb7ba3601dc383ad5431c460 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qurlinternal: fix a use of memcpy on overlapping memoryMarc Mutz2013-09-141-3/+4
| | | | | | | | | | | | | | | | | | | The old code smply copied 100 shorts from the pointer passed into the ushortarray ctor, regardless of the actual bounds of the original array. Fix by making the ctor take the array by deference, deducing the size as a template parameter, and only copying that much. Fixes asan trace: ==18660==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x7fff3c56de00,0x7fff3c56dec8) and [0x7fff3c56dd60, 0x7fff3c56de28) overlap #0 0x457161 in memcpy asan_interceptors.cc:330 #1 0x4c40fe in ushortarray::ushortarray(unsigned short*) qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:62 #2 0x4b0437 in ushortarray::ushortarray(unsigned short*) qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:63 #3 0x47b643 in tst_QUrlInternal::idna_testsuite_data() qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:119 ... Change-Id: Ie497bc8d337bc680a562482ca71ace535797ffb3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QSettings: add missing () around a macro argument useMarc Mutz2013-09-141-1/+1
| | | | | | | | | | | 'val' was set to QList<...>() << ... << ... further down. Fixes a Clang warning. Change-Id: I5fe80d87dbe2c1d50652dfd7b6c5f4a9198cd467 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* examples: fix if (!foo == 0)Marc Mutz2013-09-141-1/+1
| | | | | | | Clang issues a warning for this. Change-Id: I1b9741d0260d43f864e404c693b5a459c5038b67 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* examples: remove unused static const variablesMarc Mutz2013-09-144-7/+0
| | | | | | | They cause warnings on Clang. Change-Id: If599303f4a00c2a24f0a7c369299f3ea6fe7fc91 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix loss of valid dbus objects after unregisterObjectJohn Brooks2013-09-143-40/+11
| | | | | | | | | | | | | | | | | | Partial revert of 3c6bb0ed8bfc9a2c679f4154585a16e47275ad21 and 57aed703d21c3a360d95fd9f85396d1283d3fdd0. When registering an object that was previously unregistered but not yet garbage collected, the activeChildren count on the parent node was not incremented, which could result in other registered objects disappearing after a later unregisterObject. Copying objects in the tree is not free, but it's not expensive enough or used frequently enough to justify that error-prone logic. It's much safer to simply remove objects immediately. Change-Id: I3dc59c2ebd07b237518424fcd8ea7371a22d6d15 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Remove section about how to start threadsSze Howe Koh2013-09-144-44/+5
| | | | | | | | | | | | | | - Incomplete: It doesn't talk about how to use a raw QThread, or QRunnable, or Qt Concurrent. - Redundant: Its contents are already presented in QThread's class ref, and the line before this section links to the "Multithreading Technologies in Qt" overview page which provides a more complete intro Also remove snippet markers that are no longer used. Change-Id: I89b7bd72f10c8ffdfd9b7772e2493050aafc9c88 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Remove page about how to start QThreadsSze Howe Koh2013-09-143-114/+2
| | | | | | | | | | | | | | | | Multiple issues: - Incomplete: It doesn't talk about instantiating a raw QThread - Redundant: Its contents are already presented in QThread's class ref - Incorrect: It is legal to create a QThread before a QCoreApplication - Irrelevant: The bit about QCoreApplication::exec() and the etymology of "GUI thread" is unrelated to the topic of starting threads Also remove snippets that are no longer used Change-Id: Ice1819845b5b2cf843719edaa7b0f4bbb1e8bd97 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Move multithreading guidelines to the overview pageSze Howe Koh2013-09-142-64/+58
| | | | | | | | | | | | | | It's helpful to see how to choose among different solutions, right after seeing short descriptions of all the solutions. - Some minor rewording was done during the move - The example about polling ports in a new thread was removed because there are better ways to do that without threads. Change-Id: I2cb571a4dbf9be93fb0ec88c60fb7406996c345b Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add an overview page to compare multithreading techniquesSze Howe Koh2013-09-141-1/+121
| | | | | | Change-Id: I75e67ecb96423a3ebd82b32e6855378a73463fb7 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix copy+paste errors in the QString class refSze Howe Koh2013-09-141-8/+4
| | | | | | | | Also bring text closer to the style guide at http://qt-project.org/wiki/CppDocumentationStyle Change-Id: I30b1c36ac125a10c002efeb36978ced0d7a8f8bf Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Xcode: Resolve extra compiler (e.g qrc) dependenciesTor Arne Vestbø2013-09-131-1/+1
| | | | | | | | | | | | | | The Xcode generator relies on the generic makefile generator for extra compilers such as qrc and moc, by generating makefiles that are then executed as separate build steps in the Xcode build. These makefiles are generated by entering a special mode in the Xcode generator, in which case we _do_ want to resolve dependencies, so that e.g. the files referenced inside a qrc file are added as dependencies to the makefile rule that generates the qrc-cpp file. Change-Id: I96bdcb165e9774a6328ae1980986fa2c6b00c6d9 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Revert recent attempt to fix Invalid Drawable error on Mac.Chris Meyer2013-09-132-7/+3
| | | | | | | | This reverts commit 59fd36bb914cae248d3c5100dd734d6d90a58dca, which caused other drawing problems. Change-Id: I3bb75fd3ca1cd21ffbb9ef5474266f4cd615a64a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix highdpi CE_HeaderLabel pixmaps in fusion styleMorten Johan Sørvig2013-09-131-1/+4
| | | | | | | | | | Make sure enough pixels is sourced by multiplying the layout rect size with the pixmaps devicePixelRatio. Task-number: QTBUG-31477 Change-Id: I742603c09a65a520587da3eef9479ef7f0c87022 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QNX: new signals for foreign windows creation/closingMyoungSeok Song2013-09-132-1/+8
| | | | | | | | | Implement the foreignWindowCreated and foreignWindow closed signals, emitted when foreign windows are created and closed, respectively. Change-Id: I72dd5380e6061f191eb8362fda5dd8fb8e9ed06b Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QNX: add nativeResourceForScreenMyoungSeok Song2013-09-122-0/+9
| | | | | | | | | | | | Implemented nativeResourceForScreen api to return QObject* which can be used to connect foreignWindowCreated, foreignWindowClosed signal in QQnxScreen. Usecase is to connect signal in custom QML component as below QObject * obs = interface->nativeResourceForScreen("QObject*", screen); connect(obs, SIGNAL(foreignWindowCreated(void*)), d, SLOT(newForeignWindowCreated(void*))); Change-Id: I512c3b6d188a2e90ef7b8e89c413ca420a29dd9b Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Windows style: Support underlined mnemonics from Qt Quick ControlsGabriel de Dietrich2013-09-121-0/+6
| | | | | | | | We use the usual accessibility + private property combo pattern. Task-number: QTBUG-33030 Change-Id: I7fbb704c949ff2df163536534f6f46d2e226402d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QtConcurrent: fix median calculationMarc Mutz2013-09-121-1/+1
| | | | | | | | The median, for arrays of odd size, is found in [size/2], not [size/2+1]. For arrays of even size, the code doesn't work anyway, so nothing to do there. Change-Id: Id23ff3fe9538c2d8ef8f88e23127cb92af08b444 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* standarddialogs example: add detailed textShawn Rutledge2013-09-121-0/+4
| | | | | | | | | Demonstrates that you can have mnemonic buttons which don't conflict with the Ctrl-A and Ctrl-C shortcuts. Task-number: QTBUG-6731 Change-Id: I41ce64e6f3bd0cf387af13c5c37894b721b5a3bb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMessageBox: implemented shortcut for selectAllShawn Rutledge2013-09-121-0/+9
| | | | | | | | | | The context menu all along has indicated that Ctrl-A selects all the text, so now that is actually implemented. Task-number: QTBUG-6731 Change-Id: I82dac3aea530e5a3fcd59217c4c0118025061c7d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMessageBox: shortcuts for selectAll, copy don't conflict with buttonsShawn Rutledge2013-09-121-1/+1
| | | | | | | | | | | | | You can hit a key with no modifier to select a dialog button that has the corresponding mnemonic, but it doesn't make sense to do that if the Control or Meta key is being held. Now you can hit Ctrl-A, Ctrl-C to select all the message detail text and copy it to the clipboard, even if the dialog has buttons with mnemonics like &Continue and Save &Again. But as before, Alt-C, plain C, Alt-A and plain A select the mnemonic buttons on the dialog. Change-Id: I40c052dbb7730bde444ac2de405724a3203d1472 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Windows: Fix window opacity for non-translucent windows.Friedemann Kleint2013-09-122-2/+5
| | | | | | | | | Use the UpdateLayeredWindow() functions only for windows with alpha. Task-number: QTBUG-33025 Change-Id: I64b0c28ee0997cd3d09dc76babe105ed474c6835 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Compilation fix for libjpeg release 9aavit2013-09-111-23/+6
| | | | | | | | | | | | In the latest libjpeg version, the "boolean" type is changed so that true and false no longer can be used instead of TRUE and FALSE. Also, purge some ancient code remains meant to support a now defunct OS´s idea about the boolean type. Task-number: QTBUG-33166 Change-Id: Iebbdf300cfdc22775954de65f985358424ed2b49 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* fix configure -commercialJoerg Bornemann2013-09-113-8/+8
| | | | | | | | | | | Commit 0aad3fc742a7aa15c21fe75e2b1b001f1f73468c broke "configure -commercial". The license check needs to know where Qt's source directory is. Change-Id: I5e53135b6b628eb5e413b2c2b3b8721dae02b503 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Kalle Viironen <kalle.viironen@digia.com> Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix echoplugin docs: Q_INTERFACES expects a space-separated list.Mitch Curtis2013-09-111-1/+1
| | | | | | | Task-number: QTBUG-25580 Change-Id: I736d5743b7901bf207c31795c96acc02fd149277 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix the internal QDir sortingGiuseppe D'Angelo2013-09-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If two items are equal according to the current sorting criterion, the sorting predicate uses the address of the items to break the tie. The problem is that the items themselves are being moved during the sort; therefore, this will break the Strict Weak Ordering that std::sort requires. For instance, suppose to be sorting case-insensitively the following array: ("b", "a", "A") Simulating a swapped-based sorting can lead to: Array before Evaluated predicate Array after ("b", "a", "A") "a" < "A" (1) ("b", "a", "A") ^ ^ ("b", "a", "A") "b" < "A" (2) ("A", "a", "b") ^ ^ ("A", "a", "b") "A" < "a" (3) (XXXXXXXXXXXXX) ^ ^ (1) True, because of the array ordering (they're equal otherwise) (2) False: swap them (3) True, because of the array ordering (they're equal otherwise) (1) and (3) say that "a" < "A" and "A" < "a", SWO gets violated, leading to undefined behavior. This problem was causing QFileSystemModel autotests failures (cf. [1]) after switching to STL algorithms instead of using qSort. The array to be ordered in that case is ("a", "c", "C"), cf. tst_QFileSystemModel::caseSensitivity. (STL algorithms are much smarter than good ol' quicksort in qSort; if we're ordering on an array which fits in a cache line, they turn to the much faster (~1 robe) insertion sort. Violating SWO with a quick sort usually just gets to a non-sorted container; insertion sort is implementable in ways that rely on SWO, otherwise they will overflow the iterator; cf. Cormen/Leiserson/Rivest and the other literature on the topic.) This commit reverts commit fa5f3a44 (in Qt 4). [1] http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_01749/linux-g++_shadow-build_Ubuntu_11.10_x86/log.txt.gz Change-Id: I5d8ac0d0907675c501717969abee2816b41eca18 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix Invalid Drawable error when using createWindowContainer on Mac.Chris Meyer2013-09-102-3/+7
| | | | | | | | | | | You are not supposed to call NSOpenGLContext -setView: for a view that has not yet called drawRect. Doing this would result in a invalid drawable error. Similar to 4.8 commit cd2a51a66f52767c20e80361033c573651b3a08d Change-Id: Ibb2300a8c6fe52f786f813987e93d4a3dc145366 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Doc: split up Qdoc-manualNico Vertriest2013-09-1018-8893/+8859
| | | | | | | | | | | | | qdoc-manual.qdoc is now an overview document Each section is a separate qdoc file Title modification in minimal qdocconf qdoc file Task-number: QTBUG-31801 Change-Id: I9e50eb8c4f1f501e9c0bc768372d4393b73053ed Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>