Commit cf4a611115 refactored out test
identifier buildup into a standalone function, but it returned the
QTestCharBuffer as a value type, which ultimately caused it to crash:
Unfortunately QTestCharBuffer is not copied correctly: Since it uses the
default copy ctor it will copy the buf pointer and create a deep copy of
the staticBuf pointer. When the dtor was later called it would then end up
calling free(buf) (where buf pointed to the staticBuf of the original
QTestCharBuffer).
Task-number: QTBUG-66607
Change-Id: Ifa290658be6f077a0d6613451c26aeeffc8df41c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6ffb358822)
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
GTK's scale factor, which can differ from Qt's scale factor, must
be taken into account in the native GTK menu positioning function
qt_gtk_menu_position_func().
Task-number: QTBUG-55251
Change-Id: I4ad460baab54facd25564ad85ded383c9321d597
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
When the table for a selected column can't be determined (e.g. because
there is no table for it), PQftable returns InvalidOid. This was not
covered and a query to determine the table name was executed every
time which slowed down calls to QSqlQuery::value(QString).
Task-number: QTBUG-65226
Change-Id: Idd8fbaaef7b01ca4151439f46cad2cce6f1c93e9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
with 40e87491 merged, 'QMAKE_CXXFLAGS' variable in
'win32-g++' toolchain became defined via 'QMAKE_CFLAGS'.
the similar can be found in 'win32-clang-msvc' and
'win32-icc' toolchains too.
this works for now, because such definitions just duplicates code
from includes, like 'gcc-base.conf', 'msvc-desktop.conf', etc.
but it would became broken, if changes would be applied to
'QMAKE_CXXFLAGS' definitions in that includes, prior
to the redefinitions in 'win32-*/qmake.conf' toolchains.
thus 'QMAKE_CXXFLAGS' definitions in 'win32-*/qmake.conf' toolchains
should not depend on 'QMAKE_CFLAGS' and be done explicitly.
in order to apply this change correctly to 'win32-icc' toolchain,
its 'QMAKE_CFLAGS' variable should become dependent on definitions
in the includes, similar to 'win32-clang-msvc' and
'win32-msvc' toolchains.
Change-Id: I5e820e44a769a590ba63f70dcb3a115311093311
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
CGDisplayCreateImageForRect seems to have a weird behavior when mixing
highDPI and non-highDPI screens since it may take part of the
non-highDPI screen when the highDPI display is at the left or at the
top of the main monitor.
To workaround this issue, we capture the whole screen and then crop the
image to the desired size.
Task-number: QTBUG-47643
Change-Id: Ib2a3850a0a549964c7fe272abb563bd23518c234
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Without any content it was hard to see the window. Put some lipstick on it.
Change-Id: I0fefffb0a4deba7ac91e67a6153a9a27308fe493
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The latter would allow one final resize that would immediately
jump to 300x300.
Change-Id: I566e5e9dc1fb07f748f528f002166a8438344173
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
While both GCC and the GCC compatible clang support this attribute in
general, GCC doesn't support it when targeting macOS, ending up with
errors like these:
error: 'init_priority' attribute is not supported on this platform
This error isn't a property of the platform itself though, since
clang supports the attribute just fine on macOS.
The attribute is only used to work around an issue with dllimport
on windows, so limit its use to that platform, to avoid issues
with it potentially being unsupported on platforms other than
macOS as well.
This fixes compiling with GCC for macOS.
Change-Id: I0235e6365635d73233951566c10ad869b26a0fc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Configuring Qt with -no-feature-ftp cause build to fail.
Change-Id: I47f1cdc400702d0211a9f620c8606983f08fa70c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This reverts commit 71090f0950. Changing
the link was wrong because we do not actually comply with the new RFC.
Task-number: QTBUG-66470
Change-Id: I940917d6763842499b18fffd15147cb93c27b7f4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
They can be, if compiled with -Wl,-pie. Example:
$ file /usr/bin/ping
/usr/bin/ping: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0
And you can't detect via the interpreter, since libraries can have
them too:
$ file /lib64/libc-2.26.so libQt5Core.so.5.11.0
/lib64/libc-2.26.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2
libQt5Core.so.5.11.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.17.0
Change-Id: I940917d6763842499b18fffd15143bb80ce0e531
Reviewed-by: David Faure <david.faure@kdab.com>
QOpenGLProgramBinaryCache::setProgramBinary() should check
GL_LINK_STATUS after glProgramBinary(), but doesn't.
In practice, this means that SDDM is a white screen, and KDE is just
a gray task bar.
So far, Qt tries to check this using its internal ::link() function.
But in case the cached binary fails to load, Qt currently attempts to
link the inexistent program, resulting in a zero-length, fixed
pipeline shader.
Checking this already in ::setProgramBinary() makes the call to
::link() superfluous, so we remove that as well.
Done-with: Max Staudt <mstaudt@suse.com>
Done-with: Michal Srb <msrb@suse.com>
Done-with: Fabian Vogt <fvogt@suse.de>
Task-number: QTBUG-66420
Change-Id: Iabb51d0eb2c0c16bde696efff623e57d15f28d82
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
contains() interprets the regexp as being implicitly
anchored, so the leading part of the path needs to be
explicitly matched.
Change-Id: I1efa07dc99bb2db1717d2a66621899e23c144164
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Do not clear the settings of QHeaderView during layoutChange when the
model is empty and the section count did not change. This will not work
when a section is moved or a section is replaced with a new one during
layoutChange. But since layoutChanged is also called on sorting, this
patch ensures that the settings are not cleared in this case.
This restores the behavior to the same as before 5.9.4.
Task-number: QTBUG-66444
Task-number: QTBUG-65478
Change-Id: I39989cfd45b42e58f49d18ec014d3a941cadb6c9
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
During (re)storing the sections within layoutChanged handling, the
hidden section size was not properly stored which lead to a section
size of 0 when the section was unhided afterwards.
Task-number: QTBUG-66413
Task-number: QTBUG-65478
Change-Id: I0b714c7e0530a1eae82b3bb0e0dc80ed576522d0
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Rename example savegame and its snippets following
a6b697ca13.
Fix:
/qtbase/examples/corelib/serialization/savegame/doc/src/savegame.qdoc:28: warning: Cannot find file 'json/savegame/savegame.pro' or 'json/savegame/savegame.qmlproject'
qtbase/examples/corelib/serialization/savegame/doc/src/savegame.qdoc:98: (qdoc) warning: Cannot find file to quote from: 'json/savegame/level.cpp'
json
qtbase/src/network/ssl/qsslconfiguration.cpp:889: warning: Undocumented parameter 'name' in QSslConfiguration::setBackendConfigOption()
qtbase/src/corelib/tools/qbitarray.cpp:314: warning: No such parameter 'len' in QBitArray::fromBits()
Change-Id: If59512873ca2116b89490927fdbf9ea1d8b237a8
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Currently there is a bug in Qt regarding the PostgreSQL driver as it
does not correctly escape the table names when constructing queries
internally. Therefore, these tests are marked as expected failures until
the bug itself is fixed in Qt.
Change-Id: I74dadc187f8a08509128dfea27be99787e57ea51
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Properly initialize MedianDouble::values in ctor.
This fixes the following valgrind warnings in the unit test:
Conditional jump or move depends on uninitialised value(s)
at 0x40771E4: addValue (qtconcurrentmedian.h:161)
by 0x40771E4: QtConcurrent::BlockSizeManagerV2::timeAfterUser() (qtconcurrentiteratekernel.cpp:195)
Change-Id: I8c8e297a52caca38cd6191ae2653f2765d387077
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This also accounts for some quirks on the PostgreSQL side:
- Null values for a related table are placed in a different
order when sorted.
- Functions (sum, count) return a different type than other databases
- Using quotes to account for case sensitivity with tables
Task-number: QTBUG-63861
Change-Id: Ib1894fa8d0c77d7045941f7c57be0d0acd8d117e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Private headers not only need the _p suffix, but we also need to mean it
:)
Change-Id: I6028200a872661af34cbf90c77974cc1a22c09c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
TouchEvent::TouchPoint::pos was not updated in
QGraphicsScenePrivate::updateTouchPointsForItem().
To prevent the transformation being calculated repeatedly for each touch
point member, extract a function genericMapFromSceneTransform()
from genericMapFromScene() returning the transformation and use
that whereever multiple points are transformed.
Add a test, extracting helper functionality from
tst_QGraphicsItem::touchEventPropagation().
In addition, fold tst_QGraphicsScene::checkTouchPointsEllipseDiameters() from
c48f4bde00 into this test, so that
it is testing all transformations.
Task-number: QTBUG-66192
Change-Id: If71886d2c14c4e216f7781ea2f22f1adc444e6cf
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
$$RCC_DIR can be absolute, so simple concatenation with $$OUT_PWD is
bound to fail.
Change-Id: Ibd80c49656c0e03b8a86ebca851af106cced08fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-geometry, -title and -icon for xcb did not work if the platform string had
arguments or there were fallback platforms.
Only accept the arguments if xcb is the default platform. I.e. ignore the
arguments if xcb is a fallback.
This now works:
./application -platform "xcb:someArg=value" -title specialXcbTitle
./application -platform "xcb;wayland" -title specialXcbTitle
./application -platform "xcb:someArg=value;wayland" -title specialXcbTitle
But this does not:
./application -platform "wayland;xcb:someArg=value" -title specialXcbTitle
Change-Id: I4ee20b1ed722bc98417a5e75db7d8c98ffcdfcfe
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
[ChangeLog][QtGui] QT_QPA_PLATFORM and the -platform argument now support a
list of platform plugins in prioritized order. Platforms are separated by
semicolons.
The plugins are tried in the order they are specified as long as all preceding
platforms fail gracefully by returning nullptr in the implementation of
QPlatformIntegrationPlugin::create()
This is useful on Linux distributions where the Wayland plugin may be
installed, but is not supported by the current session. i.e. if X11 is running
or if the compositor does not provide a compatible shell extension.
Example usage:
QT_QPA_PLATFORM="wayland;xcb" ./application
or
./application -platform "wayland;xcb"
Task-number: QTBUG-59762
Change-Id: Ia3f034ec522ed6729d71acf971d172da9e68a5a0
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Since the PlatformInputContext is shared between test cases, the set commit
string from inputMethod() was otherwise saved and could pollute other tests.
For example on Windows PlatformInputContext::commit() was called when the
QLineEdit was first clicked onto in tst_QLineEdit::testQuickSelectionWithMouse()
and inserted "text" in the middle of the text, rather than starting selection as
intended.
This led to tst_QLineEdit::testQuickSelectionWithMouse() failing on Windows at
first in CI, but then always passing the repeats when it was tested alone.
Task-number: QTBUG-66499
Task-number: QTBUG-66216
Change-Id: Id6bdd263d57fd6d08fb48f013542b55b132907ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
It was added by Sam back in 2007, and we've removed other instances of
the same pattern since then. It doesn't make any sense today.
Change-Id: I0f3cb299e312648fd9dc96c639dab4c77fcb48c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This makes the documentation match the implementation.
-platform overrides QT_QPA_PLATFORM, not the other way around. Similarly
for the other arguments.
Change-Id: Iffaf8bb1134bc57e5b682f37b9cc1a713872ede1
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Skip the initialization of a QOffscreenX11GLXContext and thereby fix
a null pointer dereference if the environment variable $DISPLAY is
unset or contains invalid information.
Task-number: QTBUG-66423
Change-Id: Ideea510d1c63a4f6700839955d833cd10e3b0bbe
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Since 1.1 lib names are similar to what they have on other
platforms, that is: libssl and libcrypto.
Task-number: QTBUG-62733
Change-Id: I477899433719fe36104491601d8cb71004b265ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Use ShmCreateSegment call, that was added in MIT-SHM 1.2, to
create shared memory segments on the server side. It returns
a POSIX shared memory object that is used to mmap memory.
It's in effect a file descriptor that is passed through the
X server socket and thus avoids permission checks.
On the other hand this scheme is more secure, because the
file descriptor, and thus the shared memory, are accessible
only by the X server and the application.
Task-number: QTBUG-46017
Change-Id: I202eead9d01aee2ab5b65f4f74f4c13da7cb2239
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
- extract the creation of a shared memory segment into a separate
function
- do extra checks for errors
- check that MIT-SHM extension is present once in QXcbConnection
Change-Id: I956bdf76b879ec5c95a7ed219a59ae722dc5afba
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Fix 'Too many segments for object format' errors for (Debug) builds
using Windows ICC.
Change-Id: Ie48f43199948477c426d0a4e557f039eda129b22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>