summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't call releaseKey a second time if the insertion failsAndy Shaw2017-03-072-7/+11
| | | | | | | | | | | When the insertion into the cache fails then it will delete the entry for us which already calls releaseKey(). So we should not call it a second time. Task-number: QTBUG-58259 Change-Id: I816c6f29ef97fe3a245f145c4faf1e0649f72dc5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Don't pass -headerpad_max_install_names when using BitcodeJake Petroules2017-03-074-4/+8
| | | | | | | | It is ignored (and is unnecessary to begin with) in that case, and emits an annoying warning which this patch silences. Change-Id: I6059969724b203d6e0e2eea81ad3e3e8f8d536d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* put load(qt_plugin) at end of project fileOswald Buddenhagen2017-03-061-5/+5
| | | | | | | amends a28364bc1. Change-Id: I8e6044abcbfffde8688d87cd3aa722c0c362534c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix UB in QFutureInterface: invalid casts from ResultStoreBase to ResultStore<>Olivier Goffart2017-03-065-145/+122
| | | | | | | | | | | ResultStore never actually exists, only ResutStoreBase does. So casting to ResultStore<T> and calling its member functions is UB. Put the type dependent function as template member functions within ResultStoreBase and so we don't need QtPrivate::ResultStore anymore. Same goes for the iterator. Change-Id: I739b9d234ba2238977863df77fde3a4471a9abd2 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix building of various examples and tools with -no-feature-processUlf Hermann2017-03-064-3/+8
| | | | | | | | We should not check for platforms, but rather for features. Also, if dbus is available it doesn't automatically mean that QProcess is. Change-Id: I27ef5863fcb107cca1aa47abba95b734962adc33 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* qmake: Check for QT_CONFIG(process) in qmakebuiltinsUlf Hermann2017-03-062-5/+5
| | | | | | | | | The code in question is obviously checking for support of QProcess, not for general bootstrap mode. You can manually disable QProcess, in which case it is still not available after bootstrapping is done. Change-Id: Ia99810b8900621911a31912034358a01af4f18a0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Doc: Add macro for embedding YouTube videosTopi Reinio2017-03-064-0/+57
| | | | | | | | | | | | | | | | | | This macro adds a \youtube <ID> command that embeds a YouTube link into the documentation. The video container scales to a specified percentage of the available horizontal area. It assumes a source aspect ratio of 16:9, but looks acceptable with other ratios. For backends that do not support <iframe> (e.g. QTextBrowser), shows a clickable video thumbnail that open the YouTube link in an external browser window. Unfortunately, QTextBrowser cannot load images from a remote URL, so we need to store a thumbnail image in the .qch file. Change-Id: I3a3a0c5a20dd90e5cec6357ba70a23ee47dbe825 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-0652-158/+143
| | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* tst_QVersionNumber: fix Clang warning about superfluous moveMarc Mutz2017-03-061-1/+1
| | | | | | | | | | Parameters passed by value, like local function variables, are subject to NRVO/return-by-move already, so adding std::move, even disguised as qMove(), makes Clang warn about a pessimizing move. Change-Id: I7d59bfee4cf7ecddee0874ee489367044c702643 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* forkfd: fix calling the old signal handler when there wasn't oneThiago Macieira2017-03-061-4/+6
| | | | | | | | | | | | On some stupid systems, execve() may clear the handler but not clear the SA_SIGINFO flag. This change now requires that sa_handler and sa_sigaction be in a union together. We can't operate otherwise. Task-number: QTBUG-59246 Change-Id: I33850dcdb2ce4a47878efffd14a84b48a8f6b1e8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make QLocale consistent about special handling of the C localeEdward Welbourne2017-03-062-2/+12
| | | | | | | | | | | | | | | | | | QLocale::matchingLocales() simply created each locale using the basic data, without (unless the matching conditions stipulated Language C) applying number-options hacks that it applies everywhere else, when creating the C locale. Thus the C locale in its returned list (if it wasn't the only entry) ended up with the default number options, without omiting separators in numbers. Thus QLocale::c() didn't actually appear as an entry in the list. Discovered while investigating QTBUG-58947. Added a dumb autotest that checks various ways of getting the C locale do actually give us equal locale objects. Fixed matchingLocales() to apply the same hack as is used elsewhere for the C locale. Change-Id: I263f31da623052b63171f5b5a83c65802383df21 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMenu: make wide submenu appear on the same screen with its parent menuOleg Yadrov2017-03-042-2/+38
| | | | | | | | | | | On a multi-display system wide submenu might either appear on wrong screen or not appear at all (depending on the specific display configuration). Task-number: QTBUG-56917 Change-Id: I40013b0bee340a01ae1c08a5e074afa63da4dbfd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
* Wide QMenu: fix size and positionOleg Yadrov2017-03-043-30/+53
| | | | | | | | | | | | | | | | | | | This patch fixes 2 issues related to wide menus: 1) Menu took on full screen height when menu width was larger than screen width; 2) On a multi-display system wide menu might appear on wrong monitor (not the one where show event was triggered). The idea is we limit parent menu and all its submenus within the screen where it was opened. Note that this patch fixes only geometry-related issues and there are also some style flaws which need to be addressed (for example, currently the text does not elide if it doesn’t fit to the menu’s width). Task-number: QTBUG-56917 Change-Id: I7e9ff4a48bf03060d76e34d33a13ad6cc890c133 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QMacStyle::sizeFromContents(CT_Menu): take proxy style into accountOleg Yadrov2017-03-031-1/+9
| | | | | | | This is missed in 10d0f4cba99d2386db28a3afd71832e35992b797 Change-Id: If3566eb4b1f00f6882c290c83e10e51e1bf1d6d9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Fix Bitcode handling for both makefile and Xcode generatorsJake Petroules2017-03-031-2/+8
| | | | | | | | | | | | This fixes an issue which caused certain iOS projects to fail to link when building with Xcode, and also fixes an issue where projects were only ever built with -fembed-bitcode instead of -fembed-bitcode-marker for debug builds with the makefile generator. Task-number: QTBUG-58754 Change-Id: Icf0c9f0d64dbc0b38d6c48bf635c5383a78bd6d5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Remove the last remaining non-SSL use of QMutexPool in QtThiago Macieira2017-03-031-1/+2
| | | | | | Task-number: QTBUG-59164 Change-Id: Idd5ceba1eba34cb78c46fffd14a734735991f4fb Reviewed-by: David Faure <david.faure@kdab.com>
* QVector: Avoid implicit conversion warningsStig Bjørlykke2017-03-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes compiling an application using QVector and -Wshorten-64-to-32 on a 64-bit system without getting this warning: ... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:695:18: warning: implicit conversion loses integer precision: 'typename iterator_traits<QString *>::difference_type' (aka 'long') to 'int' [-Wshorten-64-to-32] int offset = std::distance(d->begin(), before); ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:731:35: warning: implicit conversion loses integer precision: 'long' to 'const int' [-Wshorten-64-to-32] const int itemsToErase = aend - abegin; ~~~~~~~~~~~~ ~~~~~^~~~~~~~ ... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:740:39: warning: implicit conversion loses integer precision: 'long' to 'const int' [-Wshorten-64-to-32] const int itemsUntouched = abegin - d->begin(); ~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~~~~ Change-Id: I52d85908f4aac20c7e9ac8063ac760ce52f85541 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix UB in QWidgetItemV2::~QWidgetItemV2Olivier Goffart2017-03-021-1/+1
| | | | | | | | | We might get there because 'wid' is already partially deleted (called from ~QObject). In that case, it is an undefined behavior to call a QWidget member function on it. Use QObjectPrivate::get instead. Change-Id: I6da314bf8385684d1332aa031a2d92012941303b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QDialogButtonGroup: Fix removal of deleted buttonsOlivier Goffart2017-03-022-3/+21
| | | | | | | | | | As the destroyed() signal is emitted from ~QObject, it is not allowed to use static_cast to a QAbstractButton on that pointer anymore. And the qobject_cast will also fail which will keep a dangling pointer in the hash. Change-Id: If0d22fcc30cde87e771e70914c3afb04ea207289 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix crash for glyphs with height > 128Eskil Abrahamsen Blomfeldt2017-03-021-2/+2
| | | | | | | | | | | | | | | In fe97ecf408da60931fc49b502a223d59b5f93f99 we added support for arbitrarily sized glyphs, since there is no guarantee that a glyph will fit inside the em square. There was, however, a hardcoded max size in the distance field generator, so for very tall glyphs we could potentially get a crash. [ChangeLog][QtGui][Text] Fixed crash for very tall glyphs Task-number: QTBUG-57241 Change-Id: Id95c0f10d82a1294f7e7a51ac32e88a5a2e0a790 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* xcb: fix misuse of xcb_send_eventGatis Paeglis2017-03-014-3/+16
| | | | | | | | | | | | | | | | | | | | | This fixes the following Valgrind warning: "Syscall param writev(vector[...]) points to uninitialised byte(s) Uninitialised value was created by a stack allocation" The xcb_send_event() requires all events to have 32 bytes. It calls memcpy() on the passed in event. If the passed in event is less than 32 bytes, memcpy() reaches into unrelated memory. And as it turns out, this behavior is actually described in the xcb_send_event function's documentation. This patch adds a macro that declares an event for safe usage with xcb_send_event. Change-Id: Ifcaab5e9a3b52b7f64ac930b423e0c7798bbfedb Done-with: Uli Schlachter Task-number: QTBUG-56518 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* tst_utf8: Fix one of the overlong sequences to be what we meantThiago Macieira2017-03-011-2/+2
| | | | | | | | | | | | | C0 to DF take one continuation byte; E0 to EF take two. It's invalid UTF-8 anyway, but at least this is what the test row meant: overlong sequence with 3 bytes of what should have been two. This updates the comment to match the character that we were actually testing. Change-Id: I85a8bd6da2c44f52b4e3fffd14a75df2600487aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix registry function link error on WindowsJason Erb2017-02-281-1/+1
| | | | | | | | | Added library required by registry functions called by QWindowsFontDatabase::readRegistryString. Task-number: QTBUG-59160 Change-Id: I8f6beee3cff4443c56bd835021d15122867e76e3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix "zero as null pointer constant" warningJesus Fernandez2017-02-281-3/+3
| | | | | | | | | | | | qsqlrelationaldelegate.h:60:52: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] explicit QSqlRelationalDelegate(QObject *aParent = 0) qsqlrelationaldelegate.h:72:87: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] QSqlTableModel *childModel = sqlModel ? sqlModel->relationModel(index.column()) : 0; qsqlrelationaldelegate.h:93:87: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant] QSqlTableModel *childModel = sqlModel ? sqlModel->relationModel(index.column()) : 0; Change-Id: I6e7de3cccf705b74018f522165886104194bf9be Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix parsing of day-of-week names that start with another nameThiago Macieira2017-02-282-32/+59
| | | | | | Task-number: QTBUG-59159 Change-Id: I95c9e502ccc74af3bcf0fffd14a69e0cd27ce96b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QList: Avoid implicit conversion warningStig Bjørlykke2017-02-281-1/+1
| | | | | | | | | | | | | | This fixes compiling an application using QList and -Wshorten-64-to-32 on a 64-bit system without getting this warning: ... 5.8/clang_64/lib/QtCore.framework/Headers/qlist.h:897:26: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] int removedCount = e - n; ~~~~~~~~~~~~ ~~^~~ Change-Id: I688ed086805c431821c2ee6078fa5aeb631e7a07 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QTimer: Avoid implicit conversion warningsStig Bjørlykke2017-02-281-1/+1
| | | | | | | | | | | | | | This fixes compiling an application using QTimer and -Wshorten-64-to-32 on a 64-bit system without getting this warning: ... 5.8/clang_64/lib/QtCore.framework/Headers/qtimer.h:171:21: warning: implicit conversion loses integer precision: 'rep' (aka 'long long') to 'int' [-Wshorten-64-to-32] setInterval(value.count()); ~~~~~~~~~~~ ^~~~~~~~~~~~~ Change-Id: I3e0407a7193c841308f7271c41a8dd5a2eb2a534 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: added info about return type for function QMutex::try_lock()Nico Vertriest2017-02-281-0/+3
| | | | | | | qmutex.cpp:266: warning: Undocumented return value Change-Id: Ib93a5a2505f663f266871dbe5582fb5856096889 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Make it possible to specify the RCC data version formatSimon Hausmann2017-02-284-15/+40
| | | | | | | | | | After commit d20773824529d191e7b483b505107dce6c1b1c3d we unconditionally write version two, but it seems useful to allow users to specify the version explicitly. Change-Id: I81d3de3d7f87318653f89bf10e3618becd8329d6 Task-number: QTBUG-58769 Reviewed-by: hjk <hjk@qt.io>
* Fix wrong codec with MySQL plugin in newer versionsJoni Poikelin2017-02-281-4/+8
| | | | | | | | | | | | Since MySQL now properly supports UTF-8 through utf8mb4 option, it caused regression on systems which did not use UTF-8 encoding by default which caused queries to fail as they were converted into system codec. To fix this, simply use UTF-8 encoding for queries when MySQL supports it. Task-number: QTBUG-59176 Change-Id: I21cc9102b15df15a31bc7c74469321c44a257946 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix UB in QWidgetResizeHandler::eventFilterOlivier Goffart2017-02-271-5/+6
| | | | | | | | Unconditional cast to a QMouseEvent while the event might also be a QKeyEvent. Change-Id: If5eb6fbad6e4440c167ff95298f51efde1834217 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Properly use the "process" featureUlf Hermann2017-02-2756-213/+209
| | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* fix detection of static icu under unixOswald Buddenhagen2017-02-271-0/+3
| | | | | | | | | the library has a dependency on libdl. Task-number: QTBUG-58301 Change-Id: I36567ded32980b241ff2f01cfdec044510405a75 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* streamline libdl detection and linkingOswald Buddenhagen2017-02-276-20/+9
| | | | | | | | | | | | | | | | | | | | instead of having a library and a test, use a library with two sources, the first being empty (i.e., just libc). this allows us doing away with the "libdl" feature, and using just the "dlopen" one. subsequently, replace all LIBS+=$$QMAKE_LIBS_DYNLOAD with QMAKE_USE+=libdl. the definitions of QMAKE_LIBS_DYNLOAD remain in the qmakespecs for backwards compat only. n.b.: the only specs where it is not empty or "-ldl" (i.e., what we support now) are the hpux ones, where the library is called 'dld'. technically, the "library" feature should depend on '!unix || dlopen', but that's for a later patch. Change-Id: Ib8546affc4b7bc757f1a76729573ddd00e152176 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* forkfd: use SA_SIGINFO to pass extra information to chained handlersThiago Macieira2017-02-261-11/+15
| | | | | | | | | | This existed in QProcess before forkfd, but was lost in the port to it (commit 1814142b7a11befab315bf3f9d91c4ffbf56ef3e). The original QProcess fix was done in 97279d05822a70da1fb3dab083d823a5f5a008fe. Task-number: QTBUG-57584 Change-Id: Ibc5c715fda334a75bd2efffd14a425871f3162b5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix documentation typosChristian Gagneraud2017-02-253-3/+3
| | | | | | | | | | This patch fixes 2 simple typos in QGraphicsItem and QPainter documentation and a copy/paste error between QAbstractItemModel's beginRemoveColumns and beginRemoveRows documentation. Change-Id: I32bdc4dc69154a40fe30a5b8c08d0c3a001853f8 Reviewed-by: Harri Porten <porten@froglogic.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* remove unused Xlib's XRender dependencyGatis Paeglis2017-02-245-75/+2
| | | | | | | | | We do use xcb-xrender, and it has its own detection logic in configure.json. Change-Id: I20bbc1ddf5dd0c32e93ef2c12c7b0eda3f96f4f4 Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* don't assume that configure --foo options' value is 'yes'Oswald Buddenhagen2017-02-241-6/+12
| | | | | | | | | | | | otherwise, the invalid "--qpa xcb" would complain about "xcb" being unknown, rather than "--qpa" missing an argument. actual booleans are handled by the type-specific callback, just like -foo would be. Task-number: QTBUG-59062 Change-Id: I96632dacfb721cfcbf223b76f6c5c38c810e8d0e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* fix generation of QSql headerOswald Buddenhagen2017-02-241-1/+1
| | | | | | | | | | | the classname definition must name the new real header, not the generated deprecated one. amends 7331d22c6. Task-number: QTBUG-58844 Change-Id: I2721d1f682a4ca0f986184fe7c8321976a540b4c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* make an effort to keep /src properties constantOswald Buddenhagen2017-02-241-1/+1
| | | | | | | | | | | | | | | | | writing $$PWD (via $$QT_SOURCE_TREE) into the new bin/qt.conf would potentially change the path compared to the value originally written by the configure script, as $$PWD is canonicalized. this in turn would break the magic for delaying the loading of toolchain.prf. so instead just write out the perfectly fine current value of $$[QT_INSTALL_PREFIX/src]. amends 169a40d51, thereby fixing 6834d0eec on windows. Task-number: QTBUG-58816 Change-Id: Ibbd44df8f3c825a97d9f4acb869e44c93acb835b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* de-duplicate and simplify condition checking in qtConfProcessOneOutput()Oswald Buddenhagen2017-02-241-9/+2
| | | | | | | amends 90eee08b3. Change-Id: If1fa2b14d758cc252d9a2ec3f9deedd1dd200c5e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QDateTime: Fix clearing the ShortData flag in setMSecsSinceEpochThiago Macieira2017-02-242-1/+27
| | | | | | | | | | | | | | | | | Unlike setTimeSpec, this forgot to clear the bit when detaching. So it's possible that some further use of the flags could incorrectly conclude that the data was short and then proceed to corrupt the pointer. The example from QTBUG-59061 caused this because toUTC() -> toTimeSpec() calls setMSecsSinceEpoch which left the bit set; then addDays() calls setDateTime(), which calls checkValidDateTime() and that corrupted the pointer. This problem was more visible on 32-bit systems because no QDateTime was short (except for default constructed ones), but it can happen on 64-bit with sufficiently large dates. Task-number: QTBUG-59061 Change-Id: Ibc5c715fda334a75bd2efffd14a562a375a4e69b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDockWidget: Fix memory leak when dragging a tab outside of a floating tab ↵Olivier Goffart2017-02-241-1/+2
| | | | | | | | | | | | | | | window A QDockWidgetItem will be leaked if a QDockWidget is dragged out of a floating tab window, and then plugged back somewhere. The problem is that QMainWindowLayout::unplug was not returning the QDockWidgetItem* from the floating tab's layout. When that's the case, a new QDockWidgetItem is created in QDockWidgetPrivate::startDrag and will be put into the layout, leaking the old QDockWidgetItem. Change-Id: Ifb9c1c562cb74383ebff1df0f91ee225c5cdb296 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Doc: Fix minor typos in QRectFAaron Linville2017-02-232-5/+5
| | | | | | | | | | | | | Fix a couple incorrect references to the integer precision classes. Update snippet to use floating point precision classes. Task-number: QTBUG-51630 Change-Id: I9b08cfb68937a8e1179ee414d7981956ef7bc106 Reviewed-by: Martin Koller <kollix@aon.at> Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QUrl::fromUserInput(with cwd) fix handling of files with trailing spacesDavid Faure2017-02-232-4/+4
| | | | | | | | | | The call to trimmed() makes sense for URLs typed in a browser's location bar, but its use in every code path made it impossible to open a file with a trailing space in command-line tools that uses fromUserInput(cwd) to handle command-line arguments, as recommended. For instance kde-open5 "file.txt " would fail. Change-Id: Ie61182684521d91f077d3e76f95b7240965ab405 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qurl: use temp dir and create our own files for testingDavid Faure2017-02-231-15/+32
| | | | | | | This allows to test specific filenames without polluting the current dir. Change-Id: Ieb99019a2e37e30f294d85c5d80af1de1b919019 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qurl: replace all QDir::currentPath() calls with local variableDavid Faure2017-02-231-18/+19
| | | | | Change-Id: I70e4547ba87292c29dfab59950aa1214be8015a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTextFormatCollection: replace copy ctor and op= with clear()David Faure2017-02-234-15/+37
| | | | | | | | | | | | | | | | | operator=, which was only used for clearing, wasn't clearing the hash. This led to a mismatch between the vector and the hash (given that the hash points into the vector). Spotted by interrupting kmail in gdb, and it was in this code iterating over a 2000 entries hash (the first vector entries not matching the hash, this code keep appending new entries for the same formats). This fixes QTBUG-8862 again, the initial fix having been accidentally reverted in 467b15a. Change-Id: Ia34b3d002a0199e1930431a4bbdb2ec981ed4ffc Task-number: QTBUG-8862 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Output "qml-debug" as privateFeatureStephan Binner2017-02-231-1/+4
| | | | | Change-Id: Iecf59b5e4cd387e59b28a252d6cd8cdf411b3d41 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Do not delete someone else's QSystemLocale when constructing anotherEdward Welbourne2017-02-231-1/+0
| | | | | | | | | | | | | The QSystemLocale constructor remembers the most-recently-constructed instance - a dodgy enough proposition at the best of times - and shares it with much of the rest of QLocale. There is a global static instance, actually of a derived singleton class, to which it is usually set on program start-up. However, the constructor deleted the remembered instance before remembering any new instances; there was no way this could not lead to bad consequences. So let's not do that. Change-Id: Ie8f3d655c9d4f75f6ec00a5861d98d6020ecc633 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>