summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QEvent: Don't give DeferredDelete special treatmentBradley T. Hughes2012-06-191-12/+8
| | | | | | | | | | After commit 9b07fd0d5cae6846f0eaccf3dc51bc9e78559a05, Qt no longer keeps the loop-level in QEvent's d-pointer. This means we no longer need to special case this event type in the QEvent copy constructor, assignment operator, and destructor. Change-Id: Iff71713d38303674f4517fdfa169cc448ed41dd4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* platform hooks: provide defaults for screen size and depth hooksJohannes Zellner2012-06-191-2/+42
| | | | | | | | Default hooks for querying screen size and color depth based on linux fbdev API. Change-Id: I7fc75c0df5e0f507cf679439416fe68c8f62f91d Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fixed QOpenGLFunctions API.Samuel Rødal2012-06-185-6/+10
| | | | | | | | | We don't use the GL short term in the new API. Change-Id: I73a51f65f5f4216c1763b95dcddf68fe8fc229d1 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Prevent ending up in a state where focus is perpetually grabbed.Samuel Rødal2012-06-183-10/+25
| | | | | | | | | | | | | | | Mouse / enter / leave / key events etc are all blocked when a window has the blockedByModalWindow flag set. The problem appears if a QWindow is created and only later directly or indirectly parented to a modal window that's currently showing. Since the decision on whether a window should be blocked or not is based on its parent / transient parent chain, we need to reevaluate the blocked status each time the parent or transient parent of a window changes. Task-number: QTBUG-26112 Change-Id: Ida6b118b556fe26d17fa86335a0fe7baddc7eaf8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* xcb: ensure the primary screen is added firstGirish Ramakrishnan2012-06-181-3/+9
| | | | | | | | | | | | Currently, Qt windows without an explicit screen parameter always appear on screen 0 despite the DISPLAY being set to :0.1. With this change, the xcb backend adds the primary display at the beginning of the screen list. QGuiApplication::primaryScreen() will then return that display for all windows without an explicit screen. Change-Id: I657c4ed92b9e0f0ed379e91c732dad9d69c4f5e0 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make QUuid compile with QT_NO_QUUID_STRINGJeremy Katz2012-06-181-1/+1
| | | | | | | Task-number: QTBUG-24816 Change-Id: I0cbb0581a1c3abefdde75b7cd45fdafd31640f0d Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Clean up a partially scrolled QRollEffect widgetMiikka Heikkinen2012-06-181-1/+1
| | | | | | | | | If the associated widget pointer got zeroed while QRollEffect was scrolling, the partially scrolled QRollEffect widget remained on screen indefinitely as 'done' was never set to true. Change-Id: If1567ea740e81b5501137d10db471ca97d295ed8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Improve the code generation by using Q_LIKELY/Q_UNLIKELYKonstantin Ritt2012-06-161-36/+34
| | | | | | | + reorder conditions in getWordBreaks() to make further updates more clear Change-Id: I1ca9adde066c3a48830f310202f7181585fac194 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix: Widgets that become top-level widgets may crash the applicationBerthold Krevert2012-06-152-3/+6
| | | | | | | | | | | | | | | | | You can reproduce the bug with the QMainWindow demo application: Just dock the toolbar on the left side, then try to drag the bar back to the top and observe that the application crashes. This happens, because the toolbar becomes a top-level widget during the dragging action and therefore some data structures like a window are created. After the toolbar has been docked, it loses its top-level state and the window object is destroyed. The same is not true for the backing store structure, which still keeps a pointer to the destroyed window. When the toolbar is dragged the next time, a new window object is created, but the backing store tries to access the deleted one. Crash occurs. Change-Id: I0d1ffc04c19ec14654ceb62a0d3cf7cf65cb952d Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Add automatic metatype declaration for QPointer and QWeakPointer.Stephen Kelly2012-06-151-26/+34
| | | | | Change-Id: Ic9a04fa68d0bb14ef07455a6559e59f4b887f38b Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Do not redefine NIN_KEYSELECT if already definedJonathan Liu2012-06-151-1/+4
| | | | | | | NIN_KEYSELECT is already defined for MinGW-w64. Change-Id: Ieab9f883cf1680f792d085e254916d51602ce701 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix double error setting, which overrode correct value.Jonas M. Gastal2012-06-151-1/+0
| | | | | Change-Id: I3bc992b8b41f305a01b80bca16346e18ac4d7833 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Forward-declare QLatin1String tooThiago Macieira2012-06-151-1/+1
| | | | | | | | | | | | qhash.h doesn't include qstring.h and was depending on an indirect inclusion (probably via qpair.h -> qdatastream.h -> qiodevice.h -> qobject.h -> qstring.h, which I've broken). Since it forward-declares QString and QStringRef, let's add QLatin1String too. Change-Id: I179ebb22f761b88423ef13643afa2e5ce91ef6a2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* eglfs: Pass QSurfaceFormat to createNativeWindow() hookJohannes Zellner2012-06-144-5/+8
| | | | | Change-Id: Ib352d8591360a224359ef218b95cd27cdfaf81aa Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* eglfs: Make QEglFSWindow respect the window formatGirish Ramakrishnan2012-06-145-31/+12
| | | | | | | | | | | | | | Prior to this change, eglfs code used to override the window format with it's own format. With this change, eglfs will respect the window format. This is useful when the application requires a surface with alpha (for example, so that the video layer below is visible) QEglFSHooks::surfaceFormatFor() allows the hook author to override the context and window surface format. Change-Id: I97f03a8b0871dfebfca73004fa0188b33d0d0367 Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Speedup for QAbstractItemViewPrivate::delegateForIndexABBAPOH2012-06-141-4/+11
| | | | | | | | This fix prevents copying of a QPointer on a stack and adding/removing QMetaObject guards Change-Id: I844c10cede1536a14ad7cd9f007470966619d6d6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use QPointer, not QWeakPointer.Thiago Macieira2012-06-141-1/+1
| | | | | | | | | QWeakPointer tracking of QObjects is deprecated. Change-Id: I1a81a0f9bbe02a6a38a50ab4a50e7c65212fa591 Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com> Reviewed-by: Michael Hasselmann <michaelh@openismus.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Make qurlinfo private, now that QFtp is private.David Faure2012-06-1410-20/+8
| | | | | | Change-Id: I0bb641b397b7087c89009f92d9973e0922dce653 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Extend JSON QStandardPaths to support multiple paths per locationJeremy Katz2012-06-141-32/+77
| | | | | | | | | | | | | | | | | Allow a location to be specified as an array of paths. LOCATION: ["first", "second"] The first value is selected for writableLocation(). Define the first entry as an empty string for no writable path. LOCATION: ["", "second"] A single path may be expressed as a string. LOCATION: "only" Change-Id: I897cf40a039ad7cb680bdf643bfa78020e8eb1cb Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: David Faure <faure@kde.org>
* Fix QListView::scrollTo() when there are hidden rowsJani Honkonen2012-06-141-1/+6
| | | | | | | | | | | | | | | | | This is a cherry-pick of b0601630dd0ddabfaa3b97d042ee02b981d95988 from February QListView does not consider hidden rows when scrolling to an item. If there are hidden rows (or columns) before the selected item then the visual index of an item is not the same as the row index from the model. So scrolling will be off by the number of hidden rows before the selected item. Added a autotest for this also. Task-number: QTBUG-21115 Change-Id: I01b097bce7f163cdb480a71b763c060cc006fdc7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* It should be a moc error for the specified file to not exist.Stephen Kelly2012-06-141-1/+1
| | | | | | | Currently the missing file is ignored and plugin data is created anyway. Change-Id: I118fd57b7d05a135e3ff58c0298b25e67cd12587 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Disable hinting for scaled glyphs in FreeTypeJiang Jiang2012-06-141-0/+5
| | | | | | | | | | | | Scaling hinted glyphs looks ugly, and it makes smooth scaling animation not possible. Since nothing will work as intended in hinted mode, we should disable hinting automatically when glyphs are loaded with scaling transformation. Task-number: QTBUG-24846 Change-Id: Id7fb5f5bdc2d00be157b0c5d55c316473571473c Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* egl: return EGL config when r/g/b sizes are not setGirish Ramakrishnan2012-06-141-5/+4
| | | | | | | | | | | The check is already done for alpha. Do a similar check for r/g/b sizes. The problem was discovered because the default scenegraph context in QSGContext::defaultSurfaceFormat does not have r/g/b set. Change-Id: I2f529c9d5cc7dbc61a27722336e8099e7be08965 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add since 5.0 markers to new QCryptographicHash enums/functionsAlbert Astals Cid2012-06-141-4/+5
| | | | | | Change-Id: If367d365510cc7f6bf8f87808f5843c4a41d13e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* choke uploadProgress signalsShane Kearns2012-06-143-3/+27
| | | | | | | | | | | | | | | | | | The QNetworkReply::uploadProgress signal is intended for updating UI elements such as a progress bar. Limit the signal emissions to 10 per second to prevent overloading the UI with updates. As with the downloadProgress choke, this is implemented by dropping signals that occur within 100ms of the previous emission. The 100% signal is always emitted (bytesSent == bytesTotal) When the upload size is initially unknown, this behaviour is still provided by the upload device emitting a suitable readProgress signal when EOF is reached. Task-number: QTBUG-20449 Change-Id: I77e03c8a49109106e1c375ee00380293fd326b63 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* choke downloadProgress signalsShane Kearns2012-06-145-7/+40
| | | | | | | | | | | | | | | | | | | The QNetworkReply::downloadProgress signal is intended for updating user interface components (e.g. a progress bar). Limit signal emissions to 10 times per second, with an additional signal just before the finished() signal to provide the 100% progress. For the size of download where a progress bar is necessary, this update frequency seems sufficient. The implementation is done by dropping signals which would be emitted less than 100ms after the previous signal emission. Task-number: QTBUG-20449 Change-Id: I9c2dbe16c70f3270cbf98f3c74cf9d9a3f0ab900 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* disable codecs for asian language when QT_NO_BIG_CODECS definedTasuku Suzuki2012-06-1425-60/+71
| | | | | Change-Id: I45025b13bacc5f63946b02a87c742beff1946c0b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Regenerate the Unicode tablesKonstantin Ritt2012-06-142-7140/+5998
| | | | | Change-Id: I64b93ba8ec85eff5e308d92c57e98e8745c43d66 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QFontMetrics/QRawFont: Optimize SMP code points handling a bitKonstantin Ritt2012-06-144-11/+19
| | | | | | | | | Calling QString::fromUcs4() for the single UCS-4 -encoded character is quite suboptimal since the BOM detections and the resulting QString aren't really used; all we need is to split the UCS-4 code point into the UCS-2 surrogate pair. Change-Id: Ia5b68312909bf551cf2493d9e2752a7d7d837fb9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add the AGLFN tables generator, update the tables up to AGLFN 1.7Konstantin Ritt2012-06-142-175/+289
| | | | | | | Task-number: QTBUG-21727 Change-Id: Ib2cacc2a52b2853059d6c873a33dcde735fbe168 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* AGLFN: optimize glyph name lookup and reverse map creationKonstantin Ritt2012-06-142-15/+22
| | | | | | | | Use binary search in glyph name lookup, drop the linear search sentinel (0xFFFF); Pass the reverse map by ref, initialize with memset. Change-Id: I56de64bf2352af0615787e4cc0e13c922c640822 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Introduce QPA API for size grip handling.Friedemann Kleint2012-06-148-72/+123
| | | | | | | | | | - Introduce API to do size grip handling (mouse press and move). - Move Windows code to Windows plugin. - Move X11 code to XCB plugin and activate it. Change-Id: I2f61d6ddc1fa07447e668554d41ecc820efca23f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Windows: Fix warnings about being unable to load fonts from font dir.Friedemann Kleint2012-06-142-2/+0
| | | | | | | | | | | | | Do not call QPlatformFontDatabase::populateFontDatabase(), which tries to load qpf2-fonts from the Qt library directory. This directory is not installed on Windows. Note: This affects non-in-source builds only. Task-number: QTBUG-26066 Change-Id: I5782e61965958fc48e0edd7a3d50eef325529708 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Do not add debug/release to QMAKE_CONFIG. Let module system enable themSean Harmer2012-06-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solved QTBUG-26111 in which qtjsbackend gets built with an incomplete framework on Mac OSX. This was traced back to commit 6a6fd56e662b2c1a581727f7ec44d5bd60913ad4 which moved QMAKE_CONFIG values from .qmake.cache to mkspecs/qmodule.pri. Since qtjsbackend contains config tests it creates its own .qmake.cache which was previously masking this issue. QMAKE_CONFIG incorrectly contained debug for debug_and_release builds even though debug and release are already present in the CONFIG variable in mkspecs/qconfig.pri. The changes to configure prevent CONFIG in qmodule.pri from containing debug and release variables and ensure that QT_CONFIG contains build_all and debug_and_release if appropriate. Configure.app is also adjusted to match this behaviour. The other part of the change is to qt_module_config.prf and qt_plugin.prf. These changes take care of populating CONFIG with the appropriate debug_and_release and build_all variables depending upon what is present in QT_CONFIG. This ensures that the Qt modules and plugins get built with the same configuration as qtbase. The special handling for the qcocoa QPA plugin ensures that it is built in release mode only to preserve the behaviour introduced by commit 5603f94eaa538dbe28fc426065d65a27799adedc. Task-number: QTBUG-26111 Change-Id: I6f65aba50709e1b2431b8b4411ff30a06f7d8aed Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Compile.Morten Sorvig2012-06-141-1/+1
| | | | | | | | | Expressions containing "reinterpret_cast" are not constant expressions according to C++11 rules. Change-Id: Id97729f184983e5bdda180b99cfbe27e2768e09e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix namespace compilation on OSX.Toby Tomkins2012-06-144-4/+17
| | | | | Change-Id: Ib579ae298a5f894b8b02a5d56567870109bd29bd Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove unneeded #includes and namespace wrappersJoão Abecasis2012-06-141-10/+0
| | | | | | | | qvector.cpp no longer contains any code, now that inline functionality has been deferred to QArrayData. Change-Id: I000ef8507e5b8438edd32a762750e4ceaa8aa8ee Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* OpenGL: Update QOpenGLFunctions docs to remove widget codeSean Harmer2012-06-141-4/+25
| | | | | Change-Id: I4246a49444c09d899f2bd7cd2e9353ee0a6859bf Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QtWidgets: Fix warnings about deprecated QGraphicsView functions.Friedemann Kleint2012-06-144-5/+5
| | | | | | | | Warnings introduced by d76de69b4b60e7e13d5b0602768702e4bf219804 . Change-Id: I613500074a2318a617f18d5b887840ecc3408237 Reviewed-by: Gatis Paeglis <gatis.paeglis@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QDoc: Check if index file was already inserted in list.Casper van Donderen2012-06-141-8/+15
| | | | | | | | | | | Previously it was possible to insert exactly the same index file in the map twice by specifying an -indexdir which is the same as -installdir. Probably you can also have two indexes with the same name that happen to have the same creation time, but changes of that happening are slim to none. Change-Id: I6be5fb9d04839026830b9948887b282489b379c0 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Remove downstream documentation references from guiGunnar Sletta2012-06-141-43/+0
| | | | | Change-Id: I6c107ed1f1cabe3713e22ec1c7854d5c07dca4b5 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QNX: Enable additional CPU features to be compiled in for QNXSean Harmer2012-06-141-1/+1
| | | | | | | The QNX toolchain can use Neon on ARM and SSE<X> on x86/x86_64. Change-Id: I36c61fa12b65d806b3cc60a0aefcb63964f9ab7e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deliver wheel events when window is nullGirish Ramakrishnan2012-06-141-15/+15
| | | | | | | | | | | The generic input plugins do not set the window parameter. So, use the same technique we use with mouse event handling to determine the window to deliver the event to. Done-with: Johannes Zellner Change-Id: I950c0ad2f330dccfdcc41b8d01f62cd39902bc9c Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Fix QUrl documentation: FullyDecoded and DecodedMode are a pairThiago Macieira2012-06-141-4/+4
| | | | | | | DecodedMode with FullyEncoded makes no sense whatsoever. Change-Id: I182db7aceb38e4e9398138066022912adec9c413 Reviewed-by: David Faure <faure@kde.org>
* eglfs: mark overriden methods with Q_DECL_OVERRIDEGirish Ramakrishnan2012-06-131-4/+4
| | | | | | | | | The current cursor implementation can be a bit hard to read without hints about which methods are overriden. Change-Id: I3376890a13be46e1ece03d1442dd5a15ccd61382 Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* printersupport: Fix cups.pro qmake warningGirish Ramakrishnan2012-06-131-1/+1
| | | | | | Change-Id: I59c8e3021fbf733af003ebd99be4a63e0a68f155 Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Partial fix for WebKit compilation on WindowsSimon Hausmann2012-06-133-9/+6
| | | | | | | | | | | | | | | | | | | | | | qdatetime.h uses std::min/max and on Windows windows.h (or some subsequent header file) may under certain circumstances define min/max as macros. The easiest way to prevent the windows header files from doing that is to define NOMINMAX in the place right before windows.h is included. The other way is to define min and max to min/max themselves to prevent windows.h from doing its evil thing. If a user of Qt (WebKit in this case) chooses the approach of defining min/max to themselves and then includes qdatetime.h, then a subsequent inclusion of windows.h doesn't work because qdatetime.h undefines min/max. We should not enforce the type of workaround needed, therefore this patch removes the workaround from qdatetime.h and requires user code that happens to include windows header files before qdatetime.h (seldom case) to choose either workaround. Change-Id: I7347eec7369491a065e894cff557004e069453d5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* AbstractItemView editorForIndex/indexForEditor speedupABBAPOH2012-06-131-0/+8
| | | | | | | | | | Frequent calls to editorForIndex/indexForEditor are very slow because of an implicit conversion from QModelIndex to QPersistentModelIndex. This fix allows to avoid unnecessary conversions when there are no open editors (most common case) Change-Id: Ic072880c9f33a43a20b2a61a42c3ba215c5c33cb Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Send key events to pop-up widget in case there is one.Friedemann Kleint2012-06-133-4/+10
| | | | | | | | | | Make QApplicationPrivate::inPopupMode() static for convenience. Task-number: QTBUG-26095 Change-Id: I98dc1e40d357592b790cd51d7aca60c2be9f380f Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Don't use gcc extension for QByteArrayLiteral neitherLars Knoll2012-06-121-16/+0
| | | | | | | | | This extension doesn't work for e.g. default arguments in function declarations. Change-Id: I32b7afa6e01b6af55fb2409179b4fd94cb04cd8d Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>