Commit Graph

114 Commits

Author SHA1 Message Date
Lars Knoll
9bd0323551 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/corelib/io/qurl.cpp
	src/gui/kernel/qwindow.cpp
	src/tools/moc/generator.cpp
	src/widgets/kernel/qwidget_qpa.cpp
	src/widgets/styles/qstyle.h
	src/widgets/widgets/qtabbar.cpp
	tests/auto/corelib/codecs/utf8/tst_utf8.cpp

Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
2012-04-16 12:04:34 +02:00
Qt4iOS
dcd893fbf7 Added iOS compatibility.
Modified OpenGL header inclusion block to support iOS GL include paths.
Removed ability to build for MacOS with GLES2, as no support on MacOS
for OpenGLES.

Change-Id: I2bcf302278545147632b23a86380fa3980ec10a4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-13 08:33:54 +02:00
Samuel Rødal
5bf5ace38c Prevent warning when using QPainter on a QGLWidget.
Prevents warning "QOpenGLContext::swapBuffers() called without
corresponding makeCurrent()".

Change-Id: I7e4f94df8654f899c25b3f41cbf4d007ca293f16
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-13 08:33:47 +02:00
Samuel Rødal
592bb3ca5e Removed Qt 5 todo comments from qgl.h / qgl_p.h.
No point in changing QGLContext API when QOpenGLContext is meant to
obsolete it.

Task-number: QTBUG-25074
Change-Id: Ie21692c8c402ed9cd6af56bef0175c4e46c3d8a9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-10 22:48:00 +02:00
Andy Nichols
2756101d0e Fixed build issue when using GLEW with MSVC
MSVC does not support the #warning precompiler command and
is considered an error when used. This change checks for
GCC before issuing the warning.

Change-Id: Iee1e27841fe77b0289e88b7b4ccaa176ab56a39d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-10 10:38:10 +02:00
Kent Hansen
3b512ae142 Merge master into api_changes
Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
2012-03-23 14:10:58 +01:00
Donald Carr
045c79f5ed Correctly export GL graphics engine for use in plugins
EGLFS and QNX both reference this symbol, hence it needs to be exported

Change-Id: I11b2b8ad5f2b81d951173f7cd8a7fbb8be4bb89b
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 13:30:06 +01:00
Samuel Rødal
55fa3c189f Got rid of Map / Unmap events in favor of Expose event.
Since change 2e4d8f67a8 the need for Map and Unmap events has
gone away, as now the Expose event is used to notify the application
about when it can start rendering.

The Map and Unmap events weren't really used except by QWidget to set
the WA_Mapped flag, which we now set based on the expose / unexpose.

Also guarantee that a Resize event is always sent before the first
Expose, by re-introducing an asynchronous expose event handler. Since
an expose is required before rendering to a QWindow, show a warning if
QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a
window that has not received its first expose.

Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-22 11:43:36 +01:00
Donald Carr
b936b95965 EGLFS: Integrate building into configure.
With the move to the QPA architecture EGL is now only required by
individual platform plugins and the configure script has been adjusted to
reflect this.

Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-21 03:03:29 +01:00
Jiang Jiang
7de046db73 Enablers for shared graphics cache in raster paint engine
Required changes for using shared graphics cache for distance field
raster glyph rendering. Most of the logic is in platform plugins.

Platform plugins should implement
QPlatformIntegration::createImagePaintEngine() to create a subclass
of QRasterEngine.

Change-Id: Icf0a396e722e43b4caa2c1849aae38753cde38f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-08 09:39:26 +01:00
Casper van Donderen
95d83cb1b6 Remove the usage of deprecated qdoc macros.
QDoc now has support for Doxygen style commands for italics, bold
and list items. This change applies that change in QDoc to the
actual documentation.

Task-number: QTBUG-24578
Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-02 23:16:25 +01:00
Sean Harmer
c2baf45c73 Prevent stack corruption when using OpenGL Core Profile
When an OpenGL Core Profile context is requested the function
glGetStringi() is used to query the supported extensions as
glGetString(GL_EXTENSIONS) has been removed in the core profile.

The signature for glGetStringi used in Qt missed off the APIENTRY calling
convention. This results in stack corruption on windows each time
glGetStringi() is called leading to a crash.

