Commit Graph

550 Commits

Author SHA1 Message Date
Alexandru Croitor
79d820f8a9 Regenerate opengl
And add the first version of the .prev file.

Change-Id: I96f27bce6d1c3107fb8c7b3758b29cfd944cf374
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:35:53 +00:00
Tobias Hunger
1c310adb17 CMake: Regenerate src/opengl
Change-Id: I6a140b18f12cb048e2b113fb1cef38e224cc8417
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:22:47 +00:00
Topi Reinio
4ad915425d Doc: Replace example file lists with links to code.qt.io
Instead of generating .html page for each file in an example
project, generate links to code.qt.io, under the correct
path and branch, where the user can browse the example source.

Store all URLs under QT_INSTALL_DOCS/config where other qt5
submodules can access them. The repository name appears in
the URL, so we cannot define a single URL for all modules.

Task-number: QTBUG-74391
Change-Id: I63d4d6d2c352877797b1ee8e057d48c0cd789bff
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-05-03 14:24:42 +02:00
Tobias Hunger
6630937e63 Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
2019-04-16 16:32:08 +02:00
Christian Ehrlicher
69f6cab0af Doc: replace even more null/0/nullptr with \nullptr macro
Try to replace all wordings like '.. to 0' with '.. to \nullptr'. Also
checked for 'null pointer' and similar.

Change-Id: I73341f59ba51e0798e816a8b1a532c7c7374b74a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-05-08 12:48:32 +00:00
Alexandru Croitor
547c7f8ca5 Fix architecture conditions
The actual variable that contains the architecture is
TEST_architecture_arch. TEST_architecture only contains the value
if the test was performed or not.

Fix the conversion script and all the generated files.

Change-Id: Icb3480832cab894948f4fef03b8bc8187cab6152
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-03 09:00:08 +00:00
Tobias Hunger
72e0f74e31 CMake: Re-generate opengl
Change-Id: I8aca37a7f07ced03500779c708374f7553684c37
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-02 13:17:37 +00:00
Tobias Hunger
aa50b377a7 CMake: Add widgets examples
Change-Id: Ib6142b93df066e3658eb189b50ca74c455fe7e56
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-26 15:25:39 +00:00
Kevin Funk
41e7b71c41 More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on
the CMake-based Qt version.

Skipping src/3rdparty, examples/, tests/

Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-14 07:37:52 +00:00
Robert Loehning
85b0ce8ca3 Fix can not -> cannot
Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-02-25 13:03:45 +00:00
Liang Qi
388fe97f2a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/tools/qstring.cpp

Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
2019-05-13 08:04:58 +02:00
Christian Ehrlicher
a4b8e7141b QtGui/Network/OpenGl/Widgets/Xml: use \nullptr in documentation
Replace null and '\c nullptr' with \nullptr in the documentation.

Change-Id: I58934eea06943309ba895833f1991629870ab45b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-20 18:58:58 +00:00
Liang Qi
fbfacd33be Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/android/templates/AndroidManifest.xml
	src/network/ssl/qsslsocket_mac.cpp
	src/widgets/styles/qstylesheetstyle.cpp
	tests/auto/corelib/kernel/qtimer/BLACKLIST
	tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
	tests/auto/testlib/selftests/expected_blacklisted.lightxml
	tests/auto/testlib/selftests/expected_blacklisted.tap
	tests/auto/testlib/selftests/expected_blacklisted.teamcity
	tests/auto/testlib/selftests/expected_blacklisted.txt
	tests/auto/testlib/selftests/expected_blacklisted.xml
	tests/auto/testlib/selftests/expected_blacklisted.xunitxml
	tests/auto/testlib/selftests/expected_float.tap
	tests/auto/testlib/selftests/expected_float.teamcity
	tests/auto/testlib/selftests/expected_float.txt
	tests/auto/testlib/selftests/expected_float.xunitxml

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
2019-02-08 12:31:02 +01:00
Kai Koehne
44cf8cea8e QtOpenGL: Unify license headers
Change-Id: Ia25b8f9833bd3d941ef73dcc7c6590063fe65329
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-29 10:41:46 +00:00
Christian Ehrlicher
4ee8f75572 QtBase: replace 0 with \nullptr in documentation
Replace 0 with \nullptr in the documentation.
As a drive-by also replace some 0 with nullptr in the corresponding
code.

Change-Id: I914b6b2151554c06acc2d244eff004524cbb9a82
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-28 19:37:30 +00:00
Tobias Hunger
e2ff9e3b99 CMake: Introduce Q_OBJECT qdoc macro
CMake's moc file scanning is rather primitive: It will run moc on any
file containing a line that starts with Q_OBJECT (and similar macros).

We have four files in QtBase that contain such a macro at the start
of the line in a qdoc comment. These four files were excluded from
automatic moc handling by cmake, which is not ideal, since this will
silently fail when somebody actually adds a Q_OBJECT macro in code.

This patch introduces a macro Q_OBJECT for qdoc. This macro will be
replaced with Q_OBJECT in the generated documentation.  While not nice,
at least a failure to use \Q_OBJECT is noticeable: Moc will warn about
the file.

Change-Id: I829893c1166eee306fe30058d4ea0256affd45ea
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-25 14:33:26 +00:00
Liang Qi
03039979b5 Merge remote-tracking branch 'origin/5.12' into dev
Also blacklist tst_QRawFont::unsupportedWritingSystem() and
tst_QGlyphRun::mixedScripts() on windows for now.

 Conflicts:
	qmake/generators/makefile.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
	tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
	tests/auto/gui/text/qglyphrun/BLACKLIST
	tests/auto/gui/text/qrawfont/BLACKLIST

Task-number: QTBUG-72836
Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
2019-01-04 07:33:14 +01:00
Allan Sandfeld Jensen
a227ea5bd5 Fix warnings building with --std=c++11 and gcc 8
Silence warnings about signed constants being shifted out of int range.

Change-Id: I5dc397de71f4de09e54ce3cbc0f8e3a1cf977b03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-14 23:38:20 +00:00
Tobias Hunger
e57a94cbd8 CMake: Use AUTOMOC/AUTOUIC/AUTORCC
Change-Id: I0235ca4f227623e5937348b4b010637921dbf154
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:04:59 +00:00
Friedemann Kleint
e209321966 Use Q_DISABLE_COPY_MOVE for private classes
Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-12-12 07:23:54 +00:00
Liang Qi
bf58c70546 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/corelib/io/qdir.cpp
	src/corelib/kernel/qtimer.cpp
	src/corelib/kernel/qtimer.h

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I683d897760ec06593136d77955f8bc87fdef3f9f
2018-11-22 01:53:29 +01:00
Liang Qi
4d180586cd Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm

Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
2018-11-19 12:42:10 +01:00
Edward Welbourne
15b1c3fd9b Purge some unused code for the OpenGL library name
We had a global static, a setter for it (that's nowhere used within Qt
code) and a getter for it whose only use was commented out.  Neither
was declared in any header; the getter's commented-out client had a
local extern declaration at the point of (non-)use.

Found while reviewing a change to the next few lines of code after the
commented-out use of the getter.

Change-Id: I393d56219cb7dd7cf836ca80e1bdd605a2914003
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-11-12 14:58:54 +00:00
Martin Smith
81d8319276 doc: Fix all clang parse errors in QtBase during PCH build
This update eliminates ALL parsing errors when clang parses the
Qt headers to build the precompiled header qdoc needs. These errors
are often cases where an old use of Q_QDOC no longer works because
clang sees the enclosed fake declarations as erroneous.

