summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'e4bec39a139363d1ee4cf3fb15a3fe4499215e77' into 4.6Thiago Macieira2009-11-028-100/+226
|\
| * Fix compilation in QContiguousCache.Thiago Macieira2009-10-291-3/+3
| | | | | | | | Reviewed-by: TrustMe
| * Initialise the reserved bits to 0.Thiago Macieira2009-10-287-4/+11
| | | | | | | | | | | | | | This is future compatibility: we must rely on them being 0 in older versions of Qt. Reviewed-by: Bradley T. Hughes
| * Fix Qt containers to properly support types with strict alignments.Thiago Macieira2009-10-288-36/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QContiguousCache is a new type, so there are no binary compatibility issues. QHash and QMap didn't have any public qMalloc / qFree, so the entire logic is contained in .cpp code. However, since old code will not inform us of the alignment requirements, we need to add a bit to the structure to indicate whether strict alignment is in use or not. QList doesn't require any changes. For small, movable types, they're all stored in the pointer array itself, so they're aligned. For larger types, we use new(), so types with stricter requirements should define their own operator new(). QLinkedList cannot be fixed. It uses new() on the QLinkedListNode, which contains a T type. Sorry. QVector did have public qMalloc / qFree. I've moved the calls to the inner function and made it keep the old calls if the alignment requirement is below a certain threshold. The idea is that, if it's above, no one was using QVector anyway. Reviewed-by: Bradley T. Hughes
| * Add some STL compatibility for QContiguousCache and private inheritanceThiago Macieira2009-10-281-60/+65
| | | | | | | | | | | | | | | | The private inheritance ensures that we don't try to access the types under the wrong pointer. If we did that, we'd cause strict aliasing violations. Reviewed-by: Olivier Goffart
* | Merge commit '8c4edbd04f350294462fd689748de2dd7cc84d47' into 4.6-upstreamBradley T. Hughes2009-10-301-1/+3
|\ \
| * | QLocale: AM/PM symbol support for symbian platformdka2009-10-281-1/+3
| |/ | | | | | | Reviewed-by: Denis Dzyubenko
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into origin-4.6Olivier Goffart2009-10-301-3/+3
|\ \
| * | Fixed: Variable res goes out of scope but is accessed later via pointerMiikka Heikkinen2009-10-291-3/+3
| |/ | | | | | | | | | | | | In qdatetime UTC conversion functions, variable res was declared in incorrect scope and went out of scope too soon in Symbian. Reviewed-by: Janne Koskinen
* | Merge commit origin/4.6 into team-widgets/4.6Olivier Goffart2009-10-291-3/+3
|\ \ | |/
| * Fix integer overflow in string.remove len parameterMarkus Goetz2009-10-271-3/+3
| | | | | | | | | | Task: 262677 Reviewed-by: joao
* | Use qLowerBound in qBinaryFindPascal Létourneau2009-10-281-32/+10
|/ | | | | | | | | | | | The current implementation of qBinaryFind use 64bit arithmetics even on a 32bit system, which make it slow The docs mention qBinaryFind will find any occurence of the search value not necessarily the first one, but this is not case with current implementation So nothing prevents the use of qLowerBound Reviewed-by: Olivier Goffart Merge-request: 1513
* Reimplementing QDate/QTime/QDateTime in Symbian native mannerAleksandar Sasha Babic2009-10-191-1/+61
| | | | | | | Some of the methods used in QDate/QTime/QDateTime have been reimplemented to use native Symbian calls. Reviewed-by: Janne Anttila
* Revert "Workaround for OpenC daylight saving cache issue when using ↵Aleksandar Sasha Babic2009-10-091-30/+2
| | | | | | localtime_r." This reverts commit 2f7d1318d2dc63322a468d8c301ae718eaba0d03.
* Workaround for OpenC daylight saving cache issue when using localtime_r.Janne Anttila2009-10-081-2/+30
| | | | | | | | | | | | | | | | OpenC incorrectly caches DST information between localtime_r calls, i.e. if previous call to localtime_r has been called for DST affected date, also the second call will be affected by DST even the date is such that DST should not be applied. The workaround is to call mktime with non-DST affected date before calling localtime_r. mktime call resets the OpenC internal DST cache to right value and localtime_r will return correct values. This commit can be reverted once Open C bug 9525 has been reverted. AutoTest: Fixes tst_QDateTime::totime_t Reviewed-by: Aleksandar Sasha Babic
* Fixed initialization of the system locale on Symbian.Denis Dzyubenko2009-10-071-2/+8
| | | | | | | Made it thread-safe and actually make sure that we don't initialize the data several times. Reviewed-by: axis
* Revert "There's no need to include qstringmatcher.h in qstringlist.h"Marius Storm-Olsen2009-10-072-1/+1
| | | | | | | | Source-incompatible change This reverts commit 8714892977269591bb9b348c6eb549a7f2c45cbc. Rev-by: Trustme
* fix string builder for QT_NO_CAST_FROM_ASCII on Windowshjk2009-09-301-2/+13
| | | | Reviewed-by: thiago
* doc: add some more \since 4.6 tagsVolker Hilsheimer2009-09-281-1/+4
|
* getMacPreferredLanguageAndCountry: Fix possible crashMarkus Goetz2009-09-281-1/+1
| | | | | | | | getMacPreferredLanguageAndCountry can crash when called e.g. as a root user because CFPreferencesCopyValue will return 0. Reviewed-by: denis Task-number: 261664
* Fixed qsharedpointer auto test build break for Symbian OS.Janne Anttila2009-09-281-1/+1
| | | | | | | RVCT has problems with scoping, the similar workaround has been used in qhash.h also. Reviewed-by: Janne Koskinen
* QRingBuffer: Try to minimize memory consumption while it is emptyMarkus Goetz2009-09-231-5/+18
| | | | | | | | | Try not to hold an unused 4k QByteArray. This may introduce a performance regression e.g. for QNetworkReply in exchange for lower memory usage. We will see if this is really the case. Reviewed-by: Thiago
* Fixes some warning in headersOlivier Goffart2009-09-222-13/+13
| | | | | | | | | such as margins.h:90: warning: declaration of ???bottom??? shadows a member of _this_" 'a' stands for argument Reviewed-by: jbache
* Fixes warnings in QMapOlivier Goffart2009-09-221-5/+4
| | | | | | | | | | Get rid of the pages of warning you get when compiling code that uses QtConcurrent::map for instance. qmap.h:607: warning: dereferencing pointer 'y' does break strict-aliasing rules qmap.h:605: note: initialized from here Reviewed-by: Peter Hartmann
* qdoc: Added \brief texts to all the since 4.6 functions.Martin Smith2009-09-211-0/+4
|
* System locale on Mac may not return AnyCountry for any language != Ccon2009-09-181-2/+5
| | | | | | Because of QLocale limitations this broke other places. Reviewed-by: Denis Dzyubenko
* Add a new wildcard mode similar to bash in QRegExpBenjamin Poulain2009-09-172-18/+85
| | | | | | | | | | | It is not possible to escape a wildcard character in the Wildcard mode of QRegExp. This follows the kind of wildcard of the CLI of Windows The new WildCardUnix follows the escaping of a unix's bash. Task-number: 241346 Reviewed-by: Olivier Goffart Reviewed-by: Matthew Cattell
* doc: Fixed some qdoc errors.Martin Smith2009-09-161-3/+0
|
* doc: Fixed some qdoc errors.Martin Smith2009-09-161-1/+1
|
* I don't think this was intentional...João Abecasis2009-09-152-2/+0
| | | | | | Wonder how it survived for so long. Reviewed-by: Peter Hartmann
* Fix ambiguous overload for QTileRules constructorOlivier Goffart2009-09-151-0/+2
| | | | | | Also fix the relations in the documentation Reviewed-by: David Boddie
* System locale on Mac returns preferred language/country from sys prefs.con2009-09-141-5/+29
| | | | | | | Previously it always returned the C locale's language, which is of not much help for an application. Reviewed-by: Morten Sorvig <msorvig@trolltech.com>
* Fix -Wconversion warnings where possible.David Faure2009-09-136-25/+25
| | | | | | | | | | | | In order to detect "int foo = myQReal" mistakes, one needs to compile with -Wconversion. However that flag triggers many warnings inside Qt. This commit fixes many of them, like qchar.h:295: warning: conversion to 'ushort' from 'unsigned int' may alter its value qglobal.h:1026: warning: conversion to 'qreal' from 'qint64' may alter its value qbytearray.h:441: warning: conversion to 'char' from 'int' may alter its value Other warnings remain (such as those coming from bitfields) Merge-request: 1460 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Compile fix for windowsRobert Griebl2009-09-111-1/+1
| | | | Reviewed-by: TrustMe
* Out of memory fix for qUncompressRobert Griebl2009-09-112-21/+34
| | | | | | | | | | | qUncompress shouldn't crash when running out of memory, since it might deal with buffers which are not under user control (same behavior as Qt 4.5). It will however throw a std::bad_alloc exception if Qt is compiled with exception handling. Reviewed-by: Harald Fernengel Reviewed-by: Ralf Engels Reviewed-by: Lars Knoll
* Add missing \since 4.6 in the QMargins documentationOlivier Goffart2009-09-091-0/+1
|
* Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6Janne Anttila2009-09-0989-363/+372
|\
| * Update license headers again.Jason McDonald2009-09-0989-356/+356
| | | | | | | | Reviewed-by: Trust Me
| * Doc: A timeline's current value is not reset when the duration changes.David Boddie2009-09-081-0/+4
| | | | | | | | | | Task-number: 219152 Reviewed-by: Trust Me
| * exception safety fix for QList::operator+= (const QList&)mread2009-09-081-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring of current++ and src++ out of the new line makes the code easier to understand but it also seems to be significant at least in the ::isComplex case. I suspect that the ordering increment operations vs throw from new is not well defined, or not implemented as you might hope (with the ++ happening very last). The changes in the catch blocks mean that it deletes the created objects, rather than trying with the first failed object. The test code has been updated with a +=(Container) test, and to force testing of both static and moveable types. Reviewed-by: Harald Fernengel
* | Fixed 'use of function is deprecated' warnings reported by RVCTJanne Anttila2009-09-091-2/+2
|/ | | | | Task-number: 241223 Reviewed-by: Janne Koskinen
* QByteArray: Two new functionsMarkus Goetz2009-09-032-1/+30
| | | | | | | | We had append(str,len) before and now we also have insert(index,str,len) and prepend(str,len). Task-number: 247881 Reviewed-by: Thiago
* doc: Fixed several qdoc errors.Martin Smith2009-09-023-0/+11
| | | | That's the last of them... for now.
* QCache: Variable initialization was missingMarkus Goetz2009-09-021-1/+1
|
* QMargins doesn't need to be exported as it is fully inlineThierry Bastian2009-09-011-1/+1
| | | | Reviewed-by: ogoffart
* qlist.h uses memcpy() without including <string.h> or <cstring>Bernhard Rosenkraenzer2009-09-011-0/+1
| | | | | | | | | | | | | | | | | Attempting to make use of the inlined QList::node_copy without including <string.h> or <cstring> with gcc 4.4 results in (e.g.) /usr/lib64/qt4/include/QtCore/qlist.h: In member function "void QList<T>::node_copy(QList<T>::Node*, QList<T>::Node*, QList<T>::Node*) [with T = net::Port]": /usr/lib64/qt4/include/QtCore/qlist.h:600: instantiated from "void QList<T>::detach_helper() [with T = net::Port]" /usr/lib64/qt4/include/QtCore/qlist.h:121: instantiated from "void QList<T>::detach() [with T = net::Port]" /usr/lib64/qt4/include/QtCore/qlist.h:462: instantiated from "void QList<T>::append(const T&) [with T = net::Port]" /usr/src/ark/BUILD/kdenetwork/kget/transfer-plugins/bittorrent/libbtcore/net/portlist.cpp:54: instantiated from here /usr/lib64/qt4/include/QtCore/qlist.h:388: error: "memcpy" was not declared in this scope Task-number: reported, but not yet assigned a number Merge-request: 1388 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* doc: Fixed several qdoc errors.Martin Smith2009-09-012-10/+3
| | | | | Also removed four function declarations from QMargins that had no definitions.
* Updated lisence headers for QMarginsJens Bache-Wiig2009-08-312-26/+26
|
* Make QMargins a proper classJens Bache-Wiig2009-08-313-63/+386
| | | | | | | | | | Since we need QMargins for other things then the CSS helper functions in drawutil, we have to make it more generic. It is already useful for QWidget::contentsMargins for example. This ensures we have some flexibility on how to use and modify it in the future. Reviewed-by: mbm
* doc: Fixed several qdoc errors.Martin Smith2009-08-312-0/+17
|