Change-Id: Iff62c42e2bb5fc4a5c0561fae97ddc5a8ae3a45e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-28 00:29:04 +01:00
Kim Motoyoshi Kalland
e452923f1e Corrected the size of mipmaps in framebuffer objects.
Change-Id: Ia3c0daefc6537b12be7f9072e7defc0631794690
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-15 17:06:49 +01:00
Andreas Holzammer
88f15faa4a Fix compile with QT_NO_OPENGL.
Change-Id: Icade54a6e3b43fdc9c151efbc25adcef6b7e41d6
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-02-09 00:32:41 +01:00
Bradley T. Hughes
f6f1a2dbc1 Revert "Put the generated <module>version.h into build tree"
After discussion with Liang, I'm reverting it as he requested. This change put every header into the SYNCQT.HEADER_FILES twice for in-source builds, and the qtMODULEversion.h header did not include a path component.

This reverts commit 2fbc45b58bba860abf67fb28aa1319c9f4ededaf

Change-Id: Ie84cef19193ce5e49072f1f67a41140d9d2673b8
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2012-02-01 10:48:09 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I311e001373776812699d6efc045b5f742890c689
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 03:54:59 +01:00
Liang Qi
273715fc9b Put the generated <module>version.h into build tree
It was put in source tree before.

Task-number: QTBUG-20439
Change-Id: Ib52d9c2e83ae375aad259ddc74138bbc728b3ed0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-28 14:44:48 +01:00
Samuel Rødal
2d39471897 Introduced QOpenGLContext::defaultFramebufferObject().
Also add some debugging helpers to make sure applications are correctly
written even on less restrictive platforms.

Change-Id: Ie92e497c32e07b2b83662f7ab5540d8f37777fd0
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-27 10:58:32 +01:00
Gunnar Sletta
4ecf82795d Remove use of QT_MODULE from library
These defines were there to aid in the commercial
licensing scheme we used long ago, and are no longer needed.

Keep a QT_MODULE(x) define so other modules continue compiling.

Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-25 10:19:44 +01:00
Jiang Jiang
af48e0ba36 Move glyphMargin() to QFontEngine
glyphMargin() support for QTextureGlyphCache is implemented in
respective font engines, thus this function is platform dependent.
Before Qt 5 the code is guarded in macros like #ifdef Q_WS_MAC,
now we should move them into QFontEngine and its subclasses.

So far only Windows font engines support it. FreeType and Core Text
based font engines all ignore it.

Change-Id: Ia14016533d8fbfaacf848a7d3bc928f8197318f5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-24 17:42:04 +01:00
Kim Motoyoshi Kalland
97ba018492 Allocate mipmaps in FBOs with glTexImage2D, not glGenerateMipmap.
Change-Id: I7b7d26da97f82f354d81913eccab46d79ec9e8f0
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-24 02:45:13 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Samuel Rødal
82340ea5cd Fixed crash in GL 2 paint engine on Intel Atom.
The GPU in question supports GL 2 but not framebuffer objects. Since we
anyway have a font rendering path that doesn't use FBOs we might as well
not require framebuffer objects in order to use the GL 2 engine.

Task-number: QTBUG-22483
Change-Id: I2a80343fedda276e73e603ffe54edff58801af5b
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
(cherry picked from commit f13d0078d9f829cde2cd5b8b9eac40635a883ec6)
2012-01-17 10:30:17 +01:00
Samuel Rødal
9702400e2d Fixed QGLContext::getProcAddress() to return a function pointer.
Task-number: QTBUG-5729
Change-Id: I57e71f89a2c5ca7f74f73c66adcbf4a6cc073813
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-01-16 11:47:32 +01:00
David Faure
eb8fce6e56 Fix compilation of Qt itself with QT_NO_DEBUG_STREAM
Change-Id: I07087dff0f109347ea80434f17eeb7cc1c13114c
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 16:15:00 +01:00
Robin Burchell
b08daaedd4 Remove all non-inline of qMalloc/qFree/qRealloc.
We're trying to deprecate these, so don't use them anymore.