In a few cases, clang reported errors because two dummy function
declartations under the Q_CLANG_QDOC guard were indistinguishable,
so one of them was removed, and the documentation was patched
accordingly.

Using the macro Q_DECLARE_INTERFACE(...) causes clang to report errors
because the class parametewr is abstract. These uses of the macro are
not needed, so they are removed with #ifndef Q_CLANG_QDOC.

Some declarations of default GL types that had been provided for qdoc
were no longer needed, so they are removed.

Now there are some member function signatures in QDBusPendingReply
and QDBusPendingCall that have very long template clauses and qualifiers
in their signatures. These unwieldy signatures will be unnecessary in the
documentation and will look bad there, but for now they are correct. The
ultimate solution will be to add a metacommand to qdoc, something like
\simplify-signature to tell qdoc to generate the documentation for these
member functions without the long template caluses and qualifiers.

Change-Id: I012cf17a544fbba2ebc71002f31bdc865119bb8e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-11-05 13:10:11 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +00:00
Frederik Gladhorn
102a919b73 Generate documentation .tags files for all of the docs
This allows others to link to QtDBus and the other libraries/tools using
doxygen.

Fixes: QTBUG-60933
Change-Id: I026895a432a328f224c40cf231ad12d109dc648f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-10-31 08:38:02 +00:00
Tor Arne Vestbø
b75babc6ae QGLWidget: Prevent premature platform window creation
Passing Qt::MSWindowsOwnDC along with the window flags to the QWidget
constructor results in creating a native window as part of the base
class initialization.

By deferring the window creation to later in the QGLWidget construction,
the meta object reflects the actual class.

Change-Id: I51343c767057d6841331614b93ad860fe99d65e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-10-31 07:27:05 +00:00
Cristian Maureira-Fredes
1f6bfc2207 Doc: Move literal code block to a separate file
We need to override this snippet for the documentation
we generate for Qt for Python, and it is easier to have
it on a separate file.

Task-number: PYSIDE-801
Task-number: PYSIDE-691
Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-10-15 10:55:18 +00:00
Qt Forward Merge Bot
295cd87c6d Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
2018-09-07 01:00:21 +02:00
Venugopal Shivashankar
059b10f295 Doc: Check before including the \snippet from a .pro file
Change-Id: Icc7552b46a2657c81958e40f33596ddeee045172
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-08-30 09:23:42 +00:00
Morten Johan Sørvig
29c0377f07 WebAssembly for QtBase
This is the squashed diff from wip/webassembly to dev.

Done-with: Peng Wu <peng.wu@intopalo.com>
Done-with: Sami Enne <sami.enne@intopalo.com>
Done-with: Morten Johan Sørvig <morten.sorvig@qt.io>
Started-by: Andrew Knight <andrew.knight@intopalo.com>
Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-30 06:48:33 +00:00
Qt Forward Merge Bot
8842d9d1e6 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
2018-08-17 09:08:06 +02:00
Alexander Volkov
242ea38375 doc: Add missing override and remove redundant virtual for snippets
Change-Id: I2395fd01b93c4ea364225e0cf1a5f59908b691d0
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-08-16 11:00:31 +00:00
Tor Arne Vestbø
b122e0e323 Guard QGL2PaintEngineEx/QGLPaintDevice against using unset context
QGL2PaintEngineEx::end() calls endPaint() on the device, which may end up
calling QGLContext::swapBuffers() on the context, a call which we have
documented to require makeCurrent() for any further GL commands:

  Call this to finish a frame of OpenGL rendering, and make sure to
  call makeCurrent() again before issuing any further OpenGL commands,
  for example as part of a new frame.

QOpenGLContext also documents that:

  To be able to support certain platforms, QOpenGLContext requires that
  you call makeCurrent() again before starting rendering a new frame,
  after calling swapBuffers().

As a consequence, we need to guard the GL usage in QGLPaintDevice::endPaint(),
as well as the GL reset in QGL2PaintEngineEx::end().

Change-Id: Ib66e91cce12fbaea32ed3c30141150fa15907187
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-07 11:20:17 +00:00
Tor Arne Vestbø
819cad6670 Be more explicit about the effects of swapBuffers() on the current context
Change-Id: I7ab9e4e7323d49cf19774bfd0c51f8516ecb842d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-08-06 11:42:15 +00:00
Tor Arne Vestbø
cc27a50ef8 QGLWidget: Gracefully handle failed makeCurrent during resize and paint event
The underlying QOpenGLContext may fail to be made current, e.g. if the
surface is not exposed, or the graphics hardware is not available.

Instead of trying to initialize and resize the GL viewport with a
non-current context, we return early and defer the init and resize
until later.

Change-Id: I278ca8f1ad4d3da2d5be18b44d775f8d6c8af726
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-20 06:40:04 +00:00
Christian Ehrlicher
e3fa4af68e qdoc: properly omit comments for enums marked with omitvalue
When a value is omitted with \omitvalue, the comment must be either
deleted or omitted with \omit .. \endomit. Otherwise the comment is
merged into the comment for the previous value

Change-Id: Ic5cfb20d36853526ae939529b4609712cd0eb341
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-03-27 16:50:10 +00:00
Liang Qi
bb0fec8057 Merge remote-tracking branch 'origin/5.10' into 5.11
Conflicts:
	src/corelib/corelib.pro
	src/corelib/global/qrandom.cpp
	src/network/access/qhttpnetworkrequest_p.h
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/cocoa/qcocoansmenu.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/offscreen/qoffscreenintegration.h
	src/widgets/kernel/qaction.cpp
	src/widgets/widgets.pro

Done-with: Andy Shaw <andy.shaw@qt.io>
Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
2018-02-15 10:14:11 +01:00
Liang Qi
305dd1b61f Merge remote-tracking branch 'origin/5.9' into 5.11
Conflicts:
	.qmake.conf
	src/corelib/animation/qvariantanimation.cpp
	src/corelib/global/qglobal.cpp
	src/corelib/global/qlogging.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/json/qjsonarray.cpp
	src/corelib/tools/qsimd_p.h
	src/corelib/tools/qtimezoneprivate_p.h
	src/corelib/xml/qxmlstream_p.h
	src/gui/kernel/qsimpledrag.cpp
	src/gui/kernel/qsimpledrag_p.h
	src/plugins/generic/generic.pro
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/widgets/styles/qmacstyle_mac.mm
	tests/auto/concurrent/qtconcurrentmap/BLACKLIST
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qmessagebox/BLACKLIST

Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
2018-02-14 12:51:24 +01:00
Liang Qi
9f065554ff Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I7bfb75083f60190aa1def82d153f89925a92fd56
2018-01-26 10:09:06 +01:00
Thiago Macieira
7d6bf37049 MSVC: Don't set a DLL base address for 64-bit
The linker complains:

 LINK : warning LNK4281: undesirable base address 0x67000000 for x64 image; set base address above 4GB for best ASLR optimization

And it's not really required anymore, as the recommended /DYNAMICBASE is
the default.

Change-Id: I56b444f9d6274221a3b7fffd150caab1beecfd43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-24 21:20:47 +00:00
Kai Koehne
c4b596fb79 Document licenses for all Qt modules
Follow the example of the other modules and explicitly mention
the valid licenses on each module landing page, optionally
combining it with trademark information.

