summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that bootstrapped users of QCryptographicHash only use SHA-1Thiago Macieira2013-08-152-1/+9
| | | | | | | This reduces code size quite considerably in the bootstrapped tools. Change-Id: I7475650b1936e93afcf327cb4def2f7763609179 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Don't compile MD4, MD5, SHA-2 and SHA-3 into qmakeThiago Macieira2013-08-151-1/+1
| | | | | | | | We just need one digest algorithm, any algorithm, to generate a somewhat unique identifier. SHA-1 will suffice. Change-Id: I3cb26bf866d616df3ef32feace10934f19daa1a6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix crash in QProcess::waitForStarted() on Unix.Christian Strømme2013-08-131-3/+3
| | | | | | | | | | | | Invoking waitForStarted() on a QProcess before or after an unsuccessful call to start() (e.g., with an empty command), would execute FD_SET with an invalid file descriptor and cause the process to abort. The bug can be reliably reproduced on OSX. Task-number: QTBUG-32958 Change-Id: Id25b7781168489281645e21571361ca1a71d43e3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reset the QItemSelectionModel when its model is reset.Stephen Kelly2013-08-131-0/+2
| | | | | Change-Id: I12af41adb18a2ecf8825b23d5715766dcae55436 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* un-confuse lupdate: make #ifdef'd braces symmetricalOswald Buddenhagen2013-08-121-3/+2
| | | | | | | | | as a side effect, this also de-duplicates the code, which is good in its own right. Change-Id: I504cb518276fdf610639c3337e3842570b97815f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: John Layt <jlayt@kde.org>
* Remove OS X unsupported warning.Jake Petroules2013-08-101-4/+0
| | | | | | | No other platform has such a warning and it really is not important. Change-Id: Ib85a536b6fcf9d7f15cd8b0779db7f6cfaec339a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Forward the correct compilers to the actual cmake tests.Stephen Kelly2013-08-091-0/+8
| | | | | | | | | | This was missing from commit 87db2fdef (Use the compilers used by Qt for the CMake tests., 2013-07-19) Task-number: QTQAINFRA-609 Change-Id: Ief1f0ed11d9f6268c636dc739fbf7945c5dee2c8 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Merge branch 'release' into stableSergio Ahumada2013-08-091-1/+1
|\ | | | | | | Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
| * Enable qsrand() on builds without thread-safe posixEskil Abrahamsen Blomfeldt2013-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The #ifdef clause in qsrand() needs to be the same as in qrand(). Otherwise, we will store the seed in thread-local storage in qsrand(), never passing it into srand(), and then we'll use regular rand() because the rand_r() function is missing, thus always using a random seed of 1 in all applications. Task-number: QTBUG-32781 Change-Id: I00240a1954ae746b87b031f3a0470a6cbe747571 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Android: Fix QCoreApplication::applicationDirPath()Eskil Abrahamsen Blomfeldt2013-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Disable the code path which queries /proc/<pid>/exe for the current executable path, as from a Q_OS_ANDROID perspective, this executable will be the Dalvik binary. Instead we get the application directory via the fallback, by looking in argv[0], since this is set to the location of the application binary. Task-number: QTBUG-32852 Change-Id: Ib93050f41cbd47aaf71284e8bfa6a3247131d978 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | qobject: Do not destroy slot objects inside a lockDario Freddi2013-08-071-8/+26
| | | | | | | | | | | | | | | | | | This prevents deadlocks in case the destructor re-enters. (Example: a functor containing a QSharedPointer of a QObject) This also fixes a leaked slot object in disconnectHelper. Change-Id: Ia939790e3b54e64067b99540974306b4808a77f2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fix clang detection of thread_local variablesThiago Macieira2013-08-061-1/+1
| | | | | | | | | | | | | | | | The "0" must have been added because there was no __has_feature for the feature back in the day. Now it exists. Change-Id: I50f0544ae82a8be54a8d26da400e31c1906dad9e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QMimeDatabase: Fix handling of duplicate mimetype definitions (2/2).David Faure2013-08-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | 7721c3d27c6a fixed the case where two similar definitions are in the same directory. This commit fixes the case where two similar definitions are in different directories, both in the search path (GenericDataLocation). If the file extension gives us the same mimetype twice, there's no conflict, i.e. no reason to fallback to determination from contents. Change-Id: I72c56004b6d5e88964159e53ec160ce8b06c2264 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Mark qt5_use_modules as obsolete.Stephen Kelly2013-07-311-0/+12
| | | | | | | | | | | | | | | | | | | | Forward-port of cb7f32f5b861fe115fa71f64500a5cbb0b643f1b (Mark qt4_use_modules and qt4_automoc as obsolete., 2013-07-04) from cmake.git. Change-Id: I0c24408ef06bc93eb0e55108cf4eab2f8cbd19cb Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QByteArray: Remove some reinterpret_cast<>.Friedemann Kleint2013-07-302-4/+4
| | | | | | | | | | | | | | | | | | | | Fix warning: QByteArray(QByteArrayDataPtr dd) constructor warning C4946: reinterpret_cast used between related classes: 'QArrayData' and 'QTypedArrayData<T>'. Task-number: QTBUG-32559 Change-Id: I06356902f79ed6bf784127ff0c3a97d3263a25da Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Symbol for max number of arguments in QMetaMethod::invoke()Illya Kovalevskyy2013-07-302-0/+10
| | | | | | | | | | | | | | | | | | | | | | QMetaMethod::invoke(..) takes fixed number of arguments for execution. Adding preprocessor macros which literaly equals this number would be useful for writing some generic code. Task-number: QTBUG-31821 Change-Id: Ia2faf291f3f7df44a47c3cf18f5cd587d37d7d2e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add support for Q_OS_FREEBSD_KERNEL and documentThiago Macieira2013-07-301-5/+16
| | | | | | | | | | | | | | | | | | | | Also clarify documentation for OSes with variants. Q_OS_ANDROID should have been called Q_OS_LINUX_ANDROID and Q_OS_BLACKBERRY should have been Q_OS_QNX_BLACKBERRY. Task-number: QTBUG-15402 Change-Id: I3a34d52a1c0ebb8eb73284bdf198443c209a5fd4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Remove a left over cast that is now semantically incorrect.Jake Petroules2013-07-301-1/+1
| | | | | | | | | | | | | | | | CFPropertyListRef is a typedef for void*, which is why this code was compiling OK prior to this change. Change-Id: I78d65652a76721434056bd9f6d011917e2864125 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Work around msvc /clr LNK2005 errors with QListRichard Browne2013-07-301-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a compatibility with Qt 5 and Microsoft C++ /clr mode. The QList copy constructor defines a Cleanup class that causes LNK2005 errors. It is a compiler problem, but the patch is simple. The use of QT_TRY/QT_RETHROW instead of a Cleanup class is more consistent with other Qt code, so is arguably preferable even without the compiler bug. Task-number: QTBUG-31949 Change-Id: I1acfbae1924f0a52ffb8d9722b52e01b61edd42e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Correct QHash::values() documentation.Mitch Curtis2013-07-291-1/+1
| | | | | | | | | | Change-Id: Ia19bd0578591f77e5aee1c7e3e619ba97754f384 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2013-07-261-6/+2
|\| | | | | | | Change-Id: Ic5a232260a6c8ee71f9ff91e820f54c36ab6b15a
| * Doc: Update documentation of Qt::HANDLETopi Reinio2013-07-241-6/+2
| | | | | | | | | | | | | | | | | | Qt::HANDLE is always defined as 'void *' on Qt 5.0 Task-number: QTBUG-32469 Change-Id: I3f0f2b19e65d54c88604e1cb65b5791c456b3003 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Fix crashes when invoking toVariant() on empty QJsonValue objects.Friedemann Kleint2013-07-241-2/+6
| | | | | | | | | | Change-Id: I51cd114e862c6fad564484e990348f324ad56ab9 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Bump Qt version to 5.1.2Sergio Ahumada2013-07-231-2/+2
|/ | | | | Change-Id: Ibe3e6a37a874b75ea9a20e0a9ed8aa5f21bf6be2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* document that validity of exitCode() depends on exitStatus() == NormalExitOswald Buddenhagen2013-07-221-3/+7
| | | | | Change-Id: Ied16681f08c59de16ac365b9ae76c2eacf6bc29c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Ensure that the user codecs are listed in QTextCodec::availableCodecsThiago Macieira2013-07-211-4/+4
| | | | | | | | | Codecs registered by creating new QTextCodec instances should be listed there. Task-number: QTBUG-32500 Change-Id: I56c00e0d6bbfef55a6cbd571bcf9aa2cf333ef3a Reviewed-by: David Faure <david.faure@kdab.com>
* Changed digia contact details to */legal, updated licensesTeemu Kaukoranta2013-07-201-1/+1
| | | | | | | | Scripts are available in internal mkdist repo. Added license tags, updated licenses and copyrights/contacts Change-Id: Ibc734275f3000987eaa4f5c57f19d4e1fda2c479 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix warning about using QString's const char* constructor on MacThiago Macieira2013-07-201-1/+2
| | | | | Change-Id: I20ca50fdcdcfb075ad317247f147e4eb007a0c44 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix incomplete override of QIODevice::open in QProcess and QLocalSocketThiago Macieira2013-07-202-22/+38
| | | | | | | | | | | | | | | | | | | The rule for a new override is that it must still work if the old implementation is called. The catch is that any class that derives from QProcess and isn't recompiled will still have QIODevice::open in its virtual table. That is equivalent to overriding open() and calling QIODevice::open() (like the tests). In Qt 5.0, QProcess::start() called QIODevice::open directly, not the virtual open(), so there's no expectation that a user-overridden open() be called. With that in mind, simply fix QProcess::start to not call the virtual open at all. Similarly with QLocalSocket, the calls to open were always non-virtual. Task-number: QTBUG-32284 Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* fix endless loop in QProcess/Win drainOutputPipesJoerg Bornemann2013-07-181-2/+4
| | | | | | | | | | | Commit 568f82fba397e06a26b4fd40f074e4432d02d248 was incomplete. If drainOutputPipes detected some readyRead it wouldn't end the loop. Task-number: QTBUG-32354 Change-Id: I4e594f1e148abe9ef36c047a55eee1b22fd5064b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix compilation of QLockFile on SolarisDavid Faure2013-07-161-0/+4
| | | | | | | | flock isn't available but we use fcnlt already (which is the recommended alternative on Solaris) Change-Id: I718e59c4804950a26eeb610888e17ce666522dcc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Update description of QAbstractItemModel::supportedDragActions()Topi Reinio2013-07-161-2/+4
| | | | | | | | | | Update documentation for the QAbstractItemModel::supportedDragActions() (virtual since 5.0) and the obsoleted setter function. Task-number: QTBUG-32410 Change-Id: I4f77601bca63e5f782ade1f577104500f541bbb1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Define QT_NO_DEBUG with RelWithDebInfo and MinSizeRel builds.Stephen Kelly2013-07-151-0/+2
| | | | | | | | Task-number: QTBUG-32403 Change-Id: I709ca32ca5bc1a342593357735ef3911ef849eb9 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QCoreApplication: Removed out-of-date docs (argv() method).Tomasz Olszak2013-07-121-5/+1
| | | | | | | | QCoreApplication::argv() method was obsolete in Qt4.8 and removed in Qt5.0. Change-Id: I217402f774f5509c8ca317a35c831ffa5ac2af06 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDir::mkpath shouldn't fail if parent directory denies accessShawn Rutledge2013-07-111-1/+2
| | | | | | | | | | | The fix for QTBUG-30046 introduced this regression on Windows, which meant that it became impossible to create a directory anywhere under c:\Users for example, because each user only has permission to see his own directory. Task-number: QTBUG-32314 Change-Id: I1b35433265934d4978d4b0c23a946c3f920c710d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Accept defeat when select(2)ing without a monotonic clockThiago Macieira2013-07-101-6/+2
| | | | | | | | | | | | | | | | We prefer to use the monotonic clock because it's never affected by time jumps (such as the user changing the date, or the system adjusting for any other reasons, including automatic leap seconds). But if a system doesn't have a monotonic clock, we simply accept the regular, real time clock and hope it doesn't jump. This is better than the current code that never restarts a call. The side-effect is that a 30-second select may become a 3630-second select if someone sets the clock back one hour. Task-number: QTBUG-22301 Change-Id: Ia5a3bb453cd475f45b03637e2549165589fd2524 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix dead lock in the Qt event handlingOlivier Goffart2013-07-101-2/+4
| | | | | | | | | | | | | | | The deadlock is caused because the QEvent is destroyed while holding the event list mutex. And the QEvent may have a custom destructor that will re-enter the event handlng code. The QScopedPointer that should destroy the event must be created after the MutexUnlocker. Regression introduced by commit f9035587b98ac5dc9491e642b8ec84470ec03f0e Task-number: QTBUG-31606 Change-Id: I6b2cbc2656eacdec61b641886953f00bf5b3ff36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Uniformize the syntax description of Q_PROPERTYOlivier Goffart2013-07-102-18/+1
| | | | | | | | | | | | In the qobject.html page, the description of the syntax of Q_PROPERTY does not include the MEMBER keyword added in Qt 5.1. But it was well documented in the documentation of the property system. Merge the two code snipppets. Task-number: QTBUG-32211 Change-Id: I7b57329c201b6f3bc812155f21dbfb2c6423494e Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: fix typo in QXmlStreamNamespaceDeclaration[s]Thiago Macieira2013-07-101-1/+1
| | | | | Change-Id: I2b6c0fc21152a06a7c401dfd0ac3141643c5f81b Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* fix infinite loop in QProcessPrivate::drainOutputPipesJoerg Bornemann2013-07-051-1/+1
| | | | | | | | | | | | | | | | | | When drainOutputPipes is called, the process is already dead. If readyReadEmitted is false, there was no data in the pipes. As the process is dead, there won't be data in the pipes in future iterations. The situation that triggered the infinite loop was this: process A starts console process B. B starts console process C. C inherits stdout/err of B. B dies. C runs forever and does not close the stdout/err handles. A notices that B died and calls drainOutputPipes. Task-number: QTBUG-29391 Change-Id: I4819901df307be684c6ad70753a5f964a834704a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QWinOverlappedIoNotifier: fix race conditionJoerg Bornemann2013-07-051-5/+38
| | | | | | | | | | | | Fix race condition in waitForNotified for zero timeout. A waitForNotified(0) call is typically used for triggering events near the end of life of the I/O resource (e.g. drainOutputPipes in QProcess). In that case we must synchronize the IOCP thread and waitForNotified. Task-number: QTBUG-29391 Change-Id: Iadbd8564ec461cbc48a6ef8c5627e30a5c6eecfd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* bail out early in QWinOverlappedIoNotifier::waitForNotifiedJoerg Bornemann2013-07-051-0/+7
| | | | | | | | Calling waitForNotified on an uninitialized notifier will print a warning and return false. The autotest has been adjusted. Change-Id: I85e18d6d0a8a5462e1a5d451613add941d89b5fb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Clean up evaluation license logicTor Arne Vestbø2013-07-054-49/+46
| | | | | | | | | | | | | | | | | | Instead of storing the application type as a uint, we use the enum provided by QCoreApplicationPrivate. The former resulted in a few cases of wrong logic where the values got mixed up, such as always printing the QtCore console warning, even for GUI applications. The qt_eval_is_supported function has been refactored to return enums instead of magic values, to make the logic easier to read. The same goes for qt_eval_days_left, which now only concerns itself with the number of days left. qt_eval_is_expired() has been added to use for easy checking of expiration date. Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Ia0e85b2103f790a7e02e0d6e567a477b3145fcb9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* doc: Build fix to QSettings documentation snippets.Robin Burchell2013-07-041-3/+3
| | | | | | | | | The constructor taking a global color was removed in Qt 5.0.0. We need to explicitly convert to QColor before we get a QVariant. Change-Id: I821f164b8601647b062eeef57372755fa187c50c Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QtCore: fix the number precision in QJsonDocument.toJson() againLiang Qi2013-07-041-1/+1
| | | | | | | | | | | Need to store 17 decimal digits for binary64, IEEE 754 double formats. Autotest is included. Test cases from TC39 test suite for ECMAScript. Task-number: QTBUG-31926 Change-Id: I546398f21ea7ff5e40e89fc9de8703f628f55df9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Use case insensitive matching for hashes QFileSystemWatcher/Win.Friedemann Kleint2013-07-042-23/+40
| | | | | | | | | | | Do not lower case file names to generate hash keys since QString::toLower() converts some characters with context which the Windows file system will not. Task-number: QTBUG-31341 Change-Id: I285bfedef3c1ca9d59083229e61974dd378c72ae Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Add cmake related information to the test output.Stephen Kelly2013-07-031-0/+8
| | | | | | Change-Id: Ie52630402bea331c89ac106f38ffbba4784f04ab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix change-of-sign warning found by ICCThiago Macieira2013-07-031-1/+1
| | | | | | | | | | | | | qstring.cpp(3896): error #68: integer conversion resulted in a change of sign The line before also had 0x8000, but since there was no addition, 0x8000 was a literal converted to short. However, 0xff + 0x8000 is an int, and 0x80ff is positive, while short(0x80ff) is negative. Change-Id: I445ff401d817b643479e54320525890ce12bbfe5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove default argument from declarations of qHash as friendGiuseppe D'Angelo2013-07-022-2/+9
| | | | | | | | | | | | | | | It's illegal in C++11: §8.3.6.4 [dcl.fct.default] "If a friend declaration specifies a default argument expression, that declaration shall be a definition and shall be the only declaration of the function or function template in the translation unit." Clang is starting to enforce this, thus it's making qtbase not compiling. Task-number: QTBUG-32100 Change-Id: Ifd9d4f62354d7cf4ccf275f36aab64e05c59efff Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtCore: Fix remaining MSVC-64 warnings about integer truncation.Friedemann Kleint2013-07-021-5/+5
| | | | | | | | | warning C4267: 'argument' : conversion from 'size_t' to ' int', possible loss of data. Change-Id: I8d1ca27d4d66a9ce0deb70766446e780308bba33 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>