This patch makes Qml Classes get written to tag files the same as C++
tags.
Task-number: QTBUG-40551
Change-Id: I4a1973eeed6f7c2fdb65686c50e6ae4d273c9d7a
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Martin Smith <martin.smith@digia.com>
If the back key was pressed when no window was
visible, such as during startup, the app would be
killed without notice. This change makes sure that
we always give the app a chance to intercept the
back key before killing the application.
[ChangeLog][Android] Back key no longer kills the application
when no window is visible.
Task-number: QTBUG-39688
Change-Id: If9373e8d26ff323d8c8a274fb30820ecc4ca66ab
Reviewed-by: BogDan Vatra <bogdan@kde.org>
It was originally created to avoid allocating memory for the QString at
every turn, but we have QStringLiteral for that today. It has also
served a very good run by catching qatomic.h implementations that had
bad cv qualifications.
Change-Id: Id6d952b8cce363015ec2611d346b4cccedecf137
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
The table interface may be implemented without having a QObject.
Change-Id: I59b9bef29494296149bc1023db933b7c5d762cac
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Make the functions work consistently. For example asking for the line at
the cursor position when the cursor was at the end returned an empty
line before.
Task-number: QTBUG-38500
Change-Id: I60fc78c7be129a59c83efcfce6d8fdd16f2c3f65
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
It is not valid to dereference a null pointer, even if it's just in order
to access enum constants
Change-Id: Id404c308ae7ffd879afdd678302e3ac4e0c69001
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
One can't dereference the null pointer value. Even to access a static member.
Change-Id: I5edc92d7886ccc7029d1f3c00a12de78b439f080
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@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
QExposeEvent::region() reports a region in a random coordinate system.
The behavior is undocumented and the platform plugins do different things.
xcb, offscreen and ios are correct. These set the region in local coordinates,
which is the most logical interpretation of the expose region.
windows is almost correct, except for one occurrence.
cocoa and others need changes: passing in geometry() as the exposed region is
always wrong.
The patch documents the expected behavior both for QExposeEvent and
internally in QWindowSystemInterface. The problematic plugins are fixed to
use local coordinates.
Task-number: QTBUG-40470
Change-Id: I6ded3154d14254fa71d4292d8e1b5e6cf696c81a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
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>
A recent change in qtdeclarative (60ed6a43) added an attached
property 'Window' to Item type, with property names identical
to the ones already available in Window. This caused QDoc to
report warnings for duplicate documentation for QML properties,
because there was no distiction between a QML property and an
attached property.
This change fixes the issue by:
- Allowing identical names for \qmlproperty and
\qmlattachedproperty
- Using distinct URLs/UUIDs/anchor references for them
- Marking attached properties with '[attached]' qualifier
in 'All Members' page.
This doesn't solve the issue of disambiguating between a
similarly named QML property and attached property when
linking from an external location. However, these can be
solved with the help of the \target command.
Task-number: QTBUG-40674
Change-Id: Icc74de237366e9897334689fe354ab83e4af0356
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
The core dispatcher lookup should be performed from the constructor
in all cases but the first (WinMain) thread, and only rechecked if the
thread changes.
Change-Id: I05f0c15b3e199994aa5d740b2092b42fb8d2f596
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
These methods assumed incoming data would have LF line endings, and
therefore broke when parsing files with CRLF line endings. This
simply removes the line feed from the header/footer strings, and switches
to QByteArrayLiteral while doing so.
Change-Id: I0c14634243c4bd7d19a6b5ef718b6ed1cc6bcdb2
Reviewed-by: Richard J. Moore <rich@kde.org>
This allows QSslKey to avoid converting to pem format if the backend
supports native der decoding.
Change-Id: I0822a21401ad0ca81c6eeb6c7d53c421e1e2e93a
Reviewed-by: Richard J. Moore <rich@kde.org>
Windows Phone didn't handle the base color enums well, and ARM was
getting incorrect colors due to different byte ordering. So, use the
Phone-specific enums where applicable and pass in the proper char sequence
for the color.
Change-Id: I7ffbc383c07d2160974560110fea221a204577ea
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
The calculation forgot to take the mirrored texture upload into account.
Change-Id: Ia69c9c4b9d852d9ac652e71aaa466c5387ff5bca
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Fix disconnection from pointer to member signal that belongs to the base
class, but whose type is a pointer to a member of the derived class.
Commit 9cc106d9d7 fixed connect, so apply
the same fix in disconnect
[ChangeLog][QtCore][QObject] Fixed disconnecting from pointer to member
signal that belongs in the base class but whose type is explicitly given
as a pointer to a member in the derived class
Task-number: QTBUG-40638
Change-Id: Ia546fc8f36e1ea0dd0645bdd820aea47f43677ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We have to document because we don't know how to fix the bug and don't
know when they will be fixed. We should also disable the unit tests
related to those functions, as they probably cause CI instability.
Task-number: QTBUG-24451
Change-Id: I0e60682ec4af7570258b13735339051ba8f4a6e4
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Take the correct number of samples from the widget's context, not the
tlw's context.
The original implementation did the blit only after paintGL(). This is
not sufficient for applications that override paintEvent() and do QPainter
calls in there (e.g. the 2dpainting example). Therefore the approach is
changed to perform the resolving of the samples in a function that is
invoked by QWidgetPrivate every time a paint event is sent.
Change-Id: Iae0b2c30f6070ec75201339a848854e4582a9c0c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Makes it possible to follow changes in activation an deactivation of a11y.
Needed for WebEngine to know when to activate a11y.
Change-Id: Ia264a76974224d1baad3e88c34a4b8a9f1a3695d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
QStyle is used, so include it explicitly instead of relying on
indirect inclusions.
Build was broken when using a bunch of QT_NO_ defines, not sure
which one triggers the failure though.
Change-Id: Ib07218521648448576f1b55d2d91d1711c048f09
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
viewportSizeHint() should be defined outside the QT_NO_DRAGANDDROP ifndef
Change-Id: I7c23c820ea58b3614eb030dc5b0f290ad891ccb1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We introduce QPlatformFontDatabase::isPrivateFontFamily() to allow
testing for private, system UI font families. Both QFontComboBox
and QFontDialog need to filter out those private font families
which, by definition, should be hidden from the end user.
(The textedit example had to be updated to fix the issue where the
default font would be private. In 5.4, we will be adding an equivalent,
public API in QFontDatabase, and a better solution for the textedit
example and QTexEdit in general).
In particular, on OS X and iOS, private fonts are used for the system
UI font. Those have their font family name prefixed by a dot.
QCoreTextFontDatabase knows about this, and makes sure those are
tested positive as private font families. In order to have a cleaner
layer separation, we moved the QPA theme font resolution from the
platform theme classes into QCoreTextFontDatabase for both Cocoa and
iOS QPA plugins.
In both cases, we use CoreText's CTFontCreateUIFontForLanguage(), that
nicely maps to the HITheme API we were using so far on Mac. That means
one HITheme dependency less. We also cache the font descriptors we get
for these font for each time QCTFD::populateFamilies() gets called.
(While not common, this currently happens in auto-tests, like
tst_QFontDatabase, and could happen in actual applications -- specially
when adding and removing application fonts.)
Change-Id: Ic6f0b60f9f597afee1a43596a669742dc546b97f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
It's actually a subset of the patch (tests, docs, other whitespace
fixes were dropped).
Fixes a stack overflow issue on pathological regexps reported upstream:
http://bugs.exim.org/show_bug.cgi?id=1515
Change-Id: Ie36536e820d79ff842d90efa6bec22b701423793
Reviewed-by: Richard J. Moore <rich@kde.org>
It's actually a subset of the patch (tests, docs, other whitespace
fixes were dropped).
Fixes a stack overflow issue on pathological regexps reported upstream:
http://bugs.exim.org/show_bug.cgi?id=1503
Change-Id: If080e4c1e7a86c86459bbbc631c8d8bb3cd7b99f
Reviewed-by: Richard J. Moore <rich@kde.org>
This is done by defining QMAKE_LFLAGS_RPATH for compilers for Apple platform.
Task-number: QTBUG-31814
Change-Id: I9040df341ad46395d6ab71bc760ba7a5ee5ff291
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Defaults qmake behavior is to make all project RPATHDIR paths absolute prior
passing them to linker. We need to make an exception for paths starting with @
such as @executable_path (Apple platforms) or $ such as $ORIGIN (Linux).
Task-number: QTBUG-31814
Change-Id: Ie9887c0046c5030c4128dda945b491a5d389ba34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
The native Windows Runtime file picker is required to support picking
of any file/folder from the system. Due to platform security restrictions,
the non-native file dialog is effectively useless when outside of the
application's installation or local storage directories.
This adds a QPA implementation for the WinRT file picker, as well as
a simple file system engine to handle files which were opened by the
picker. This necessary for platform security reasons, as it is not
possible to open files from arbitrary paths - only file handles opened by
the picker can be used, so these are kept inside this file system engine
and acted upon when a known path is observed.
The file system engine is only instantiated when needed, and may prove
useful for other areas of Qt (such as known folders/standard paths) which
must operate on a virtual file rather than an absolute path.
Task-number: QTBUG-37748
Change-Id: Ia4fd6c5065ac92101ce34adcb6c9026fbcff56df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Use QString::splitRef on platforms with case sensitive paths, to
avoid unnecessary allocations.
Change-Id: Iff331a5eb67c4cbaf1333e663e77290261c5b013
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
If the user requested the system xkbcommon with -system-xkbcommon, then
don't silently fall back to the bundled version if the functionality
test fails. Instead, print the an error notice.
Also note that the -xkbcommon argument didn't do anything, since it set
the variable to "yes".
Change-Id: I2c9e820bd076995aaaad987ecce76ebddcd79b4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The comparison, Latin 1 and UTF-8 benchmarks contained in this file are
stale. The implementation changed in Qt 5.3 and this benchmark couldn't
be updated (test data too large for Qt).
Please contact Thiago Macieira to obtain the benchmarks and test data.
Change-Id: I48c19b1f1711eb73c953a30ed4da510e97a62472
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit adds tests for ref-qualified member functions, the new
syntax for functions and decltype.
__PRETTY_FUNCTION__ for lambdas varies wildly between compilers and will
produce really bizarre results after cleanup. It's not tested and is
known to be broken.
Change-Id: I70c8dbcba54790357cecba35aa45c5cc672f29d1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
And correct the comment by listing more types that are available
Change-Id: I9cb4b664f97300357a55d81bc99dd542a29e933b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
On templates, adding constexpr makes a given instantiation constexpr
if it can be.
This turns qMakePair(0,0), say, into a compile-time constant.
The effects on existing code are small, but exist:
$ size lib/*{-baseline,-paircexp} | sort -nr
6516727 211192 2608 6730527 66b31f lib/libQt5Widgets.so.5.4.0-baseline
6516711 211192 2608 6730511 66b30f lib/libQt5Widgets.so.5.4.0-paircexp
5373720 44492 15976 5434188 52eb4c lib/libQt5Core.so.5.4.0-baseline
5373504 44492 15976 5433972 52ea74 lib/libQt5Core.so.5.4.0-paircexp
5107206 125072 6080 5238358 4fee56 lib/libQt5Gui.so.5.4.0-baseline
5107030 125072 6080 5238182 4feda6 lib/libQt5Gui.so.5.4.0-paircexp
1341290 30180 2600 1374070 14f776 lib/libQt5Network.so.5.4.0-baseline
1341210 30180 2600 1373990 14f726 lib/libQt5Network.so.5.4.0-paircexp
# no other libraries benefit
[ChangeLog][QtCore][QPair] Can now be used in C++11 constexpr contexts.
Change-Id: I3872e6aa33a7d02a168516f4dfa7119efcac8c40
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
These occurrences are only in docs or code comments.
Change-Id: Ia114466a85c01e2b978396c329153044921fb20b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
{,c}{begin,end}() were added post-5.3, in 1a6f490b, but weren't marked with \since 5.4.
Add it.
Change-Id: Ide743833144f784c7d09b125e7a22f9b184ed823
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
and make QByteArrayList be a simple typedef.
As a side-effect, the constructor taking a QByteArray is no longer
available since I couldn't find a way to add it to QList<T> when T is
QByteArray. My template-foo failed me. I tried:
- QEnableIf<is_same<T, QByteArray>::value, QByteArray>::type
=> makes QList fail to compile for any T that isn't QByteArray
- make the constructor a template member
=> it compiles if the parameter is a QByteArray, but not a const
char[4] like the test was
- inheriting constructors
=> runs into ICC and Clang bugs that I could not work around
Besides, the constructor with std::initializer_list is a superior
solution anyway.
Change-Id: Ic86fbadc1104142bfd907a5c4147199bf839fb89
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Instead of abusing inheritance to provide convenience constructors,
use simple inline constructor functions. The name got a lower-case
q to indicate a free function. The usual fromXYZ() static methods
were deemed not fitting in this case in the initial round of review,
since they implied some kind of conversion while these functions are
simply constructors of formsts, which contain no data.
This also solves the problem that some of these ctors could have been
called with just one argument and were therefore candidates for hidden
QPixelFormat temporary injection.
QPixelFormatRgb was renamed to qPixelFormatRgba to explain the third
argument at the call site better.
There seem to be no users of this class in qt5.git at this time.
Change-Id: Ib4fe8ceb2d30744127b116a748724a3406400eb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Being a better quint64, it can be passed in registers, so take them as value args.
Change-Id: I8eb96a2594d910b538b651fb3ca567c0c124dd3a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
There's little point in duplicating the complex declaration (thanks to C++11), just define
the relational operators and the default ctor where they're declared.
Change-Id: Ie91545b2581c89edd434c911eb05705e2d16debe
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Initial submission of a new class QByteArrayList with the
purpose of aggregating and then joining QByteArray instances.
[ChangeLog][QtCore] Added new QByteArrayList class.
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I503af58f125d7f44fef10360177490c933e5840f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The class provides compare operators, stream operators, and hashing
functions. This class aims to be compatible with (but not restricted to)
the Semantic Versioning 2.0 standard (semver.org).
[ChangeLog][QtCore] Added QVersionNumber class
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I244c8ccc002909af03987a2df052734d1a8621a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
QObjectPrivate::Connection::method should never be called when
the Connection was made with the function pointer syntax
This caused valgrind warning about using uninitialized value on such code:
QObject::connect(&o, &Object::aSignal, &o, &Object::aSlot);
o.disconnect(&o, SLOT(aSlot()));
Change-Id: Iaff9ecd3ddfe665db92726b420021493453c4cea
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In order to prepare the addition of WinRT and iOS (SecureTransport)
implementations of SSL the structure of some SSL files has to be
redone. Parts of certificate that probably can be reused by other
ports stayed in qsslcertificate.cpp while other parts were moved
to qsslcertificate_openssl.cpp. qsslcontext, qsslkey and qsslsocket
were suffixed by _openssl to show that these are pure openssl
implementations.
Change-Id: I7b022dec49759f882274999c0991bf95788f2a3a
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>