Change-Id: I9f1fea0f002e0ab607da89a0cbfe7c53060582d7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-24 13:19:24 +00:00
Friedemann Kleint
9031069e12 Add more Q_FALLTHROUGH()
Silence g++ 7.X warnings.

Change-Id: Id06d06e7e3b5be2cf3934d81f1891da58dea2649
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-12 07:10:25 +00:00
Martin Smith
f4ad5ede58 doc: clangqdoc must always see GL typedefs
QT_NO_OPENGL must not be defined when running clangqdoc
because there are opengl elements that must be documented.
That means clang will see uses of GLxxx, which might not
be included on some platforms. For example, clang must
parse the declaration for class QOpenGLFramebufferObject,
which uses GLuint, GLenum, and GLbitfield, because there
is documentation to be published for that class in
qopenglframebufferobject.cpp.

This change uses Q_CLANG_QDOC to first undef the needed
GLxxx types and then provide suitable typedefs for them.
This technique is also used in qglshader.h.

This works for macOS, but is it the right way to solve the
problem?

This change also removes some \overload commands, because
they shouldn't be used on constructors. And some \fn commands
that are made unnecessary by upgrading to clang.

Change-Id: I4ac658e951b3f2011698005f0238d4dea85fc403
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-12-08 17:37:54 +00:00
Martin Smith
24a0b641c1 doc: clangqdoc needs to see all GLxxx typedefs
Clang needs to see declarations for GLclampf, GLSizei,
and GLboolean.

Change-Id: Id1c1310e4877b32bb8fc2e6d4f743999842b3f06
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-12-02 17:30:17 +00:00
Liang Qi
153e8b49ad Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/network/access/qhttp2protocolhandler_p.h
	src/network/kernel/kernel.pri
	src/network/ssl/qsslkey_qt.cpp
	src/plugins/platforms/cocoa/qcocoascreen.mm
	src/plugins/platforms/windows/accessible/iaccessible2.cpp
	src/plugins/platforms/windows/accessible/iaccessible2.h
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
	src/widgets/widgets/qmenu_p.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp
	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
2017-11-23 09:36:03 +01:00
Thiago Macieira
19b0ce5daa Change almost all other uses of qrand() to QRandomGenerator
The vast majority is actually switched to QRandomGenerator::bounded(),
which gives a mostly uniform distribution over the [0, bound)
range. There are very few floating point cases left, as many of those
that did use floating point did not need to, after all. (I did leave
some that were too ugly for me to understand)

This commit also found a couple of calls to rand() instead of qrand().

This commit does not include changes to SSL code that continues to use
qrand() (job for someone else):
  src/network/ssl/qsslkey_qt.cpp
  src/network/ssl/qsslsocket_mac.cpp
  tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-08 09:14:03 +00:00
Jake Petroules
cd542a82b0 Remove references to obsolete platforms
ultrix and reliant have not seen a release since 1995. dgux not since
2001. bsdi not since 2003. irix not since 2006. osf not since 2010.
dynix... unclear, but no later than 2002. symbian needs no mention.
All considered obsolete, all gone.

