summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Prevent compilers optimizing eval timebomb code out of existence.Jason McDonald2010-11-241-2/+2
| | | | | | | | | | | | | | | | The variable that holds the eval license key is a placeholder that is patched during package installation. Unfortunately, for a non-final package build, the placeholder is filled with nulls at compile-time and a clever compiler will optimize away most of the eval timebomb code due to a check in the eval code for the first character of the license key being null. This commit makes the variable that holds the license key volatile, to convince compilers that they cannot make assumptions about the contents of the variable when optimizing. Task-number: QT-3848 Acked-by: Thiago Macieira
* Compile when USER_TIMER_MINIMUM isn't definedBradley T. Hughes2010-11-221-1/+1
| | | | | | | Just user a value of zero instead. Windows will use USER_TIMER_MINIMUM anyways (according to the SetTimer() docs). Reviewed-by: trustme
* Don't let posted events starve native dialogs (regression)Bradley T. Hughes2010-11-181-14/+34
| | | | | | | | | | | | | | | | | | | | After commit eb1015c7bbf135af3656110a4d112377c1209db8, it is possible for posted events to starve some of the (most likely internal) messages used by native dialogs. This commit reverts eb1015c7bbf135af3656110a4d112377c1209db8, and instead introduces a Windows timer to keep sendPostedEvents() happening while the event queue is very active. The GetMessage() hook we install will eventually see when the queue is empty and we can use PostMessage() again, which will then stop this timer. This fixes the regression reported in QTBUG-14655, as well as all of the other reported regressions and problems since the initial commit 31f1ff91028dd7f90925d5b3737e4d88b5fb07aa (which ensures that posted events are sent even when Windows is spinning the message loop). Task-number: QTBUG-14655 Reviewed-by: joao
* Push and pop the thread-default context for the current threadPhilip Van Hoof2010-11-111-0/+7
| | | | | | Merge-request: 869 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com> (cherry picked from commit aa88b7044dd86850e6986aa80104bb38bb7b12eb)
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-11-092-4/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixed deployment for symbian/linux-armcc when using shadow builds. Started using qtmain.lib for all Qt applications, also corelib ones. Make qmake to pass all UTF-8 characters unchanged through parser. Implement support for DEPLOYMENT.display_name in Symbian Added .flags modifier support for DEPLOYMENT items in Symbian Make default application deployment removable Allow pkg_prerules and pkg_postrules to be targeted to separate files Added missing def file symbol. Revert "Use qtmain.lib to provide entry point for all Symbian applications" Fixed test after the fix to QT-4077. Fixed event starvation with pointer events on Symbian.
| * Merge branch 'QT-4077-fix' into 4.7-s60axis2010-11-052-4/+9
| |\
| | * Fixed event starvation with pointer events on Symbian.axis2010-11-052-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CEikonEnv active object is used by Symbian to indicate that new window server events are available, in this case pointer events. Since this object was being controlled by Symbian, it was not subject to Qt's round robin queue. In a case where the event handler for the pointer event would take very long, it was possible for the active object to be completed again before the previous handler was finished, causing it to be called in a loop. This was fixed by making a new Qt-owned class as a subclass of CEikonEnv, and in its RunL, make sure that the object follows the round-robin queue. Because the round robin code is located in a subclass of CEikonEnv that we own, the fix will have no effect if Qt is loaded after the Eikon framework (such as a Qt plugin in a non-Qt app). Task: QT-4077 RevBy: mread AutoTest: N/A, system events
* | | Doc: Removed note about some Qt classes working without an application.David Boddie2010-11-041-5/+4
|/ / | | | | | | | | | | The QString example turned out to be a poor one because it requires an application instance in cases where text codecs need to be set up for the user's locale.
* | Fix a few typos in comments and docs.Jason McDonald2010-11-011-1/+1
|/ | | | | Task-number: QTBUG-13714 Reviewed-by: Trust Me
* Merge branch '4.7-upstream' into 4.7-docA-Team2010-10-201-16/+2
|\
| * Don't allow posted events to starve native messages.Bradley T. Hughes2010-10-201-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9215506e6a057d8aef7415c2921214e1ba1c760d, which caused the above behavior. The intention of this commit was to prevent native messages from starving posted events, but as shown by the example, it is possible for posted events to then starve native messages (which results in very bad behavior on Windows if the user is moving or resizing a window). Unfortunately, my attempts to construct an autotest for this have failed, as I've not found a way to generate the right kinds of native messages from code. Task-number: QTBUG-14021 Reviewed-by: prasanth
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7David Boddie2010-10-201-4/+4
|\ \ | |/
| * Merge commit 'doc-team/4.7' into 4.7Morten Engvoldsen2010-10-142-8/+7
| |\
| * \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-10-131-4/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QGraphicsLayoutItem - user set sizes should always override, even if there's a constraint QGridLayoutEngine - Rework height-for-width support so that row/col spanning works Revert "Revert "Fix (implement!) hfw/wfh in QGridLayoutEngine"" Adjust the parent index for the itemsMoved call. Correctly handle both 16bit and 32bit live pixmaps in meego graphics system. Correctly remove the egl alpha surface flags in meego graphics system. Proper dither & proper alpha checking. In meego graphics system, use always 16bit textures. QCompleter: do not auto complete when directory is changed. tst_qcompleter: Add a test for QFileSystemModel
| | * | Adjust the parent index for the itemsMoved call.Stephen Kelly2010-10-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not doing this causes the parent QModelIndexes to be out of sync with the model. The fix in fe350ca756df6392b3d0b7840351fccc89f9ef6f is extended to also use adjusted indexes in the itemMove call. Merge-request: 849 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7David Boddie2010-10-142-0/+7
|\ \ \ \ | | |_|/ | |/| |
| * | | Merge branch '4.7-upstream' into 4.7-docA-Team2010-10-132-0/+7
| |\ \ \ | | |/ /
| | * | Add a declarative callback for when a QObject's objectName changesAaron Kennedy2010-10-112-0/+7
| | |/ | | | | | | | | | | | | Task-number: QTBUG-13999 Reviewed-by: Martin Jones
* | | Doc: Fixed documentation style and qdoc warnings.David Boddie2010-10-081-5/+5
|/ / | | | | | | Task-number: QTBUG-12071
* | Doc: Fixed doc references to non-existing APIGeir Vattekar2010-10-061-3/+2
| | | | | | | | | | Task-number: QTBUG-13632 Reviewed-by: David Boddie
* | Doc: Fixed the in-repository licenses for the documentation.David Boddie2010-10-041-5/+5
|/ | | | | | In the repository, we should always use the No Commercial license alongside the GNU Free Documentation License for documentation files.
* Made it more clear what the okToRun function does by renaming it.axis2010-09-232-12/+12
| | | | | | | | Since it has the side effect of possibly adding the object to the deferred run queue, this name is more appropriate. AutoTest: Passed RevBy: mread
* Fixed event starvation on Symbian if timers were constantly recreatedaxis2010-09-232-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a timer event occurred, and inside its handler a new timer was created that would also immediately occur, the events would execute over and over and starve other events. This happened because the code in Symbian that is supposed to detect when the same event happens more than once does not work if it is always a new timer which executes. The bug was fixed by introducing a state variable which signals whether we are currently inside the handler of a timer event, and then pretending that newly created timers inside this handler have already been executed once, thereby delaying their execution until the next iteration. Because we reset the state variable in processEvents, the behavior will be slightly different if run directly under CActiveScheduler::Start(). There, we have no way of resetting the state on the next iteration, so all timers inside such a handler (even if it recurses into a new CActiveScheduler::Start()) will be delayed by one event iteration. However, this is considered acceptable, since there is no real "iteration count" in the active scheduler; the event will simply be run after the deferred queue is reactivated (which will be immediately if there are no other events). This is the same as what would have happened for a real timer that executed once and then recursed into CActiveScheduler::Start() (it would also be delayed by one iteration). Task: QTBUG-13773 RevBy: mread AutoTest: Passed
* Made posted events part of the round robin queue.axis2010-09-232-6/+5
| | | | | | | | | That means that posted events will only be sent once per event queue iteration, just like timers. This helps prevent event starvation. RevBy: mread AutoTest: Included Task: QTBUG-13743
* Make qml debugging work with command line argumentsLasse Holmstedt2010-09-171-1/+2
| | | | | | | | | | The environment variables do not work for Symbian devices, so without this change, QML debugging cannot be done on them. In addition, configure now contains an option to disable qml debugging entirely, due to it being a major security risk. Reviewed-by: kkoehne
* Merge branch '4.7-upstream' into 4.7-docA-Team2010-09-162-23/+25
|\
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-09-161-9/+13
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed regression in QPixmap::size() for null pixmaps. Make test less sensitive to platform specifics Doc: Further QML improvements. Doc: Minor improvements to QML-related documentation. The test livelock of QTimer is now expected to work Make sure mapSelectionFromSource does not return a selection with invalid ranges. QEventDispatcherUnix: do not process too many timer if other events need to be processed first Doc: Continued work on the QML documentation. Doc: More work on the QML documentation. Doc: More work on the declarative API documentation. Doc: Some editing and tidying up. Doc: Added a missing file. Doc: Fixed text in license headers.
| | * QEventDispatcherUnix: do not process too many timer if other events need to ↵Olivier Goffart2010-09-151-9/+13
| | | | | | | | | | | | | | | | | | | | | be processed first Task-number: QTBUG-13633 Reviewed-by: Brad
| * | Fixed Q_DECLARE_METATYPE for aix-xlcRohan McGovern2010-09-161-14/+12
| |/ | | | | | | | | | | | | | | XLC needs to see the full declaration of these classes to use them in templates, where other compilers are satisfied with a forward declaration. Reviewed-by: Kevin Wu Won
* | git Merge branch '4.7-upstream' into 4.7-docJesper Thomschutz2010-09-151-91/+0
|\ \ | |/ | | | | | | Conflicts: src/gui/kernel/qgesturemanager.cpp
| * Revert "Properly implement qobject_cast for const pointers."Thiago Macieira2010-09-113-21/+6
| | | | | | | | | | | | | | This commit added new symbols to the 4.7 branch after 4.7.0 was frozen. This reverts commit 0b0aa7603b27447a5abe55c55d0514bc56b35f9e.
| * Remove unsupported code from qobject.h for MSVC < .NET 2003Thiago Macieira2010-09-101-91/+0
| | | | | | | | Reviewed-By: Joerg Bornemann <joerg.bornemann@nokia.com>
| * Properly implement qobject_cast for const pointers.Thiago Macieira2010-09-103-6/+21
| | | | | | | | | | | | | | | | Instead of using ugly const_cast in public headers and Q_UNUSED (which expands to nothing in release builds), use a properly-const method. Reviewed-By: Bradley T. Hughes
* | Merge branch '4.7-upstream' into 4.7-docA-Team2010-09-094-24/+72
|\ \ | |/
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-09-091-2/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Editable QComboBox popup immediately closes itself after a click Change RLibrary handle in QS60PluginResolver to be process wide Cursor is misplaced in the editors text area QSslSocketPrivate::systemCaCertificates() hangs sometimes on Symbian
| | * Change RLibrary handle in QS60PluginResolver to be process wideMiikka Heikkinen2010-09-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | This fix enables Symbian version plugins to be accessed from all threads of the process. Task-number: QT-3895 Reviewed-by: Janne Koskinen
| * | When a move is completed, report the source and destination correctly.Stephen Kelly2010-09-092-8/+51
| |/ | | | | | | | | | | | | | | In rare cases source or destination is changed during the move, so it must be corrected afterward before being reported in the signal. Merge-request: 800 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
| * Fix compilation on Windows CEBradley T. Hughes2010-09-081-1/+1
| | | | | | | | | | | | | | Manual conflict resolution accidentally turned an #ifndef Q_OS_WINCE into an #ifdef Q_OS_WINCE, causing a build failure. Reviewed-by: TrustMe
| * Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-09-071-13/+14
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/Makefile.win32 src/corelib/io/qfsfileengine_win.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/gui/dialogs/qfiledialog_win.cpp src/gui/inputmethod/qcoefepinputcontext_s60.cpp src/gui/text/qfontdatabase_win.cpp src/gui/util/qsystemtrayicon_win.cpp src/script/utils/qscriptdate.cpp tests/auto/qinputcontext/tst_qinputcontext.cpp tests/auto/qscriptengine/tst_qscriptengine.cpp
| | * Ensure that we load system libraries from the correct location.Jan-Arve Sæther2010-09-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a security hole that has been there for a while, but the public awareness have recently rised so the threat is more imminent now. The solution is to fix all places where we dynamically load system libraries. More specifically, we now load all system libraries with an absolute path that points to a library in the system directory (usually c:\windows\system32). We therefore introduce a small class named QSystemLibrary that only loads libraries located in the system path. This shares some of the API with QLibrary (in order to make the patch as small as possible). We don't fix QLibrary due to risk of regressions. In addition, applications can fix the code that calls QLibrary themselves. The problem does not apply to Windows CE, since the search order is documented as not searching in the current directory. However, it touches some CE-specific code - therefore QSystemLibrary is sometimes used on WinCE (however, it will just do a normal LoadLibrary() since its safe anyway). This change does not affect the testability plugin (it is not clearly documented where that plugin is located, and the plugin should never be used in production code anyway) Loading OpenSSL libraries The ssl libraries are handled specially, and searched in this order (we cannot expect them to always be in the system folder): 1. Application path 2. System libraries path 3. Trying all paths inside the PATH environment variable Task-number: QT-3825 Reviewed-by: Thiago Macieira Reviewed-by: Peter Hartmann
| | * Fix Qt applications freezing until mouse/keyboard events occur.Bradley T. Hughes2010-08-301-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the qt_GetMessageHook() is executing, GetQueueStatus() reports that there are timer messages in the queue, but these are never actually seen by the hook. Calling PeekMessage() will never return these messages (which is what we really want to know), so don't use GetQueueStatus() with QS_TIMER. Task-number: QTBUG-12721 Reviewed-by: denis Reviewed-by: joao
* | | Merge commit 'staging-1/4.7' into doc-4.7Morten Engvoldsen2010-09-031-2/+6
|\ \ \ | |/ /
| * | Added catching of errors in timers.axis2010-09-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the bug report this may happen in SMP systems and systems with certain schedulers. This patch does not actually fix the bug which causes the timer error, but avoids the timer firing if it happens, and gives a chance to handle the error. Task: QT-3591 RevBy: mread
* | | Fixed typo in qmath documentation.Jerome Pasion2010-08-232-3/+3
| | | | | | | | | | | | Fixed typo in QPointer documentation. Task: QTBUG-13056
* | | Added documentation for qmath.h header and qnumeric.h.Jerome Pasion2010-08-201-0/+155
|/ / | | | | | | | | Reviewed by: David Boddie Tasks: QTBUG-10011, QTBUG-3205