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>
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>
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>
Replace null and '\c nullptr' with \nullptr in the documentation.
Change-Id: I58934eea06943309ba895833f1991629870ab45b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
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>
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>
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
Silence warnings about signed constants being shifted out of int range.
Change-Id: I5dc397de71f4de09e54ce3cbc0f8e3a1cf977b03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Clang needs to see declarations for GLclampf, GLSizei,
and GLboolean.
Change-Id: Id1c1310e4877b32bb8fc2e6d4f743999842b3f06
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
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>
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>
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>
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>
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>
Angle does not support glGetBufferSubData.
Task-number: QTQAINFRA-1199
Change-Id: I17f99027cc374131965d6589d2babacb75f9174a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
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>
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>
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>
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>
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
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>
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>
Fix the occurrences where the wrong classes are mentioned.
Change-Id: Ia291af77f0f454a39cab93e7376a110c19a07771
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
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>
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>
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>
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>
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>
... instead of using removeAt in a loop, with quadratic complexity.
Change-Id: I38b49e56b12c396db9fc0f1b75d8fb43c503a7f6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Returning dbg.space() breaks formatting on streams that already
have nospace() set.
Change-Id: I55e38b018679a67eb40be6b4664505483a3a7d8e
Reviewed-by: David Faure <david.faure@kdab.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
These occurrences are only in docs or code comments.
Change-Id: Ia114466a85c01e2b978396c329153044921fb20b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
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>
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>
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>
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>
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>