sco and unixware are effectively obsolete. Remove them until someone
expresses a real need.

Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-05 06:33:53 +00:00
Kevin Funk
58c14c4a7e Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
  (definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:55 +00:00
Kevin Funk
47c92fbb0b Replace Q_DECL_OVERRIDE with override where possible
Remaining uses of Q_DECL_OVERRIDE are in:

src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.cpp
doc/global/qt-cpp-defines.qdocconf
  (definition and documentation of Q_DECL_OVERRIDE)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:42 +00:00
Morten Johan Sørvig
d7bb44dba4 Make high-dpi QGLWidget work cross platform
A Q_OS_MAC ifdef was left from the days of macOS-only support.

Task-number: QTBUG-59956
Change-Id: Ia10258910ad14ecccee8f0ec22e53f9299a672ff
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-02 21:58:21 +00:00
Stephan Binner
93dc459f48 Convert features.graphicseffect to QT_[REQUIRE_]CONFIG
Change-Id: I1bb96088b2e9f2a2cfab5fceeebebe94fa6bb3a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-11 02:52:03 +00:00
Simon Hausmann
dcaa2d057b Fix crash when running tst_qlbuffers under Angle
Angle does not support glGetBufferSubData.

Task-number: QTQAINFRA-1199
Change-Id: I17f99027cc374131965d6589d2babacb75f9174a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-06-28 11:25:42 +00:00
Liang Qi
d51c3ecf8e Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	examples/network/network.pro
	mkspecs/features/mac/default_post.prf
	src/corelib/io/qfilesystemengine_win.cpp
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess.h
	src/corelib/io/qprocess_p.h
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/thread/qmutex.cpp
	src/platformsupport/fontdatabases/windows/windows.pri
	src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
	tests/auto/corelib/io/io.pro

Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
2017-03-13 15:55:44 +01:00
Ulf Hermann
d6330a19b2 Use QT_CONFIG(library) instead of QT_NO_LIBRARY
For the windows file system engine, we add an extra macro to use
library loading if configured to do so, but avoid it on WinRT, as
none of the symbols would be found.

We also QT_REQUIRE_CONFIG(library) in the library headers and
exclude the sources from the build if library loading is disabled.
This, in turn, makes it necessary to clean up some header inclusions.

Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-06 11:27:20 +00:00
Marc Mutz
cad9c7cbc9 Use static initialization for QBasicAtomics
A default-constructed static QBasicAtomicInt at function scope
will be dynamically initialized. It will still be zero-initialized,
but at least GCC adds guard variables for such objects.

When using aggregate initialization, the guard disappears.

Amends 04d6495bf7.

Change-Id: Id9335cffdd43094cafb231fdde2523d013abe1d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-16 19:26:46 +00:00
Marc Mutz
04d6495bf7 Make some atomic counters zero-based
A variable of static storage duration that is not zero-initialized
takes up space in the DATA segment of the executable. By making the
counters start at zero and adding the initial value afterwards, we
move them over to the BSS segment, which does not take up space in
the executable.

Wrap atomics used across function boundaries into small functions,
to avoid code duplication and to increase readability.

Change-Id: Ida6ed316ecb8fe20da62a9577161349e14de5aed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-15 20:14:27 +00:00
Liang Qi
6755ec891a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	qmake/Makefile.unix.macos
	qmake/Makefile.unix.win32
	qmake/generators/win32/msvc_vcproj.cpp
	src/3rdparty/pcre/qt_attribution.json
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qdeadlinetimer.cpp
	src/platformsupport/kmsconvenience/qkmsdevice.cpp
	src/platformsupport/kmsconvenience/qkmsdevice_p.h
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
	tests/manual/qstorageinfo/printvolumes.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
2016-12-13 09:39:20 +01:00
Martin Smith
f27a1ae9a8 doc: Always declare GL types for clangqdoc
GLint, GLuint, GLfloat, and GLenum must be declared for
clangqdoc because it must generate the documentation for
opengl support whether or not opengl support is provided.

Change-Id: I1dccac86fe72a30509bc563dda0b60bcb156bc0b
Reviewed-by: Martin Smith <martin.smith@qt.io>
2016-12-03 19:17:53 +00:00
Alexander Volkov
7183fc8f0d Add missing override into Qt modules
Change-Id: I014ac8c7b590c77b054fbb01f0ab5601c44ca88e
Reviewed-by: hjk <hjk@qt.io>
2016-12-01 12:07:13 +00:00
Lars Knoll
04b276b0f5 Remove last traces of MeeGo
Change-Id: I5242f1dfcfccf9811398e717b90196e6228d1dc5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 10:57:19 +00:00
Liang Qi
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	config.tests/win/msvc_version.cpp
	configure.pri
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	src/corelib/io/qsettings_mac.cpp
	src/corelib/json/qjsondocument.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.h
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/qiosintegration.h
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
	tests/auto/gui/painting/qpainter/tst_qpainter.cpp
	tools/configure/environment.cpp

Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
2016-11-01 06:02:55 +01:00
Liang Qi
6370c3aa71 Merge remote-tracking branch 'origin/5.6' into 5.7
Also bump minimum required Qt version for Android: Ministro updates.

Conflicts:
	src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java
	src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
	src/plugins/platforms/android/androidjnimain.cpp

Change-Id: I966f249bebf92da37bfdeb995ad21b027eb03301
2016-10-13 15:18:02 +02:00
Marc Mutz
0c8b5b9a04 QtOpenGl: compile with GCC 7
GCC 7 warns about implicit fall-throughs now.

Fix by adding the missing comments.

Change-Id: I081d4db07c7f2b30ee6344a166aaec34ac639ee5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2016-10-12 08:16:52 +00:00
Oswald Buddenhagen
d314819fc0 Merge dev into 5.8
Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
2016-08-22 11:30:01 +02:00
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Friedemann Kleint
e4bb9395c2 Standardize some "We mean it" comments
Fix the occurrences where the wrong classes are mentioned.

Change-Id: Ia291af77f0f454a39cab93e7376a110c19a07771
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-17 19:51:40 +00:00
Liang Qi
17198e03ab Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/global/qglobal.cpp
	src/corelib/tools/qstring.cpp
	src/network/socket/qabstractsocket.cpp
	src/network/socket/qnativesocketengine_unix.cpp
	src/plugins/platforms/eglfs/api/qeglfsglobal.h

Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
2016-08-16 07:58:32 +02:00
Liang Qi
6b8f422c5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/io/qsettings.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp

Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
2016-08-13 01:05:02 +02:00
Topi Reinio
a2ae631c04 Doc: Change instances of '(Mac) OS X' to 'macOS'
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change the occurrences where the Mac platform
is discussed to use a macro \macos, which expands to 'macOS'. This
helps with adapting to future renaming.

Update the instructions on mac-specific Q_OS_* macro usage.

Add a \target for the old 'Qt for OS X' topic to keep links working
for other documentation modules that try to link with the old name.

Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-08-12 08:30:29 +00:00
Liang Qi
56d6e000f7 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/corelib/global/qnamespace.h
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qfsfileengine_win.cpp
	src/corelib/tools/tools.pri
	src/network/ssl/qsslconfiguration_p.h
	src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
	src/plugins/platforms/windows/windows.pri
	src/src.pro
	src/tools/bootstrap/bootstrap.pro
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/dialogs/qfilesystemmodel.cpp
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt

Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
2016-05-23 21:09:46 +02:00
Liang Qi
818014b449 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
	src/widgets/widgets/qlineedit_p.cpp
	src/widgets/widgets/qlineedit_p.h
	src/winmain/winmain.pro
	tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
	tools/configure/configureapp.cpp

Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
2016-05-19 12:55:27 +02:00
Marc Mutz
7248e97669 QtConcurrent/QtOpenGL(Extensions)/QtPrintSupport/QtTestLib/QtXml: add QT_NO_FOREACH
Mark these libraries as what they are: Q_FOREACH-free,
using QT_NO_FOREACH.

Change-Id: I2a567d9fe67e15e9b6f0784525810b553dc50e1f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-05-12 21:42:10 +00:00
Topi Reinio
72e3fcce38 Doc: Remove repository name from examplesinstallpath
Examples in binary packages now directly match the install path.

Change-Id: Ic1487bc766cfd3b0a0a340cc4ae4ba49d953eaa6
Task-number: QTBUG-52953
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-12 12:15:52 +00:00
Liang Qi
990969655c Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	config_help.txt
	configure
	src/corelib/io/qprocess_wince.cpp
	src/plugins/platforms/windows/qwindowstheme.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qtimezone/BLACKLIST
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
2016-05-12 08:33:08 +02:00
Anton Kudryavtsev
64df35c02d OpenGL: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing.

Change-Id: I211ae74434bf3705914764e1e9d02ae823a1be3a
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-20 11:56:25 +00:00
Timur Pocheptsov
a4a83f52f9 OGLTextureCache::insert - make sure it did not fail
QGLTextureCache is using QCache internally, QCache in theory
can delete the object we are trying to insert (in case the cost > maxCost).
Vague comments in the code suggest that this can never happen.
Q_ASSERT assert this.
Found by coverity, CID 11765

Change-Id: I34ef114b9607926cd5e7d2baed4b63051cf87cff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-04-15 19:59:27 +00:00
Liang Qi
f34e73a16a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/corelib/kernel/qobject.cpp
	src/gui/painting/qpaintengine_raster.cpp

Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
2016-04-11 09:12:36 +02:00
Anton Kudryavtsev
8903460093 QtBase: use erase and std::remove_if with QList and QVector
... instead of using removeAt in a loop, with quadratic complexity.

Change-Id: I38b49e56b12c396db9fc0f1b75d8fb43c503a7f6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-08 19:35:26 +00:00
Anton Kudryavtsev
d42da86c96 OpenGL, PlatformSupport: use QStringRef to optimize memory allocation
Replace substring functions that return QString with
corresponding functions that return QStringRef where
it's possible.

Create QString from QStringRef only where necessary.

While touching the code, also port loops to C++11 style.

Change-Id: Ib94d29b6ecec1cdab2604d0277a743e8b340be5e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-07 12:57:43 +00:00
Liang Qi
f285687584 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	examples/corelib/ipc/ipc.pro
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp

Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
2016-04-05 14:22:45 +02:00
Jani Heikkinen
cd46a2daf5 Unify license header usage.
Update files using old header.LGPL3 to header.LGPL
Update files using old FDL template to use new one
Update files using old BSD template to use new one

Change-Id: I36a78272516f9953d02956522f285b40adfc8915
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-29 10:20:03 +00:00
Liang Qi
a02863234d Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	mkspecs/common/wince/qplatformdefs.h
	src/plugins/platforms/directfb/qdirectfbbackingstore.cpp
	src/plugins/platforms/xcb/qxcbbackingstore.cpp

Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
2016-03-22 07:28:42 +01:00
Liang Qi
59a3ca679e Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-03-13 19:27:21 +00:00
Marc Mutz
6417bbde85 QtBase (remainder): use printf-style qWarning/qDebug where possible (I)
The printf-style version of QDebug expands to a lot less code than the
std::ostream-style version. Of course, you pay in type safety (but
compilers warn about it these days), you cannot stream complex Qt
types and streaming QStrings is awkward, but in many cases you
actually improve on readability.

But the main reason is that something that's not supposed to be
executed under normal operation has no business bloating executable
code size.

This is not an attempt at converting all qWarnings() to printf-style,
only the low-hanging fruit.

In this first part, replace
   qWarning() << ""
with
   qWarning("...").

Had to fix broken qImDebug() definition. Instead of defining it as
a nullary macro in the QT_NO_DEBUG case and as a variadic macro in
the other, define it in both cases, as is customary, as a non-function
macro so that overload selection works without requiring variadic
macro support of the compiler.

Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3
AMD64 builds.

Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2016-03-12 17:29:36 +00:00
Liang Qi
50d0f57b77 Merge remote-tracking branch 'origin/5.6' into 5.7
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.

This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.

Conflicts:
	mkspecs/features/default_post.prf
	src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
	src/3rdparty/sqlite/sqlite3.c
	src/corelib/tools/qsimd_p.h
	src/gui/kernel/qevent.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface_p.h
	src/plugins/bearer/blackberry/blackberry.pro
	src/plugins/platforms/cocoa/qcocoasystemsettings.mm
	src/plugins/platformthemes/gtk2/gtk2.pro
	src/plugins/styles/bb10style/bb10style.pro
	src/sql/drivers/sqlite2/qsql_sqlite2.cpp
	tools/configure/configureapp.cpp

Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
2016-03-11 20:08:50 +01:00
Oswald Buddenhagen
a28364bc1c consistently put {qt,qml}_{module,plugin} at the end of project files
this fixes static builds by ensuring that all dependencies are exported.

Task-number: QTBUG-51071
Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-07 14:09:49 +00:00
Marc Mutz
9c1d3bc253 QtOpenGL/plugins/platformsupport: use new QRegion::begin()/end() instead of rect()
Saves e.g. ~900b and ~2900b in text size in QtOpenGL and
XcbQpa libs, resp., on optimized GCC 5.3 Linux AMD64 builds.

Change-Id: Id904689164ca32df41118a23747c70048d8e6604
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-02 21:01:00 +00:00
Andre Somers
0df5c366e5 Use QFlags::setFlag where prudent in qtbase
QFlags::setFlag is most useful to replace explicit constructs like

if (condition) {
   someFlags |= TheConditionFlag;
} else {
   someFlags &= ~TheConditionFlag;
}

with

someFlags.setFlag(TheConditionFlag, condition);

Change-Id: Ie4586681c83e0af812d5bbf14965aad51941a960
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-12 19:32:05 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:18 +00:00
Jani Heikkinen
1a88b2f768 Updated license headers
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)

Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-15 12:25:24 +00:00
Marc Mutz
fd7861ac4b QtOpenGL: eradicate all remaining Q_FOREACH loops
Not many left. Still 344b saved in text size on optimized
GCC 4.9 Linux AMD64 builds.

