Commit Graph

38515 Commits

Author SHA1 Message Date
Volker Hilsheimer
3f17029aa1 Fix resolving NTFS symbolic links that point to UNC shares
Without this change, the target of a symbolic link that points to a UNC
share would include UNC in the target path, and not be correctly made
absolute.

Add a relevant test case, and use the opportunity to factor out the
helper code that creates NTFS symlinks into a function that takes
care of error handling.

The file created with the new test case only gets cleaned up correctly
when passing the file path into QDir::rmdir, which is either way the
right thing to do.

[ChangeLog][QtCore][QFileInfo] Fixed resolving of symbolic links to UNC
shares on NTFS file systems.

Change-Id: I9ba75d627aedf7c4cc289f0cb71088d795d30d8a
Fixes: QTBUG-73688
Task-number: QTBUG-63970
Task-number: QTBUG-30401
Task-number: QTBUG-20791
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-10 04:53:52 +00:00
Friedemann Kleint
bafa676d08 QEglConfigChooser: Silence warning about fallthrough
Add Q_FALLTHROUGH, fixing:
qeglconvenience.cpp:267:9: warning: this statement may fall through [-Wimplicit-fallthrough=]

Change-Id: I764a5821f98982bc94ce5dc6a4efa81a431fd369
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-09 19:46:09 +00:00
Friedemann Kleint
b1709bdc72 Windows QPA: Fix Drag and Drop of images onto MS PowerPoint
Use the PNG format only for transparent images.

Fixes: QTBUG-64322
Change-Id: I5e02132ca446876e20fcf46f2ef8daa599e85e71
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2019-04-09 19:45:43 +00:00
Laszlo Agocs
1d1dcd8d6c Fix context loss in QOpenGLWidget upon tlw change with AA_ShareOpenGLContexts
The logic introduced in 2ea90c56 has an issue: it resets (destroy the
context and co.) upong TLW change even when AA_ShareOpenGLContexts is set,
and that is just wrong and goes against what the docs claim.

Fixes: QTBUG-74307
Change-Id: Ib519045c1d9842664cbe602d4e6425660cf638b5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-09 19:27:54 +00:00
Christian Ehrlicher
1029a2e010 QTableView: don't draw additional grid lines top and left
QTableView drew additional grid lines on the top and left side when
the corresponding header was not visible and the ScrollMode was
ScrollPerItem. After 8f2bacea41 they were
also drawn for ScrolPerPixel for consistency. But they are not needed at
all and only create visual artifacts.
Therefore remove the drawing of the additional lines completely.

Fixes: QTBUG-74706
Change-Id: I5c77d53a2eeefab9b9bfe0efea6439f5afede4ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-04-09 18:54:02 +00:00
Christian Ehrlicher
37c24c6b1b QTableView: fix Ctrl+End behavior with disabled columns
Ctrl+End moves the visual index to the bottom left index. This does not
work correctly when the item in the bottom left is disabled. It should
be fixed with 7863be3115 but does not due
to a typo.
Fix the typo by using the newly calculated visualColumn instead the
initial column.
There are cases where the algorithm still does not work as expected when
there are more disabled items but fixing them would add a lot of
complexity with no (much) gain.

Fixes: QTBUG-72400
Change-Id: Ie90f6b3e41e00f54e826c2b4e7303e85ac1e4115
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-04-09 18:53:59 +00:00
Milian Wolff
5f2afe18cc Fix QMetaObject::newInstance on non-QObject meta object
QMetaObject::newInstance returns a QObject, thus it's not possible to
create a new instance of a Q_GADGET using this function. Previously, we
returned a non-null QObject pointer for such scenarios, which then
leads to crashes when one tries to use it. Now, we check whether the
meta object inherits QObject's meta object, and error out early
otherwise.

Change-Id: I7b1fb6c8d48b3e98161894be2f281a491963345e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-09 15:46:35 +00:00
Edward Welbourne
6d4a456a28 Fix off-by-one error in QTranslatorPrivate::do_load()
The central loop starts by reading five bytes; but
the loop condition only checked that four were available.

