summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QStandardItem::takeRow() would crash when it had no columns.Gabriel de Dietrich2009-08-061-8/+10
| | | | Reviewed-by: olivier
* Make sure QWidget::setStyle() relayouts its children.Jan-Arve Sæther2009-08-061-1/+3
| | | | | | | | | | | | Changing a style on a widget should invalidate the widget's layout, since the layouts spacings and margins may depend on the style. One optimization could be to check to see if the spacing and margins have changed due to the style change, but the old style is not available in changeEvent, so we'll keep it simple for now. RevBy: paul Task: 256986
* QMenu: small little code simplificationThierry Bastian2009-08-061-12/+5
| | | | Reviewed-by: trustme
* Fix QMacStyle subControlRect()-reporting for CC_SpinBoxTor Arne Vestbø2009-08-061-3/+9
| | | | | | | | | The mac style ignored the QAbstractSpinBox::NoButtons flag for the SC_SpinBoxEditField sub-control, effectivly always making room for the spinner buttons. Now it's in line with both the Cleanlooks style and the Windows (common) style. Reviewed-by: Jens Bache-Wiig <jbache@trolltech.com>
* QMenu could return wrong geometries for its actionsThierry Bastian2009-08-061-0/+2
| | | | | We needed to call ensurePolished before updating the action rects.
* Faster quaternion multiplications.Ariya Hidayat2009-08-061-18/+11
| | | | | | | | | | | | | Use the known factorization trick to speed-up quaternion multiplication. Now we need only 9 floating-point multiplications, instead of 16 (but at the cost of extra additions and subtractions). Callgrind shows that the function now takes 299 instructions instead of 318 instructions, which is not a big win. However I assume the speed-up has a better effect for mobile CPU, where multiplications are more expensive. Reviewed-by: Rhys Weatherley
* Compile fix for gestures.Denis Dzyubenko2009-08-061-5/+4
| | | | Reviewed-by: trustme
* Support _NET_WORKAREA on Xinerama setups in QDesktopWidgetBradley T. Hughes2009-08-061-8/+18
| | | | | | | Instead of ignoring _NET_WORKAREA, merge it with each screen geometry to give a meaningful availableGeometry() for all screens. Reviewed-by: denis
* Fixes a regression in qwidget when setting a large minimum size.Denis Dzyubenko2009-08-061-9/+9
| | | | | | | | | Setting a minimum size to a value that is larger then the biggest allowed widget size, we should costrain the widget to that max allowed size as we did before. Change 6a2621b6832dbdd349f77cf1f3242b4a6ba3c740 broke it. Reviewed-by: Bradley T. Hughes
* Small fix for native gestures on windows.Denis Dzyubenko2009-08-061-7/+2
| | | | | | We should close the gestureinfo handle only we managed to open successfully. Reviewed-by: trustme
* Enable pan gesture on all QAbstractScrollArea-based widgets.Denis Dzyubenko2009-08-067-29/+40
| | | | | | | | | Two-finger panning will work on all QAbstractScrollArea based widgets, however single-finger panning will be enabled only on some special widgets that always wants it - for example we don't want it on QGraphicsView, and we might want it on itemviews *sometimes*. Reviewed-by: trustme
* Changed setting state in a QGestureDenis Dzyubenko2009-08-064-40/+55
| | | | | | | | | | | | Instead of having a protected setter for the state and forcing the application developer to emit signals manually (which leads to misunderstanding - i.e. if the started() signal should be emitted only once, or of the triggered() signal should be emitted before the finished() signal, etc). So I've added an protected updateState(state) function that sets the internal state and emits appropriate signals depending on the old and new states. Reviewed-by: Volker Hilsheimer Reviewed-by: Richard Moe Gustavsen
* Rearranged the gesture code a bit for future native gestures on Windows.Denis Dzyubenko2009-08-069-45/+80
| | | | | | | | Moved the code that subscribes to native gestures on Windows to a private function in QWidget which will check which gestures the widget is subscribed to and enable native gestures as requested. Reviewed-by: trustme
* Fix build for mingwThierry Bastian2009-08-061-1/+2
| | | | | Unfortunately mingw doesn't know about the IFileDialog interface. So it might have issues on Vista with a file dialog with search enabled.
* Fixed crash in tst_qitemview.Gabriel de Dietrich2009-08-061-1/+2
| | | | | | QAbstractItemViewPrivate::selectionModel may be null. Reviewed-by: olivier
* Replace instances of weak linking for 10.3 with 10.4.Morten Sorvig2009-08-061-1/+1
|
* Merge commit 'origin/4.5'Rohan McGovern2009-08-069-11/+40
|\ | | | | | | | | | | | | | | Conflicts: src/gui/dialogs/qfiledialog.cpp src/gui/dialogs/qfiledialog_win.cpp tests/auto/qicoimageformat/tst_qicoimageformat.cpp tests/auto/qscriptqobject/qscriptqobject.pro
| * Fix a bug when activating HideNameFilterDetails on Windows filedialog.Alexis Menard2009-08-052-11/+19
| | | | | | | | | | | | | | | | | | | | The HideNameFilterDetails was not taken in account for windows file dialog. This patch fix that. For Windows Vista and later we use now the new COMMON_ITEM_DIALOG API (in master) where it add always the filter extension like *.txt so no point to take that flag in account. Task-number: None, during testing Reviewed-by: prasanth
| * Fix compilation when QT_NO_HTTP is definedMarkus Goetz2009-08-056-5/+12
| | | | | | | | | | | | | | | | Note however you still need to -nomake examples -nomake demos when configuring Qt. Reviewed-by: Thiago Task: 259179
| * Fixes hangup when pressing key in QListWidgetOlivier Goffart2009-08-051-0/+7
| | | | | | | | | | | | | | | | | | If there is severals matching items but all of them are disabled, it would have produced an infinite loop. Block the loop once we reach an already matched item. Task-number: 258949 Reviewed-by: Thierry
| * Cocoa: Menus show old selected values.Richard Moe Gustavsen2009-08-051-0/+6
| | | | | | | | | | | | | | | | | | | | We never told Cocoa that it needed to redraw the window view when a window was shown. This is implicit if the window is shown for the first time, but needs to be done explicit if you hide and show it again. Task-number: 254672 Reviewed-by: bnilsen
* | Make QLineEdit cursor blink againAlan Alpert2009-08-061-0/+3
| | | | | | | | | | | | | | Somehow forgot to hook up the blinking signal (in the new QLineControl) to QLineEdit. Reviewed-by: Trust Me
* | Compile Fix for QT_KEYPAD_NAVIGATIONAlan Alpert2009-08-067-11/+29
| |
* | Doc: fix qdoc errors in QSharedPointer documentation.Thiago Macieira2009-08-052-2/+3
| | | | | | | | | | | | | | | | | | | | I added the documentation to QWeakPointer::data, but I forgot to declare the class in the qdoc stub. Also, apparently I cannot link to a specific overload of a given function. Reviewed-by: Volker Hilsheimer
* | Restore symmetry between QSharedPointer and QWeakPointer on QObjects.Thiago Macieira2009-08-053-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous commit, you could create a QWeakPointer from any QObject-derived object. It's possible because QObject now has a pointer to the QWeakPointer's d-pointer. However, if you did: QSharedPointer<QObject> obj(new QObject); QWeakPointer<QObject> weak1(obj); QWeakPointer<QObject> weak2(obj.data()); Then weak1 would shared d-pointers with QSharedPointer, but weak2 wouldn't. Also, weak1.toStrongRef() would work, but weak2.toStrongRef() wouldn't. This change makes QObject know where the d-pointer created by QSharedPointer is, so weak2 would get the same d-pointer. As a nice side-effect, you can check if a given QObject is shared by trying to promote its QWeakPointer to QSharedPointer. Reviewed-by: Bradley T. Hughes
* | Performance improvements by avoiding creation of temporary QSharedPointers ↵Thiago Macieira2009-08-051-43/+25
| | | | | | | | with d=value=0
* | Add support for using QWeakPointer with QObject, replacing QPointer.Thiago Macieira2009-08-054-5/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with QPointer is that it's a simple QObject*. So the only way for QPointer to do what it's supposed to do is if the object it's pointing to clears all QPointers when getting deleted. That means the QObject must know each and every QPointer pointing to it. To make matters worse, QPointers can be deleted while the object they're pointing to also gets deleted. So deleting QObjects must do locking. The solution to the QPointer problem is that both QObject and the "QPointer" reference something outside the QObject. This way, QObject doesn't have to lock anything to destroy itself: it's simply setting a volatile integer to zero when it gets deleted. Since the integer is outside the QObject, the integer is also refcounted. It's also O(1), so there's no problem having as many "QPointer". The two-atomic-ints structure is exactly what QSharedPointer and QWeakPointer use internally. We just abuse this structure for QObject needs, setting the strong reference count to -1 to indicate that it's a QObject that cannot be managed by a QSharedPointer. But QWeakPointer can still work and replace QPointer neatly. Reviewed-by: Bradley T. Hughes Reviewed-by: Jarek Kobus
* | ItemViews: make it possible for chekcable items to get partiallyCheckedThierry Bastian2009-08-052-2/+13
| | | | | | | | | | | | | | Previously it was only switching between checked and unchecked. Task-number: 259008 Reviewed-by: ogoffart
* | QTapAndHoldGesture is gone, remove referenceVolker Hilsheimer2009-08-051-1/+1
| |
* | Fix compilation for compilers that don't have template friends.Thiago Macieira2009-08-051-1/+0
| | | | | | | | | | | | | | GCC has template friends, so I wasn't seeing the error that d is protected. Thanks to Robert for pointing out. Reviewed-by: Robert Loehning <robert.loehning@nokia.com>
* | Fixed setting a style shet on a QSpinBox to change the arrow possitionOlivier Goffart2009-08-051-4/+4
| | | | | | | | | | | | | | If you only set the position, of the button without setting a geometry, it did not work. Task-number: 259226
* | Fix regressions introduced by 31edb4d5a63b9b3c28cce1c4ca6eb99f62a09759Alexis Menard2009-08-052-5/+11
| | | | | | | | | | | | | | | | | | | | The commit 31edb4d5a63b9b3c28cce1c4ca6eb99f62a09759 introduced regressions in filters which breaks the mac native dialog, the non native dialog with HideNameFilterDetails activated. Task-number:259105 Reviewed-by:olivier Reviewed-by:prasanth
* | MainWindow: fixed an update issue when moving a separatorThierry Bastian2009-08-051-0/+3
| | | | | | | | | | | | A non painted (ie. garbage) area could appear if you had a fixed size dock widget and you moved the separator. The previous place where the separator was painted was not updated
* | Re-enable the use of Common Item DialogPrasanth Ullattil2009-08-051-1/+3
| | | | | | | | | | | | This was disabled by patch bf305bc2e488ad4f08c49767246f31a81218991e Reviewed-by: Thomas Hartmann
* | QMenu: fix a crash depending on stylesThierry Bastian2009-08-051-9/+13
| | | | | | | | | | We were calling pixelMetric and sizeFromContents with a NULL styleoption That crashes on mac and might also with other styles.
* | Merge AudioServices into mainline.Justin McPherson2009-08-0545-0/+10166
| |
* | Merge branch '4.5'Bill King2009-08-055-12/+36
|\ \ | |/ | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp
| * Make file extension case insensitive with the Gtk+ file dialogJens Bache-Wiig2009-08-041-1/+18
| | | | | | | | | | | | | | | | | | | | | | The Qt dialog treats extension filters as case insensitive where the default behavior of the Gtk+ file dialog is to be case sensitive. The GtkFileFilter allows only simple glob syntax to be used so we basically rewrite the extension string from .xyz to .[xX][yY][zZ]. Task-number: 259155 Reviewed-by: joao
| * Fix: Gtk native dialogs do not repaint when zero-timers are usedJens Bache-Wiig2009-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | The problem was that our glib timers were given too high priority, effectively starving the Gtk event loop. By assigning our timer source, G_PRIORITY_DEFAULT_IDLE we ensure that all gtk+ events are handled first, thus allowing the native dialogs to respond and repaint properly. Task-number: 258433 Reviewed-by: bhughes
| * Fix indentation.Alexis Menard2009-08-041-1/+3
| | | | | | | | Reviewed-by:TrustMe
| * Fix ancestor flags that are not correctly update when reparenting.Alexis Menard2009-08-041-11/+12
| | | | | | | | | | | | | | | | | | updateAncestorFlags was not reseting the flags if you change the parent that have for instance itemsClipChildrenToShape to a new one that doesn't have that flag. Task-number:258956 Reviewed-by:bnilsen
| * Build on snow leopard.Morten Sorvig2009-08-041-1/+1
| | | | | | | | | | | | Don't error out when building qmake, just let it build a 64-bit binary (even for carbon) RebBy: Richard Moe Gustavsen
| * Preserved fill rule for perspective mapped strokes in raster engine.Samuel Rødal2009-08-032-0/+3
| | | | | | | | | | Task-number: 254407 Reviewed-by: Gunnar
* | Fixes casing issue in the PSQL driver.Bill King2009-08-051-5/+5
| | | | | | | | | | The record and primaryIndex functions don't take into account that psql treats different casing as different entities when enquoted.
* | Fix compilation after my last change to qobject_p.hThiago Macieira2009-08-041-3/+3
| | | | | | | | | | | | | | I renamed deletionNotification back to its original name. I had forgotten that QWidget needed a similar change. Reviewed-by: Trust Me
* | Fixed bug where Q[Styled]ItemDelegate edition wouldn't terminate whenGabriel de Dietrich2009-08-042-13/+2
| | | | | | | | | | | | | | | | | | the item lost focus to an unrelated dialog. The tests against the active modal window was unnecessary. Task-number: 257859 Reviewed-by: olivier
* | Restore the old name for QObjectDeletionNotification.Thiago Macieira2009-08-042-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | If we're going to do changes to simplify some of the Declarative UI enablers, let's do them all at once. That way, the adaptation necessary happens only once, as opposed to every time we do the changes. I tried not to break by leaving a typedef, but obviously the QObjectPrivate member isn't affected by the typedef... Reviewed-by: Trust Me
* | Revert "Remove currentChildBeingDeleted from QObjectPrivate."Thiago Macieira2009-08-042-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 128717b171f01c82e5f0fb83f5923d4f7b9cfc10. The change broke Alien because QWidget no longer has the native window handle in its own private. It needs to access the top-level window (or the one with the native handle) in order to perform some operations. The problem is that it needs to do that in the destructor. And we cleared the parent before the destructor was run. Technically speaking, reverting is the correct thing to do, since the parent *still* exists when the child is deleted.
* | qregext filter changed to support additional parameter/unicodeMatthew Cattell2009-08-041-1/+2
| | | | | | | | | | | | | | | | | | | | changed the QRegExp filter back to the old form plus an additional piece to allow international characters. the new regular expression now allows a file type filter to contain a bracketed description prior to the filter set itself. 259105 Andy Shaw
* | Add QWeakPointer::data, which thread-unsafely returns the tracked pointerThiago Macieira2009-08-042-2/+75
| | | | | | | | | | | | | | | | This function allows one to retrieve the pointer out of a QWeakPointer without promoting it to QSharedPointer first. That means there are no guarantees that the object won't get deleted. Reviewed-by: Bradley T. Hughes