Change-Id: I51ba49fe065854f84e26d25d7da5e26427ea2c0b
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2016-01-04 12:22:23 +00:00
Marc Mutz
1663bdbf15 QGLShaderProgram: replace a Q_FOREACH with qDeleteAll()
Change-Id: I81a7a3accdcbd3229aeb1dc6fcda5b4ae5cd1a7b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-12-26 07:46:15 +00:00
Marc Mutz
6c28efb58b QGLShaderProgram: hoist some constant expressions out of a loop
d->programGuard and its ID don't change when calling a
GL function, so check them only once, before entering
the loop, instead of once per iteration.

Cache d->programGuard->id().

Change-Id: I398da7a76823b2eb854b7b9d5af512adf9969fc9
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-12-26 07:46:09 +00:00
Liang Qi
72f5867f14 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/kernel/qcoreapplication.cpp
	src/corelib/kernel/qeventdispatcher_blackberry.cpp
	src/network/bearer/qnetworkconfiguration.cpp
	src/plugins/bearer/blackberry/qbbengine.cpp
	src/plugins/platforms/android/androidjnimain.cpp
	src/plugins/platforms/android/qandroidplatformtheme.cpp
	src/plugins/platforms/qnx/qqnxbpseventfilter.cpp
	src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp
	src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp
	src/plugins/platforms/qnx/qqnxintegration.cpp
	src/plugins/platforms/qnx/qqnxnavigatorbps.cpp
	src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp
	src/plugins/platforms/qnx/qqnxwindow.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	src/widgets/styles/qwindowsvistastyle.cpp
	src/widgets/styles/qwindowsxpstyle.cpp
	src/widgets/widgets/qtoolbararealayout.cpp
	tests/auto/corelib/global/qflags/qflags.pro
	tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
	tests/auto/corelib/tools/qversionnumber/qversionnumber.pro
	tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp

Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
2015-12-02 23:33:06 +01:00
Marc Mutz
51089a5742 Use Q_UNLIKELY for every qFatal()/qCritical()
If, after checking a condition, we issue a qFatal()
or a qCritical(), by definition that check is
unlikely to be true.

Tell the compiler so it can move the error handling
code out of the normal code path to increase the
effective icache size.

Moved conditional code around where possible so that
we could always use Q_UNLIKELY, instead of having to
revert to Q_LIKELY here and there.

In some cases, simplified the expressions newly wrapped
in Q_UNLIKELY as a drive-by.

Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-29 22:59:17 +00:00
Marc Mutz
40a8302115 QtBase: remove explicit function info from qWarning() etc
This information is already registered by the QMessageLogger ctor.

Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only
a string literal remained, converted to printf-style qDebug() on the
go.

Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-28 16:34:26 +00:00
Topi Reinio
d159fe199f Doc: Update examplesinstallpath to include the repository name
The examplesinstallpath variable in .qdocconf files defines the path
under QT_INSTALL_EXAMPLES where examples are found.

To match the way examples are packaged in Qt 5.6, prefix each
install path with the repository name.

Task-number: QTBUG-48736
Change-Id: I6a35c94fdacaad21cd044411aba02027b9019300
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-10-21 09:50:16 +00:00
Nico Vertriest
58664dbeb3 Doc: fixed links to qmake documentation
Task-number: QTBUG-43810
Change-Id: I56676d6f6f95ed79bd1719404b4e48c26490eea6
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-09-25 10:57:51 +00:00
Friedemann Kleint
47b3e7d130 Fix some doc warnings.
qtbase/src/gui/text/qzip.cpp:797:warn:Cannot find 'FileInfo::d' specified with '\variable' in any header file
qtbase/src/opengl/doc/src/qtopengl-index.qdoc:28:warn:Can't link to 'Qt Gui'
qtbase/src/opengl/doc/src/qtopengl-module.qdoc:28:warn:Can't link to 'Qt Gui'
qtbase/src/widgets/widgets/qcombobox.cpp:3033:warn:Cannot find base function for '\reimp' in showPopupFromMouseEvent()
qtbase/src/corelib/plugin/quuid.cpp:849: warning: Can't link to 'variant()'
qtbase/src/corelib/plugin/quuid.cpp:863: warning: Can't link to 'variant()'
qtbase/src/widgets/dialogs/qsidebar.cpp:72: warning: Cannot find base function for '\reimp' in mimeTypes()
qtbase/src/widgets/dialogs/qsidebar.cpp:80: warning: Cannot find base function for '\reimp' in flags()
qtbase/src/widgets/dialogs/qsidebar.cpp:98: warning: Cannot find base function for '\reimp' in mimeData()
qtbase/src/widgets/dialogs/qsidebar.cpp:134: warning: Cannot find base function for '\reimp' in dropMimeData()
qtbase/src/widgets/dialogs/qsidebar.cpp:151: warning: Cannot find base function for '\reimp' in setData()

