summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
* Bump Qt version to 4.8.6Thiago Macieira2013-07-091-2/+2
| | | | | Change-Id: I91189c8c33591ef866a4478c113f93162afede95 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* qfilesystemengine_mac.cpp is empty => purgeSamuel Gaist2013-07-052-49/+0
| | | | | | | | | | | All mac related qfilesystemengine operations are done in qfilesystemengine_unix. Purging it like commit bd7ca33889139782f3f0063f93ca9c1f39501a17 in qtbase Change-Id: I16ba494b699d731c3cd688cbd34b81cc67851b47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* BlackBerry: Increased loop level around bps_get_eventBernd Weimer2013-07-021-4/+10
| | | | | | | | | | | This is needed, because bps_get_event can also invoke callbacks. Deferred deletions in such a callback are not executed for instance, because the loop level might already be at its minimum. Backported from qtbase: f62c92b Change-Id: I83d72d773d53b7b84ec590180f6b1131a57e0f46 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QUrl stringprep: fix handling of U+0080: it's prohibitedThiago Macieira2013-06-211-1/+1
| | | | | | | | | Edge case: a > that should have been >=. Without it, we never ran the rest of the IDN nameprepping. (cherry-picked from qtbase commit 4d93393a6de2d6631979df2bc6d12aa43781dc6f) Change-Id: I2276d660de3a70d0c561bb18816820d9a0f47e77 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QUrl stringprep: avoid recalculating the surrogates we already knowThiago Macieira2013-06-211-2/+2
| | | | | | (cherry-picked from qtbase commit 53388cd8e0451ea375ed250b59f9e89319fb3e1c) Change-Id: Icac4e81fff6f7f7fa4f46ec2a08105f8d3d2b403 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QUrl stringprep: fix handling of prohibited charactersThiago Macieira2013-06-211-11/+14
| | | | | | | | | | | | | | | | | | | | | RFC 3454 says about prohibited characters (section 2, "Preparation Overview"): 3) Prohibit -- Check for any characters that are not allowed in the output. If any are found, return an error. This is described in section 5. In other words, we mustn't simply strip the output of prohibited characters. We must generate an error if they are present. We do that by clearing the data. We already had tests for prohibited output, but they were indistinguishable from being stripped. So instead add some extra characters so that we can tell whether the label was cleared. (cherry-picked from qtbase commit 736a052d93d9c75e51e8f3da733bc8e4a50c39ce) Change-Id: I2d95217c27be5e2d54deed0036cb009e3b7f4886 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QUrl stringprep: fix case folding from non-BMP to BMPThiago Macieira2013-06-211-1/+1
| | | | | | | | | | | | | When uc > 0xffff (non-BMP character) and l == 1 (replacement is in the BMP), we must use QString::replace so the correct number of characters is replaced. There's one case testing this in tst_qurl, but it is being obscured by another bug (false positive). (cherry-picked from qtbase commit 86312275197c3fde948035a59c0358162701f9f2) Change-Id: I32388dd5bef32d4d6804aeeec4904bd5f563e9b9 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QUrl stringprep: recalculate the current position if the size changesThiago Macieira2013-06-211-1/+2
| | | | | | | | | | | | | | If the case folding operation results in either expansion or reduction of the string, we need to adapt. Reduction happens most often when a non-BMP character is case-folded to a character in the BMP (example: mathematical signs at U+1D400-1D7FF). Expansion happens in the rare case of symbols containing words, like U+2121 ℡ (this is part of the unit test), and one common case: the German sharp S (ß) is expanded to "ss". (cherry-picked from qtbase commit 2ccf4c32cc593f568581dd237e1e27d39fd965a2) Change-Id: I1bdbdc908b958a89bf30e4bb648d65dfdd9097f8 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QSystemLocale: Fix the time format on BlackBerry 10Mehdi Fekari2013-06-201-2/+2
| | | | | | | | | The time format should depend on the device settings (24 hour format) cherry picked from qtbase/686c94c892006a3e72291ca8971aabf18ea1ec85 Change-Id: I6226486ee1feedc27fab49802a0043619e83659c Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Implement apostrophe in windows cmd args.Leonard Lee2013-06-171-5/+2
| | | | | | | Task-number: QTBUG-15379 Change-Id: I113692983a8c16c56f0f684146d0d32e25d4869d (cherry-picked from qtbase/c1e24f883824ad894aa121568e4fde8553028d95) Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Fix crash when re-creating QThreadData after initially destroying itTor Arne Vestbø2013-06-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We destroy the thread data for the main thread when the QCoreApplication is destructed, and then delete the pthread key for the thread data in the global static destructor function 'destroy_current_thread_data_key'. The user may have its own Q_DESTRUCTOR_FUNCTION though, which may or may not run after we've destroyed the key. If it runs after we've destroyed the key, we'll end up trying to re-create the tread-data, as expected, but set_thread_data() will fail to persist it, as pthread_setspecific is called with an invalid key. The result is an infinite recursion: ... 6 in QThreadData::current () at qthread_unix.cpp:216 7 in QObject::QObject (this=0x48e1b30, dd=@0x48e1b40, parent=0x0) at qobject.cpp:703 8 in QThread::QThread (this=0x48e1b30, dd=@0x48e1b40, parent=0x0) at qthread.cpp:396 9 in QAdoptedThread::QAdoptedThread (this=0x48e1b30, data=0x48e1af0) at qthread.cpp:120 10 in QAdoptedThread::QAdoptedThread (this=0x48e1b30, data=0x48e1af0) at qthread.cpp:130 11 in QThreadData::current () at qthread_unix.cpp:219 12 in QObject::QObject (this=0x48e1a20, dd=@0x48e1a30, parent=0x0) at qobject.cpp:703 ... To solve this, we reset current_thread_data_once when destroying the key, so that subsequent calls to pthread_once to potentially create the key will call create_current_thread_data_key once more. This means we'll leak the key for this particular use-case, since we don't end up calling pthread_key_delete a second time, but this leak is small and happens typically only for a short duration during application shutdown. Cherry-picked from qtbase/46667d604fb2ae11a87c0c075a3d2468d02f7bdb. Change-Id: Iffc372ca530a486cd3efc2237ab02468bdcb5c81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure QThreadData and QAdoptedThread object is destroyed at app exitjian liang2013-06-161-0/+7
| | | | | | | | | | | | | | | | Task-number: QTBUG-30134 Restore the lines in qcoreapplication.cpp removed by commit 950b35cf97ad398f97883efd2a18ee97994a8a9c to ensure QThreadData and QAdoptedThread object of main thread is destroyed at application exit. We don't set QCoreApplicationPriavte::theMainThread to 0 as before since it will be set to zero in QThreadData::~QThreadData() Cherry-picked from qtbase/7dc622290bb8e81af634034f443e25be0d6d48a3. Change-Id: I6bc62235d0aff7818ca9a9cad45625b2777afc55 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clear the current thread data for the main threadThiago Macieira2013-06-165-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This avoids crashes accessing deleted memory when creating a QObject after the last QObject had been deleted, like a qDebug() in global destructors. ==41000== Invalid read of size 4 ==41000== at 0x5F01ED5: bool QBasicAtomicOps<4>::ref<int>(int&) (qatomic_x86.h:208) ==41000== by 0x5F01309: QBasicAtomicInteger<int>::ref() (qbasicatomic.h:147) ==41000== by 0x5F24051: QThreadData::ref() (qthread.cpp:100) ==41000== by 0x614A984: QObject::QObject(QObject*) (qobject.cpp:681) ==41000== Address 0x6ee73f0 is 0 bytes inside a block of size 152 free'd ==41000== at 0x4A0736C: operator delete(void*) (vg_replace_malloc.c:480) ==41000== by 0x5F240BF: QThreadData::deref() (qthread.cpp:109) ==41000== by 0x6113F6B: QCoreApplicationData::~QCoreApplicationData() (qcoreapplication.cpp:268) The comment right above the change in qthread.cpp looks eerily similar to the problem I'm trying to fix. However, the actual change that introduced the change is not in the Qt public history, so we can't know for sure what the problem was then. Cherry-picked from qtbase/950b35cf97ad398f97883efd2a18ee97994a8a9c. Change-Id: Ic4072c15529e2ae94ea36fbd0340cf5ee61413d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disable precision timers when running MSVC2012 code on pre-Windows 8.Friedemann Kleint2013-06-041-1/+5
| | | | | | | | | | | Precision timers can cause the event loop to lock up when running MSVC2012 code on pre-Windows 8. Task-number: QTBUG-27266 Change-Id: Idd73731e82843d0d140859bab825bc1a54eccf1a Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from qtbase/aa1b4c0943187d82e0c313b93559e99226a9c75a)
* Fix QLocale::standaloneMonthName when d->m_data == systemData()El Mehdi Fekari2013-05-216-3/+17
| | | | | | | | | | | | | | | | | At the moment if d->m_data == systemData() it calls systemLocale()->query but forgets about the standalone part so you get the wrong data This patch introduces the new enums so that backends can implement properly the standaloneMonthName feature properly. At the moment the Windows and Mac ones still return the monthName, the Unix and Blackberry ones return the data we store in months_data. cherry picked from qtbase/b1de018e9a1efcd0f9e298ae4c865197feb47895 Change-Id: I1054420dc696ed2be0d52bdc6567ebaf202faf12 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* BlackBerry: Revised error handling in event dispatcherBernd Weimer2013-05-151-40/+42
| | | | | | | | | | | | | Added an upper bound check for socket notifier file descriptors. Too high FDs have been a real source of failure. Added compiler hints to allow error-free code path run faster (errors are highly unlikely) and adjusted warning messages (some were misleading and too long). Backported from qtbase: ebd5de1 Change-Id: Ib982f853ee803447bdcaf22aed310697a36b4ccf Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Special-case the forward declaration of STL types for libc++.Raphael Kubo da Costa2013-05-111-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is somewhat of a follow-up to 5210d47aa66214e3cb16f394d0510a91f770c1b1. libc++ declares the STL types in an inline namespace within the "std" one if clang is used. If one includes a header such as <iterator> before a Qt one and builds with QT_NO_STL, the following ends up happening: // <iterator> namespace std { inline namespace __1 { struct random_access_iterator ... ; } } // qiterator.h #ifdef QT_NO_STL namespace std { struct random_access_iterator; } #endif qiterator.h's declaration shadows the original one, and the compiler complains random_access_iterator lacks an actual declaration. Solve this by checking for libc++ and forward-declaring the iterator types we need within the same inline namespace. Not backported from qtbase because QT_NO_STL does not exist in Qt 5. Change-Id: I6742d540f6538a30aa060a4447c288cfb9cd781d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Check that 3DNow! instructions are supported before including mm3dnow.h.Raphael Kubo da Costa2013-05-101-1/+1
| | | | | | | | | | | | | | | | | | Include mm3dnow.h the way we already include the (S)SSE{3,4} and AVX instruction headers: by checking that the compiler is set to support those instructions besides verifying that QT_HAVE_3DNOW evalues to true (which only means the compiler supported them when the build was being configured). This has not caused a problem in most cases so far because GCC protects its mm3dnow.h header with an #ifdef __3dNOW__ (contrary to what it does on, say, pmmintrin.h). clang's mm3dnow.h, on the other hand, does not have that check and can fail if -march is set to, for example, i386 or i486. Not backported from qt5 because qtbase because qsimd_p.h does not include the 3DNow! headers after commit a1b30b49ef09bef2e97b9a0622bf7ad622678fee. Change-Id: I15ab5e936c71c55f89c3f25777ab27fbd262e9cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QContiguousCache with zero capacity not crashThiago Macieira2013-05-071-0/+6
| | | | | | | | | | | These containers don't make sense and will just result in no action being taken (all items added will simply be discarded), but it shouldn't crash due to a division by zero. Task-number: QTBUG-27339 Change-Id: Ib9acf5c0a9a826e6853e7beaf5e56511fde98dc6 (cherry-picked from qt5 commit 320c4e31e124f99601399d00935362b587c77510) Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Make Qt 4.8 also compile with the LSB SDK on LinuxThiago Macieira2013-05-062-8/+8
| | | | | | | | | | | Generate worse code. This is similar to Qt5 commits 46bfd84fdc24fa3e3e721a5dda6cfbebe75be073 and c69106d1bf66d64e046c4f639542457151187dfc. Task-number: QTBUG-25336 Change-Id: Idd61c23d2b528db9d8c7895df008b9c1b0e2a2a4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QLocale: Add fr_MA localeEl Mehdi Fekari2013-05-031-868/+873
| | | | | | | | French_Morocco locale was introduced in CLDRv22.1 and already exists in Qt5 Change-Id: I4f0452f421cf074eb2c4fae22351d430d5f02e42 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QNonContiguousByteDevice: reset() instead of seek() if possiblePeter Hartmann2013-04-271-2/+2
| | | | | | | | | | ... because e.g. QHttpMultiPartIODevice does not implement seek at all (QTBUG-30295), which would make resetting such a device fail. (cherry picked from commit 804a067846cd90e3ca31f985d539c8d75d654d82) Change-Id: I8ba1ef76cc6e7f5ebf0b39c9a75e3aea26980b82 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QThreadDataPrivate: fix data race on canWait boolean.David Faure2013-04-233-3/+10
| | | | | | | | | | postEvent() accesses it with the postEventList mutex locked, but processEvent() was checking it without any mutex locked. Change-Id: I31bbb50f7a1c337067b8e3de16ee7cd11400b517 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from qtbase/bf3a5ccef13d568662f027be62280aba1f73bada) Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Rename qAbs Function for timevalDavid E. Narváez2013-04-131-3/+2
| | | | | | | | | | | This decouples it from qAbs which is declared as a constexpr under certain compilation flags and enables for qtbase to be compiled with GCC 4.8 Change-Id: I78e02256ffc8b460ca74ae5241e77dfac4e09ba9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry-picked from qtbase commit d9ff510f02bba63dabe7a081a68296056a89ae4c) Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove unnecessary typedef, found by GCC 4.8Thiago Macieira2013-04-101-1/+0
| | | | | | | | | qtconcurrentfilter.h:108:47: warning: typedef 'Iterator' locally defined but not used [-Wunused-local-typedefs] Qt5 commit: d4c241a98059edaa7a4b15beb1cfd16ed041284e (qtbase) Task-number: QTBUG-30594 Change-Id: Icc69e41c2d4e11962f0c8434236d4847b46e7d9d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Added support for multicore CPUs in QThread::idealThreadCount for INTEGRITY ↵Florian Behrens2013-04-091-1/+7
| | | | | | | | | | target. Cherry-picked from qt5 commit 90361fd36c803c4c5c28d67f05ed66f619e0d39c. Change-Id: If13954d40d07aebf08b9a143964038c0996c325f Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid socket notifiers on invalid file descriptorsBernd Weimer2013-04-081-5/+4
| | | | | | | | | | | There is potential trouble and no point in registering a QSocketNotifier on an invalid file descriptor. This is prevented now in addition to the existing warning. Backported from qt5/qtbase: d20851f8ecd044479dd1892e92937a9135aa7856 Change-Id: I86e0a2c7ebdc6fb4cffcd39958003506ff01cb46 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use LC_MESSAGES instead of LC_NUMERIC in QSystemLocale::fallbackLocale()Dmitry Shachnev2013-04-071-1/+1
| | | | | | | Backported from QtBase 7dfee3ffc5129307. Change-Id: I5e7d0116ed95ede87c97d8ac2b9eff3b922818f7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix a bug in QSystemLocale on BB10El Mehdi Fekari2013-04-042-18/+20
| | | | | | | | | | | Call qt_safe_open in the constructor to avoid opening the pps files several times. backport: f1d8987b82ce6b0a852b715a8713608bfd72aabf Change-Id: Ia6b8ca339fa2f9f85df28792e95242b6ff7b70ca Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QNonContiguousByteDevice: roll back complete internal state in reset()Peter Hartmann2013-03-261-0/+6
| | | | | | | | | ... otherwise we would not start reading from the beginning when the device was reset. Change-Id: I897adbad6e1f240fa871758ec7e3d6b499cb5944 (cherry-picked from commit ffe45f1896adfff93258b917f6a566dcc06a6597) Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Inital port of QSystemLocale on BlackBerry 10El Mehdi Fekari2013-03-205-107/+422
| | | | | | | | Backport of: a0c4a712263dbacd2c8d95da64e00bd213d05cbf Change-Id: I4253067b42a8aa93325d48eeaa3a9937be2d2b75 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Fixed bug in QTimeLine::setPaused(false)Jan Arve Saether2013-03-201-0/+3
| | | | | | | | | | | | | The problem was that the elapsed timer was not restarted, causing the currentTime() not being adjusted for the time it was paused. (cherry-picked from Qt 5: 75614792fa2370b6b0402117bf) Task-number: QTBUG-30108 Change-Id: I9718aa408075623514717328321c34e7ab3af436 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* QThread::isFinished should return true from finished()Olivier Goffart2013-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | and isRunning() should return false. This restore the Qt 4.7 behaviour In Qt 4.7, the finished() was called with the thread's intenal mutex locked. Which mean that: - Call to isRunning or isFinished called from a slot connected to finish within the thread would deadlock. (Hence no compatibility to keep here) - Call to isRunning or isFinished from a slot connected with QueuedConnection in another thread would lock the mutex until the destructors are finished. and then return as if the thread have finished. Change-Id: I963eccae8f7634aff90cc4bbab6ca886a78e35eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry-picked from qtbase commit ec5e59b73c20a7dc6aec96c829f1e53c3fa58c07) Task-number: QTBUG-30251 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update Irish locale to return correct date formatEl Mehdi Fekari2013-03-131-2/+2
| | | | | Change-Id: I89ad9b97dba6f76d34a23ec03b119fb51e592917 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Workaround a bug in mktime on QNXFabian Bumberger2013-03-131-0/+10
| | | | | | | | | | | | | Under certain circumstances, mktime failes to convert the tm struct into secs since epoch. This is a workaround and fixes the qdatetime and qqmllocale autotests. Backport of: 56820382f26 Change-Id: I7d819aad2d6901cd096b441f2c18fd97108d9abb Reviewed-by: Mehdi Fekari <mfekari@rim.com> Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix CreateFileMapping() error handlingPeter Kümmel2013-03-012-4/+5
| | | | | | | | | | | CreateFileMapping() returns NULL in case of an error. The patch corrects the wrong testing on INVALID_HANDLE_VALUE, and sets NULL for invalid handles. Change-Id: Iaab4945ed88ee92bbf9a0871e95a5820dd1a56ed (cherry-picked from qtbase/1a8f67938c4146614fec3788c7868dc1a314cc84) Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix QTBUG-18934 by checking return value of qt_safe_pipeSimeon Bird2013-02-281-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | When QProcess->start() is called, Qt creates a pipe to the process to get its exit value and output. It does this with qt_create_pipe, which calls qt_safe_pipe. qt_safe_pipe, on failure, returns 1. qt_create_pipe then sets errno and returns void. The calling function, QProcessPrivate::startProcess, does not check errno, and thus continues to fork the process, assuming the pipe has been created successfully. The child process then has no way to pass its exit value to the calling process, since the communication pipes it would normally use do not exist, and thus when it exits it becomes a zombie. As a bonus, if waitForFinished is called on a broken process, a crash results because it is trying to wait on a pipe which does not exist. The fix makes qt_create_pipe return an integer, and QProcess::startProcess check the return value, set processError and not create the child process. Task-Number: QTBUG-18934 Cherry-picked from qtbase f575dc214630b3e3ebd66477a623c78405724468 Change-Id: I2e1effdd0617be5b8c5492bcbcf5f2b1584b2241 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compilation of Qt Concurrent with gcc 4.3Thiago Macieira2013-02-271-1/+1
| | | | | | | | | | | | GCC 4.3 had support for decltype but not the new function syntax (which we call "auto function" for short). That meant the code did not compile. qtconcurrentrun.h:105: error: expected initializer before ‘->’ token Task-number: QTBUG-28984 Change-Id: I792276ec59c4f6e73f6137c517636e70c71ed849 (cherry-picked from Qt 5 commit 0c4f6c6ea9415bcc5fde3e34bf909f43a9c6483c) Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QThread documentation: do not discourage the reimplementation of QThreadSze Howe Koh2013-02-192-39/+29
| | | | | | | | | | | | | | | | | | | | | The new QThread documentation now really discourage to reimplement QThread. But in fact, there are many cases where it is perfectly fine. And the example given is even a case where using worker object is wrong. The examle even contains a leak since the thread will never stop and will even leak. This changes put back some sentences from before commit 207f588b6896cbe72745037dc1cb0a3aef1cf6d0. The sample code has been re-writen. Notice how reimpementing run takes less lines of code, less runtime overhead, no leaks, and also is more complete than the previous example. This is a modified backport of qtbase commit 91e12dca757a8ef5c4691b70eb80db61a9d47e83 Change-Id: I4932aef00307a6cf91d57d632a02b8a85e5e8845 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix call to QMetaObject::metaCall from updatePropertyDavid E. Narváez2013-02-181-2/+5
| | | | | | | | | | | Create an array of arguments in the same way QMetaObject::write does cherry-picked from f0221d359499f675115da1f47dd3669a4383653d Task-Number: QTBUG-29082 Change-Id: Ia2772bce409876861b7004320641b0c4e8996fa8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QLocale: Update tamil's AM/PM textEl Mehdi Fekari2013-02-151-107/+106
| | | | | | Change-Id: I355d24fcaaf2c76b8bdbc51f71f931118f5cb3cd Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fixed checking HOME variable return value using isEmpty()Pasi Petäjäjärvi2013-02-131-1/+1
| | | | | | | | | | | | Return value of the QFile::decodeName(qgetenv("HOME")); is never null if HOME environment variable is not set. So need to check the return value using isEmpty() instead. Task-number: QTBUG-28912 Change-Id: I7875520965bf2c0c7311fb051c1f5177e9c3685b (cherry picked from qtbase/05b4000e01ff5785739617c3069fbe0b0d36a606) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Strip prepending <hostname>: string from currentPath() for VxSimPasi Petäjäjärvi2013-02-131-1/+9
| | | | | | | | | | | VxWorks simulator (VxSim) maps SDK rootdir usable as normal directory. Mapped directory name is either host: or <hostname>: and can be used without prepending prefix containing colon. Strip prepending string and colon to get valid native path to host SDK rootdir running VxSim. Change-Id: I15f4bf4d9eb2cea87268bad9b1a95973962cb2c8 (cherry picked from qtbase/cd5a4279f38ac6cca8ff8da4d75c2577d9b0bbcd) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QLocale: Update the Japanese and Czech localeEl Mehdi Fekari2013-02-121-5/+5
| | | | | | | | | | | - Japanese locale: Year should be displayed in 4 digits instead of 2 in short format - Czech locale: monthName should be displayed in lower case N.B: The changes above are already fixed on Qt 5 that uses an updated version (v22.1) of CLDR Change-Id: I40535ea60b1f6abdd3717a28adbcddaa63b39997 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QProcessEnvironment: Permit magic cmd variablesDaniel Teske2013-02-081-1/+2
| | | | | | | | | | The cmd shell inserts magic variables starting with a = into the environment. Task-number: QTCREATORBUG-8716 Change-Id: I2f140032aea4fb1d77633c6baf90d7b536e2812a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> (cherry picked from qtbase/e7a242b27b961c64613542c75c69954d1c7bd315)
* BlackBerry: The MeasurementSystem port was for BlackBerry OS not QNXSamuli Piippo2013-02-012-11/+11
| | | | | | | | | | (cherry picked from qtbase/18260ed21240fe4c2d1892def80353448096e54c) Change-Id: I4de18389fc3ad7743d80b3f72b44083708d72e77 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Kalle Viironen <kalle.viironen@digia.com> Reviewed-by: Mehdi Fekari <mfekari@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Make compile with QT_NO_FILESYSTEMITERATORThomas Zander2013-01-305-0/+10
| | | | | | | Change-Id: Ie79dda5a48288a1d9cd4b7e0a7934ee9db48c953 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Thomas Zander <zander@kde.org> Reviewed-by: João Abecasis <joao@abecasis.name>
* VxWorks process (RTP) mode does not have taskLock/taskUnlock functionsPasi Petäjäjärvi2013-01-281-0/+5
| | | | | | | | | | VxWorks does not support to globally lock and unlock the scheduler from process. In kernel mode (DKM) above functions disable preemption from requested task and such functionality does not exist for process. Change-Id: Id41eab4c1973e4181e82539d08707659e0780f99 (cherry picked from qtbase/49b8e21429c7ab785fb11e8ef84bd7e65c943861) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add support getting memory page size to RTP mode on VxWorks.Pasi Petäjäjärvi2013-01-282-1/+7
| | | | | | Change-Id: Id71bf7fd8e7371284076247558cba7edb0307e13 (cherry picked from qtbase/00faa09aadfc6c6db9da639ba6b7866c72447e39) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Use Qt defined gettimeofday for VxWorks and no fallback to X11 versionPasi Petäjäjärvi2013-01-282-1/+9
| | | | | | | | | | | | VxWorks don't have gettimeofday function so we always use the one implemented in Qt. VxWorks DIAB compiler is not supported building Qt for VxWorks 6.9.2. Anyone using older VxWorks should also not be affected so use new defines VXWORKS_DKM and VXWORKS_RTP for VxWorks version 6.9.2 onward. Change-Id: I2e9546a101256ea0557b65163b40cd0f28be8519 (cherry picked from qtbase/7e3d5a720752900b1ccbb3d8dcbf12cc02b01b63) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>