summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QtCore: Use QDebugStateSaver in (almost) all QDebug operator<<Kai Koehne2015-02-0921-46/+75
| | | | | | | | | Unify the behavior of the different operator<< by always using QDebugStateSaver (appending an optional space at exit), and making sure that the space(), nospace() setting isn't 'leaked'. Change-Id: I38e4f82fa6f7419d8b5edfc4dc37495af497e8ac Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* WinRT: fix QLibrary::isLibrary() due to incomplete #if statementJochen Seemann2015-02-071-1/+1
| | | | | | | | | Q_OS_WINRT was missing in the Windows-condition. Condition was simplified through use of Q_OS_WIN. Change-Id: I1a49d2d9c413dc2156930b6915e1675abcdde36f Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QAbstractTableModel/QAbstractListModel: reimplement sibling()Marc Mutz2015-02-052-0/+18
| | | | | | | | | | | | | | | | | | | | This basically inlines the call to parent(), which unconditionally returns QModelIndex(). The change is binary compatible, because even though we newly override a previously non-overridden virtual method, it doesn't matter whether old code still calls the base class' method, as the new implementation is semantically equivalent, at least if subclasses don't inherit parent() (but why would they). [ChangeLog][QtCore][Important Behavior Changes] QAbstractTableModel and QAbstractListModel now reimplement sibling() to avoid calling parent() (which returns a constant). Subclasses of these models that override parent(), will likely also need to override sibling() now. Change-Id: I9e0cb5622a6d3826e40acaf0e0cd3fdea85cba2d Reviewed-by: David Faure <david.faure@kdab.com>
* Add a qDebug operator overload to handle registered enumOlivier Goffart2015-02-052-0/+24
| | | | | | | | | So if you stream enum type into qDebug, it will show the name of the enum value instead of the int Change-Id: Iec5e826623353560319890d3e7c4ab97d0645f4a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Introduces QMetaEnum::fromTypeOlivier Goffart2015-02-052-0/+17
| | | | | | Change-Id: I1976c1844e52ef8d70a1bbe9945f3299428dbf87 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QMetatype: Register the QMetaObject of a Q_ENUM or Q_FLAGOlivier Goffart2015-02-052-2/+24
| | | | | Change-Id: Id1343c3fb51d88a43d4d97e8859dbe2b0cfbea34 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* introduce /dev variants of qmake propertiesOswald Buddenhagen2015-02-052-6/+21
| | | | | | | | | these reflect the on-target paths (unlike /raw, which are host paths, just without the -sysroot). this is necessary for anything deployment-related, starting with RPATH. Change-Id: I13d598995d0e4d6cb0dc1fc7938b8631cf3e3a95 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* write relative paths to qconfig.cpp as far as possibleOswald Buddenhagen2015-02-052-11/+18
| | | | | | | | | | | | | | | this cuts down the bloat in the binaries and the binary patching requirements in the installer. as a side effect, the sysroot and makespecs are not binary patchable any more as well, which is ok, as the installer does not do it anyway. we now also warn if -[host]<foo>dir is not a subdir of -[host]prefix, as putting things outside the prefix is anti-thetical (the obvious exception being the (unix-only) -sysconfdir). Change-Id: I878f0e71a4dfcfd55b2f8b1cf3045b98b502569b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: Allow for passing a modified argv to QCoreApplication.Friedemann Kleint2015-02-052-27/+50
| | | | | | | | | | | | | | | | | Check by comparing __argc/__argv whether a modified argv was passed to QCoreApplication. If that is the case, build QCoreApplication::arguments() from that argv instead of using the command line. [ChangeLog][Important Behavior Changes][QCoreApplication] On Windows, QCoreApplication::arguments() now returns a list built from argv on Windows as well if a modified argv was passed to the class' constructor. Task-number: QTBUG-30330 Task-number: QTSOLBUG-184 Change-Id: I2498bb554130e7bfaeada3aebe786dfdd0eb534d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-041-2/+0
| | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Use Q_ENUM and Q_FLAG for types in QtCoreOlivier Goffart2015-02-049-12/+16
| | | | | | Change-Id: I33590a9c4c6d87c5bbba1d201e32c6bf1bd3e00b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use Q_ENUM and Q_FLAG in the Qt namespaceOlivier Goffart2015-02-042-48/+97
| | | | | | | They need a special macro since they have a different metaobject Change-Id: I2fa50b4b2e45990fb01771378765b42f03139183 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-031-6/+6
| | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Allow exposing QItemSelectionModel to QMLGabriel de Dietrich2015-02-033-35/+144
| | | | | | | | | | | | | | | | | | | | | This requires being able to create a QItemSelectionModel without specifiying its model, and also setting the model later. Also, several classes, like QPersistentModelIndex, need to be declared as meta-type. Finally, and in order to introduce the 'model' property, we need to have a type compatible getter. Hence the new, non-const model() function. Where needed, meta-type declarations have been removed from auto-tests. [ChangeLog][QtCore][Item Models] QItemSelectionModel can now be created without a model and have one set later. Change-Id: If49bed061a5d1012331f335ca7f6e3959ecd3f1c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QTextStream: remove a use of QString::sprintf()Marc Mutz2015-02-021-4/+11
| | | | | | | | | | | | | Instead of using QString::sprintf() (and converting the result back to QByteArray), simply do the conversion from uchar to hex digits ourselves, using QtMiscUtils. This function is a copy of a similar (but not identical) one in qprocess_unix.cpp, but it's not clear whether they can or should be merged (both are only conditionally compiled), so this patch does not attempt to do so. Change-Id: I0be87963f78a98e35a54c98c5fb444756c57b672 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QTextStream: fix a warning with QTEXTSTREAM_DEBUG definedMarc Mutz2015-02-021-1/+1
| | | | | | | | | The warning was: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] Change-Id: I37dc13ca864d408e02c69102ba5208f8bfe70980 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QProcess: fix warnings with QPROCESS_DEBUG definedMarc Mutz2015-02-021-2/+2
| | | | | | | | | The warnings were: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] (2x) Change-Id: If8c2e8fab7388cb4aa7d6e7ceb5faee531e16006 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Call QDir::homePath() only when necessary in QSettings::initDefaultPaths()Maks Naumov2015-02-021-3/+2
| | | | | Change-Id: I990520917ec65127ae554b5e872791cff78f0b56 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* fix relative path resolution inconsistency in qmake propertiesOswald Buddenhagen2015-02-021-1/+3
| | | | | | | | | | | | | | suppose we queried QT_INSTALL_DOCS/get. if no [EffectivePaths] existed, we'd try [Paths]. if that didn't exist, either, we'd use the built-in, which is relative. so we'd query QT_INSTALL_PREFIX ... without the /get, which is technically wrong. this doesn't currently matter, as all groups have the same built-in defaults anyway, but it may (hint hint) matter later on. Change-Id: I5a3746e80ca1bfbf2f37db3604cc351bddeacd94 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* less preprocessor magic relating to qmake buildOswald Buddenhagen2015-02-021-5/+5
| | | | | | | | it's not worth making things more complicated to remove the duplication of one real LOC. Change-Id: Iddbd0db7d0f81b80192b3980dbe2316b246a3b57 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* complete reversal of adding QLibraryInfo to the bootstrap libraryOswald Buddenhagen2015-02-022-30/+22
| | | | | | | amends 684028a64. Change-Id: I8dcc4b74c4c0328c07711cd7253ff19a74ea2fbf Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Centralize use of __attribute__((noinline))Marc Mutz2015-01-293-11/+11
| | | | | | | | | | There are currently only two users, but I have patches in the pipeline which mark some other function noinline, so proavtively centralize the ifdef'ery involved. Change-Id: I1f02351fdc903d4e026089e12b8a976ed6a8d603 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString: optimize multiArg()Marc Mutz2015-01-291-18/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function used a QMap<int,int> to map the %n's to the index in the args array. By way of construction, the key was sorted in ascending order while the values, initially all -1, were later reassigned to be 0...map.size()-1, ie. std::iota(). The only information this data structure stores is therefore the sorted %n's. For that, a sorted vector is a vastly superior data structure. Go one step further and use QVarLengthArray to avoid allocating any memory for the common case of just a few placeholders. As an artifact of the underlying refactoring, the management of that data structure has been moved to a separate class, ArgMapper. Runtime for the following test from tst_qstring: QString str("%1 %2 %3 %4 %5 %6 %7 %8 %9 foo %10 %11 bar"); // not timed str = str.arg("one", "2", "3", "4", "5", "6", "7", "8", "9"); str = str.arg("ahoy", "there"); went down from 2.2us to 1.5us. Change-Id: Ic552615fbac646b78ba05eb4e3215e63d202fd94 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QString: reduce template bloatMarc Mutz2015-01-291-11/+12
| | | | | | | | | | | | | | | | | | | | Reduce the number of (non-regex) splitString instantiations from six to two by: - Passing separators by (const QChar*, int) and using qFindString() instead of indexOf() - Passing QString as QStringRef when the output is QVector<QStringRef>. Doing so also allows to drop the MidMethod template parameter since QString::midRef() is no longer being used. (Somewhat disappointing) effects on Linux GCC 4.9 stripped release builds: text -500B data +-0B relocs +-0 Change-Id: Id89e2814d5f7da5170181d863167517943c2e0cd Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qlogging: Fix build on FreeBSD after 63cd16d.Raphael Kubo da Costa2015-01-281-2/+2
| | | | | | | | | pthread_getthreadid_np(3) is defined in pthread_np.h, not pthread.h. Additionally, it was added during the FreeBSD 9 time frame, so add a version check to use it only when we know it is present. Change-Id: I4d716d9bfb189d10128b6d458a47045e130b51e8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* corelib: Fix a faulty 5.4->dev merge.Raphael Kubo da Costa2015-01-281-0/+1
| | | | | | | | | | Commit b6191b16 ("Merge remote-tracking branch 'origin/5.4' into dev") merged commit 350c60b ("Link against QMAKE_LIBS_EXECINFO when using backtrace(3)") into the dev branch, but the conflict resolution left out the actual line that changed LIBS_PRIVATE. Change-Id: I6e716ed375abdc534a1f20e412ce7c56ee85d6c0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Remove support for QT_QLOCALE_USES_FCVT.Erik Verbruggen2015-01-282-78/+0
| | | | | | | We expect floating-point math to be IEEE754 compliant. Change-Id: I2b257177f2ef5fce38ac4d8fd76f746dc7b9fc15 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make Qt for Android compile when using errors for warningsAlex Blasche2015-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | In file included from kernel/qsystemsemaphore_android.cpp:35:0: kernel/qsystemsemaphore_p.h: In constructor 'QSystemSemaphorePrivate::QSystemSemaphorePrivate()': kernel/qsystemsemaphore_p.h:104:10: error: 'QSystemSemaphorePrivate::createdSemaphore' will be initialized after [-Werror=reorder] bool createdSemaphore; ^ kernel/qsystemsemaphore_p.h:101:11: error: 'key_t QSystemSemaphorePrivate::unix_key' [-Werror=reorder] key_t unix_key; ^ kernel/qsystemsemaphore_android.cpp:43:1: error: when initialized here [-Werror=reorder] QSystemSemaphorePrivate::QSystemSemaphorePrivate() : ^ widgets/qdockwidget.cpp:208:6: error: unused parameter 'floating' [-Werror=unused-parameter] bool QDockWidgetLayout::nativeWindowDeco(bool floating) const ^ cc1plus: all warnings being treated as errors Change-Id: I69af3ba3883b4311477f0e4e991b5cc0900fb71b Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Itemviews: add ItemIsUserTristate flagDavid Faure2015-01-252-2/+8
| | | | | | | | | | | | | | | | | | | ItemIsTristate is now again purely for enabling the automatic management of the check state of QTreeWidgetItems, while ItemIsUserTristate is separate from that and lets the user select the three states manually. This restores the original behavior of ItemIsTristate for QTreeWidgetItems, which got broken by letting the user cycle through the states too. [ChangeLog][QtWidgets][QTreeWidget] Restored Qt 5.1 behavior of QTreeWidgetItems with ItemIsTristate to enable automatic management of the check state. User-editable tristate checkboxes are now enabled by setting the new flag ItemIsUserTristate. Task-number: QTBUG-40060 Change-Id: I341f5e983804d3b4f27982520bb6647f3014cccc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Add conversion functions for C++11 u16string and u32stringAllan Sandfeld Jensen2015-01-242-4/+70
| | | | | | | | | | | The patch adds convenience functions for working on C++11's new char width specific unicode strings u16string and u32string. [ChangeLog][QtCore][QString] Added methods for convenient conversion to and from std::u16string and std::u32string. Change-Id: I67c082e4755c592d61daaaaa70c8867ef0b23dcb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* src/corelib/tools/tools.pri: add missing qtools_p.hMarc Mutz2015-01-241-0/+1
| | | | | Change-Id: If7af29fdaefddc1e3f08148610ba2720f5927b67 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: QProcess workaround for the stdin pipeRafael Roquetto2015-01-231-3/+37
| | | | | | | | | | | | Due to a bug in the internal implementation of posix_spawnp on QNX, all file descriptors with a value lower than the maximum file descriptor specified in the file_actions structure are duplicated by default, ignoring the FD_CLOEXEC flag. This includes all file descriptors that we are not working with. So we add those file descriptors that have the FD_CLOEXEC flag to the file_actions structure as close actions. Change-Id: I316bc334addb46a4b84c199a69e9bd291ca706c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Handle posix_spawn using exit code 127 to indicate fail-to-startThiago Macieira2015-01-231-2/+16
| | | | | | | | | Most posix_spawn implementations are done using fork(), so the only way to report errors afer fork() is via a special exit code. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html Change-Id: I3a37f81b0cb278bb31e5cb83c87e6b4c034dbc19 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use forkfd in QProcessThiago Macieira2015-01-235-398/+138
| | | | | | | | | | | | | | | | | | | | Replace the existing code in QProcess that dealt with signaling of child processes exiting with forkfd and spawnfd. The previous code was convoluted and hard to maintain, having shown its age in the last year. I've been running it for a year and a half and the new implementation is definitely an improvement. This change replaces support for the QNX Neutrino spawn() call with the POSIX version. We lose the ability to do setsid(), but we gain quite a few ioctls() that were done to fill in the file descriptor mapping structure. That's also the only OS for which we have the ability to thread-safely chdir() before the call to spawnfd(). Another advantage is that forkfd does not require a dedicated thread running to handle child processes exiting. Change-Id: I5eb76821dfdb6a8ed2989d7f53b3c31e515c3174 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Add the compilation of forkfd to QtCoreThiago Macieira2015-01-232-0/+85
| | | | | | | | This also brings in the harness to forkfd that uses QBasicAtomic instead of the generic GCC atomics. Change-Id: Id5488bf192db0027bc684956ade0bf6c640c9512 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QTextStream::readLine() overloadAlexander Volkov2015-01-232-5/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | The most common use case for QTextStream::readLine() is reading a file line by line in a loop. The existing readLine() method allocates new memory for each line, that results in a loss of speed. The introduced overload can use already allocated memory. Besides it allows you to not think about filesystem specifics. The current QFile documentation suggests a separate way to read files from /proc filesystem. With this overload it's possible to use the same idiom in all cases: QTextStream in(&file); QString line; while (in.readLine(&line)) { process_line(line); } The idea was inspired by the blog post of Ivan Čukić: http://ivan.fomentgroup.org/blog/2014/10/03/api-design-and-impact-on-the-performance-qt-vs-stl-example/ Change-Id: I0c62b4a52681870589bc099905e83ed69e03dd40 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Added new private API for Android and onNewIntentPeter Rustler2015-01-212-0/+44
| | | | | | | | | | | | | On Android the foreground activity can get intents with onNewIntent. Those intents can not be received in any other way. This is especially true in Android nfc. This patch adds a way to receive those intents in Qt. This patch heavily leans on the implementation of onActivityResult. Change-Id: Ic4dca301f34afe9a528149c3653e545ed3265a3c Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QAssociativeIterable: add find()Marc Mutz2015-01-212-15/+13
| | | | | | | | | | This is like value(), but returns an iterator instead of the value(). [ChangeLog][QtCore][QAssociativeIterable] Added find(). Change-Id: I029fc8f91cef78f718d419587a2a50ffd2bf7632 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* QtCore: add some more Q_DECL_NOTHROWMarc Mutz2015-01-215-13/+11
| | | | | | | | | | | QtCore now builds with no -Wnoexcept warnings (that doesn't mean there aren't tons of functions that should be marked noexcept, just that all conditionally noexcept functions aren't noexcept(false) just because of a forgotten noexcept elsewhere). Change-Id: I10dacb6b9c9d41d3595fe2f306356d62d3d91c76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devSimon Hausmann2015-01-2123-161/+277
|\
| * Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-2123-161/+277
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| | * Bump versionOswald Buddenhagen2015-01-191-2/+2
| | | | | | | | | | | | | | | Change-Id: I250fa893cdf831d03f9217b5dc0a5aa2f9a6a6b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QIncrementalSleepTimer: Use QElapsedTimer instead of QTimeDaniel Teske2015-01-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since the former is monotonic and we need a monotonic timer here. Change-Id: I34325da4fe0317e12f64629a6eef6a80990c3e1a Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Doc: Fix typosSze Howe Koh2015-01-194-6/+6
| | | | | | | | | | | | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * QFreeList: fix undefined behaviorMarc Mutz2015-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed integer overflow is undefined behavior ([expr]/4), but unsigned arithmetic doesn't overflow, so isn't ([basic.fundamental]/4, footnote there). So, use unsigned arithmetic for the loop-around serial number generation in incrementserial(). While we're at it, also use it for the masking operation in the same function. Found by UBSan. Change-Id: I500fae9d80fd3f6e39d06e79a53d271b82ea8df8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QByteArrayMatcher: fix undefined shiftMarc Mutz2015-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The REHASH macro is used in qFindByteArray() with a char argument. Applying the shift operator promotes (a) to int. The check in REHASH, however, checks for the shift being permissible for _unsigned_ ints. Since hashHaystack is a uint, too, rectify by casting (a) to uint prior to shifting. Found by UBSan: src/corelib/tools/qbytearraymatcher.cpp:314:72: runtime error: left shift of 34 by 30 places cannot be represented in type 'int' Change-Id: Id09c037d570ca70b49f87ad22bed31bbb7dcc7fb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix compilation with Apple Clang 425Thiago Macieira2015-01-171-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This version was based on Clang mainline between releases 3.1 and 3.2, which means it has part of 3.2 features but not all. One of the missing features is __builtin_bswap16. Change-Id: Ic5d393bfd36e48a193fcffff13b95664c7f664de Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Move enabling of C++11 Unicode Strings with ICC from 12.1 to 14.0Thiago Macieira2015-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The support in 12.1 and 13.x appears to be incomplete. Move it to the official supported version https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler Note: this commit will cause a conflict in 5.5 against 99357e32a0e29c73ed721d6d31da66635e6586ca Task-number: QTBUG-43864 Change-Id: Ic5d393bfd36e48a193fcffff13b9a07106e96795 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Add missing AppDataLocation caseMorten Johan Sørvig2015-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This amends commit f3bc9f5c. Change-Id: I69b1a5080e7ac92b8a39746d814da77b17c271c2 Task-number: QTBUG-43868 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * Doc: define target voor function qsnprintf()Nico Vertriest2015-01-161-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-43537 Change-Id: I76c511891a1a07eca77da399d23097e76047f824 Reviewed-by: Martin Smith <martin.smith@digia.com>