summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* OpenGL: Use official glext.h and gl2ext.h headersSean Harmer2012-08-2018-1749/+13586
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Khronos group makes the glext.h (Desktop OpenGL) and gl2ext.h (OpenGL ES2) headers officially available nowadays. Most (all?) Linux systems ship this by default. On Windows platforms the glext.h file needs to be downloaded from http://www.opengl.org/registry/api/glext.h and placed alongside the system OpenGL header. Making use of the official header reduces the maintenance overhead for OpenGL support in Qt by removing the need to copy and paste definitions into the Qt sources. As the Khronos-provided headers are standardised and backwards and forwards compatible we can utilise these for all platforms rather than just for Windows. This means that all definitions required by Qt will be present even if the system ships out-dated equivalents. Mac OS X needs special handling in that we should always use the system-provided headers there. This is because Apple controls the OpenGL driver and the headers that go along with it. As such there is no possibility that the driver exposes additional functionality compared with the system-provided OpenGL headers. Apple has also decided to make different decisions about some OpenGL typedefs compared to other implementations. For example, Apple typdefs GLhandleARB to void* whereas other platforms use unsigned int. The alternative, which is to use the system provided glext.h (or gl2ext.h) header means that Qt code would need to check for the availability of such definitions wherever it is not guaranteed to be provided by core OpenGL/ES just to compile. The proposed approach means that Qt can compile regardless of the system's OpenGL extension support. We just need to be rigourous in runtime checking of support for extensions but that is already a requirement (and is missing in a few places, see TODO's added in this commit). The official Khronos headers are added to Qt as qopenglext.h - Desktop OpenGL qopengles2ext.h - OpenGL ES2 They need to be public but not part of QtGui module include, hence the headers have been modified by adding #if 0 #pragma qt_no_master_include #endif to them. This has been tested on: Gentoo Linux with GCC 4.6.3 Windows 7 with MSVC 2010 Mac OSX 10.8 with Apple clang 4.0 (based on LLVM 3.1svn) QNX with qcc (based on GCC 4.4) A small change is needed to QtDeclarative when building for OpenGL ES 2 after applying this commit. See https://codereview.qt-project.org/#change,31794 Change-Id: I4b3d2b1680baf4c78be9a87b4d8de076d23e8f82 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Take account of hidden items in QListView when using scrollTo.Stephen Kelly2012-08-201-3/+9
| | | | | | | Task-number: QTBUG-21804 Change-Id: I475166f3f60b1278089baa255ace4e18baeb568e Reviewed-by: Jani Honkonen <jani.honkonen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Replace deprecated ColorSync Manager use with updated CG APIJiang Jiang2012-08-201-9/+1
| | | | | | | | ColorSync Manager is deprecated in 10.6 and new CG API for copying color space is available since 10.5. Change-Id: I730431dcd28ca0ff6cec5d1eeff99fff9f3d0a29 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix in-process QAxServers inside modal windows.Miikka Heikkinen2012-08-206-2/+46
| | | | | | | | | | | | | | | | The main window of in-process QAxServers doesn't have QWindow parent, but it does have native parent that is part of the native window tree of the application. The lack of Qt parent makes embedded controls look like toplevel windows, which causes problems e.g. with modality. Introduced new optional method QPlatformWindow::isEmbedded() to detect if a window is an embedded window and utilized it in proper places during modality handling. Task-number: QTBUG-26871 Change-Id: Iac9a51dae06b8fc15410de7838857e203e4275b8 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Ensure that all the children get the new stylesheet set on a parentAndy Shaw2012-08-201-2/+4
| | | | | | | | | | | | | | When a stylesheet was set on a parent widget then in some cases it would not get applied to all the child widgets. This was because the order of the children list may have been modified while it was being set on children. By making a copy of the list we prevent this from being a problem. Task-number: QTBUG-26321 Change-Id: Iea6bf72c69a0c39746f7ef5e7893dda5a93ed7e5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix drag curor visibility on Windows.Janne Anttila2012-08-201-2/+0
| | | | | | | | | | | | | QDrag has an API to set both pixmap (QDrag::setPixmap) and drag cursor (QDrag::setDragCursor): http://qt-project.org/doc/qt-5.0/qdrag.html. We cannot return from createCursors if there is no pixmap, but we need to go through also dragCursor and use those if one is set. Change-Id: If2b2139ad193a4ab5b25c65400c595dc7c33de2c Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use QThread instead of QPushButton as an example in the docsLars Knoll2012-08-202-3/+3
| | | | | | | This keeps links local and inside the module. Change-Id: I5e267197c6356a2c4e231c1941ed4be33b96a16e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix more qdoc errorsLars Knoll2012-08-209-37/+53
| | | | | Change-Id: Ieed340068327f37ea0f549d24ea49235994118f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qdoc errors in qcoreevent.Lars Knoll2012-08-201-4/+9
| | | | | Change-Id: Ic6cb963a7df643819dfdd93c7300d054e11cd0d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qdoc errors in the QAbstractEventDispatcher documentation.Lars Knoll2012-08-201-4/+32
| | | | | Change-Id: I7de48286f05b14c831f1290e009a25630504a76e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some qdoc errors in the QJson* classesLars Knoll2012-08-202-0/+16
| | | | | Change-Id: If475655445afdba307508c5a3863c4bc8d87ebe6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix snippet bug in State Machine OverviewLars Knoll2012-08-201-1/+3
| | | | | | | | | Cherry-pick of b0facd481a2fc119d87c85481d97357d814a5fd2 from the qtdoc repository. Task-number: QTBUG-25314 Change-Id: I2166db46399ea6da8cadf02a7f65738c0c252142 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix a couple of qdoc errors.Lars Knoll2012-08-202-3/+10
| | | | | Change-Id: I0770fc61e265face4fa061be9e110814effee181 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor the automatic metatype templates into preprocessor lists.Stephen Kelly2012-08-201-24/+40
| | | | | | | This will allow re-use in moc. Change-Id: I99c5f8f0756fccf0fb2bb845c29255c14d4d703e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Fix a QListViewItem width when spacing is setJani Honkonen2012-08-191-1/+1
| | | | | | | | | | | | | The listitem width was calculated incorrectly because spacing was not considered. This fixes the second part of the reported bug where spacing is set. Added some tests to catch the issue relating to the reported bug. Also added a test to check spacing in general. Task-number: QTBUG-21804 Change-Id: Icc6326bce914264d882a60a9fc0ebe7d2a08dbf6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix QListWidget scrolling with keys when there are hidden itemsJani Honkonen2012-08-191-3/+11
| | | | | | | | | | If the selected item is scrolled with keyboard keys the selected item will go outside the visible area. The scrolling did not take hidden items into account when calculating the amount to be scrolled. Task-number: QTBUG-21804 Change-Id: I63da0248cec43be464898f9dc8167e739f00ccd0 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Small addition to QAbstractTextDocumentLayout::registerHandler()Geir Vattekar2012-08-181-0/+2
| | | | | | | Task-number: QTBUG-23345 Change-Id: I6f768472aaef95f5dd88cf896ef3e635d223b635 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@nokia.com> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* doc: Fixed qdoc errors in SSLMartin Smith2012-08-182-12/+14
| | | | | | | | | Fixed some bad camel case, marked some parameters with \a, and changed a \enum to a \typedef. Removed some obasolete text. Change-Id: I1e69dd9f3b74129230770addc80fe1c125faf268 Reviewed-by: Richard J. Moore <rich@kde.org>
* Enable QAtomicInteger for char16_t and char32_tThiago Macieira2012-08-187-0/+47
| | | | | | | | | | | Those are regular, integer types, of 16- and 32-bit width, respectively. C++11's std::atomic supports them, so we should too. C++11 also supports wchar_t, but since that type's size can change, I don't feel like support for it in Qt is pressing. Change-Id: I945b641c91a8a98be82715f878c382dee58ac98b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add Q_DECL_CONSTEXPR to the isXXX functions in the new atomics.Thiago Macieira2012-08-1812-96/+96
| | | | | | | | | This allows one to write code that depends on these values at compile-time. Change-Id: I7d78524ed9c70d4141360496d1d764dcbfa92e62 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix -Wclobbered warningsMarc Mutz2012-08-182-5/+5
| | | | | | | | | | | | | | | | | GCC warns: warning: argument 'x' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered] Apparently, the real fix would be annotating the functions correctly with noreturn and returns_twice attributes, but there's also workarounds for these, at least in the png case, so adding volatile was the easier way out here. Needed a cast to lose the volatile again, passing the argument to qMin(). Change-Id: Id820cf9b65752359f3b8f268172ba71bc9a76784 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Register QTextDocument* as a meta type to fix QTextEdit::document typeJ-P Nurmi2012-08-183-2/+4
| | | | | | Change-Id: I666845049749bfa6f88b764eefaefb0dcf05cb3f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Modernise, update and fix errors in the QUrl documentationThiago Macieira2012-08-181-44/+65
| | | | | | | | | | | | | | Update the documentation of the deprecated API to match the current behaviour. Notably, the current behaviour is to check the correctness of the percent-encoding even in the "encoded" functions. Also, the use of QUrlQuery makes the matching work on canonical forms, so "%73earch" does match "search". Elsewhere, make sure we do not refer to the deprecated API in the documentation of non-deprecated functions. Change-Id: If3505ac3c6121177ad6ab18199e143775bef44b9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Bring back the documentation on QUrl deprecated methodsThiago Macieira2012-08-181-0/+433
| | | | | | | | | | | | | | | | The deprecated query methods were removed along with their documentation in commit 1c2144c39fa0069bf496e8f77389a9c2f8a31acf, so restore it from before that commit. The rest of the encoded methods were removed along with their documentation in commit 1372d60bde04a31c8036601076d1093a67c6bd46. Restore their documentation from the previous commit to that one. All the documentation from this commit is brought back unchanged, except for the addition of \deprecated. Change-Id: I1851b0dc922c681e1623359b35dfd0f505d258d2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix a couple of qdoc errorsLars Knoll2012-08-188-22/+7
| | | | | Change-Id: I79f689e08ed4a496052529af38fca72c3d4e04cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clean up QScreen::grabWindow()aavit2012-08-183-4/+10
| | | | | | | | | | | Handle 0 WId parameter as meaning "desktop window"/whole screen. Also, re-add the default values for the grab area, both for convenience and compatibility with QPixmap::grabWindow() in Qt4. Update the screenshot example so it doesn't comlain about usage of deprecated QPixmap::grabWindow(). Change-Id: I2ad229113ddb8ded0388f2ebc0e8c703c6657f1f Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove QWidgetStar.Stephen Kelly2012-08-184-25/+5
| | | | | | | | | | | | This allows us to remove the odd hacks to get the static metaobject for the QWidget* metatype. The QWidget* is still an automatic metatype thanks to the QObject partial template specialization. It is registered as a metatype at runtime automatically in qwidgetsvariant.cpp. Change-Id: Ie01b69eadf2cbe87af1a86c3284550f60dcf9e94 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix most qdoc errors for QMapLars Knoll2012-08-181-18/+10
| | | | | Change-Id: I8cac3b63cab32c655f722aca467489730c3f0a42 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move the statemachine documentation into qtcoreLars Knoll2012-08-1816-0/+1163
| | | | | | | | | Moved the documentation from qtdoc to here, so the statemachine class docs can link to it. Change-Id: I49a10cc7c418d415c64ea538376eb9bd7b031c27 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Move the animation overview doc into QtCoreLars Knoll2012-08-182-0/+364
| | | | | | | Moved here from the qtdoc module. Change-Id: Ib263848e0637204ec3b0cba973076ca79a25a953 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qdoc erros in qfile and related classesLars Knoll2012-08-185-9/+8
| | | | | Change-Id: I56b66e6eeb06c84e1157a701a814aebb1ddf4845 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mark simple static methods in QThread as Q_DECL_NOTHROWThiago Macieira2012-08-183-6/+6
| | | | | | | | | | These methods aren't often used, but currentThreadId() gets used in the recursive mutex code to store the identity of the thread with multiple locks. Change-Id: I031cf3893aa6e7fd7a53733fc1088d295bdb9079 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Emit layoutChange signals when changing QPersistentModelIndexes.Stephen Kelly2012-08-181-0/+9
| | | | | | | | | | | | | | | This is necessary whenever QPersistentModelIndexes are changed. Omitting it means that views are not able to react to the change, such as QTreeView clearing its (manually held) QModelIndex cache, and the QItemSelectionModel clearing the item from its storage. It is necessary to change a QSortFilterProxyModel test which assumed setItem does not have any such effect. That test is ported to setData instead. Task-number: QTBUG-18539 Change-Id: Id7a602f18b9773ba4d11019418de886860d26d3e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QAbstractSlider: fix qdoc warningsJ-P Nurmi2012-08-181-1/+1
| | | | | Change-Id: I996d45513a0239d0ed11669ce6e238955ec8a31b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QSlider: fix qdoc warningsJ-P Nurmi2012-08-181-24/+2
| | | | | | | | Removed some Qt3 support leftovers and docs for qt_qsliderStyleOption() that qdoc wasn't able to tie to anything. Change-Id: I49bb886b639fe11e4923ef8486e0b9f8a966b10c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QLCDNumber docs: cleanup Qt3 support leftoversJ-P Nurmi2012-08-182-21/+0
| | | | | Change-Id: I22378c5334ac830e94060f20568e200f0ee49280 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Remove docs for removed functions.Frederik Gladhorn2012-08-181-34/+0
| | | | | Change-Id: I75ec0137c56581653ee0dd6fd84f10f0a6c3429c Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Reference proper example.Frederik Gladhorn2012-08-182-1/+8
| | | | | Change-Id: Icda7e21f7e1eee8d4a6939ce3a50d1874ecda1e6 Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* Remove outdated docs.Frederik Gladhorn2012-08-184-149/+1
| | | | | Change-Id: I6eaffdad3b800b7d90478cb7c4044ec27e659ec9 Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
* QMessageLogger: mark noDebug() as nothrowMarc Mutz2012-08-182-2/+2
| | | | | Change-Id: Ib01ad955844e8da376c687876141ad8f21776613 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMessageLogger: make member functions constMarc Mutz2012-08-182-17/+17
| | | | | | | | | | Just because we can :) It looks a bit weird that QMessageLogger has a constexpr constructor, but no const methods... Change-Id: I794dd2b3326c45be17b29decb47c9cac4778d397 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Moved guibooks.qdoc from qtdoc to qtwidgetsJ-P Nurmi2012-08-181-0/+103
| | | | | Change-Id: I69e07b7a343c99ebafc7bf4587041b6f9ddbd37e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Exclude snippetsJan-Arve Saether2012-08-171-0/+2
| | | | | Change-Id: Ia31d7923e9a121eb7c16a1fe059dc8c9a5b61bd1 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Doc: Fix spelling errorsSergio Ahumada2012-08-179-13/+13
| | | | | Change-Id: Ibae8d10183f6b15a16b1499daa2df8802dbb014e Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* QTabWidget docs: cleanup Qt3 support left oversJ-P Nurmi2012-08-171-2/+0
| | | | | Change-Id: If73848b0b8dc424b3429f845aff383d088a6a367 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QTabBar docs: cleanup Qt3 support left oversJ-P Nurmi2012-08-171-17/+0
| | | | | Change-Id: If2c9245ad454b1f34c44f1d0a0c61700cea53cf3 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QDate/TimeEdit: fix qdoc warningsJ-P Nurmi2012-08-171-0/+12
| | | | | | | | | | | | Warnings caused by c3e1ab: ../widgets/qdatetimeedit.h:208: No documentation for 'QTimeEdit::time' ../widgets/qdatetimeedit.h:220: No documentation for 'QDateEdit::date' Both 'date' and 'time' are declared and documented in QDateTimeEdit. Change-Id: I287b5f20568e4055e6922eb1a70aeedf220de823 Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QMenuBar: fix qdoc warningsJ-P Nurmi2012-08-171-85/+3
| | | | | | | | | Removed Qt3 support left overs, marked QMenuBar::platformMenuBar() as internal, and removed the reference to qt_mac_set_native_menubar() that was removed in 2922f8. Change-Id: Ia6af9bd399c88fafab26789278b4c82312d6d9c7 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QScrollBar: fix qdoc warningsJ-P Nurmi2012-08-171-6/+0
| | | | | | | Removed some Qt3 support leftovers Change-Id: Idd8e05fd96f5eb0816f79e6684293c9477d4d52f Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QFrame docs: cleanup Qt3 support leftoversJ-P Nurmi2012-08-171-10/+0
| | | | | | Change-Id: I8c51f0a379c03e4bdd9dbdccc6cdc98a7013c40e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>