Behavior will agree with the docs.
[ChangeLog][QtGui][QWindow] lastWindowClosed will be emitted even if
quitOnLastWindowClosed is not set
Task-number: QTBUG-32956
Change-Id: I7bb269d53894859fee27e171eea7ad472ea86af0
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Previously QPlatformScreen was automatically deleting its QScreen
in ~QPlatformScreen(). That means that we cannot use QScreen's
methods when the screen is being removed, because doing so would
call virtual methods of QPlatformScreen. By that point the
QPlatformScreen subclass object does not exist anymore, and we
call the default implementation instead of the subclassed one, or
get a crash for the pure virtual methods. This happens for example
when removing a screen which contains a QWindow with some QML item
using QQuickScreenAttached.
This patch adds a QPlatformIntegration::destroyScreen() function,
which deletes the QScreen and later the QPlatformScreen.
~QPlatformScreen will still delete the QScreen if it was not deleted
with destroyScreen(), so code not ported to the new approach
will continue to work as before, with only a warning added.
Task-number: QTBUG-41141
Change-Id: Ie4a03dee08ceb4c3e94a81875411f6f723273fe1
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
In case the foundry name was empty and foundry lookup has failed, don't
look for *any* foundry since it does exactly the same as previous call.
Change-Id: I2a81949df06c31e1ae6999a6bbbe973408d4b814
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
The EglDisplay and the Display is normally a PlatformIntegration wide
resource
Change-Id: Ie5382a2a0b34fbe1c506b5134bf581afbd7f5d99
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
According to the Desktop Entry Specification, “If $XDG_CURRENT_DESKTOP is
set then it contains a colon-separated list of strings”. For example, on
GNOME Flashback session that variable is set to “GNOME-Flashback:GNOME”.
The value returned by QGenericUnixServices::desktopEnvironment() is in
most cases the uppercase variant of $XDG_CURRENT_DESKTOP variable.
In qgenericunixthemes.cpp, we need to support multiple names in the
return result of that function. If at least one part is in the list of
Gtk+-based desktop environments, then we should use gtk2 platform theme.
Change-Id: I0c9de68756d41b031e822be8cf100ca5c0b202ae
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The enum values are different for the default framebuffer and non-default
ones. With QOpenGLWidget there is always a non-default fb bound, so the
correct way is to use GL_COLOR_ATTACHMENT0 etc. GL_COLOR_EXT and friends
are only allowed when the default framebuffer is bound, as per spec.
Change-Id: Ia8c27038dc899e44d1a95eb88adbc1cac72652b0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Supports relative pointer, axis, keyboard and touch events.
libinput support is only available in combination with libudev.
libxkbcommon is required to perform key mapping. For now the
default keymap is used always (selected when building xkbcommon).
[ChangeLog][QtGui] Added a plugin to get mouse, keyboard and touch events
via libinput.
Change-Id: I469d8992c0cd3e79225cefaeb931697baf86a92b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
They aren't needed. The template version for QList in qdatastream.h is
sufficient.
This is binary compatible, since the functions were never exported. It's
also source compatible, provided no one tried to do:
QDataStream & (*fptr)(QDataStream &, QStringList &) = &operator>>;
Change-Id: I8a4449b416154b34c007ef6abacf2b112451028f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
qstringlist.h no longer includes qiodevice.h
Change-Id: I08b83400316cb0b43bde0b390a9430e589e79e10
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Even though the compiler supports it, the MSVC headers might do
something wrong and make compilation fail later due to attempting to
overload unsigned short with char16_t.
The _CHAR16_T definition comes from <cstddef>, so include that instead
of <stddef.h> in C++ mode.
Change-Id: Ifaeb1c92bde2db4ed4129507462391904afd6510
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
icl.exe behaves like cl.exe (MSVC), so we should use the MSVC-style of
__pragma instead of _Pragma.
Change-Id: Ieee740c430589c3bb1b964138f8bf7f58b8d2892
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
We cannot use override in the Q_OBJECT macro, so tell Clang not to warn
about our lack of use of the keyword in the three virtuals that Q_OBJECT
overrides when the user uses Q_DECL_OVERRIDE in their own functions.
We can't use Q_DECL_OVERRIDE for two reasons:
1) because that would trigger the warning in any and all virtual
overrides the user may have in their own class (and most of Qt)
2) because when Q_OBJECT is used in QObject, it's not overriding
anything -- it's the base declaration
For #2, we could add a different macro exclusively for QObject that moc
would expand, but it's unnecessary work.
Change-Id: Ic9cb7896f93f06f4e86b6a42dc08f96d257f7550
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
There's a lot of code now requiring it. Any compiler that doesn't
support the keyword is too old for Qt now. The last time anyone asked
about this macro was for QTBUG-27393 and we don't know which compiler
that was.
As a necessity, this patch contains a reversal of
a0c3a57aed
[ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses
the "using" keyword. Compilers that do not support this keyword are
deprecated and will not be able to build Qt. Previous versions of Qt may
or may not compile, as no testing was done to ensure it worked.
Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This allows the time to be synchronized between different programs, as
opposed to how long it has been since the message pattern was first
parsed...
Change-Id: If8bdfa0d997ca418a5fcae40f8c34fb77f90d2aa
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Now it will say "MSVC 2015" instead of "MSVC _MSC_VER 1900".
Change-Id: I1546929aec205d0a9a62dcc39f20093664951048
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Basically, introduce a small check for this corner-case situation.
Setting a model doesn't just store a pointer, but also resets the current
index, changes the line edit completion model, and so on, and seems silly
to trigger changes in such cases.
[ChangeLog][QtWidgets][QComboBox] A QComboBox does not reset itself any
more when setting the same model more than once.
Change-Id: If028b36cdfaa5552c156dd900e123ca9a04d4e3d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Added the function pointer to addTransition to take
advantage of the new connect syntax.
[ChangeLog][QtCore][State Machine] Added an addTransition() overload that
takes a pointer-to-member for the signal triggering the transition.
Change-Id: Ic97f7983839217ca0c8484b269d38221cbe804e3
Task-number: QTBUG-40293
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QPA][Xcb] GLX and EGL code paths are now dynamically
resolved, making it possible for one build of a plugin to use both code
paths. Default is to use the GLX code path if available. This can be
overwritten by specifying QT_XCB_GL_INTEGRATION=xcb_egl as an
evnironment variable. Enable qt.xcb.glintegration.debug to get debug log
output of what integration is used
Change-Id: Ia9fa95fcca3d901b91dadb8c98a695fea0ae3b1e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This is an import of the tuio2qt plugin (https://github.com/rburchell/tuio2qt),
as of sha 9b1f163ac52ea440e83f16b3906f9b55e21b87be henceforth to be developed as
a part of Qt itself.
This plugin offers touch events via QPA interfaces, using data offered over the
TUIO protocol (http://www.tuio.org).
It is useful for accepting touch input on devices which otherwise don't have
touch input (such as desktops) for the purposes of development, as well as
accepting input from some hardware which offers up touch events specifically
over the TUIO protocol.
Known "shortcomings" at this time, as documented in the README:
* Multiple TUIO sources sending data at the same time will conflict. This will
not cause problems, strictly speaking, but it will not work well (repeated
touchpoint release/press events for the same IDs)
* TCP transport is not currently supported. I don't see a need for it at this
time, but I have left the capability in terms of port acceptance open for it
to be made available.
Change-Id: I7178f9db13c635268db8460fbe4d4ea6be654c05
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fixed regression bug of the commit #fc11798
Change-Id: I3d64fd67dfe2196a726886a19b9510dd12ff255d
Task-number: QTBUG-43392
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Add the source widget to the texture list (may be null for custom
compositor implementations that add textures not belonging to actual
widgets). This allows us to do proper checks with the
dirtyRenderToTextureWidgets list.
As a result paint events are only sent to a QOpenGLWidget if (1) there
was an update() for it or (2) it was actually marked dirty. (2) was
previously behaving differently: the widget got a paint event when
anything in the window has changed. This is fine for naive animating
OpenGL code but less ideal for QGraphicsView.
Bool properties like stacksOnTop are now stored in a flags value to
prevent future explosion of texture list fields and parameters.
Task-number: QTBUG-43178
Change-Id: I48cbcf93df72ac682c9b5d64982a8b648fe21ef3
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
The Qt bug tracker URL changes as part of the qt.io transition
Change-Id: Icb4ab198943b93639b5e3a8d99262303785c6459
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
The Windows configure application was missing the logic to enable
the Android style, so this was missing from the Windows packages.
[ChangeLog][Android] Included Android style on Windows hosts.
Task-number: QTBUG-43302
Change-Id: I6a1423d58d00e7b4d4fd0a3d1a12cce10aa2fc91
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Setting lfHeight to a positive value in LOGFONT requests the font
with the given cell height, which is em square size + internal
leading. When setting this to the em square size, it means we
will get glyphs that are actually sized for an em square with
sides that are (emSquareSize - internalLeading). For most fonts,
this was not noticeable, but for some fonts with large internal
leading, the resulting glyphs would be very small.
When setting lfHeight to something < 0 instead, we are selecting
the font with the given character height instead, which is not
including the internal leading.
[ChangeLog][PDF] Fix embedding glyphs from fonts with large
internal leading.
Task-number: QTBUG-43082
Change-Id: Id74cf2279df2062804e9431fe305d803cb0b19d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The test still fails sporadically at a new place, so this adds some
debug information when it fails to may help us identify what is going
wrong.
Change-Id: Ife0f171299ef7e800a2d808602e76ca2f3885964
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Otherwise, potentially active players no longer receive the keys when
a Qt application is running.
Task-number: QTBUG-43343
Change-Id: Iefa511a101734690305e3244fafec4a460a9212d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Length is supposed to be equal to the section items length, but the state saved might be corrupted.
If so, print a warning, return false and don't restore this corrupted state.
Change-Id: I4d3dfec528a65fc81ed70d1c8cc69c11faf414e0
Task-number: QTBUG-40462
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The grids are filled top to bottom, left to right, so use division to get
the column.
Task-number: QTBUG-43371
Change-Id: I02ad518512858ed71e0e3a0cae8c4e02d537a9b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
These mkspecs are not supported and no longer compile. Related support in
qmake has also been removed.
Change-Id: I7706dcfa5471e55e2ae3d580d65e9371e2c652d5
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
As of 6cec75a730 we use pkg-config to
pickup OpenGL. Some OpenGL implementations list additional directories
to be used as include directories in CFLAGS. Up until now, if this has
been empty, then the default path has been used. Now that there may be
additional directories, the default include path is not used, which
causes gl.h to be picked up.
Task-number: QTBUG-43377
Change-Id: I86e995cb8d718724a75d9f3f5713e87451fd7129
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
The LOG_TAG for Android can be set by QCoreApplication::applicationName
instead of a constant "Qt" tag. This will avoid that multiple apps
will use the same tag.
Also it will be easier to filter the logs for different apps instead
of "adb logcat -s Qt" for all Qt apps.
Change-Id: I422cc3adf8b526634b5daa9a1bb1b90403de5618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The calculateTabWidth() can trigger shaping of the item, which can
cause the layout data to be reallocated, so we need to update the
local pointers to it, like we do when we explicitly invoke the
shaper.
[ChangeLog][Text] Fixed problems with text layout when using custom
tab stops.
Task-number: QTBUG-43126
Change-Id: Ifaeeeb4bfb1a55e6638b12b444f53d2679d3d1e6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Load again JSON document is it was freed.
Task-number: QTBUG-43111
Change-Id: I22f1de221371b49fec8b3d66ad5f0bd2af9656fe
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
It went completely broken after the fix for QTBUG-32928. The crash fix I made
afterwards forgot to take into account that the shortcuts must still be handled,
even when the window in the input event is null. So instead of bailing out on a
null tlw, we have to use the window that currently has the focus.
Task-number: QTBUG-43203
Change-Id: I6cd65ee5bd021f80d9440cba8bc9dfda9abe2cfd
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Update4 provides a native Sleep implementation. Hence the wrapper
needs to be disabled.
Change-Id: I162da45934b02c262ac09b557c66c3363c276e54
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
The preprocessor used in QOpenGLShaderProgram to help with determining
where it should add the #line and other #define directives is broken
when parsing the standard Qt Project copyright header.
In a multiline comment if the preprocessor encounters repeated '*'
characters when in a multiline comment, it toggles the state between
MultiLineComment and CommentEnding. This is wrong as every asterisk is
potentially the one before the closing '/' of a multiline comment.
This change fixes this by only going back to the MultiLineComment when
in the CommentEnding state if the character is not another '*'.
Task-number: QTBUG-43240
Change-Id: I114e933026ba5de1c23f3e0399613def59f44961
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Ensures that we have a consistent view of what the last used texture
was, which is critical when deciding whether or not we need to re-bind
the texture or update texture properties.
Change-Id: Ib47eb00abde98d148fc6e569ce3e359b340328fb
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>