File system operations like renaming/removing may fail on Windows when
file system watchers are present. Add functions to
QFileSystemModelPrivate to temporarily remove the watchers prior to such
operations and to restore them in case of failure. Use them for
rename/remove (within a feature check for QFileSystemWatcher
and Q_OS_WIN).
Task-number: QTBUG-65683
Change-Id: I90142901892fbf9b1e1206a3397a95ffd3c8f010
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
With this change it is possible to use all supported
configurations in different backends without any new interfaces.
Change-Id: Ib233539a970681d30ae3907258730e491f8d3531
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The include is needed for std::unique_ptr on winrt.
Change-Id: I72a28bd0951cc947ac65877ccc35f464c757c444
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
All of our compilers support #include <immintrin.h>, so we don't need
the legacy code that includes the earlier versions.
Change-Id: I938b024e38bf4aac9154fffd14f80214d1d744c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Adds inline handling of the C++17 type std::variant, so the type will
be resolved if converted into a QVariant.
Change-Id: I31809d70d7f347277389d42a3695836ec7a32d02
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit 29bc68cf16 added support for
unsigned and commit 5ff7a3d96e later added
support for int. This commit adds support for qsizetype, which isn't int
on 64-bit platforms.
We do this by reorganizing the code and using the generic version of
__builtin_{add,sub,mul}_overflow from GCC 5 and Clang 3.8, which ICC 18
seems to support now too on Linux. That leaves older versions of GCC and
Clang, as well as MSVC, ICC on Windows, and the GHS compiler, to use the
generic implementations, as I've removed the assembly code those
versions of GCC and Clang on x86 are now uncommon.
Note: any older version of ICC probably breaks. We only support the
latest.
Change-Id: I9e2892cb6c374e93bcb7fffd14fc11bcd5f067a7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
It did not make it into 5.10 as far as I can tell.
Change-Id: I01f950c476f2c98f4ed40d2cafd15ecc112a3427
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
CT_LineEdit is as well, so that makes QLineEdit free
of HITheme APIs.
Change-Id: Ia02ce9f1003e5ae9c8bf47dab9ada030feca98ba
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
For some reason the cups options are kept globally instead of per printer at QCupsPrintEnginePrivate
so when setting the printer options on accepting the print dialog, we first need to clear them
and then call the other functions that set them, otherwise, we will "reuse" cups option set on
the previous print.
How to reproduce:
* Open print dialog, set some advanced option to a non default value, easiest one is print in grayscale
* Print
* Check it prints in grayscale
* Open print dialog, check the advanced options are all on default values
* Print
* Check it incorrectly prints in grayscale
Change-Id: I59aacaf30db844ad40887d6b771f9354557852b6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Extract a helper function to determine the window title from QXcbConnection
and add an invokable function to the native interface that dumps the window
tree similar to existing functionality on Windows.
Change-Id: I5544d69ea2b801eb16d3b5b8d64021b3e567b0d8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Use qInfo() instead of qDebug() in case QDebug is turned off.
If the 'diff' tool is available, write the output to temporary files and
run diff on it. Otherwise, print the lines as was before, but onto one
stream to avoid indentation by the testlib handler.
Change-Id: Ib5a5dfb66ce481b493b85b915aa8c785ecb6b387
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add more queries, output the query enumeration value
and output the hints as flags.
Change-Id: Icfc648a8d6e144074455ecebae1b25c3c3e1063e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
While menubar actions are hidden, as menubar was too narrow
to contain them, by clicking the blank area, where the action
was supposed to place, can still trigger the action.
Task-number: QTBUG-65488
Change-Id: I6b137e0717f634ebd3371dbcc2c1ce2089688374
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The macro Q_DECLARE_INTERFACE declared some qobject_cast() functions
that clang-qdoc must not see in the contexts where the macro is used.
This update prevents that from happening by ensuring that Q_CLANG_QDOC
is not defined when the macro is defined.
This update also adds a \fn command for a declaration of qobject_cast()
that was missing in the documentation. There are two versions of the
function, one with a const parameter and one with a non-const parameter,
and they both share one qdoc comment.
Change-Id: Ic74d0aaae62767cd0391474ee95ae3f4f820b06e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The functions had been added without documentation.
This update adds the documentation.
Change-Id: Ib29e9356b26c248b5fcc9f13ecf77371fbae054a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Fixed many cases of missing return types in \fn commands.
Added a fake GLxxx typedef for a GL type that wasn't there
because the GL includes weren't accessible. Also added some
fake declarations for a few functions declared in namespace
Qt in QtWidgets that must be seen by qdoc in QtCore.
Change-Id: Id82476042d0563d32fa85c4ae81a58c1298a468a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Adding larger pixmaps to the icon caused the icon to grow.
Task-number: QTBUG-38776
Change-Id: I29148d70afa55e287f2ad254e449a98c4aa631fb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Add larger pixmaps for the dock title bar icons; override
them by the XPM in fusion style to maintain the behavior.
Task-number: QTBUG-38776
Change-Id: I7d0e022bbf620d2aad2b6ee011b8bb9a745d7c3b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Make way for adding dock title icons to QCommonStyle.
Task-number: QTBUG-38776
Change-Id: If1729478f55f0bce5e04399d0cca98afd2facb31
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
By ensuring that the current index follows the focus of an index widget,
we can ensure that moving the cursor will happen in the way that is
expected from the focused widget.
Task-number: QTBUG-27793
Change-Id: Ia36891a94ce41c7d12fba678de23a6f3b69374ae
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
While touching the code, move initialization from
body of ctor to initializer list
Change-Id: Idfcb4fb771d1414268f8685874395ca54b20621a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The action which added by QMenuBar::addAction(const QString &text) already
connected relevant signals and slots implicitly, however, while
QMenuBarPrivate::updateGeometry -ing, it reconnects them
if there's a extension button associated with a hidden popup menu.
In that case the QMenuBar::triggered would be fired twice.
Since the QAction's ownership may be changed or added dynamically,
there are still very rare cases like several widgets share the same
QAction object to result in this problem.
[ChangeLog][QtWidgets][QMenu] Fixed a bug in QMenu that caused QMenuBar::triggered
to be fired multiple times.
Task-number: QTBUG-25669
Change-Id: I4d52e82a2136a992e0b37118e41237d96a2c5d22
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
On some combinations of RDP client and server a large mouse cursor
results in a hang of the RDP session. However, the 'touch' drag
facility (creating a transparent window) works just fine, so use
that when encountering a large cursor on RDP.
(The threshold of 96 for a 'large' cursor was extracted from the
spec, as that is the largest supported size mentioned.)
Change-Id: I9782c45e8bd6640f36bb5a392961681a99e214e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The fixes included undocumented enum values, which are now
marked as omitted, adding a test for Q_CLANG_QDOC for a
couple windows enum values, adding \fn commands for a pair
of member functions in QLocale, and a \fn command for an
obsolete function in QSqlError.
Change-Id: I12a8ea7287039096b9cfe7870d2ab213a3d78dcf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The fixes included adding missing '!' characters to qdoc comment
markers, correct misspelled words, adding documentation for an
anonymous enum type, and replacing Q_QDOC with Q_CLANG_QDOC.
There remain 12 qdoc link warnings in QtBase.
Change-Id: I00447722e6e029f5aed273b3cd571cef33c119b4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The size of the QStaticText was always adjusted, even if setTextWidth()
was used. Now size of the QStaticText is calculated according to
the set width of the text, and if no width was set, then the
automatically adjusted size is used.
[ChangeLog][QtGui][QStaticText] Fixed explicitly set width not being
respected.
Task-number: QTBUG-65836
Change-Id: If2f9f6952fb168f4bcb6d8fabfdc7360f8a36485
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Improves performance and STL compatibility by adding rvalue versions
of prepend and insert.
[ChangeLog][QtCore][QVarLengthArray] Added rvalue overloads of
prepend and insert.
[ChangeLog][QtCore][QVector] Added rvalue overloads of prepend
and insert.
[ChangeLog][QtCore][QVarLengthArray] Can now contain movable but
non-copyable types, such as std::unique_ptr.
Change-Id: I6c946acc5b67502c91c52ac5dea67cedb1af93a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QStaticTextPrivate::paintText() now uses QColor(0, 0, 0, 0) to mark
body text. QPainter's pen color was used before this commit
(that was always black) that leads to different colors of body text if,
for example, links are in body (first block painted with correct color
set by QPainter::setPen() but after link body text was always black).
Now QPainter::drawStaticText() will draw body text with set pen in
any case.
[ChangeLog][QtGui][Important Behavior Changes] Fixed a bug where
QStaticText would not use the QPainter's pen color for text when other
text colors were also in use. Internally this reserves
QColor(0, 0, 0, 0) for use with QStaticText.
Task-number: QTBUG-45957
Change-Id: If3e180e3083cdac1b4236e738acd15572f19ab69
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This is a regression test for bugs resulting from failure to take
account of the MS TZ APIs fake-DST handling of standard-time
transitions happening during DST. Has to skip the 2014 test on Win7,
as it's so old it doesn't know about the (for it) "future" transition.
Task-number: QTBUG-42021
Change-Id: I853b86d03a86f0269371bf1622bf63882fb8ee5d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We unconditionally tried Any-ing out various tags of a locale without
checking the remainer weren't Any, which would get us the C locale in
some cases where we might have done better. So check some retained
tag isn't Any before Any-ing out any tag.
In the process, add a separate variable for the ID with likely tags
filled in, to distinguish it from the supplied localeId (thereby
somewhat clarifying what's afoot) and save duplicating the
construction of this.
Task-number: QTBUG-64940
Change-Id: Ibd9f1aba6862434cf00fbf77ba00288ac9a50a3b
Reviewed-by: Jason Erb (Suitable Technologies) <erb@suitabletech.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Removed the '!' from two comments because the functions being
documented are static functions declared and defined in the
.cpp file. They are not public.
Change-Id: Ie3b2c32c64102634b6b2a4c438da191536a426d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Gcc 8 now warns against casting functions taking references to
functions taking pointers:
warning: cast between incompatible function types from ‘QVariant (*)(const int&, const int&, double)’ to
‘QVariant (*)(const void*, const void*, double)’ [-Werror=cast-function-type]
Suppressed by casting over void(*)().
Change-Id: I48bee53253b8e87110e8a49efa761fc2add89c5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QItemDelegate::doLayout added a margin after the checkbox which is not
done within QCommonStylePrivate::viewItemLayout. This created a small
but visual difference between using QItemDelegate or QStyledItemDelegate.
The additional margin was removed from viewItemLayout somehwere between
4.4 and 4.5 so it was intentional.
Change-Id: I2fc3f287fe8b181355edeebec9626c49d85fe74d
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The __fastcall calling convention is silently ignored on other
architectures. The GNU attribute regparm is allowed but doesn't
make sense on x86_64. On other architectures, the attribute isn't
supported at all.
This fixes building with clang for MinGW/ARM and ARM64.
Change-Id: Ice1c6eadd0e90b2e5e34736542ee49a25dc67fe6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don't use the full size of dest in strncpy, we override the last byte
anyway afterwards.
Change-Id: I9f1618cc9019e0060f01deed58a726caa1989d3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don’t crash on focusObjectChanged to a QWindow with
a null QPlatformWindow.
Change-Id: Ibf426521d6c8f8b2b2e94d5b92020fa510a74133
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Use Ids from newly introduced id attribute depending
on the global form setting.
Change-Id: I0a5094d5543c0714c88511fa159b60afc9be3c81
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>