The inline uses of these have been left intact, for the moment. Inline code will
need to create their own non-inline allocation methods (for future-proofing to
allow alterations in how e.g. individual containers allocate)

Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-06 14:11:14 +01:00
Jason McDonald
1fdfc2abfe Update copyright year in license headers.
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 06:36:56 +01:00
Holger Hans Peter Freyther
f1a67c6531 opengl: Do not crash when programGuard is a nullptr
The rest of the code is checking programGuard for nullptr, do it here
as well to prevent a segmentation fault.

Change-Id: I38a03f74d493b8f731157be1739707b39904f7ba
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-01 10:51:10 +01:00
Jiang Jiang
63eae1bd15 Fix subpixel positioning support
Move subpixelPositionForX from QTextureGlyphCache to QFontEngine,
since some font engines like QFontEngineFT may need a custom
implementation or tweak it a little bit.

In QRasterPaintEngine::drawCachedGlyphs, do not add aliasedCoodinate
to x offset as that will break subpixel positioning.

Change-Id: Idbcec617509459b80965220ceb07b17737649bbf
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-11-08 07:43:00 +01:00
Friedemann Kleint
9d43b8d970 Gui/OpenGL: Remove remains of qpa from profiles.
Change-Id: Iff2531a19030bd782ee4cd9bbe529d18666503f9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-31 11:35:49 +01:00
Samuel Rødal
77d30df7e5 Get rid of legacy glTexParameterf calls.
ES 1.0 didn't have glTexParameteri, which is why we sometimes used
glTexParameterf. However, we shouldn't use glTexParameterf because
that's treating integer values as floating point, which is not type
safe. ES 1.1+ and ES 2.x have glTexParameteri, and we don't really care
about supporting ES 1.0 in any case in Qt 5.

Change-Id: I6b586b31ddc418ba319c4cc88f6bb3978fdbd040
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2011-10-28 12:14:10 +02:00
Bradley T. Hughes
6476ac738c Replace implicit QAtomic* casts with explicit load()/store()
Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-10-27 18:57:38 +02:00
Friedemann Kleint
434824aede Fix compiler warnings.
- Fix gcc 4.6.X warnings about assigned but unused variables
- Remove trailing ';' from inline functions (Clang)

Change-Id: I8670afd6b149748a740f22c65de137762e9f18e1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-27 16:35:12 +02:00
Friedemann Kleint
fc14bd2c92 Widgets: Remove Q_WS_QPA and qpa-sections from .pro files.
Enable compilation without -qpa.

- Remove conditionals from Q_WS_QPA sections.
- Rename precompiled header.
- Remove gui-related Q_OS_SYMBIAN-#ifdef sections.
- Leave other Q_WS code in for reference.

Change-Id: I16326b631fff483aec8edd2f7a2e7a1822eab814
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-21 21:29:46 +02:00
Friedemann Kleint
da68749fdb OpenGL: Remove Q_WS_ defines.
Change-Id: I351a910968ff7f46550af5b3742959cb0cab540d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-18 08:21:19 +02:00
Morten Sorvig
9fa6e8f627 Clean-up a macro for Cocoa
Remove the usage of Q_MAC_USE_COCOA and Carbon code paths.

Change-Id: Ib569ad8c6d9ffe258f454b3c3b06e95294a10112
Reviewed-on: http://codereview.qt-project.org/5100
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Sanity-Review: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-10-10 07:47:58 +02:00
Kent Hansen
31b89a8b31 Remove duplicate check for glDeleteProgram
It's already checked for earlier in the expression.

Task-number: QTBUG-20482
Change-Id: Iad7e8fa80aab98d47d90ecb0c497245450cdfa40
Reviewed-on: http://codereview.qt-project.org/6052
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-05 15:13:25 +02:00
Thiago Macieira
5bfeab8749 Make all uses of QBasicAtomicInt and Pointer use load() and store()
Most of these changes are search-and-replace of d->ref ==, d->ref !=
and d->ref =.

The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to
be basic, so I made it QAtomicPointer.

Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6
Reviewed-on: http://codereview.qt-project.org/5030
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-03 07:57:41 +02:00
Lars Knoll
3fd9398052 Remove the remaining traces of QT3_SUPPORT
The only place that now still knows about it is moc,
so it can still parse old headers.