Change-Id: I244cecacabeffbac10ad94081f32847f912d95d9
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk@qt.io>
2019-04-09 09:12:11 +00:00
Joerg Bornemann
9617791075 Let QINSTALL copy hidden files when installing directories
When installing directories, QINSTALL must not ignore contained hidden
files to be consistent with the old INSTALL_DIR.

Fixes: QTBUG-66835
Change-Id: I3a7c952dcac9732d5b17c5a258f87ca277b388d2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-04-09 08:16:25 +00:00
Kai Koehne
0adb78a847 QElapsedTimer: Remove unused static nanosecondsToTicks method
Fixes clang-cl warning
 qelapsedtimer_win.cpp(80,22): warning: unused function 'nanosecondsToTicks' [-Wunused-function]

Change-Id: I1ff334049fcf4b265fe97235b7daf06969331313
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-09 07:00:11 +00:00
Kai Koehne
e251f11849 printsupport: Fix clang-cl warning
qprintengine_win.cpp(1117,14): warning: comparison of two values with different enumeration types in switch statement ('QPrint::DuplexMode' and 'QPrinter::DuplexMode') [-Wenum-compare-switch]
        case QPrinter::DuplexShortSide:

Change-Id: Ib5028d80ecf7f6bb9eb0562e5c137acfeb709a14
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-04-09 07:00:02 +00:00
Paul Lemire
d92f63122b QShaderGenerator: stop abusing from auto everywhere
Leads to a huge loss of context for people trying to understand
and maintain that code. Replacing with proper types to ensure
better readability and maintenance.

Change-Id: I9900b743e8b7fe11bcc7db9ce3191c89f8718afc
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2019-04-09 04:46:20 +00:00
Timur Pocheptsov
4b445481c3 tst_http2 - extend 'singleRequest' test case
to test different h2 modes: "h2c" (clear text with protocol upgrade),
"h2" (encrypted, negotiating via ALPN extension), "h2-direct" (encrypted,
no ALPN), "h2c-direct" (plain text, no protocol upgrade). This patch-set
is  an amendment to the recent fix in the protocol handler where we were
crashing in "h2c-direct" mode.

Change-Id: I3ff5ed1396a59b72b59a95f927d404ccd202d0b8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-04-09 04:08:01 +00:00
Thiago Macieira
c2a1360b3f Update TinyCBOR with bugfixes
Updated to https://github.com/thiagomacieira/tinycbor commit
ac9369d8ec8511bc7516266ae6b07f7da860c954.

Fabrice Fontaine (1):
      fix undefined encode_half in json2cbor

Pedro Oliveira (1):
      Fixed minor error in the example code.

Svyatoslav Phirsov (2):
      Typo fixed in stdlib fread(...) usage
      typo in dumprecursive return type

Thiago Macieira (9):
      Install the tinycbor-version.h header.
      Update version number for a possible but unlikely 0.5.3 release
      Fix #137: off-by-one error in UTF-8 decoding
      Update Travis CI to Ubuntu Xenial
      Pretty: fix use of uninitialised variable
      Validation: fix out-of-bounds access when content ends in a string
      Parser: apply the same memory-check update
      Tests: remove useless comment
      Tests: Catch an earlier QCOMPARE failure in compare()

phirsov (6):
      Fix off-by-one causing buffer overflow in open_memstream
      Protect macro argument expansion using parentheses
      eliminating misleading messages in case .config file not yet created
      Run check silently in Travis
      Make AppVeyor test suit run silent as in Travis
      enhancement #149 implemented: access half-precision floating point data as single float

Change-Id: I9e3d261ad9bf41cfb2b6fffd159088f1cc9b3b02
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-04-08 20:12:35 +00:00
Friedemann Kleint
f7949df243 tst_QUrl: Fix left-over temporary directory on Windows
The test changes the current directory to the test directory
in fromUserInputWithCwd(), but did not restore it, causing:

Totals 898 passed, 0 failed, 1 skipped, 0 blacklisted, 368ms
********* Finished testing of tst_QUrl *********
QTemporaryDir Unable to remove "C:\\TEMP\\tst_qurl-ryVxqu" most likely due to the presence of read-only files.

