summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Restore Qt 4.6 behaviour: exec() always enters the event loop.Thiago Macieira2011-01-271-4/+1
| | | | | | | | | | | | | | In Qt 4.6 as well as 4.7's QCoreApplication and QEventLoop, calling exec() always enters the event loop, even if you had tried to quit()/exit() it before entering, with one exception (noted in the unit tests; this difference has been in Qt since at least Qt 4.2). Add unit tests to ensure all of the three classes have the same behaviour. Decide if we want to match the behaviours in Qt 4.8. Reviewed-by: Bradley T. Hughes
* Make syncqt not complain about missing header macros.Thiago Macieira2011-01-271-0/+10
| | | | | | | | | qsharedpointer_impl.h contains class definitions that are also mirrored in qsharedpointer.h (which is there for qdoc3), so we have a macro to stop processing. Task-number: QTBUG-16912 Reviewed-by: Olivier Goffart
* Check if the interpolators have already been deleted.Thiago Macieira2011-01-261-4/+9
| | | | | | | | | During application destruction, the order in which static destructors is run is undetermined. So avoid a null-pointer dereference. Task-number: QTBUG-16855 Reviewed-by: Robin Burchell Patch by task reporter
* Improve timer ID safety by using a serial counter per ID.Thiago Macieira2011-01-261-6/+24
| | | | | | | | | | The high bits of the counter are not used, so we store a serial counter there. This has nothing to do with the serial counter used in nextFreeTimerId, which is there for ABA protection. Reviewed-by: Bradley T. Hughes
* get rid of extra calls to handle()Ritt Konstantin2011-01-211-9/+4
| | | | | | | | | in create(), handle() is called a few lines early; in attach(), QSharedMemory::attach() calls handle() as a preparation step; in detach(), well, if we're here, unix_key is valid anyways... Merge-request: 1018 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* simplify QSharedMemory::detach()Ritt Konstantin2011-01-213-5/+3
| | | | | | | | de-init members in the QSharedMemoryPrivate::detach() like in code for symbian. this gains a lightly better control in case of errors on detach() Merge-request: 1018 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* avoid extra calculationsRitt Konstantin2011-01-212-4/+2
| | | | | | | | QSystemSemaphore::setKey() sets the fileName member to makeKeyFileName()'s result; no need to call it again Merge-request: 1018 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* fix error reporting on detach()Ritt Konstantin2011-01-211-1/+1
| | | | | | | before, we returned too early :) Merge-request: 1018 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* fix error reportingRitt Konstantin2011-01-211-0/+1
| | | | | | | that was mistakenly broken by 570e7b38487455d394b5b74a59edc639f3dc416f Merge-request: 1018 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Revert "Add a warning about trying to release a timer ID that isn't active"Olivier Goffart2011-01-171-1/+0
| | | | | | | | | | This reverts commit e1955231478df8990cf8b1f80438abf957c5d6f2. Revert it in Qt 4.7 because the warning is triggered a lot by Qt itself They are going to be fixed in master. Reviewed-by: Thierry Task-number: QTBUG-16175
* Fix QSystemSemaphore handle management issues in SymbianMiikka Heikkinen2011-01-131-4/+16
| | | | | | | | | | QSystemSemaphore native RSemaphore handle was unnecessarily created again on each acquire. The creation logic was also susceptible for random failures when two or more threads tried simultaneously acquire the semaphore. Task-number: QTBUG-16615 Reviewed-by: Janne Koskinen
* Allow use of command line parameters with RApaLsSession::StartApp.Miikka Heikkinen2011-01-113-8/+79
| | | | | | | | | | | | | | | | | | | | | | When a Symbian application is launched using RApaLsSession::StartApp, command line parameters can be given with CApaCommandLine::SetTailEndL and will now be correctly interpreted by Qt applications as command line parameters. There are a couple of limitations: 1) The parameters given with CApaCommandLine::SetTailEndL will not be available in main method's argv array; they can be accessed via QCoreApplication::arguments function. 2) CApaCommandLine::SetTailEndL does support any arbitrary binary data as parameter, but only 8-bit string data gets parsed properly into QCoreApplication::arguments. For other kind of tail data, you need to subclass QS60MainAppUi and implement ProcessCommandParametersL callback. Task-number: QTBUG-15987 Reviewed-by: axis
* QTextCodec::codecForMib: actually use the cacheOlivier Goffart2011-01-111-1/+4
| | | | | | Was removed by mistake in commit 02aecce59cb76ceb88f635203553 Reviewed-by: Peter Hartmann
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-01-10482-485/+485
|\ | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QFont/Windows: restrict the pixel size accuracy Update copyright year to 2011. For non-developer builds, skip test that requires private API tst_qhttpnetworkconnection: Compile fix Change QHostInfoCache to use QElapsedTime instead of QTime. Fix for qtdemo bug
| * Update copyright year to 2011.Jason McDonald2011-01-10482-485/+485
| | | | | | | | Reviewed-by: Trust Me
* | Fix handle leak in symbian QTimer implementationShane Kearns2011-01-101-2/+4
|/ | | | | | | | | | | | | | The timer handle was only being closed when a timer was cancelled, which resulted in a leak for one shot timers that have completed normally. Instead the timer is now closed in a destructor (closing null handles is safe, so it doesn't matter if the handle was never created - e.g. in the case of a zero timer) Also added a handle check before creating a timer to prevent a leak in case the start function is called twice in the backend. Task-number: QTBUG-16380 Reviewed-by: mread
* QUrl::setUrl should call detachOlivier Goffart2011-01-061-0/+1
| | | | | | Task-number: QTBUG-16425 Reviewed-by: Gabriel Reviewed-by: Markus Goetz
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/doc-staging into 4.7-integrationQt Continuous Integration System2010-12-213-9/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '4.7' of scm.dev.nokia.troll.no:qt/doc-staging: (29 commits) Doc: Added a missing license header. doc: Replaced some \raw and \endraw uses with \table and \endtable doc: Replaced some \raw and \endraw uses with \table and \endtable doc: Replaced some \raw and \endraw uses with \table and \endtable Doc: Added a note about the Public Suffix List. Doc: Fixed doc bug in Diagram Scene example doc: Removed some empty \row commands from a table. Doc: Added link to QML Basic Types in main Qt Quick page. Doc: Added missing What's New information for Qt 4.6 and 4.7. Doc: Fixed incorrect case in a page file name. Doc: Added a link to the QML Basic Types page. Doc: Removed duplicate external page reference. Doc: Fixed a link to the correct searchPaths() function. Doc: Added documentation about the use of null custom title bar widgets. Doc: Added a missing external page reference. Fixed the QML Focus document. Fixed snippets, images, and formatting. Added QML coding convention for "private" properties. Fixed link to qtestlib-tools by adding link to qt-webpages.qdoc. Some whitespace fixes. Fixed a bug by changing the id name to lower case. ...
| * Merge branch '4.7-upstream' into 4.7-docA-Team2010-12-131-9/+43
| |\
| * \ Merge branch '4.7-upstream' into 4.7-docA-Team2010-12-101-3/+2
| |\ \
| * \ \ Merge branch '4.7-upstream' into 4.7-docA-Team2010-12-081-7/+7
| |\ \ \
| * | | | Doc: Fixed a link to the correct searchPaths() function.David Boddie2010-12-071-1/+1
| | | | |
| * | | | Merge branch '4.7-upstream' into 4.7-docA-Team2010-12-011-1/+1
| |\ \ \ \
| * \ \ \ \ Merge branch '4.7-upstream' into 4.7-docA-Team2010-11-272-107/+97
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch '4.7-upstream' into 4.7-docA-Team2010-11-261-0/+1
| |\ \ \ \ \ \
| * | | | | | | Doc: Removed two warnings from QDirIterator docsGeir Vattekar2010-11-261-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-15492
| * | | | | | | Merge branch '4.7-upstream' into 4.7-docA-Team2010-11-253-2/+16
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge branch '4.7-upstream' into 4.7-docA-Team2010-11-244-6/+16
| |\ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7David Boddie2010-11-233-17/+41
| |\ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ Merge branch '4.7-upstream' into 4.7-docA-Team2010-11-221-14/+34
| | |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Doc: Removed incorrect statement about the C locale.David Boddie2010-11-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-15488
* | | | | | | | | | | | Add a warning about trying to release a timer ID that isn't activeThiago Macieira2010-12-151-0/+1
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Trust Me
* | | | | | | | | | | Add a small protection against releasing a timer twice.Thiago Macieira2010-12-131-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cell corresponding to an allocated timer ID in the free list is unused (because the ID isn't free). So use it to store an invalid value that we can check against the user's value. This provides some protection against a given timer being released twice. Since we store the serial counter of the nextFreeTimerId, getting the same ID twice is a 1-in-128 chance. Reviewed-By: Bradley T. Hughes
* | | | | | | | | | | Use constants the timer ID masks instead of values everywhereThiago Macieira2010-12-131-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Bradley T. Hughes
* | | | | | | | | | | Fix ABA problem with: the serial must be updated on all accessesThiago Macieira2010-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nextFreeTimerId's serial counter was only being updated on timer ID releasing. It needs to be updated on allocation too. Reviewed-by: Bradley T. Hughes
* | | | | | | | | | | Comment a bit more the timer ID allocation code.Thiago Macieira2010-12-131-2/+22
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add the notes for where to place .loadAcquire when that function exists. Reviewed-By: Bradley T. Hughes
* | | | | | | | | | Don't include <features.h> directly: non-standard header.Thiago Macieira2010-12-101-3/+2
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's completely wrong to assume that any Linux has features.h. Instead, include something that comes from the libc (like stdlib.h, which is specified by ISO C 89) and hope that __GLIBC__ gets defined. Specifically don't do this to stddef.h as that one comes from the compiler. Reviewed-by: Andreas Kling
* | | | | | | | | Fix for GCC on Windows x64.Ruben Van Boxem2010-12-071-7/+7
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 939 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | | | | | | | Fix two minor doc errorsAndy Shaw2010-12-011-1/+1
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-14929, QTBUG-15739 Reviewed-by: TrustMe
* | | | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-11-272-107/+97
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (21 commits) Fix strict-aliasing violation warning. Fix warning about %x parameter type mismatch in EGL Fix warning about address of a function being constant. Fix warnings related to unused variables. Fix silly "will be initialised after" warning. Fix warning about mixing integral with non-integral type in ?: Fix warning about use of uninitialised variable Fix "value not in enum" warning with GCC 4.5. Fix warnings with GCC 4.5: some cases are not part of the enum Fix a race condition related to service acquisition. QNetworkReply autotest: fix possible crash QKqueueFileSystemWatcher: don't stop thread that isn't running Fix QSettings auto test to use QTRY_VERIFY tst_QFileSystemWatcher: Don't exit the event loop on first signal. QPollingFileSystemWatcherEngine: Fix double report of directory change. QKqueueFileSystemWatcherEngine: Use higher file descriptors. QKqueueFileSystemWatcherEngine: Unlock mutex between two events. QKqueueFileSystemWatcherEngine: Unlock mutex before calling write(2). QKqueueFileSystemWatcherEngine: Handle kevent(2) returning EINTR. QKqueueFileSystemWatcherEngine: Deleting kevent is handled by close(). ...
| * | | | | | QKqueueFileSystemWatcher: don't stop thread that isn't runningJoão Abecasis2010-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When removing paths from the watch list, if we end up with an empty watch list, we would send a request to the processing thread to quit. In the case where the watch list was empty to begin with (the paths being removed weren't actually being watched) the request to quit would still be queued. If the processing thread wasn't running (and it shouldn't if there weren't any paths being watched) the request to quit would still be posted but not processed. The next time paths were added and the thread started, the request would be processed and the thread would quit at once. When removing paths from the list, we now check whether the watch list is empty to begin with and exit early without asking the processing thread to quit itself. Task-Number: QTBUG-14435 Reviewed-by: Bradley T. Hughes
| * | | | | | QPollingFileSystemWatcherEngine: Fix double report of directory change.Tijl Coosemans2010-11-261-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The polling engine first retrieves a QFileInfo for a given path, then tests whether it's different from before and if so, stores the new file info and emits a signal. In case path is a directory the test also checks if the list of directory entries has changed. This creates a window between retrieving the file info and the test in which a file can be added/removed from the directory or the directory itself can be removed. In that case the test returns true, because the list of entries has changed, but outdated file info is stored which means that on the next timeout the same change will be reported a second time. Therefore, refresh the file info after the test for changes. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | | | | QKqueueFileSystemWatcherEngine: Use higher file descriptors.Tijl Coosemans2010-11-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A file descriptor is used for every path to be monitored, but descriptors below FD_SETSIZE (typically 1024) are precious, for use with select(2). To allow the application (and other parts of Qt) to use select(2), try to duplicate the descriptor returned by open(2) above FD_SETSIZE and close(2) the original. However, only do so when the descriptor table is already fairly large (FD_SETSIZE / 2). This keeps the descriptor table small for applications that use only a few descriptors. While here, also set the close-on-exec flag on the (new) descriptor. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | | | | QKqueueFileSystemWatcherEngine: Unlock mutex between two events.Tijl Coosemans2010-11-261-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the worker thread unlock the mutex between processing two events. Otherwise it's possible for the worker thread to block the application thread when many events occur. Also, there's no need to lock the mutex when processing a pipe event. Generally the worker thread should hamper the application thread as little as possible, so only lock the mutex where needed. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | | | | QKqueueFileSystemWatcherEngine: Unlock mutex before calling write(2).Tijl Coosemans2010-11-261-65/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls to write(2) potentially block, so make sure the application thread unlocks the mutex before it writes to the pipe between itself and the worker thread, so the latter can continue to process events and eventually unblock the write call (if needed) by emptying the pipe. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | | | | QKqueueFileSystemWatcherEngine: Handle kevent(2) returning EINTR.Tijl Coosemans2010-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The worker thread exits whenever the kevent call returns an error, but in the case of EINTR (interrupted by signal) it should just call kevent again. Otherwise for instance, attaching a debugger to the process causes the worker thread to exit because of the SIGSTOP it receives. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | | | | QKqueueFileSystemWatcherEngine: Deleting kevent is handled by close().Tijl Coosemans2010-11-261-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | | | | QKqueueFileSystemWatcherEngine: Use EV_CLEAR instead of EV_ONESHOT.Tijl Coosemans2010-11-261-14/+2
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using EV_ONESHOT and re-enabling the kevent after emitting the signal allows for a window in which file system changes can go undetected. By using EV_CLEAR instead the kevent can stay enabled. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | | | | | Fix minor memory leakMiikka Heikkinen2010-11-261-0/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QProcessPrivate::startDetached() in qprocess_symbian.cpp was leaking RProcess object. Reviewed-by: Janne Koskinen
* | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-11-243-2/+16
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: (28 commits) Fixed tst_qwidget::winIdChangeEvent Use parent class function to generate Makefile headers in Symbian Fix spaces Fix QPixmap::fromImage() in the OpenVG pixmap backend. Native color dialog on symbian Fix non-stroked filled paths in OpenVG paint engine. Fix symbian-mmp.conf include path Fix a build break when namespace is defined Fixed namespace issues related to epocroot.cpp Corrected ASCII comparison and removed extra braces Add symbian scope for qfiledialog_symbian.cpp Resolve EPOCROOT in qt.conf using same logic as in .pro Make epocroot resolving compatible with more build environments Fix for QtOpenGL RVCT4 compilation error Removed extra cpp and done changes based on comments Correct flags for Symbian file dialogs Fix for WServ 64 crash on Symbian. Use include(original mkspec) instead of copying of mkspec to default Fixed code style of d92cbfc5, reported by git push. Switched qdesktopservices to use SchemeHandler for Symbian^3 and later. ...