summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QLocalSocket: fix abort on Windows.Martin Petersson2011-04-061-0/+5
| | | | | | | | | The socket will not close as long as there are bytes left to write. So by deleting the pipeWriter bytesToTrite will be 0 and the socket will close directly. Task-number: QTBUG-14939 Reviewed-by: Joerg Bornemann
* QStringBuilder: add operator += for QString and QByteArrayOlivier Goffart2011-04-063-0/+65
| | | | | | | | | | | | Optimize cases when we have. string += someString + someOtherString Avoid the allocation of one temporary string. Behaviour change: byteArray += someString + QByteArray("foo\0bar", 7) before, the array would end at foo because of the conversion to string Reviewed-by: hjk
* Dummy commit to trigger pulse.axis2011-04-050-0/+0
|
* Fix QMetaObject::indexOfSlotOlivier Goffart2011-04-042-1/+30
| | | | The wrong offset was added
* Fix compilationOlivier Goffart2011-04-041-2/+2
| | | | Reviewed-by: Joao
* Documentation for the initilize_list constructorOlivier Goffart2011-04-043-0/+26
| | | | Reviewed-by: Joao
* QStringList: constructor for std::initializer_listOlivier Goffart2011-04-042-0/+16
| | | | Reviewed-by: Joao
* HTTP backend: rename method that loads resource from cachePeter Hartmann2011-04-042-4/+4
| | | | Reviewed-by: Markus Goetz
* HTTP backend: make cache validation method return boolPeter Hartmann2011-04-042-14/+12
| | | | | | ... rather than storing it in a bool reference. Reviewed-by: Markus Goetz
* HTTP backend: return earlier when resource loaded from cachePeter Hartmann2011-04-041-7/+7
| | | | | | | no need to add headers to the request if it is not sent but loaded from cache anyway. Reviewed-by: Markus Goetz
* QTemporaryFile: Locate placeholder before re-encodingJoão Abecasis2011-04-041-31/+40
| | | | | | | | | | | | | | | Previously, the placeholder was identified in unicode-based QString, and the offset was assumed to be correct after conversion to the local 8-bit encoding. This assumption is obviously wrong for variable-sized encoding, such as utf-8. With this change, the placeholder is still identified in the original QString, but conversion to 8-bit encoding is done in a step-wise fashion and offsets recomputed. This allows us to drop the intermediary argument verification in _gettemp. Task-number: QTBUG-4796 Reviewed-by: Robin Burchell
* Prefer use of QByteArray to qstrdup and manual memory managementJoão Abecasis2011-04-041-9/+6
| | | | | Reviewed-by: Olivier Goffart Reviewed-by: Robin Burchell
* Check for null no longer neededJoão Abecasis2011-04-041-2/+0
| | | | | | | With proper checks for boundary conditions, we no longer need to protect against reaching the terminating null character. Reviewed-by: Robin Burchell
* Don't overrun XXXXXX placeholder when generating next filenameJoão Abecasis2011-04-041-3/+1
| | | | | | | | | | Checking of boundary condition needs to happen whenever there is a change. Checking anywhere else is useless. This fixes an issue where we would overrun the placeholder if there was a 'Z' next to the placeholder string. Reviewed-by: Robin Burchell
* Split argument validation of _gettemp as separate functionJoão Abecasis2011-04-041-25/+51
| | | | | | | | | This removes knowledge about the structure of the filename template from the randomization process and is a pre-requisite to adding Unicode support to the code. Task-number: QTBUG-4796 Reviewed-by: Robin Burchell
* Remove duplication with QCoreApplication::applicationIdJoão Abecasis2011-04-041-19/+5
| | | | | | | | | The duplication was there to allow qmake and other tools to compile without a full build of QtCore. Cleaning up this code justifies losing the benefit of PID-tagged temporary files in those tools. Reviewed-by: Olivier Goffart Reviewed-by: Robin Burchell
* Adding comments; variable scopingJoão Abecasis2011-04-041-22/+30
| | | | | | | There should be no semantic differences, otherwise. Reviewed-by: Harald Fernengel Reviewed-by: Robin Burchell
* Don't pre-check if directory exists as it's unnecessaryJoão Abecasis2011-04-041-35/+0
| | | | | | | | | | | | | | | | | | | On Posix platforms, when attempting to atomically create file and obtain descriptor, we only continue if we get an EEXIST error. If the path points to a non-existing directory, we should get ENOENT and will fail as well. On Windows, the check was already ignored. We would detect the file does not exist, attempt to obtain a handle upon return to QTemporaryFileEngine::open and fail there without running "for a *very* long time". Checking if the directory exists beforehand is not only unnecessary it also constitutes a race condition. Trusting the result of this check is dangerous and doubly useless. Reviewed-by: Olivier Goffart Reviewed-by: Robin Burchell
* QTemporaryFile: More dead code eliminationJoão Abecasis2011-04-041-84/+29
| | | | | | | | | | | | | | | | | | | There are exactly 2 uses of the _gettemp function: one for windows platforms, one for all others. Windows requests a file name, others request a valid file descriptor for that file name. Despite the 2 distinct use cases, the code was full of #ifdefs to keep never used code paths compiling. With this change the qt_mkstemp wrapper is eliminated, together with dead code inside if (doopen) {} blocks on Windows platforms. The more proper Q_OS_WIN macro is preferred to Q_WS_WIN. _gettemp is also changed to return the valid file descriptor on non-Windows platforms. Reviewed-by: Olivier Goffart Reviewed-by: Robin Burchell
* Removing dead code in QTemporaryFileJoão Abecasis2011-04-041-18/+4
| | | | | | | | The option to create a directory is never used, so let's drop it. There are bigger issues with this code. Reviewed-by: Olivier Goffart Reviewed-by: Robin Burchell
* Remove duplicate #includeJoão Abecasis2011-04-041-1/+0
|
* Extending fileTemplate autotestJoão Abecasis2011-04-041-14/+26
| | | | | | | | ... to also verify template prefix and corner cases with runs of less than 6 Xs. Reviewed-by: Olivier Goffart Reviewed-by: Robin Burchell
* Adding unicode test case for QTemporaryFileJoão Abecasis2011-04-041-0/+122
| | | | | | Task-number: QTBUG-4796 Reviewed-by: Olivier Goffart Reviewed-by: Robin Burchell
* Test should fail, debug output here is uselessJoão Abecasis2011-04-041-4/+1
| | | | | | Reviewed-by: Olivier Goffart Reviewed-by: Harald Fernengel Reviewed-by: Robin Burchell
* moc: qobject_cast cannot be used if the class privately iherit from QObjectOlivier Goffart2011-04-041-1/+3
| | | | | because the qobject_cast function do not have the right to access the staticMetaObject.
* Added debugging output to elf2e32_qtwrapper.axis2011-04-041-0/+31
| | | | Reviewed-by: Trust me
* Fixed detection of internal errors in the elf2e32_qtwrapper script.axis2011-04-041-6/+4
| | | | Reviewed-by: Trust me
* Added some more error handling to the elf2e32_qtwrapper.axis2011-04-011-4/+4
| | | | RevBy: Liang Qi
* QNetworkDiskCache: clean up after merge requestPeter Hartmann2011-04-014-9/+12
| | | | | | | changes include whitespace, parenting, recovering erroneously deleted code etc. Reviewed-by: Markus Goetz
* Speed benchmark for QNetworkDiskCacheSiddharth Mathur2011-04-013-1/+452
| | | | | Merge-Request: 2505 Reviewed-by: Peter Hartmann
* QNetworkDiskCache: change file organizationSiddharth Mathur2011-04-014-44/+78
| | | | | | | | | | Faster disk cache for mobile devices. Reduce file-system touching operations and work around FAT performance issues. Features new on-disk layout. Cached objects are now saved in multiple subdirectories and filenames are shorter in length. Merge-Request: 2505 Reviewed-by: Peter Hartmann
* Make sure we don't use subpixel positions in full hinting modeJiang Jiang2011-04-013-7/+4
| | | | | | | | | Some of the text can start from subpixel positions (start from 100.5 for instance), we need to make sure they stick to pixel grid in this case. Reviewed-by: Eskil (cherry picked from commit bf03b38d2b32a0cfca181398597884e4252466f4)
* Fix broken test on windowsOlivier Goffart2011-04-011-4/+0
| | | | | | | | | | | | | | stringbuilder.cpp(160) : error C2666: 'operator +' : 2 overloads have similar conversions stringbuilder.h(416): could be 'QStringBuilder<A,B> operator +<QByteArray,char[5]>(const A &,const B (&))' with [ A=QByteArray, B=char [5] ] or 'built-in C++ operator+(__int64, char [5])' while trying to match the argument list '(QByteArray, char [5])' The reason is the cast to QNoImplicitBoolCast (which is int)
* Fix compilation warningsOlivier Goffart2011-04-011-5/+4
|
* linking doc of QLocale with QApplication::keyboardInputLocale()Zeno Albisser2011-04-011-1/+5
| | | | | Reviewed-by: Denis Dzyubenko Task-number: QTBUG-17099
* Fix autotest when using QStringBuilderOlivier Goffart2011-04-012-25/+25
|
* Compile with QStringBuilder and QByteArrayOlivier Goffart2011-04-018-9/+10
| | | | Reviewed-by: Denis
* QStringBuilder now support building QByteArrayOlivier Goffart2011-04-014-34/+205
| | | | | | | | | This breaks source compatibility if one made its own QConcatenable as it nows require a Prefered type. And also sometimes if QT_USE_FAST_OPERATOR_PLUS was used, and the result of an addition between two QByteArray is used directly Reviewed-by: Denis
* Chnaged Q_AUTOTEST_EXPORT marco into Q_GUI_EXPORT for QZipWriter classPavel Mogilevskiy2011-04-011-1/+1
| | | | | | | | | Merge-request: 1162 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> [ Symbols for QZipReader were previously exported with 959ab5d84d67ec84c2342b083e362ca75613e8cb. There's no good reason not to do the same for QZipWriter. Classes remain private API. -- João ]
* Fix horizontal centered text drawing without word wrapJiang Jiang2011-04-014-23/+30
| | | | | | | | | In this case we can't use line width to align the text, we have to use the rectangle width given in QPainter::drawText for alignment instead. Reviewed-by: Eskil (cherry picked from commit b92a31da01ee50fed4b10282e79f812167faf659)
* Fix bug when catching exceptions in tests.Marco Alanen2011-04-011-0/+2
| | | | | | | | | | Resets currentTestObject if an exception is caught while executing a test suite. This is required or else subsequent test executions will trigger an assert. Task-number: QTBUG-3869 Merge-request: 1163 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* fix order of #include-s on SPARCRitt Konstantin2011-04-011-2/+1
| | | | | | | | on some systems (i.e. on SPARC), the order of IPC-related includes is meaningful; sys/types.h, then sys/ipc.h, then sys/sem.h, and so on Merge-request: 2586 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* move semun declaration to qcore_unix_p.hRitt Konstantin2011-04-015-50/+27
| | | | | | | | | | | according to X/OPEN we have to define semun ourselves but on some systems sem.h will have it, so let's use a prefixed one (qt_semun). this allows to avoid the code duplication and makes things a bit easier to undesrtand Merge-request: 2586 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Optimize QMutexPoolOlivier Goffart2011-03-312-13/+19
| | | | | | | Make the get() function inline and simplify the hash computation Reviewed-by: brad
* Fix declarative after the last changes to the QObject internalsOlivier Goffart2011-03-313-6/+6
|
* moc: be able to compile if there are private classesOlivier Goffart2011-03-314-10/+41
| | | | | Reviewed-by: brad Reviewed-by: thiago
* Speedup activation of signalsOlivier Goffart2011-03-3110-135/+221
| | | | | | | | | | | | | | | | | | | | | | | | | The virtual QObject::qt_metacall will recurse to the whole object hierarchy to find from which class a function should be called. But it is possible to know, at connection time, from which exact QMetaObject a function belongs, and the relative offset into it. So we make the slot calls from the qt_static_metacall function. So activation of signals is faster. - We must not call a slot from a class that has been destroyed. To avoid this, there is a check on the methodOffset. If it is smaller, that means we might be called (indirectly) from the destructor. We fallback to the virtual call to qt_metacall that does the right thing. - The signature of the static method is void (*) (QObject*,MetaCall,int,void**) It returns void, so the compiler is allowed to do tail recusive optimization. Having the QObject* as first parameter make it ready on the stack for the call to the member function. - The new static method has to be a member function in order to be able to access the private slots. Reviewed-by: brad
* Improve slightly the performence of activateOlivier Goffart2011-03-311-12/+12
| | | | | | | Avoid the overhead of QObjectConnectionListVector::at(), when we know anyway which list to take. Reviewed-by: brad
* Add a test in QObject.Olivier Goffart2011-03-311-1/+30
| | | | Testing that slot from destroyed class are not called
* Optimize QMetaObject::activate (remove call to QThreadData::current)Olivier Goffart2011-03-315-4/+9
| | | | | | | QThreadData::current is too slow, it needs to access the TLS The currentThreadId is much faster. Reviewed-by: Brad