Change-Id: I39d6494eb8179f0f7532f99458736fa5e30cdc25
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-09-11 07:41:39 +00:00
Frederik Gladhorn
77da617dc8 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/3rdparty/forkfd/forkfd.c
	src/corelib/codecs/qtextcodec.cpp
	src/corelib/kernel/qmetatype.cpp
	src/corelib/tools/qset.qdoc
	src/gui/accessible/qaccessible.cpp
	src/gui/image/qpixmapcache.cpp
	src/opengl/qgl.cpp
	src/tools/qdoc/generator.cpp
	src/widgets/kernel/qwidget.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
2015-08-06 10:54:01 +02:00
Thiago Macieira
84e1bb4951 Fix warnings about unused variables
Found by ICC
qglengineshadermanager.cpp(427): warning #177: variable "none" was declared but never referenced

Change-Id: Id3d5c7bf4d4c45069621ffff13f758ffaf1744d7
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-06 04:53:33 +00:00
Friedemann Kleint
44520dfff6 QtGui/QtOpenGL: Fix compiler warnings by MSVC2015 (64bit).
opengl\qtriangulatingstroker.cpp(130): warning C4305: '=': truncation from 'double' to 'float'
opengl\qtriangulatingstroker.cpp(546): warning C4305: '=': truncation from 'double' to 'float'
opengl\qopenglshaderprogram.cpp(1779): warning C4312: 'reinterpret_cast': conversion from 'int' to 'const void *' of greater size
qglshaderprogram.cpp(1709): warning C4312: 'reinterpret_cast': conversion from 'int' to 'const void *' of greater size

Change-Id: If1de629aada308d18c3641b504d74d3294b1e8bf
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-08-03 20:15:30 +00:00
Morten Johan Sørvig
dcd2debe62 Enable non-integer device pixel ratio
Work around QPaintDevice::metric's int return type
by adding a new metric that returns a scaled devicePixelRatio.
Choose a scale factor that gives us more than enough
range.

The QPaintDevice::devicePixelRatio() convenience accessor
is public API and can unfortunately not be changed
to return a qreal. Add devicePixelRatioF() which
returns the (unscaled) devicePixelRatio.

Change all call sites of QPaintDevice::devicePixelRatio()
to use QPainDevice::devicePixelRatioF().

Task-number: QTBUG-46615
Change-Id: I97ec4000fe379b7ff5e1624a871ae2512790aad9
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-07-30 04:04:01 +00:00
Nico Vertriest
e6ddae07e1 Doc:added doc to undocumented functions
Task-number: QTBUG-36985
Change-Id: Ic358682b276d67ef804f727bcf14191718613469
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-07-22 13:47:23 +00:00
Friedemann Kleint
a299ae3dc4 Fix some qdoc-warnings.
qtbase/src/corelib/io/qdatastream.cpp:501: warning: Undocumented enum item 'Qt_5_6' in QDataStream::Version
qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp:1764: warning: Undocumented parameter 'model' in QItemSelectionModel::setModel()
qtbase/src/corelib/statemachine/qabstractstate.cpp:216: warning: Undocumented parameter 'active' in QAbstractState::activeChanged()
qtbase/src/corelib/statemachine/qstatemachine.cpp:3262: warning: Undocumented parameter 'running' in QStateMachine::runningChanged()
qtbase/src/corelib/tools/qchar.cpp:160: warning: Undocumented enum item 'Unicode_7_0' in QChar::UnicodeVersion
qtbase/src/gui/image/qimagereader.cpp:1168: warning: Undocumented parameter 'enabled' in QImageReader::setAutoTransform()
qtbase/src/gui/image/qimagewriter.cpp:621: warning: Undocumented parameter 'transform' in QImageWriter::setTransformation()
qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:1268: warning: Undocumented parameter 'tristate' in QStandardItem::setAutoTristate()
qtbase/src/gui/kernel/qscreen.cpp:590: warning: Undocumented parameter 'orientation' in QScreen::orientationChanged()
qtbase/src/gui/kernel/qscreen.cpp:599: warning: Undocumented parameter 'orientation' in QScreen::primaryOrientationChanged()
qtbase/src/gui/text/qtextdocument.cpp:1455: warning: No such parameter 'from' in QTextDocument::find()
qtbase/src/gui/text/qtextdocument.cpp:533: warning: Undocumented parameter 'option' in QTextDocument::setDefaultTextOption()
qtbase/src/widgets/itemviews/qtableview.cpp:2546: warning: Undocumented parameter 'enable' in QTableView::setSortingEnabled()
qtbase/src/widgets/statemachine/qkeyeventtransition.cpp:119: warning: Undocumented parameter 'key' in QKeyEventTransition::setKey()
qtbase/src/widgets/widgets/qplaintextedit.cpp:1610: warning: Can't link to 'toText()'
qtbase/src/opengl/qgl.cpp:4371: warning: No documentation for 'QGLWidget::event()'

Remove the documentation as they are properties:
qtbase/src/widgets/widgets/qfontcombobox.cpp:407: warning: Undocumented parameter 'font' in QFontComboBox::setCurrentFont()
qtbase/src/widgets/widgets/qfontcombobox.cpp:403: warning: Undocumented parameter 'script' in QFontComboBox::setWritingSystem()

Change-Id: If599a3ce747bbb8a3418dd973810923b87246371
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-07-10 18:01:39 +00:00
Marc Mutz
db5e672acc QtOpenGL: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: I16c93bd36c242a6d402cf7622820e91eac782772
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-07-06 11:32:44 +00:00
Marc Mutz
9cb68cdea0 Make QWidget *=0, Qt::WindowFlags f=0 functions use Q_NULLPTR
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: If9721e8b1ab3b4cd6e3e366362cae314f451bbed
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-07-04 06:03:52 +00:00
Liang Qi
0aa2d318b1 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qglobal.h
	src/corelib/global/qsysinfo.h
	src/corelib/global/qsystemdetection.h
	src/corelib/kernel/qobjectdefs.h
	src/plugins/plugins.pro
	tests/auto/widgets/itemviews/qlistview/qlistview.pro

Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
2015-07-01 11:05:26 +02:00
Nico Vertriest
a7f2af0911 Replace MAC OS X with OS X
Task-number: QTBUG-46374
Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-06-30 07:33:31 +00:00
Holger Hans Peter Freyther
8b81f89dff Delete the d_ptr in the destructor
The d_ptr variable is introduced by QGLCustomShaderStage and
needs to be fully handled by it. Delete the d_ptr in the dtor

Fixes Coverity CID #10995.

Change-Id: I76bf05206acf23363419afc95094f5593e808a2e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-12 12:18:03 +00:00
Simon Hausmann
e2f66f9215 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qwindowspipereader.cpp
	src/corelib/io/qwindowspipereader_p.h
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/plugins/platforms/xcb/qxcbconnection.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/tools/qmake/tst_qmake.cpp
	tests/manual/touch/main.cpp

Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
2015-06-03 10:23:56 +02:00
Allan Sandfeld Jensen
218e6cc6c9 Fix subpixel rendered text in QGLWidget
Subpixel rendered text doesn't work in the old OpenGL paint engine
because it assumes the glyphs are returned in RGB32 format, when they
may be in ARGB32. This patch changes the test of the returned format
to just check for 32bit matching the logic in the new OpenGL paint
engine.

