summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QFileDialog: Stabilize tests.Friedemann Kleint2015-05-012-20/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The init()/cleanup() code in tst_qfiledialog and tst_qfiledialog2 currently differs and fails to clean up the settings file since it only removes the legacy settings under the Qt group and instantiates a new QFileDialog while the QSettings class is still in scope. Also, it has no means of clearing the setLastVisitedDirectory(), which causes the tst_QFiledialog::completer() and tst_QFiledialog::history() tests to interfere, leaving the settings in an invalid state. tst_qfiledialog2 does not use QStandardPaths::setTestModeEnabled((). - Ensure the last visited URL is always clean by making QFileDialogPrivate::setLastVisitedDirectory() static and calling it from init(). - Introduce a cleanupSettingsFile() function to the tests that cleans both groups and call it from initTestCase() and cleanup() to ensure a clean state. - Add QStandardPaths::setTestModeEnabled() to tst_qfiledialog2. Fixes sporadic test fails when executing tst_QFiledialog::completer() and tst_QFiledialog::history() in a sequence. Task-number: QTBUG-45764 Change-Id: I24de3caabf77be067b385d64ff11b7a07fe12b72 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* [DiagLib] Sync QChar enumsKonstantin Ritt2015-05-011-0/+29
| | | | | | | These values were added as part of upgrading to Unicode 7.0 Change-Id: Ib208828a7685ba4f89f0e2f06033f74c8ff13532 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* Add missing RGB32 <-> RGB30 convertionsAllan Sandfeld Jensen2015-04-302-35/+86
| | | | | | | | Completes the inplace converters so that we can rely on inplace conversions to succede as long as the image depth is the same. Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix QImage format after inplace conversionAllan Sandfeld Jensen2015-04-301-63/+147
| | | | | | | | | | | | | Some inplace conversions would not set the requested image format in the returned image, due to the same conversion being used for several destination formats. This patch ensures all inplace conversions return the right format, and adds testing infrastructure to easily test iterate over all formats so that they all can be tested. Change-Id: I68ab17a713ddb2aa8ed6aaf0a0a1ec8bbcb56090 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix two errors in RGB30 conversionsAllan Sandfeld Jensen2015-04-301-0/+15
| | | | | | | | | The one converters from RGB30 was misplaced in the method table, and the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake when alpha was 2. Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* The qpluginloader machtest needs Q_AUTOTEST_EXPORTFrederik Gladhorn2015-04-301-1/+1
| | | | | | | Doing a build on OS X without -developer-build fails. Change-Id: I49c178ab2428177d9dd94f84620595a4bc132244 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add support to set text/uri-list mimedata via setData()Marko Kangas2015-04-281-1/+16
| | | | | | | | | Fixed issue that text/uri-list mimedata got from QMimeData::data() was corrupted after setting it back via QMimeData::setData() Change-Id: I2377523a9286519402ab9127ed7f3fa66e39a679 Task-number: QTBUG-45486 Reviewed-by: David Faure <david.faure@kdab.com>
* Preserve QImage metadata in image transformsAllan Sandfeld Jensen2015-04-281-0/+36
| | | | | | | | | Some QImage methods were not preserving image metadata, or only preserving some of it. This adds the missing parts and adds a test for metadata. Change-Id: Ib5892a23e49dfde5ea26074d3deaa887fa930c6b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Tests: Use blacklist for failing tst_qfilesystemwatcher testsCaroline Chao2015-04-282-2/+8
| | | | | | | | | | Remove the insignificant_tests CONFIG option in favor of a BLACKLIST file. The tests blacklisted have been found using CI builds logs. Change-Id: I34374ed7269f941c330c65d97fe083c83d3df461 Task-number: QTBUG-33574 Task-number: QTBUG-30943 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Moc: test if superclass list is not empty before accessing first()Jacek Całusiński2015-04-271-0/+4
| | | | | | | | | | Accessing QList().first() with an empty superclassList caused assertion fail. Added check to fix it. Change-Id: I1aff35e0d267fc0e670beadba1bd196b175a4da8 Co-authored-with: Olivier Goffart <ogoffart@woboq.com> Task-number: QTBUG-45790 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Tests: Blacklist tst_QHostInfo::abortHostLookupInDifferentThreadCaroline Chao2015-04-272-2/+3
| | | | | | | | | | Remove the insignificant_test CONFIG option in favor of a BLACKLIST file. This test has been found failing on OpenSuse in CI. Change-Id: Ibc6af3c30277fec7e422e8bbeccd9437de2a61ce Task-number: QTBUG-23837 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* QMainWindow::restoreDockWidget(): Fix positioning of floating docks with ↵Friedemann Kleint2015-04-261-7/+66
| | | | | | | | | | | native decoration. Use QWidget::move() to position floating dock widgets. Add a test for QMainWindow::restoreDockWidget(). Task-number: QTBUG-45780 Change-Id: I945917728a663916e8c225b9d3d2a75fa508d68f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Tests: Blacklist task260974_menuItemRectangleForComboBoxPopupCaroline Chao2015-04-241-0/+3
| | | | | | | | On OS X 10.10. This test in tst_QComboBox is currently failing in CI. Change-Id: Ie326f79a900c3ae926c7ebe5bb5880dd422cee60 Task-number: QTBUG-45531 Reviewed-by: David Faure <david.faure@kdab.com>
* fix distclean targetsOswald Buddenhagen2015-04-231-0/+1
| | | | | | | | | | this makes the distclean targets work throughout qt. the dreaded confclean target is aliased to distclean. Task-number: QTBUG-8202 Task-number: QTBUG-20566 Change-Id: I7ac8e3b5b0110825dc93e4fa885281db91c6cf83 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix inplace double mirroring on odd sized imagesAllan Sandfeld Jensen2015-04-231-0/+51
| | | | | | | | | | | | | | The QImage inplace mirroring method, failed to handle the middle line when mirroring both ways (rotate 180). In both other mirroring cases the middle can be left untouched, but in this case it needs to be mirrored half way. To make the logic simpler, double mirroring will now mirror half the lines instead of half of every line. Change-Id: Iaa1f1e1c3f7dedfb78891fc93207f6d0c64bcafe Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* uic: Delay the setting of QPushButton::default.Friedemann Kleint2015-04-237-8/+22
| | | | | | | | | | | For the property to take effect, the button must have its parent set. This might not be the case when a container like for example QTabWidget is involved. Move the setting of the property to the bottom of setupUi. Task-number: QTBUG-44406 Change-Id: Ic2013865a020986475fa28f2e3805c63d4de8ed0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Windows: Fix QLockFile hanging when file cannot be created.Friedemann Kleint2015-04-232-0/+66
| | | | | | | | | | | | | | Return QLockFile::PermissionError when file does not exist, preventing the stale file detection logic from triggering. Add Windows-only autotest trying to create a lock file in a system folder guarded with checks for elevated processes and UAC virtualization. Task-number: QTBUG-45631 Change-Id: I1790f8f925660f6bf1df94c2ced901e6ec57cbb0 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* tst_QFileSystemWatcher: Improve diagnostics.Friedemann Kleint2015-04-231-7/+67
| | | | | | | | | | Add a special signal spy that records the time and path received to obtain information on what triggered it for the flaky cases where more than the expected signals were emitted. Task-number: QTBUG-30943 Change-Id: I67510ce5e8e19b49c0ca41457f8357b720cade76 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Revert "Remove separate SSE4 unpremultiply function"Allan Sandfeld Jensen2015-04-231-0/+19
| | | | | | | | | | | Could causedSSE4 instructions to be used on non SSE4 machines in cases when qUnpremultiplywas not inlined. This reverts commit 964ccc58534aac436529007000d1c38d76c88834. Change-Id: Ic676ade8f75129e8d37c4d96cbfb2bdb5b794919 Task-number: QTBUG-45741 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tests: Remove tst_QGraphicsIten::sorting from the BLACKLIST fileCaroline Chao2015-04-221-2/+0
| | | | | | | | The test tst_QGraphicsIten::sorting is blacklisted but always passing. Change-Id: I69bbd4b4bbe227267e16ab5558ddabe7d2c0b1b3 Task-number: QTBUG-41342 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Tests: Blacklist tst_QGraphicItem::ensureUpdateOnTextItemCaroline Chao2015-04-221-0/+2
| | | | | | | | On OS X 10.10. This test is currently failing in CI. Change-Id: I1b3a33b404c915e83c5e4fa0a7af69d1b941d93c Task-number: QTBUG-41342 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Improve tst_uic.Friedemann Kleint2015-04-221-28/+66
| | | | | | | | | | | | | - Make the version regexp a member variable, avoiding repeated construction. - Use QVERIFY2() with error message for opening files. - On failure, try to locate the standard diff tool and produce diff output for comparison, which should make for example copyright header changes much easier. Task-number: QTBUG-44406 Change-Id: Ic759899c1da3394e3eb0cee7b1c722f0945714d3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove unused private field from test.Erik Verbruggen2015-04-221-10/+0
| | | | | | Change-Id: I6f991f35a035ed9ff28ff8548b647916db85db39 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Skip tst_QFiledialog::directoryEnteredSignal() depending on side bar entry ↵Friedemann Kleint2015-04-211-2/+5
| | | | | | | | | | count. The test relies on having at least 2 entries, which is not always the case. Change-Id: Ief812c598409fe829edb930e563740e5f2213580 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QDir: fix int overflowNikita Baryshnikov2015-04-201-0/+41
| | | | | | | | This caused reverse order of session items in qt creator. Introduced in ba287c55ef179b073482453298f513992b54c11e. Change-Id: I5c37ca6a1ef4753b6449eb9e87b4def5ea858677 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Enable checking for whether the system palette was explicitly setHarald Hvaal2015-04-201-0/+17
| | | | | | | | | | In order to obey a palette set globally on QApplication, an application attribute for checking if it's set at all is added. Task-number: QTBUG-39800 Change-Id: I26b965e6e18e0e1ca4df03cf343b3527df3636b2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Tests: Use blacklist for failing tests in tst_macnativeventsCaroline Chao2015-04-172-1/+11
| | | | | | | | | Remove the insignificant_tests CONFIG option in favor of a BLACKLIST file. The tests blacklisted have been found using CI builds logs. Change-Id: I1a963bdc24f7657731dc0374a8e2c3cbaa49f126 Task-number: QTBUG-22775 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Remove separate SSE4 unpremultiply functionAllan Sandfeld Jensen2015-04-161-19/+0
| | | | | | | | | | | Merges the SSE4 specific unpremultiply with the normal version, and adds a SSE2 fallback. There was no reason to split the two since compile time options will ensure the right version is inlined. Also adds short-cut for 0 and 255 values. Change-Id: Ie5aa262f6964219fd3062d4a498f697cf79a4595 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add matching by GL_VENDOR to QOpenGLConfigLaszlo Agocs2015-04-162-13/+33
| | | | | | | | This will be essential on Linux, especially Embedded where PCI IDs are not that useful. Change-Id: I2fa8ca07236e8aae203e21fe629d12aab092c7fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Cleanup and optimization of qimage smoothscaleAllan Sandfeld Jensen2015-04-154-46/+202
| | | | | | | | | Cleaning up smoothscale code. Upscaling is improved using existing optimized interpolation methods, and downscale is given SSE4.1 optimized versions. Change-Id: I7cdc256c26850948aef7dae26fda1622be6b8179 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Add support for unregistering of custom meta types.Robert Griebl2015-04-141-0/+48
| | | | | | | | | | | | | This patch addresses a specific Qml problem, where the meta types list will grow indefinitely when unloading and reloading Qml components over and over (in an failed effort to save memory). The implementation is not specific to Qml though, but will cater to all use-cases where registered types may not live until the application's termination. Change-Id: Ic0224dcd19aeb559715ef088b22a30509be2456b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QStateMachine: remove conflicting transitions after selection.Erik Verbruggen2015-04-101-10/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After selecting all (enabled) transitions for a microstep, filter out any conflicting transition. The actual conflict resulution is done by ordering the transitions in order of the states that selected them. For example: if an event would trigger two transitions in a parallel state where one would exit that state and the other would not, this filtering prevents the state machine from selecting both states (as this case is an invalid state of the whole machine). This also fixes the exit set calculation for parallel states when one of its substates is exited and subsequently re-entered in the same transition. Previously, the parallel state was not exited, and subsequent re-entry was ignored (because it was still active). Now it is correctly exited and re-entered. A side-effect of the transition ordering mentioned above is it also fixes the non-deterministic behavior of which of the conflicting transitions is taken. [ChangeLog][QtCore] Fixed an issue where the state machine could end up in an invalid state when transitions from a parallel state were not checked for conflicts. [ChangeLog][QtCore] Fixed a case where a parallel state was not exited and re-entered when one of its substates was exited and subsequently re-entered. [ChangeLog][QtCore] Fixed the non-deterministic behavior of picking a transition from a set of conflicting transitions. Task-number: QTBUG-44783 Change-Id: I2ee72b6a2f552077bfa7aa4d369474ab62f4c2f0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* QStateMachine: fix history state restoration.Erik Verbruggen2015-04-101-0/+87
| | | | | | | | | | | | | | | | | | | | | | | When a history state is entered that has an actual saved history (so not the initial state), the entry set was calculated wrongly in some cases. See the bug report for the specific case. The fix is to fully implement the standard, so method names in the private class are updated to reflect the names as used in the standard. Note that, as mentioned in the bug report, the algorithm as described in http://www.w3.org/TR/2014/WD-scxml-20140529/ has a bug. What is implemented is the fixed algorithm as described in the current working draft as of Friday March 13, 2015. This draft can be found at: http://www.w3.org/Voice/2013/scxml-irp/SCXML.htm [ChangeLog][QtCore] Fixed an issue where a history state restore would activate too many states, possibly putting the state machine in an invalid state. Change-Id: Ibb5491b2fdcf3a167c223fa8c9c4aad302dbb795 Task-number: QTBUG-44963 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add a means to set the application icon where supportedAndy Shaw2015-04-103-0/+75
| | | | | | | | | | | | | On OS X the application icon can be changed at runtime, so this adds a way to set this via the QPlatformIntegration. [ChangeLog][OS X] QApplication::setWindowIcon now changes the icon for the application in the dock. Task-number: QTBUG-43999 Change-Id: Ice298c0bd52f10f4866f37c6d3f20cf5419b7a1b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Remove the old headersclean unit testThiago Macieira2015-04-102-8/+0
| | | | | | | We have configure -headersclean now Change-Id: Iaf576b16d7c756a08ec5c3dfa32deaa343e5e029 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QSaveFile: Fix permissions on creationKai Koehne2015-04-081-0/+8
| | | | | | | | | | | | | | | | | | | | QSaveFile is intended to be a replacement for QFile, and should use the same permissions for newly created files. QTemporaryFile however creates new files with 0600 mask by default. Fix this by making the mode_t argument QTemporaryFileEngine uses configurable, and using 0666 for QSaveFile (like we do in QFile). [ChangeLog][Important behavior changes] Files created by QSaveFile do now have the same rights as files created by QFile. This also fixes a regression in QSettings: In the Qt 5.4 series, new files created by QSettings were only readable by the current user. Task-number: QTBUG-44086 Change-Id: Ie1cc20e9f25c6e72e1bc9176490c419c27c5fc82 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Introduce QQuaternion::fromDirection()Konstantin Ritt2015-04-071-0/+94
| | | | | | | | | | ...which constructs a quaternion using specified forward and upward directions, so that the resulting Z axis "faces" a given forward direction. Change-Id: Ib77b8ab5c359a4880b0d946face87026acdc6f0b Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QVLA: Add operator= for initializer listsKai Koehne2015-04-041-0/+20
| | | | | | | | | | | | | | | | | Add a dedicated operator=(std::initializer_list) that first resizes the QCLA, and then replaces the elements one by one. This should be usually faster than creating a temporary QCLA and then copying it, except for the case where the new array does not fit into the allocated stack - but this is IMO nothing to optimize for. Task-number: QTBUG-45041 Change-Id: I147d6d01186b1ca3c635b2c8365d8f6e638ce6fe GPush-Base: 08de3113051e1289f0de0651ec5647c9ee6feb27 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QComboBox: also adjust size on model reset, with AdjustToContentsDavid Faure2015-04-041-0/+17
| | | | | | | | | | | | When the size adjust policy is QComboBox::AdjustToContents, the combobox sizeHint was recalculated on dataChanged, rowsInserted, rowsRemoved, and setModel, but not when the model was reset. This led to truncated items in the combobox when models are filled asynchronously. Task-number: QTBUG-5413 Change-Id: I3456c327d680dfffa58d6dcb26c79456c67b2a32 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QIODevice: do not change the 'pos' member for sequential devicesAlex Trotsenko2015-04-041-0/+44
| | | | | | | | | | Concept of 'current position' exists only for random-access devices. As documented, for sequential devices QIODevice::pos() must always return 0. Prevent a modification of the internal 'pos' member in QIODevice::readAll() method to follow this rule. Change-Id: Ida2ee6a629ccfc3068d62f95ab1064ada13fdda5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUuid: add missing relational operatorsMarc Mutz2015-04-041-3/+17
| | | | | | | QUuid has ==, !=, <, and >. Add <= and =>, too. Change-Id: I11a0b8028be766e2d48dc7664d935df4d327b3d3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tests: Blacklist tests for ubuntu 14.04Caroline Chao2015-04-019-0/+36
| | | | | | | | Instead of making insignificant the all platform for QtBase 5.5 integration. Change-Id: Ief3f29c094bdbc90e684f19c1077ee595fb7d581 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Liang Qi2015-04-017-12/+102
|\
| * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-317-12/+102
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| | * Fix rasterization errors in aliased cosmetic drawPolyLineEirik Aavitsland2015-03-191-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a cosmetic polyline contained a 1-pixel segment, the next segment would be drawn with wrong starting point. The original fix for QTBUG-26156 had some unwanted side effects (QTBUG-31579 and now QTBUG-42398). It tried to skip start-point update if stroke() did not actually draw anything (because the segment was too small). However, to determine that, it tested for a change in lastPixel. But that was not failsafe; in some cases (1-pixel segment), lastPixel could be unchanged even though the segment had been drawn. With this change, we instead test directly whether stroke() skipped the segment or not. Task-number: QTBUG-42398 Change-Id: Id751db69a18cd1af4f45070db9d5698aa532d22a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * QComboBox: Update completer on setCurrentIndex()Andre Hartmann2015-03-181-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the ComboBox currentText() was changed by key LineUp or LineDown or mouse click, the completer still contained the last inserted characters. If now all text was selected (by Ctrl+A or selectAll()), the old item and index was restored on next Enter press. Task-number: QTBUG-41288 Change-Id: I6916fd31c8b8fbacfb12e1a62c3e46823cf918b4 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| | * QMimeDatabase: Fix magic rules with \tEike Ziller2015-03-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | \t was not interpreted as a tab character. Task-number: QTBUG-44884 Change-Id: I3c733e227fba7e5fd5153df0ae4d0431903bb104 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
| | * Introduce qt_subtract_from_timeout to reduce code duplication.Daniel Teske2015-03-092-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same qt_timeout_value function was copied 5 times in qtbase's code, so provide a common implementation in QIoDevice that can be used by everyone. This commit also corrects the remaining time calculation in QProcess::waitForBytesWritten and QProcess::waitForFinished by using this new function. For QProcess::waitForFinished, if the process started within almost exactly the timeout time passed to waitForFinished, msecs - stopWatch.elapsed() would be -1, which is a special value. Change-Id: I7b76ee6bae695eafdd02e3db03e2ff1e23a7f40c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * tst_QDnsLookup: Update to match the new zone for test.qt-project.orgThiago Macieira2015-03-051-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit updates the NS records and disables the lookup for ptr-single.test.qt-project.org, as the new provider does not support adding PTR records outside of the in-addr.arpa zone. This commit reverts f9c70128bbb45ea4b206920dda7c330afa74916a, which was a reversal of 24c52bd44b700725d4feec0d2e05a7e382e59c4e. Change-Id: Ia0aac2f09e9245339951ffff13c7cab530a41515 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix another crash when converting format of buffer-created QImageEirik Aavitsland2015-03-041-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This continues 68762151dbf45fbb44e140ac2ad13dbe8d357352 When doing format conversion, the optimized inplace codepath did not check if the image data was external, i.e. if the QImage had been created by the constructor taking an existing external buffer. The previous commit fixed the readonly case. But in the case of the QImage constructor taking non-const uchar*, data will be read-write, but still external. This would of course crash if the converter tries to realloc it. Task-number: QTBUG-44610 Change-Id: I94d275d464e8af221682b538fc3e4897a59c061e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>