To prevent profiling and debugging tools from generating misleading
"errors", call glGetString only for ES and GL < 3.0.
Task-number: QTBUG-35173
Change-Id: I4fe3b048fff4cda948152e2ceeb1347f2b0e4ca5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Do not try to be clever, this format works always.
Using RGBX8888 for windows without alpha buffer was a bad idea because
it broke renderToTexture widgets (QQuickWidget, QOpenGLWidget) which
failed to properly draw the transparent rect with this format.
Change-Id: I295d2f8c17490b59cc5e6b9d81035360da28ab3d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Check result in initTestData().
Previously, QFINDTESTDATA() was repeatedly invoked in init(). The
data-driven cd() test then failed when invoked stand-alone since
cd_data(), which relies on the data path, is executed before init().
Task-number: QTBUG-40067
Change-Id: I91039247e8dcaedd92fa990f1b5f82bc54b17c60
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This will simplify future maintenance of qdoc, adding options being
much easier with QCommandLineParser.
As always, this revealed a number of undocumented options:
-log-progress, debug, -autolink-errors.
Compared generated docs with and without the patch, looked fine,
except that order differs (the qt_qhash_seed thing doesn't work)
Based on initial patch by Laszlo Papp.
Change-Id: I3c851135f2fd573d622d2ed456a11cee34e06054
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Improve the existing docu for Qt::ToolButtonFollowStyle in QToolButton
and show the same text in all other widgets that have toolButtonStyle property
(QToolBar and QMainWindow).
Change-Id: I26ff0ed332f8bd10b542a4111c6ae48a963d5667
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
With "QExplicitlySharedDataPointer::QExplicitlySharedDataPointer( const
QExplicitlySharedDataPointer<X> & other)" implicitly doing an
static_cast<T *>(...) on other.data(), this could lead to dangerous use
of this copy constructor.
Example code:
QExplicitlySharedDataPointer<Base> base(new Base);
QExplicitlySharedDataPointer<Derived> derived(base); // that works!
This patchs disables the use of the static_cast, and adds a new define called
QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST to re-enable
that code path.
Note, that the other way-around (assigning 'derived' to 'base') still
works as intended.
Other side note: QtXmlPatterns is relying heavily on the hidden
static_cast "feature". The other default Qt modules compile fine with
the static_cast removed.
[ChangeLog][Important Behavior Changes] QExplicitelySharedDataPointer's
copy constructor which performs a static_cast from "X *" to "T *"
(when constructing a QExplicitlySharedDataPointer<T> from
a QExplicitlySharedDataPointer<X>) doesn't perform a static_cast
from "X *" to "T *" any more. Instead, an implicit cast is now
performed. This change will break compilation of code that
relied on the downcast (i.e. cast towards a more derived type) of the
templated type when copy costructing a QExplicitelySharedDataPointer
object. Please refer to the class documentation for more information
about this issue and a workaround to keep old code compiling.
Change-Id: Id32aba6cda4e6d44728d7bc3a5c0c7a20f19adc6
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove the "As of Qt 5.4" to avoid misunderstandings.
Also add the note for the classes that miss it.
Change-Id: Id7f437954bb3ec12c0fc944c18e58e6e977863f1
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
A lot of code in QHash is doing casting to QHashNode while the pointer
may be of type QHashDummyNode. This is a lot of undefined behavior.
Remove QHashDummyNode and specialize QHashNode for QHashDummyValue instead.
QHashDummyValue is the only type for which QTypeInfo::isDummy is true.
Q_DUMMY and QTypeInfo::isDummy are internal API, so is QHashDummyNode, so
we can remove them.
Task-number: QTBUG-40029
Change-Id: I60c2ff0933075b9202bde89a9992746052f75133
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Example with this code:
"template <class Key> struct QHashNode<Key, QHashDummyValue> {"
The previous regexp would take "QHashNode<Key," as some keyword,
and "QHashDummyValue>" as the class name. By forbidding '<' in the
keyword, we avoid such mistake
Change-Id: I5d5077b9e5e764e91899bcaef137d99214ea5d63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Moved to qtbase/examples/xml/streambookmarks.
Files: qxmlstreambookmarks.qdoc and png files
Change-Id: I6edf975f1e0666a4283e65c933d31923695f8b4c
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Introduce an enumeration for the rows/columns and
use std::find() to find the matching colors.
Change-Id: If8b7f76d48beab470f6cac0bfdeaf56058237e94
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Since we have no interest in fixing HB-old to properly support surrogates,
here is a simple workaround for the case when surrogate parts gets
treated like two separate glyphs in log_clusters but a single character.
And since it's a known issue that HB-old doesn't really support surrogates,
it's better to draw some garbage/boxes rather than to assert, IMO.
Task-number: QTBUG-39875
Change-Id: I95ff43e821ae989d7a6f792f71f157dcea92dd16
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Use the findItem()'s optimized binary search impl instead of a generic one.
Also drop the "already shaped item" case since setBoundary() is only
called from itemize(), where the items are not shaped yet.
Change-Id: Ifbecdc41b2e3cb7791a7896fbb0cbea439ca0706
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
We have to escape the target name to avoid compilation errors.
This fixes the compilation failure in the qprocess autotest.
[ChangeLog][Android] Added support for building libraries with
spaces in name.
Change-Id: Ib98ba261fb3a4cc1e835d0cd2f93aac6855a7c21
Reviewed-by: BogDan Vatra <bogdan@kde.org>
At some point since Qt 4.8, the nbsp character has acquired
the whitespace attribute, causing it to be treated exactly
like an ordinary space. To account for this, we add an extra
check in the layout code to avoid breaking on non-breaking
spaces even if they have the whiteSpace flag set.
This is a temporary fix for the regression. The line breaking
algorithm needs to be refactored and support Unicode tr14
properly, which it currently doesn't.
[ChangeLog][Text] Fixed lines breaking on non-breaking spaces.
Task-number: QTBUG-39832
Change-Id: Ibd7e1a11ce4b82c611ecda1542c8638a67bf3cae
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
If none of the other locations work, we can fall back to bundling
the test data in qrc to make it possible to include test data on
platforms that do not have any good way of deploying files to the
traditional file system, like Android.
Change-Id: I7779ce6be2380d551697cecfb9f76652d1fd0a38
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
The physical size should be set based on the screen size, not
the available geometry. This used to work in Qt 5.3.0 because
the screenSize and size of the available geometry was identical
on startup, but in Qt 5.3.1 the available geometry is 0x0 until
there the metrics are actually available to avoid flickering on
startup, so this caused a regression.
[ChangeLog][Android] Fixed regression where QScreen::physicalSize()
would return 0x0.
Change-Id: I6c2ee11205427a88764e129b05ece6d3fbbf4c99
Task-number: QTBUG-39978
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Fix updating of the drop cursor when the user presses/releases the
shift key while dragging.
Task-number: QTBUG-39822
Change-Id: I1d9d3a80d349f7e405db24f8f7dc372428c34f52
Reviewed-by: David Faure <david.faure@kdab.com>
On Windows QApplication::cursorFlashTime() can return -1 if keyboard
blinking is disabled. Add documentation for that case.
Change-Id: I1e5d683573e55b045e2d9bd9804daf4be579fd02
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
the windows version is already sane in this regard
Change-Id: Ib9c6fa35ede0e5e98b38b7b97086b9245c79d48f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
[ChangeLog][configure] The -process/-fully-process/-dont-process options
have been removed due to being unnecessary and counterproductive.
-fully-process has always been broken to a degree under unix (and since
5.0 under windows) - rcc isn't built before running qmake -r, so the
dependencies are unreliable (and there are many warning messages from
qmake).
also, it is a lot slower nowadays, as qmake -r is not parallelized.
-dont-process doesn't make any sense any more - even if you don't need
the Makefile for some obscure reason, the time spent on creating it is
not relevant without the recursion.
this leaves -process as the only option.
Task-number: QTBUG-36955
Change-Id: Ifd3949d9ff773780646c6f65db1629e1c19e53d2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
the generated projects aren't optimal for building qt anyway (as rcc is
not built yet, dependencies are missing), and the added value isn't all
that great to start with (Qt devs typically use Qt Creator nowadays).
the -no-qmake-deps option was also removed, as it affected only -vcproj.
[ChangeLog][configure] The -vcproj option was removed. Use "qmake -r
-tp vc" _after_ building Qt in case you want to use VS to work on Qt.
Change-Id: I0207d1a89a83b70991a63a7d121a9de4cb685ca5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
One line in the code snippet wasn't translated whlie the others were.
Change-Id: Ie77a317833f800087b485609cd001dd26060a40f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Add function returning the screen for a new geometry for geometry
change events. This ensures that the checking is done in platform
screen coordinates (which might differ from QScreen coordinates
due to high-DPI changes) and also that no screen changes are
emitted for child windows.
Change-Id: I406750f59f006f834c386d09c0c85a804014924a
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This makes it possible to retrieve the GLXFBConfig used by Qt to
create the GLXContext. QtWebEngine on desktop needs this so that
Chromium can use the same config as Qt to eliminate BadMatch errors.
Change-Id: If18c0937b5af3e457ddbfda035e5d652230211c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This allows QtWebEngine to use the class API on top of the
Chromium network stack.
Change-Id: If595e30cfa6ecdc62cba8453d8f57ddccc1793d9
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Value interfaces on OS X and iOS can be strings, so can the value
property of MSAA. Before we'd always only send doubles, instead
change it to use strings as well.
Change-Id: I1b4410c68238ba7a69a5507d87c251f2ac61c568
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
This only ocurred in -opengl dynamic builds on Windows, when using
ANGLE. The !QT_OPENGL_ES_2 code path did not correctly check for ES.
We also need to avoid using REPEAT, just to be safe on ES2 implementations
(embedded devices typically) that will not do repeat on non-power-of-two textures.
Task-number: QTBUG-39638
Change-Id: I2eeab6627c17255373193c0a0fec8923f711e28c
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This is trickier than the GLX and EGL implementations due to the
way pixel formats, windows and contexts work. Apart from some
restrictions, it should be fully functional nonetheless.
Add also some proper documentation.
Change-Id: Ia6e3eb1ab2701e439b8621b9092c2b0934ff2151
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
In places where we call java/jni functions that can throw exceptions,
we check and clear the exception, if necessary. This change moves
the "checking" code into a single (private) function.
Change-Id: Ic3de2be51305972b096e1ed0a477e341eb5d9404
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
The grabWindow API basically should return a screenshot at the window
location. On QNX only the SCREEN_DISPLAY_MANAGER_CONTEXT can read from
the screen which will require root privileges.
At least this will fix some QWidget auto tests that rely on this API.
Change-Id: I350233173d3aecd376f48af9f650606a5cce6205
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
QMetaType::create can call user code and we should not keep mutex held as
this may cause dead lock.
Make sure the tst_qobjectrace actually emit some signal so the test check
there is no race if the receiver object is destroyed while
the mutex is unlocked.
Task-number: QTBUG-39990
Change-Id: I56ca1ae7a11cd7b33c1a68727370972862e11c2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It isn't a particularly complex operation, but why waste CPU cycles?
This is the kind of function that should be declared pure/const.
Change-Id: I13f03ef0f87607f7649c66beeb37614a31ef2a10
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
MSVC 2013 implements the behavior mandated by C++11 that removes the
ability to downconvert a string literal to a modifiable char*, but it's
not enabled by default. This option turns it on.
It's only enabled for release builds because the compiler page has a note
saying the Standard Library has bugs that prevent it from working in
debug mode. See http://msdn.microsoft.com/en-us/library/dn449508.aspx
Visual Studio "14" has this fixed.
[ChangeLog][Compiler Specific Changes] Release builds with Microsoft
Visual Studio 2013 now enable the standard-conforming C and C++ strict
string behavior. This option will be enabled in all builds with future
Visual Studio versions. Non-conforming code should be fixed for maximum
portability and correctness. See
http://msdn.microsoft.com/en-us/library/dn449508.aspx for more
information.
Change-Id: If5ba6cc8456209b268e047d1010710fe332b8312
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Architectures missing were arm64, mips64, power64, s390x and sparcv9
(sparc64, but we're using the name that matches the Q_PROCESSOR_xxx
define, which in turn matches Solaris's psrinfo output).
Change-Id: I50b8152b3c42589b98db157b9efeae2be6a90414
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The GCC documentation says that a const function is not allowed to read
global memory. This needs to be clarified: it's not allowed to read RW
global memory. It's fine to read read-only memory, as that is equivalent
to just pure code.
The QChar static out-of-line functions only lookup a property of the
given Unicode character and always return the same value.
The only exception is the decomposition() function, which returns a
QString and is therefore not allowed to be marked const.
Change-Id: Id36b2f84a1b8ff9db5acf1d4e59e8b3811068cff
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This macro is no longer used. It was introduced probably by mistake,
due to MSVC not following the strict string requirement of the C and
C++ standards by default (you can assign a string literal to a
non-const char*).
Change-Id: I4b221dd435191b0eea689dbed35915cf3206648b
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When keyboard blink is disabled, msec will be negative (-2 in my case).
In that case if (msec) will evaluate to true and create a QTimer
with a negative interval. Fix is to check for msec > 0.
Change-Id: I5c8d82c3cdaf26a961c986f4164805aacfe3ae37
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>