Restore the old directory at the end to fix this.

Change-Id: I62669868f3c6d97dd38ebac76515428c14b7e1e7
Reviewed-by: David Faure <david.faure@kdab.com>
2019-04-08 18:44:25 +00:00
Friedemann Kleint
3a34ef636a QMenu/QComboBox: Extract helper for determining the pop up geometry
Move the code returning whether a popup should use the full
screen to QStylePrivate and use for QMenu and QComboBox.

Task-number: QTBUG-73231
Change-Id: I1901ecedfa90edf16329ce3b13ef4abea5ab44e8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-04-08 18:44:59 +00:00
Friedemann Kleint
8045ccc382 Windows QPA/File dialog: Pass up http[s] URLs
The native Windows allows for typing in http[s] URLs directly (without
checking existence). Pass these up.

Fixes: QTBUG-71785
Change-Id: I60237bab596ca3f52e6f513f17544ff94e9080da
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-04-08 18:44:42 +00:00
Joerg Bornemann
448177d857 Let "qmake -install qinstall" set default permissions 0644 and 0755
...like the install commands before Qt 5.9 did.
This ensures consistent permissions. Also, we can throw away the code
that took care of removing and re-adding the read-only flag on Windows.

This reverts commit a0b5d6e60f with the
addition of preserving permissions when copying directories to properly
install app bundles (QTBUG-74912).

Fixes: QTBUG-74733
Task-number: QTBUG-74912
Change-Id: Iee6d7c5e86787dd3ada5e5e9441209d418100b1f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-08 18:39:39 +00:00
Andre Hartmann
a02a2a1e73 QUdpSocket: Convert snippet to functor connect
Change-Id: Ice210b979a1dd948cd8d95003bd50a4b71d91852
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-08 17:00:13 +00:00
Andre Hartmann
6863262ded QUdpSocket: Add missing \since to docs
QNetworkDatagram was introduced together with
these methods in Qt 5.8 (commit 4da2dda2aa)

Change-Id: I454c26ebf6f94988cada8ac9315db1d43a31a595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-08 17:00:05 +00:00
Qt Forward Merge Bot
01a269593d Merge remote-tracking branch 'origin/5.12.3' into 5.12
Change-Id: Id60d508c0f25fd5e67be07daafd2d4c56ae73934
2019-04-08 09:53:39 +02:00
Davide Beatrici
e199710d0e QHostInfo: use dlsym() with RTLD_DEFAULT in case libs cannot be loaded
The current code only tries to load the required functions from
LIBRESOLV_SO (if defined) and resolv, but on FreeBSD they are in libc:
https://www.freebsd.org/cgi/man.cgi?query=res_query&sektion=3&apropos=0&manpath=freebsd

This commit changes the code so that, after failing to load the
non-existent libraries, it attempts to load the functions with dlsym()
using the special handle RTLD_DEFAULT, which searches for the specified
symbol in the loaded libraries.

This is a follow-up to 8eeb5150ed.

Change-Id: I19d90b0ca8703398bf4f5f4edd5ae31e346ef251
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-06 17:30:27 +00:00
Davide Beatrici
8eeb5150ed QDnsLookup: fix "Resolver functions not found" error on FreeBSD
The current code only tries to load the required functions from
LIBRESOLV_SO (if defined) and resolv, but on FreeBSD they are in libc:
https://www.freebsd.org/cgi/man.cgi?query=res_query&sektion=3&apropos=0&manpath=freebsd

This commit changes the code so that, after failing to load the
non-existent libraries, it attempts to load the functions with dlsym()
using the special handle RTLD_DEFAULT, which searches for the specified
symbol in the loaded libraries.

Task-number: QTBUG-74844
Change-Id: If97aaae233cabbfa01c30d26d9a7fb01ec3ff5c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-06 01:29:31 +00:00
Edward Welbourne
82ad4be4a2 Fix various uncommon cases in QTzTimeZonePrivate backend
Includes a fixup for 03fadc26e7, which
removed the check on empty transition list, needed when no data are
available.  Ensured that such a data-free zone would in fact be
noticed as invalid during init().