Change-Id: Ib5b784dedba51cf22f216e2f035361518610b96b
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-05-30 17:20:01 +00:00
Volker Krause
337c279215 Make data tables const.
Moves some of them to the .rodata section, the rest at least to
.data.rel.ro[.local].

Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-05-05 05:31:32 +00:00
Marc Mutz
103086e379 Replace <qhash.h> with <qhashfunctions.h> where applicable
To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5)
in public headers.

Change-Id: Ic3398f4f330e15a3b55065858add26b90fd70e6c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:41:27 +00:00
Friedemann Kleint
3203ac3f4e Use QDebugStateSaver to restore space setting in stream operators.
Returning dbg.space() breaks formatting on streams that already
have nospace() set.

Change-Id: I55e38b018679a67eb40be6b4664505483a3a7d8e
Reviewed-by: David Faure <david.faure@kdab.com>
2015-03-30 12:59:58 +00:00
Thiago Macieira
f43a624ab8 QtOpenGL: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c946886247a98a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-26 06:11:11 +00:00
Morten Johan Sørvig
5c379f3ff0 QGLWidget: make renderText() work in high-dpi mode
Keep the win_x/y position in device independent
pixels. Call glViewport with the device pixel size.

Change-Id: I96fa038b1a0a3e18cb7f467b65def09cb89692a3
Task-number: QTBUG-38778
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-23 08:05:30 +00:00
Allan Sandfeld Jensen
3f858a0772 Remove some uses of the private Q_PI constant
The patch removes several uses of the private Q_PI constant and removes
the qmath_p.h from the includes. A few places are optimized to multiply
with reciprocals instead of dividing by Q_PI.

Change-Id: I097af6a929e0609d6935563064e81c856005f4bc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-02-26 20:31:20 +00:00
Frederik Gladhorn
34b14a8472 Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
	examples/xml/htmlinfo/simpleexample.html
	examples/xml/rsslisting/rsslisting.cpp
	qmake/generators/win32/msbuild_objectmodel.cpp
	src/3rdparty/harfbuzz-ng/src/hb-private.hh
	src/corelib/global/qlogging.cpp
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/thread/qwaitcondition_unix.cpp
	src/gui/kernel/qguiapplication.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	src/testlib/doc/src/qt-webpages.qdoc
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp

Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
2015-02-24 21:02:08 +01:00
Giuseppe D'Angelo
edd555425a QtOpenGL: avoid crashing if creating a QGLContext sharing with the global QOpenGLContext
If one asks for the global OpenGL context via the right attribute,
and then creates a QGLContext sharing with that context, Qt will
create anoter, dummy QGLContext owned by the global context.

At application shutdown, and specifically after ~QObject of QGuiApplication
has run, the QObjectPrivate dpointer gets destroyed. That destroys the
owning global QOpenGLContext, and therefore that dummy QGLContext as well.

However, QGLContext dtor triggers a code path that accesses qApp as
if it were still alive. That's not the case any more -- it has already
been destroyed. So, introduce a check and avoid dereferencing NULL.

Task-number: QTBUG-44621
Change-Id: Ic160ac99e9269db999e76229b1c7f8c53bd2be61
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-02-24 13:18:38 +00:00
Nico Vertriest
d5f55d9870 Doc: mod to correct OpenGL link error
Task-number: QTBUG-43810
Change-Id: I691cdeced3f857e2dcf9bda5d65207065c454635
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-02-24 08:43:50 +00:00
Allan Sandfeld Jensen
515e802ae2 Use C++ <cmath> instead of <math.h>
Including math.h can pollute the default namespace, and break
some compilers if cmath versions of the method are declared as using.

Switching to C++ math functions also greatly simplifies handling of
float qreal as C++ automatically chooses the right method.

[ChangeLog][QtCore][QtMath] qmath.h no longer includes math.h, so any
sources depending on that indirect inclusion may fail to build.

Change-Id: I4d0e331dafba354ec05dc5052e61ef4ff8d387fe
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-02-16 16:21:15 +00:00
Jani Heikkinen
2b75c156b6 Updated BSD licensed file headers
Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-15 07:41:17 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Outdated header.LGPL removed (use header.LGPL21 instead)

Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)

Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination

Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
2015-02-11 06:49:51 +00:00
Frederik Gladhorn
aaff94c2df Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/corelib/tools/qbytearray.cpp
	src/gui/kernel/qplatformsystemtrayicon.cpp
	src/gui/kernel/qplatformsystemtrayicon.h
	src/plugins/platforms/xcb/xcb-plugin.pro

Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
2014-12-29 16:37:38 +01:00
Lars Knoll
384558d78a Qt OpenGL is deprecated with 5.4. Show that in the docs as well
Change-Id: Idadf24d5331443d2c947a633029c7d4ea2305caf
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-12-18 09:48:37 +01:00
Konstantin Ritt
a69b2c0168 [QStaticTextItem] Drop unused members
The QStaticTextItem's `chars` and `numChars` members are never used,
even when set. In fact, there is nothing useful we can do with the input
string in the absence of clusters mapping.

Change-Id: I81fcbce3e575f4d0dcfc2515286d512b858f592b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-12-14 05:29:25 +01:00
Olivier Goffart
5180f32c5a Add Q_DECL_OVERRIDE in the src subdirectory
Done automatically with clang-modernize on linux

(But does not add Q_DECL_OVERRIDE to the function that are marked
 as inline because it a compilation error with MSVC2010)

Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-12-03 09:57:11 +01:00
Laszlo Agocs
954552ceac Update fbo toImage() docs regarding premultiplied alpha
Task-number: QTBUG-42510
Task-number: QTBUG-37261
Change-Id: Ic11bec0a25e66df9d022f640621686be867e84d2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-11-17 10:16:35 +01:00
Samuel Rødal
f79d96b486 Fixed QtGui's GL paint engine getting out of sync when using QtOpenGL
We need to reset the active_engine belonging to QOpenGLContext whenever
we make the QtOpenGL paint engine active, to give the OpenGL paint
engine in QtGui a chance to sync its state if we've used the QtOpenGL
paint engine inbetween.

Change-Id: I445ce2f99bfbacf55650c881c4fdf07f2ff85069
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-11-11 19:24:34 +01:00
Samuel Rødal
a4428d480b Fix for current_fbo getting out of sync in QtOpenGL
When using QGLWidget in combination with QOpenGLFramebufferObject from
QtGui, instead of QGLFramebufferObject from QtOpenGL, the current_fbo
variable doesn't get updated when framebuffer object bindings change.

To ensure that the QGLWidget correctly releases the currently bound
framebuffer object when using a QPainter, we keep track of whether
QOpenGLFramebufferObject has modified the current FBO binding, and if
that's the case we need to read the OpenGL state directly instead of
relying on a cached value.

Change-Id: If7e0bd936e202cad07365b5ce641ee01d2251930
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-11-11 19:24:29 +01:00
Nico Vertriest
54853c5f66 Doc: Use title case in section1 titles
Using Python script title-cased.py

Task-number: QTBUG-41250
Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-30 13:52:51 +02:00
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
Laszlo Agocs
92404c9cdb Mark the remaining QGL classes as obsolete
Many of them are already marked. Do it for the rest (QGLWidget et al).

