summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Made xcb plugin work when the GLX extension is not present.Samuel Rødal2012-10-196-7/+53
| | | | | Change-Id: I9285d7524586ff404206c088019ece33335137d9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed GCC 3.4 build with sse2 enabled.Samuel Rødal2012-10-191-1/+2
| | | | | | | | With minimal effort we can keep the GCC 3.4 build working. Task-number: QTBUG-19803 Change-Id: I31611a27b97d5ac426ea857d8f1b656dc6f5377a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFont: Don't invalidate engine unless request has been changedKonstantin Ritt2012-10-192-7/+29
| | | | | | | | | | This makes QFont do a "light" detach when the font attributes data has been changed. The new test clearly shows that the engine is now shared between two font instances after changing the kerning attribute. Change-Id: I59db822f459f02d111686dba7101b98e361fada9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* detach() safely in QVector::erase(), and update callers to not detach.Andreas Hartmetz2012-10-191-4/+6
| | | | | | | | | | | | | | | | remove() can use non-detaching iterators internally before calling erase(), which hasn't been exploited so far, so that the detach() in erase() never actually detached. When using erase() from outside, you can't do it legally without calling begin() or end() that detach() before erase() is called. Now remove() doesn't detach anymore, and detaching in erase() works. With new tests that fail after changing only the erase() callers and pass again after fixing erase(). Change-Id: I47c0a9e362dce8628ec566f5437d951755de96c8 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Mac: Adapt scrollbar fadeout animation for QStyleAnimationGabriel de Dietrich2012-10-192-2/+11
| | | | | Change-Id: I39f1089e8d6ba1bb412d33aa4ebc0971aba52681 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Modularize drag and drop documentationGatis Paeglis2012-10-1935-26/+2560
| | | | | | | | - Move dnd docs and examples out of QtDoc module to gui library in QtBase - Remove info related to Motif dnd since Qt5 doesn't implement it Change-Id: Id7eb4eb422f4294a36dd92709ce3007903371f03 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QStyleSheetStyle: kill more dependencies to QWidgetJ-P Nurmi2012-10-191-10/+12
| | | | | | Change-Id: I5e58ec68c5d20fd7b201c83743f9d284e7c4dc52 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QNX: Use extra information in dirent to avoid stat() callsThomas McGuire2012-10-193-2/+69
| | | | | | | | | | | | This improves iterating over /usr/bin with QDirIterator by more than half, from 36 to 13 milliseconds. Change-Id: Ib3a9271c3a6f81c1ea3c21d012c875c7e9bad2ad Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Adding Event System documentation.Jerome Pasion2012-10-195-0/+504
| | | | | | | Previously in qtdoc repository. Change-Id: I9f5cc876f2b49e86520097c0d8efe7e21eabc04e Reviewed-by: Martin Smith <martin.smith@digia.com>
* remove explicit load(qt_build_config)s from the librariesOswald Buddenhagen2012-10-1913-25/+0
| | | | | | | .qmake.conf (and previously .qmake.cache) already does that for us. Change-Id: I06cc01fa45921d7bd66dda7a0f88729faeff37bd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix excess enter/leave event generation for native widgetsMiikka Heikkinen2012-10-194-4/+79
| | | | | | | | | | | | | | | | | | | | | | Native widgets have a native window each, so QPA plugin sends enter and leave events for associated QWindow whenever mouse cursor moves from one widget to another. QWidgetWindow had no context to interpret these events as moves from one widget to another, since they were sent separately. This resulted in leaves and enters for each widget in parent chain, when only the bottom child should have gotten them. Fixed by peeking into window system message queue when handling leave in QWidgetWindow and retrieving the entered window from queued enter event. Also provided a convenience function that QPA plugin can use to ensure both leave and enter events are in the event queue when moving from one QWindow to another. Task-number: QTBUG-27550 Change-Id: I74fec0ac90f6848495c2392c5f7e41624ad8aea2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove Qt3 compat leftoversKonstantin Ritt2012-10-191-12/+2
| | | | | Change-Id: I91c3d26125168998d6279bddb0671cfb68eac2f4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QStyleSheetStyle: QObject-based style & render rulesJ-P Nurmi2012-10-192-97/+101
| | | | | | | | | The goal is to cut as many QWidget dependencies as possible and make stylesheets eventually work for the desktop components. Change-Id: Ib4aa47af07379fc39fd6df1961e113d03df6df35 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make QContiguousCache with zero capacity not crashThiago Macieira2012-10-192-2/+15
| | | | | | | | | | | | | | These containers don't make sense and will just result in no action being taken (all items added will simply be discarded), but it shouldn't crash due to a division by zero. Update the documentation to explain the fact. Task-number: QTBUG-27339 Change-Id: Ib9acf5c0a9a826e6853e7beaf5e56511fde98dc6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Ian Walters <ian@walters.id.au> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix for slowness of touch move eventsBernd Weimer2012-10-191-58/+46
| | | | | | | | | | In the event dispatcher native events will be processed in a tight loop to drain the queue. IO events and timers will be postponed. Change-Id: Ic2c06ed182027289eb5e7042fbae99efbd01ea27 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Review of documentation.Michele Caini2012-10-192-4/+28
| | | | | | | Documentation has been updated to reflect changes in Qt5. Change-Id: I378858cf61f4bf62375c30c3903818d754dadcf0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Make sure functions returning iterators have an iterator as parameterThiago Macieira2012-10-192-6/+17
| | | | | | | | | | | | | | | | | | | | | The IA-64 C++ ABI does not encode the return type for non-template functions (QVector is the template, not the function), which means that these two functions have the same signature: Node *QVector<Node>::begin() typename class QTypedArrayData<Node>::iterator QVector<Node>::begin() [both are _ZN7QVectorI4NodeE5beginEv] When linking compilation units compiled with different QT_STRICT_ITERATORS settings, only one of the two out-of-line copies will survive. Depending on the ABI, we may have a problem: the ABI can say that a function returning a structure takes an implicit first parameter, which a function returning a regular pointer doesn't. Task-number: QTBUG-27277 Change-Id: I57a59e5a7c46f55faabfe85c073dca89d2a7bbf3 Reviewed-by: Jan Kundrát <jkt@flaska.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Accessibility: itemviews check for valid model.Frederik Gladhorn2012-10-191-4/+49
| | | | | | | | | | The problem is that isValid() should return true as soon as we have a view widget. That sadly means we need to verify that the model is still valid whenever accessing it. Change-Id: I9237528abf2f5c75a73382525103307e9ca15f05 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Change the default major version of QGLFormat to 2.Jason Barron2012-10-191-1/+1
| | | | | | | | | | | | | | | This is being changed because: - The OpenGL paint engine in Qt only supports GL2 - QML2 only supports GL2 - QSurfaceFormat has a default value of 2 Applications that want to use GL1 on a QGLWidget will have to explicitly request this format using QGLFormat::setVersion. Task-number: QTBUG-27589 Change-Id: Ieb283ef7d6e15a29ec28ce7e4363dbf477decaa7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QtDBus work again with D-Bus 1.0 and 1.1Thiago Macieira2012-10-192-22/+9
| | | | | | | | | | The dbus_get_version function was introduced in 1.2, so we'd need to detect pre-1.2 by the absence of the function. But if we're going to detect the presence or absence of any function, we might as well do it on dbus_connection_can_send_type, which is the function we wanted anyway. Change-Id: I6e17a3a8f1382c6a489490084f6e3f61aa5a1947 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fixed inconsistent QPainter fill rules for aliased painting.Samuel Rødal2012-10-1911-28/+99
| | | | | | | | | | | | | | | | | | | | | | Qt 5 is the time to get rid of all the old inconsistencies in the raster paint engine caused by trying to preserve the old X11 based coordinate system where (0, 0) is in the center of the top-left pixel instead of the upper left corner of said pixel. However, this was only adhered for line drawing and path / rect filling, and not for image or pixmap drawing and not at all when doing antialiased painting. By defining the antialiased coordinate system as being the right one and letting the aliased fill rules follow from that we finally end up with some consistent behavior that doesn't lead to surprises and workarounds in application code. It is still possible for applications to get the old behavior by setting the QPainter::Qt4CompatiblePainting render hint. This should make porting easier for the few cases where an application relies on the aliased fill rules we used to have in Qt 4. Task-number: QTBUG-27500 Change-Id: If86b95e77d838ec83033d64af86632b9a73c74a9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Handle the case where persistent indexes have gone invalid.Stephen Kelly2012-10-191-0/+6
| | | | | | | | | | | | | | | | | | | Don't add invalid ranges to the result. They will be removed whenever d->ranges is processed for public consumption anyway. For example, QItemSelectionModel::selection() calls merge() with another selection. The merge() method removes invalid ranges already. But the invalid ranges don't need to be there in the first place, so this patch removes them. A longer-term goal is to maintain d->ranges as an always-sorted list. This method can be called with a vector containing invalid QPersistentModelIndexes when those persistent indexes are made invalid in between layoutAboutToBeChanged and layoutChanged. It's a normal thing to happen and a case that should be handled deliberately. Change-Id: I741ed9208d8a75644975c9e8d61f0d6d78e20576 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Make sure uints remain uints when editing in itemviews.Stephen Kelly2012-10-191-1/+32
| | | | | | Task-number: QTBUG-22974 Change-Id: I07428862c4dffc629f868f3010f663eb655922d0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Correct accessibility index handling in QListViewJosé Millán Soto2012-10-191-3/+3
| | | | | | | | QListView::currentChanged and QListView::selectionChanged changed to use 0-based indexes instead of 1-based indexes. Change-Id: Ie618970c9a37ec76156dbfab2e86685c3c8f374c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Handle separators in menus in AT-SPI (Linux accessibility)José Millán Soto2012-10-191-2/+3
| | | | | Change-Id: Id9c109d53bbb8ded04bbe98a622d44e13d572340 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Doc fix in return value of QDate::setYMDFrederik Gladhorn2012-10-191-0/+1
| | | | | | | Change-Id: Ie107e451a7b2a084fb6131939f212acd412a9df6 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Clean up instantiation of mapping of AT-SPI roles.Frederik Gladhorn2012-10-191-66/+65
| | | | | Change-Id: If31b33f1b259f896408a66b0574d640b0ad57019 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: make sure right objects are cached on linuxFrederik Gladhorn2012-10-191-1/+1
| | | | | | | | | | | | | The linux test would actually fail because the qobjects created could end up having the same address (create-delete-create...). After an object is deleted, it's not instantly removed from the cache of valid objects. Instead it would stay in the list with it's smart pointer becoming zero. This patch adds the missing null pointer check so we are always up to date. Change-Id: Ia7be14741d4798c2b8e75cb7127298c73cf206ef Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Cocoa: fix memory leakTeemu Katajisto2012-10-191-1/+4
| | | | | | | Release the created CGImageRef. Change-Id: If3b36b636ae1302b8a63bbae7285a6461b993f62 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: fix coretext memory leaksTeemu Katajisto2012-10-192-0/+3
| | | | | Change-Id: Id85dbf8a2ea8994d9fca07d3f10b43f62ec305a0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Rename the syncqt -qtdir to -mkspecsdirThiago Macieira2012-10-191-1/+1
| | | | | | | | | It's actually looking for the mkspecs (so it can read qconfig.pri to get the Qt version), so give it exactly what it wants. Change-Id: I2957b2d93a8837b8492d313209d45ff3ec01704c Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QNX: Change base font sizes from pixels to pointsKevin Krammer2012-10-181-5/+7
| | | | | | | | | | | Previously recommended fonts sizes in pixels do not work very well on the new high resolution devices. Current UX documentation recommends certain point sizes for certain roles. Those work well on both type of devices. Change-Id: Ia4faa4cf2d753cab9b10f91d01dfef1450683272 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Cocoa: fix frameStrutMouseEventsRichard Moe Gustavsen2012-10-181-3/+7
| | | | | | | | | | | | | | | It turns out that the calculation of mouse pos over the frame strut (title bar) was wrong. When outside the content view, the nsevent coordinates are negative, so to get this correct, we need to calculate the height of the window above the content view and use this information to get the mouse pos in positive coordinates with origin window top left. This bug was especially apperent with QDockWidget, as it became almost impossible to dock a window under such circumstances. Change-Id: I2faf6aab5e2aa0b4e217ea087ceec8c1b1e978bb Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Introduce new style FusionJens Bache-Wiig2012-10-189-136/+3990
| | | | | | | | | | This is a new non-native style for Qt. It is intended as a replacement for the now aging Plastique and Cleanlooks styles. Change-Id: I30c0518a69e4e3b8b2b05ee7d84c3a5a1f307578 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Modified vertical alignments of simple widgets on OSXTero Ahola2012-10-181-7/+7
| | | | | | | | | | | | | Adding QCheckBox, QComboBox, QLineEdit etc. into an HBox layout or grid layout makes the layout look like a snake's trail. Fixed the positioning of these widgets to make the layouts visually more appealing. Updated qmacstyle auto-test accordingly. Task-number: QTBUG-13635 Ammended-by: Gabriel de Dietrich Change-Id: I89461f9aad68ea8488070ed06257b9b8e7f493c5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Use the right properties when checking the frame's marginsAndy Shaw2012-10-181-4/+4
| | | | | | | | | Changed it to check the Frame*Margin property instead of the Block*Margin property as this was incorrect for a QTextFrameFormat. Task-number: QTBUG-22173 Change-Id: I2c3066165fb592ed034874b1180593822859f933 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove dependency on QWindowsStyle in QGtkStyleJens Bache-Wiig2012-10-184-84/+115
| | | | | | | | | Now that we no longer re-use the animation code in gtk, it is time to remove this strange dependency. Change-Id: Ib672a9b110dfba08d79b8654e572994007675957 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Bring back Mac dependent code in QBoxLayout, QGridLayoutGabriel de Dietrich2012-10-182-3/+3
| | | | | | | | | We also made an accessibility auto-test more stable, so that it would not be influenced by this patch. Task-number: QTCREATORBUG-7966 Change-Id: I6ce4e2361c8847aee5dd1cf5664c29cd2d83e38d Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Add new error strings to QRegularExpressionGiuseppe D'Angelo2012-10-181-1/+3
| | | | | | | | They are introduced in PCRE 8.31. Change-Id: Id0447b381d5e23996d4e87ae0368b07a8bc1c318 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Windows QPA plugin: Parse arguments from list passed to factory.Friedemann Kleint2012-10-184-42/+46
| | | | | | | Using dynamic properties on the native interface is deprecated. Change-Id: Ia3411780dad15af61d4805c0d9fabf00dba92301 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Make sure we copy *all known events* properly in order to not assert.Jan Arve Saether2012-10-181-0/+8
| | | | | | | | | This caused the following assertion in tst_QAccessibility::listTest(): ASSERT: "m_type != QAccessible::TableModelChanged" in file qaccessible.h, line 455 Change-Id: If1f1e80521f346019bdbd59aac58e30c870d6e4e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix compile with -no-widgetsRohan McGovern2012-10-182-4/+3
| | | | | | | | | | | | Remove more unnecessary references to QtWidgets in accessibility implementation. Disable accessibility tests (which rely on QtWidgets) when QtWidgets is not available. Change-Id: I57315537779d31af1245d42d1b4c49174016da54 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix for memory leak in ResultStoreChristian Strømme2012-10-181-1/+4
| | | | | | | | | | | In ResultStoreBase::addResults() it possible that the ResultItem we create is invalid (filter-mode enabled). Since an invalid ResultItem won't have any result data, we need to make sure that we don't allocate any data for it. Task-number: QTBUG-27224 Change-Id: Ic99b191db0e9dd4e29b64911f87d90a8148bb7a5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Mac: Fix QLineEdit shadowGabriel de Dietrich2012-10-181-3/+0
| | | | | | | | The cursor is still rendered 1px too low, but probably needs to be fixed in QTextLayout. Change-Id: Ie56c7140898b941c8d896f503ce1934d0d681a4d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Improve branch indicators in common styleJens Bache-Wiig2012-10-183-72/+13
| | | | | | | | | | | | | | The branch indicators in common style was painted based on motif style, effectively making it useless. Since most styles inherit from Windows style, I moved that into common style. It was already duplicating most of the code used in commonstyle. Change-Id: I1a383d90254bb97aebc038fa058ec0f225cf9dab Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix compilation with MinGW-w64Jonathan Liu2012-10-173-4/+4
| | | | | Change-Id: I0c9e6adc54ccce34e0f81af048f2a51a4ac051b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: Multisampling is disabled by default.Friedemann Kleint2012-10-171-1/+1
| | | | | | | | | The previous code assumed that -1 indicated some sort of "auto", but this is not the case according to documentation. Task-number: QTBUG-27600 Change-Id: Id17ce32f94ded61a63a33d0c04ec5312f53c7923 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Windows: QT_LIGHTHOUSE_WINDOWS_VERBOSE -> QT_QPA_VERBOSE.Friedemann Kleint2012-10-172-2/+2
| | | | | Change-Id: Ieffa1f483cddd220b158ccd570af151420c8e3c3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Add qlibraryinfo.h to global.pri's HEADERS listThiago Macieira2012-10-171-0/+1
| | | | | | | The file was already present but wasn't mentioned. Change-Id: Icac4fd5276b071ed2173e72aed51abb4c0b5b50a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix potential crash in QStyleAnimation::updateCurrentTime()J-P Nurmi2012-10-171-9/+11
| | | | | | | | | A parentless/targetless QStyleAnimation calls updateCurrentTime() from QAbstractAnimation constructor. Avoid the potential crash even if it's not a valid use case for QStyleAnimation. Change-Id: I9cd263d105c8ea4b5cbabac9a7680991745ccd95 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>