Fixed handling of times before the epoch (we still want to consult a
POSIX rule, if that's all that's available) while ensuring we (as
documented) ignore DST for such times.

Fixed handling of large times (milliseconds since epoch outside int
range) when looking up POSIX rules.  Gave QTimeZonePrivate a YearRange
enum (to be moved to QTimeZone once this merges up to dev) so as to
eliminate a magic number (and avoid adding another).  Moved
year-munging in POSIX rules after the one early return, which doesn't
need the year range.

Added test-cases for the distant past/future (just checking UTC's
offsets; SLES has a minimal version of the UTC data-file that triggers
the bugs fixed here for them).

Fixes: QTBUG-74666
Fixes: QTBUG-74550
Change-Id: Ief7b7e55c62cf11064700934f404b2fc283614e1
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-05 20:31:26 +00:00
Milian Wolff
f4c41b9797 Add missing _exit tracepoints for event handling
This allows tools that look for matching `foo_entry/exit` pairs in the
trace data to work properly. An unmatched `_entry` would otherwise
confuse them, making them think that the call stack is continuously
increasing.

Change-Id: Idff7f587ea25c46ec86ad623cc82d503db34a194
Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-05 11:57:59 +00:00
Milian Wolff
127518deda Introduce Q_TRACE_SCOPE to simplify tracing of a function entry/exit
Additionally, we also add a Q_TRACE_EXIT which runs a trace point when
the scope is exited, leveraging qScopeGuard behind the scenes.
Q_TRACE_SCOPE uses Q_TRACE_EXIT internally - the difference is that
the _SCOPE version enforces the naming scheme of _entry / _exit for the
tracepoints, whereas Q_TRACE_EXIT can be used generically.

Change-Id: I4a2f5ea09f451fcf664d07fd493b679f7527ac06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-05 11:57:52 +00:00
Milian Wolff
5f62202e6c Add tracepoint to qt_message_print
This allows us to deduce a lot about what a Qt application is doing,
since the debug output usually contains a lot of information.

Change-Id: I28a18afd151a1640a44ba8c7c9cd87d5d66c99b0
Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-05 11:57:46 +00:00
Milian Wolff
6ce2a87c23 Forward declare all types required for compilation with -trace
This patch fixes compilation with `-trace lttng` or `-trace etw`. We
need to forward declare QEvent, QImageReader etc., otherwise the types
will be unknown while compiling the trace points.

In order to handle this generically, the tracegen utility is extended
to support a 'prefix text' in the `*.tracepoints` input files. Any
text within curly braces will be embedded as-is in the generated file.
This can then be used to add forward declarations for the types we
need, including potential namespaces and such.

Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
2019-04-05 11:57:39 +00:00
Friedemann Kleint
df7eec6bcb Windows QPA/File dialog: Refactor code copying non-file shell items
Remove the canCopy() check which is not required and pass up the error
message. Remove special characters and use the base name of the display name
which can be an URL.

Task-number: QTBUG-71785
Change-Id: I22966cb8d1f5bca0bbca71cf3ebe66e4ede1a747
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2019-04-05 10:28:00 +00:00
Albert Astals Cid
bdee1189bf png handler: initialize all the variables passed to png_get_IHDR
oss-fuzz found at least width is sometimes not initialized, and we're
initializing almost all of them in most cases so be complete.

the oss-fuzz instance was
==1==WARNING: MemorySanitizer: use-of-uninitialized-value
	    #0 0x667c43 in operator!= /src/qtbase/src/corelib/tools/qsize.h:173:25
	    #1 0x667c43 in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:403

Change-Id: Idb9aaf5ab85509d9c893beaf8d9118339ba46be7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-05 08:53:01 +00:00
Kai Koehne
6d049ad63d Remove unused static method
The only use of this method got removed already in commit bebae37376.

Change-Id: I9757cbe34710efd9a9d31c74f81e01da40453ff9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-05 07:51:25 +00:00
Kai Koehne
5f7b0e5ff4 qmake: Remove dead code
Silences a clang warning