Change-Id: I506d72ad20f8ef39981dbeee0df49229bcf748a7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-10 21:43:13 +02:00
Frederik Gladhorn
ca524e5b70 Merge remote-tracking branch 'origin/5.3' into 5.4
Manually included changes from
3a347a4e70
in src/opengl/qgl.cpp.

Conflicts:
	src/opengl/qgl_qpa.cpp
	src/plugins/platforms/android/androidjnimain.cpp

Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
2014-08-12 13:05:02 +02:00
Laszlo Agocs
611558d877 Modernize the OpenGL examples
Change them to use QOpenGLWidget and QOpenGLTexture.
Advocate also the usage of VBOs.

Hopeless examples, that rely on the fixed pipeline and will
not compile or work in ES and dynamic builds, are moved to
a "legacy" directory. The documentation pages for these are
removed. This long due change avoids the confusion newcomers
experience when trying to get started with Qt 5 and OpenGL.

hellowindow's behavior is changed to open a single window only
by default. The old default behavior, that opened three windows
on platforms that supported both MultipleWindows & ThreadedOpenGL,
can be requested by passing --multiple. --single is removed since it
is the default now. This plays much nicer with drivers that have
issues with threading.

In addition, say hello to hellogl2.

This is the old hellogl example updated to use QOpenGLWidget and
OpenGL 2. It also has a mainwindow with multiple (un)dockable widgets
containing the OpenGL widgets. This helps testing the behavior when
the top-level of the QOpenGLWidget changes and provides a very
important example of how to do proper resource management in this case.
(must use aboutToBeDestroyed() of the context, since the context goes
away and is replaced by a new one on every dock/undock)

As a bonus, the logo is now real 3D, no more orthographic nonsense.

Launch with --multisample to request 4x MSAA.

Launch with --coreprofile to request 3.2 Core. In this particular example
the shaders are present in both versions and there is a VAO so the application
is functional with core profile contexts.

Change-Id: Id780a80cb0708ef164cc172450ed74050f065596
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-12 07:47:23 +02:00
Marc Mutz
31f2b7e591 Use NAmE spelling of grey (gray)
These occurrences are only in docs or code comments.

Change-Id: Ia114466a85c01e2b978396c329153044921fb20b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-08-09 09:05:57 +02:00
David Fries
3a347a4e70 OpenGL: destroy QGLContext allocated by QGLContext::fromOpenGLContext
QGLContext already uses ownContext to identify when it "owns" QOpenGLContext
and will delete QOpenGLContext when needed.  In the other way
QGLContext::fromOpenGLContext creates a QGLContext for QOpenGLContext, and is
now using qGLContextDeleteFunction to identify if QOpenGLContext "owns"
QGLContext by QGLContext only passing a delete function when QOpenGLContext
should delete QGLContext, and by QOpenGLContext calling deleteQGLContext() from
destory() to do the destruction avoiding the previous leak and sometimes crash
on exit.

Change-Id: I65e791776e99b456e4d0c70fc5b5cdb33c975893
Task-number: QTBUG-40286
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-05 17:30:03 +02:00
Frederik Gladhorn
0936bc54f9 Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	config.tests/arch/arch.cpp
	src/opengl/qgl_qpa.cpp
	src/widgets/kernel/qapplication.cpp

Change-Id: I80b442a4c2c9632743a5b5c7319ff201ec5bc4fd
2014-08-04 09:51:36 +02:00
Laszlo Agocs
e453484bca Make QOpenGLWidget public
QOpenGLWidget is now public.

In addition Qt::WA_AlwaysStackOnTop is introduced to support the
special case of semi-transparent QOpenGLWidget or QQuickWidget on
top of regular widgets.

hellogl_es2 becomes the qopenglwidget example. This example performs
painting both via QPainter and native GL commands and has the OpenGL
widget combined with other, normal widgets.

The widget stack receives some changes when it comes to renderToTexture
widgets like QQuickWidget and QOpenGLWidget. Calling update() will now
result in a paint event, which is essential for QOpenGLWidget since we
want it to behave like a regular widget. The dirty region handling is
extended specially for such widgets due to performance reasons.
(an OpenGL content update must not result in any backingstore painting,
and is thus handled as a different kind of dirtiness)

[ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget.

Task-number: QTBUG-36899
Task-number: QTBUG-40086
Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-08-01 17:13:59 +02:00
Laszlo Agocs
07e1f524f3 Propagate swapInterval to QGLFormat
Task-number: QTBUG-39370
Change-Id: Ib3a46a0ae24e5f6d690625b1d91be9e599bbc927
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-07-31 12:51:49 +02:00
Allan Sandfeld Jensen
b6ba4ac00d Unduplicate the implementations of next power of two
Qtbase contains four identical implementations of next power of two,
these should be shared and the implementation made available to other
qt modules, as it is also used many places outside of qtbase.

[ChangeLog][QtCore][QtMath] Introduced qNextPowerOfTwo methods.

Change-Id: Id23fbe5ad6bae647b30d5a4212c0330e48a50278
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-26 00:47:51 +02:00
Laszlo Agocs
ee88ed8fab Include the ES3 headers on iOS
The config test correctly recognizes if GLES 3.0 is
available, however qopengl.h still includes the ES2
headers. This causes issues for the new GLES3 support
patches.

Change-Id: Ia97f556cc207f7d828918f493fe1adab93cf31ec
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-25 12:39:30 +02:00
Laszlo Agocs
f7ddbcb3d5 Remove tracking of the current fbo
When binding an FBO directly via glBindFramebuffer, the QOpenGLContext's
internal current_fbo, that is maintained by QOpenGLFramebufferObject,
becomes out of sync. This will lead to QOpenGLFramebufferObjects thinking
they are still bound.

Such state tracking should be avoided since it is becoming increasingly
difficult to keep it consistent between the various OpenGL API wrappers
and will never be robust enough when the application changes the state by
directly calling OpenGL functions.

current_fbo is now removed in QtGui. QtOpenGL is not touched.

Change-Id: Id809aab1306c9486d1e2ba3bb5aa93593659e920
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-02 09:31:10 +02:00
Tor Arne Vestbø
768f59202d qpa: Merge qgl_qpa.cpp into qgl.cpp
Change-Id: I91cfd7daf7f1dd88659019ccc671ec0d9245067f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-15 02:51:06 +02:00
Frederik Gladhorn
1326cd15f7 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	mkspecs/qnx-x86-qcc/qplatformdefs.h
	src/corelib/global/qglobal.h
	src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
	src/opengl/qgl.cpp
	src/opengl/qglpixelbuffer.cpp
	src/opengl/qglshaderprogram.cpp
	tests/auto/opengl/qglthreads/tst_qglthreads.cpp

Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
2014-05-06 16:50:03 +02:00
Frederik Gladhorn
e6286ca289 Merge remote-tracking branch 'origin/release' into stable
Manually fixed up: isES -> isOpenGLES
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp

Change-Id: I57d2ef26c3d4a7b40ace09f4e8560b7686650ea5
2014-05-03 00:56:41 +02:00
Frederik Gladhorn
ccc6efb6e9 Merge remote-tracking branch 'origin/release' into stable
This merge adds the opengl rename.

Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
2014-05-01 13:08:42 +02:00
Laszlo Agocs
33d0a8d753 Remove direct OpenGL calls from QtOpenGL
Task-number: QTBUG-36483
Change-Id: I96dea5649c0a49a11cd2ff31da659cd2067e769d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-28 18:19:34 +02:00