Change-Id: Iafec080f99c67560974e9ebc0cbfb27d9a4b2d6f
Reviewed-on: http://codereview.qt-project.org/5755
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-03 05:59:07 +02:00
Oswald Buddenhagen
344d9b568c revert bogus .pro.user file addition
(cherry picked from commit 5c9ab15eda6a14b48120776fdc4c7c84d5771274)

Change-Id: I1fdbb531304f2cb5392670a7cc457dabb2fcce63
Reviewed-on: http://codereview.qt-project.org/4826
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-14 21:41:51 +02:00
Samuel Rødal
e2be53891f Fixed tst_QGL::destroyFBOAfterContext().
Properly free QOpenGLContext in QGLContext::reset(), if we own it.

Change-Id: Ibd913283cf8b3b8a4dc6295a878a22a3989309a7
Reviewed-on: http://codereview.qt.nokia.com/4320
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-09-07 10:09:36 +02:00
Samuel Rødal
c8fcc29298 Fixed crash in tst_QGL::multipleFBOInterleavedRendering().
Properly check for the ElementIndexUint extension.

Change-Id: I8117aa052f2dd697a2dadeb7ce84a415b5fd24c8
Reviewed-on: http://codereview.qt.nokia.com/4311
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-09-07 08:50:49 +02:00
Samuel Rødal
e9962cc300 Rename remaining gui/opengl source files to avoid name clashing.
We don't want to have source files in the opengl module and gui with the
same name, at least not private headers.

Change-Id: I5f2bf629c943a67a405574fb148aa4c70e58ecbb
Reviewed-on: http://codereview.qt.nokia.com/3864
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-08-30 11:05:30 +02:00
Friedemann Kleint
cf9a304e6e Build on Windows/clean build on Linux.
Change-Id: I26552e85a8e8c63002db93b7d9b645981620f0af
Reviewed-on: http://codereview.qt.nokia.com/3738
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-08-29 14:39:07 +02:00
Samuel Rødal
6e28e8441b Copy core GL functionality to QtGui with QGL -> QOpenGL naming.
Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855
Reviewed-on: http://codereview.qt.nokia.com/3710
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-08-29 10:25:24 +02:00
Samuel Rødal
aaa4a26f82 Move GL resource handling enablers to QtGui.
Made resource handling more robust by attempting to free GL resources in
the correct thread, and not forcing a context to become current to free
resources.

Change-Id: Ie81d4005b608972375755571d9b50ce82080709b
Reviewed-on: http://codereview.qt.nokia.com/3258
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-08-29 10:24:55 +02:00
Gunnar Sletta
04d0a9626c Merge branch 'master' into refactor
Conflicts:
	src/gui/kernel/qapplication_qpa.cpp
	src/gui/kernel/qcursor_qpa.cpp
	src/gui/kernel/qwindowsysteminterface_qpa.cpp
	src/gui/kernel/qwindowsysteminterface_qpa.h
	src/gui/kernel/qwindowsysteminterface_qpa_p.h
	src/gui/text/qtextcontrol.cpp
	src/plugins/platforms/wayland/wayland.pro
	src/widgets/accessible/qaccessible2.h
	src/widgets/widgets/qwidgetlinecontrol_p.h

Change-Id: I5e6f4eb184159dccc67e8f13673edb884d179c74
2011-08-25 12:48:52 +02:00
Gunnar Sletta
a957a88542 compile after removal of OpenGL 1 paint engine
Change-Id: Idf030ef627329f940e8a1e0a2b98d49b11e8446c
Reviewed-on: http://codereview.qt.nokia.com/3087
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-08-17 12:15:31 +02:00
Paul Olav Tvete
78056064cc Build fix after setPreferredPaintEngine was removed
Change-Id: I286529e0e1917ee3c808eba7dad0957dd4d8194f
Reviewed-on: http://codereview.qt.nokia.com/3083
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-08-17 11:59:53 +02:00
Samuel Rødal
0d5170256c Get rid of OpenGL 1.x engine and platform code from QtOpenGL.
Change-Id: I646b8e26d5e7214432a044866764d57cc11b2390
Reviewed-on: http://codereview.qt.nokia.com/3006
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-08-16 15:44:26 +02:00