Change-Id: I5ade49326afcce964ffb5c24b5708977950d123e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-05 07:48:34 +00:00
Eirik Aavitsland
4e24bb24a2 Remove noisy warning for undefined QGradient preset
This runtime warning was recently introduced in the fix for an
assert/crash when creating a brush with an invalid Preset
value. However, that overlooked the usage where an unknown value is
passed to QGradient constructor, and the code afterwards checks if
the result is a NoGradient or not. It turns out that such usage is
already established as legitimate, including in the Qt Quick Rectangle
code, so this warning would be spit out continuously for perfectly
legal qml code.

Change-Id: Id60aed0817da0214b6cf17edd245f67e26470413
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-05 07:39:25 +00:00
Dmitry Shachnev
b404cd930e Make qt_is_ascii work properly on big endian systems
Change-Id: Ia053fbc854a77e333edadb0be6c2e04826b8fbdb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-05 06:56:21 +00:00
Friedemann Kleint
5a168507b1 Manual dialog test: Output URLs when testing QFileDialog
Change-Id: Icfaedcd68ff387cc888e41ec0b1db1810122b229
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-05 05:57:17 +00:00
Volker Hilsheimer
7935d86e7d Populate test data for reverse lookups using system tools
Hardcoding IP addresses and their respective DNS records is fragile.
We care about Qt producing the same result as other DNS querying tools,
so testing that instead.

Running a python script for this is easiest, and assumed to be quite
reliable.

In case where python fails/is not present, fall back to nslookup.
That tool is available on Linux, macOS, and Windows, although the
output it produces varies. This change implements very basic
line-parsing that can interpret the various results encountered
during testing on those platforms.

This also reverts commit bbaceff253fae13d8e56691bc9de7e1981db5118,
which blacklisted the tests that failed due to changes in DNS
records.

Use the opportunity to replace usage of gitorious.org.

Change-Id: I967de226bd603c805df7fe3ed4e871d92d2d0750
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-04-05 05:50:18 +00:00
Orgad Shaneh
808758ad14 QFileSystemEngine: Fix typo
Change-Id: I538ef771dcf6b757025c8d31f13a91222c2ebd3e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-05 03:12:04 +00:00
Allan Sandfeld Jensen
7d02fb3045 Fix recursive include
qatomic.h included qbasicatomic.h which included qatomic.h.

Due to a define in qbasicatomic.h, the definitions from QAtomic would
change depending on which was included first. Fortunately qbasicatomic
does not need qatomic.h so the include can be removed.

Change-Id: I086009f2e16a6e20b2b76fc6b3bf66a343414206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-04 16:59:05 +00:00
Jani Heikkinen
a0b5d6e60f Revert "Let "qmake -install qinstall" set default permissions 0644 and 0755"
This reverts commit 3cdf46059a.

It seems change is causing regression & is reverted now to be able to
proceed with releases

Task-number: QTBUG-74912
Change-Id: Ib2365b96ee98fbbcc8853cc7f8726c157c1913a7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-04 15:24:05 +00:00
Joerg Bornemann
4eb865cd38 Remove superfluous inclusion of qtwidgets-config.pri
Every module already includes its own config.

Change-Id: I1ef630092f61f118d79dc9b39ce38f4bdea14f43
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-04-04 09:48:08 +00:00
Andy Shaw
5caaa0b6a2 Doc: Update QImage::depth to indicate we support 64 bpp now
Change-Id: Icbd4920ed03655cec483a402de9d0ae3378ff3ef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-04 08:31:47 +00:00
Allan Sandfeld Jensen
7518da2441 Update scanline documentation
Change-Id: I019b102e99f99377b528ad5c8a4ccb2a7929f14f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-04 08:31:33 +00:00
Friedemann Kleint
ab47587856 Windows QPA/File dialog: Avoid UI hangs caused by empty results
Typing in invalid URLs results in empty result lists.
Emit rejected() in this case.

Task-number: QTBUG-71785
Change-Id: Ia257b85a5c4370227f753752f6a473bbb3a054be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-04 08:28:07 +00:00
Joerg Bornemann
6fff899697 Document in which Qt version a qmake function was introduced
...starting with Qt 5.0.0.

The text is manually inserted there, because \since does not work
within sections.

Task-number: QTBUG-74737
Change-Id: I0fe2d0a113d48be0266030c8466b062c6f743aab
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-04-03 20:23:29 +00:00
Friedemann Kleint
06d753e87b Brush up and stabilize tst_QSizeGrip
- Remove unused dummyWidget and thus empty slots initTestCase(),
  cleanupTestCase().
- Add slot cleanup() checking for an empty top level widgets list
  and introduce QScopedPointer to ensure it passes.
- Use QTRY_VERIFY in hideAndShowOnWindowStateChange().

Flakyness has been observed on openSUSE:

 FAIL!  : tst_QSizeGrip::hideAndShowOnWindowStateChange(Qt::Window) '!sizeGrip->isVisible()' returned FALSE. ()
           Loc: [tst_qsizegrip.cpp(126)]

Change-Id: I340fc1892dc00bcff1985e5a8a1e535975736484
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-04-03 15:06:06 +00:00
Tor Arne Vestbø
accf7ce024 macOS: Disable explicit layerContentsPlacement
It was needed to allow lazy resize of the backingstore IOSurfaces, but
that feature hasn't been enabled yet, and explicitly setting the layer's
contents placement to NSViewLayerContentsPlacementTopLeft resulted in
the layer animating when the window was moved from screens of different
scale factors.

We need to investigate this further, but in the meantime fix the
visual regression by disabling the explicit layer contents placement.

Change-Id: I63ea1eab9cf3fa6480e88844918ed98e6aa72620
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-04-03 08:01:28 +00:00
Friedemann Kleint
163a0475eb Windows: Fix QFileSystemEngine::id() for FAT32 drives
GetFileInformationByHandleEx() which is used to to obtain the ID, has been
found to fail on FAT32 (USB removable drives). Fall back to
GetFileInformationByHandle() for these.

Fixes: QTBUG-74759
Change-Id: Ib3ef60a6bf9e9edaf41af86bf71666001cb0aa58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-02 16:21:39 +00:00
Alexandru Croitor
e5f0fec762 Fix disabling AUTOMOC and AUTOUIC for generated resource cpp files
when using qt5_add_big_resources.

The previous approach of just setting SKIP_AUTOMOC and SKIP_AUTOUIC
on the generated source files is not enough because if AUTOMOC is
globally enabled, AUTOMOC will still run for the
rcc_object_{outfilename} target, which ends up creating a
mos_compilation.cpp.o file and adding it as a target object to the
target.

Thus later when $<TARGET_OBJECTS:rcc_object_${outfilename}> is passed
to the rcc invocation, the expression evaluates to a list of two
files: the rcc-related .o file and the mocs_compilation.o file.
Obviously that breaks the rcc invocation.

The fix is to disable AUTOMOC and AUTOUIC on the whole target, instead
of just the source files. This prevents the creation of the
mocs_compilation.cpp file.

Fixes: QTBUG-74270
Change-Id: I51f757b110e940fe224010acb25b88c52ef612b1
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-04-02 12:22:29 +00:00
Venugopal Shivashankar
05d9195669 Doc: Use the \nullptr macro instead of 0
This enables overriding the macro so that it translates
to 'None' in the Qt for Python context.

Change-Id: Ib3cecf57eeb0405a1929309b71e9f012a07f11cf
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-04-02 08:14:07 +00:00
Eskil Abrahamsen Blomfeldt
a65800cc68 Add a clarification about "characters" to QTextCursor docs
The function name QTextCursor::positionInBlock() may give users the
idea that it can be displayed to the user as the visual position of
the cursor in the current block. This becomes confusing with some
writing systems, since e.g. a surrogate pair will count as two
characters while only representing a single visual grapheme.

Since it is an side effect of the encoding that will be unexpected to
many, and since it also touches on some linguistic complexities, we
add a note to the documentation to make users aware of the
consideration needed.

Task-number: QTBUG-74725
Change-Id: Iba28ba8a6ad07ee38dbb7e6a5a4b68c93d4da76a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2019-04-02 06:51:21 +00:00