Passing parameters via auto to a lambda function is a c++14 extension
which is not supported by gcc4.8.
Change-Id: I335b2a2f5ba02f5440c2e7ccc81d4156e8b29484
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When QFile::open is called with the NewOnly flag, the call will
fail if the file already exists. As usual, if the file does not exist,
it will be created. Like QTemporaryFile, there is a guarantee from
the operating system that you are not accidentally creating a new file
on top of an older file. When QFile::open is called with the
ExistingOnly flag, the call will fail if the file does not exist. The
ExistingOnly flag only provides new functionality when used with the
WriteOnly flag. For ReadOnly it provides no change in functionality,
as ReadOnly by itself already never creates.
Task-number: QTBUG-52244
Change-Id: I8e3206728f245f95172c225bf297023fb078fc6d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QStyle::pixelMetric(QStyle::PM_FocusFrameHMargin) was called three times
in the worst case but it returns a constant value. Therefore cache this
value and call pixelMetric() only once.
Since this code is duplicated from QCommonStylePrivate::viewItemLayout()
also change it there.
Change-Id: I6d5f0a8d2b1373bd36f0520f404e6a3cb0794f12
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
When in full screen, then the geometry available is the whole screen
not including the menubar or dock area. This ensures that it does
not leave space for the dock area.
Task-number: QTBUG-39403
Change-Id: I15d7b7764d83282e1ee057628680a338b72711a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
CUPS has a complex way to configure colors for printers, and this can not
be represented only by radio buttons.
Because of that all colors related options will be available only in
the advanced panel.
The color/grayscale option will still be available when printing to a file.
Change-Id: I1592e779009bd80b6dfc18dde760db4154e46439
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
clang needed to see so type definitions that aren't there
for some platforms, so this update provides defaults when
qdoc is running.
Change-Id: I15e635b31dd651457f828f90c8dd132959c826e6
Reviewed-by: Martin Smith <martin.smith@qt.io>
IBus 1.6 will remove the deprecated DBus APIs; GetAddress() GetEngines()
These APIs are replaced with DBus GET properties.
Change-Id: I427494dd0685d523ac07366be528127d98ad7d7c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This also fixes focus ring thickness on retina
displays except for radio button, for which we
don't allocate enough space around. Instead of
going down the push button madness we currently
have, we leave it as is (i.e., slightly truncated)
until we can come up with a more sane solution
regarding focus rings.
Change-Id: Icd4aa2e08c2558768c91efd7d119879e249b052f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Using Core Graphics or AppKit has no real advantage.
Change-Id: Ie7e2df23f8da6ca4798092a7c074bbb2f40e2b18
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Generate it only when the form contains some actions.
Change-Id: Ic1d64003ccff6102174771c04999cf7c90ac2ae8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Generate it only when needed.
Change-Id: I7a89b18ec0f2ee7d55fcad1b3f9701269d7616ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Qt was missing symbols for many dead keys defined in <X11/keysymdef.h>.
These dead keys were thus ignored by the "compose" input module. This
commit adds the missing dead key symbols.
[ChangeLog][Linux/XCB] Added missing dead key symbols, enabling their
use with the "compose" input module.
Task-number: QTBUG-56452
Change-Id: Ib5c37168990c9d9fa99fdd50f63b934c793e8dc4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Matt Whitlock <qt@mattwhitlock.name>
Added many template clauses to \fn commands. Also added or
modified some uses of Q_CLANG_QDOC in some dbus include files
to work around some seriousl ugly template clauses that could
not be added to \fn commands. Also modified a few parameter
names in the documentation.
The first attempt at making this change caused syncqt to fail
to create QtDBus/QDBusPendingReply. This second attempt works.
Change-Id: I96c1fb9bcb1d9debf9409f6baf8c42e18fb9e75d
Reviewed-by: Martin Smith <martin.smith@qt.io>
... that will be used if an icon can't be found in the
current theme.
The Icon Theme Specification
https://standards.freedesktop.org/icon-theme-spec/latest/ar01s05.html
states that unthemed icons must be searched in the base directories,
i.e. /usr/share/icons, ... But in practice unthemed icons are
installed into /usr/share/pixmaps and this dir is not used as
a base dir for icon themes. So it's better to explicitly specify
fallback dirs to avoid needless access to the filesystem.
Also some KDE application install their own unthemed icons
(into /usr/share/<appname>/pics), that can't be found by
QIconLoader. With this change it would be possible for them
to specify dirs with unthemed icons and thus be displayed
correctly in non-KDE environments.
[ChangeLog][QtGui][QIcon] Added fallbackSearchPaths() that
will be used to find icons missing in the current icon theme.
Change-Id: I0dc55ba958b29356a3b0a2123d6b8faa24d4c91e
Task-number: QTBUG-33123
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
One foreach too many, creating a temporary container.
Converted to range-loop, as drive-by change.
Change-Id: Ie2bb94a7147edcfc0d8b5f479604f5ebe113d7cb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Added several missing template clauses to member functions.
Change-Id: I95b46de84c9afa74b74fc36818094b0fff41f755
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Added a few missing template clauses to member functions
of QVulkanInstance<T>.
Change-Id: Ie13f7e97f6a2183ee66d7ea275bc56a2bc3588e8
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Added a few missing template clauses to member functions
and friends.
Change-Id: Ie5ca557ddcc1dfd90ef5e80fc4e8213dfb32a03c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
struct FormatRange is contained in QTextLayout, so uses of it as
parameters in friend functions of struct FormatRange must be
qualified with QTextLayout::
Change-Id: I6d3ad3020240bff3b948fb571971694b44708c54
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Tab is contained in QTextOption, so it needs that class qualifier.
Also removed a useless qdoc comment.
Change-Id: Ic37f0fc8cb97c2b022f69293e8fd50f0a5a2b649
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QTouchPoint is declared inside QTouchEvent, so \fn commands
for functions in QTouchPoint must use QTouchEvent::QTouchPoint::
as the qualifier.
Change-Id: I1dffe9f43f9f8bddbaa8fab9f77cf17802cf8b26
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Data in item models is most often organized in rows, where each column
contains an attribute of the item represented by the row. Often when
sibling is used, it is to request another piece of data from the same
row. Having a specialized version makes this easier and less awkward
to do, simplifying
auto sibling = index.sibling(index.row(), columnOfInterest);
to
auto sibling = index.siblingAtColumn(columnOfInterest);
For symmetry reasons, siblingAtRow(rowOfInterest) was also added.
Change-Id: Ib203b2cdb16154cbb2680d16fb5c6a7538f33d07
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
The template clause was missing in the \fn command for
a member function of a template class.
Change-Id: Ie1a8f8372d3183f05f02e518b363a7bac735abbb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The class qualifier was missing in the \fn command for
the move copy constructor.
Change-Id: Ia3633efde155ed19ac8460d760a5248e52097ea1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
A few \fn commands were missing the template clause now
required by clang-qdoc. This update adds the template
clauses. It also changes an instance of Q_QDOC to
Q_CLANG_QDOC.
Change-Id: I2850d43d98debb80e01c36a524e0c00651a89298
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Some options only make sense if the printer has installed some extensions, e.g.
we should not shown "Staple" options if the Stapler addon is not installed,
so with this change we use ppdInstallableConflict to know whether an option
should be shown to the user or not.
Change-Id: I5733e1ac8b667c26b292aeafc90a10c155b751a4
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Previously it was a bit awkward to use, you had to do
QStringList cupsOptions = QCUPSSupport::cupsOptionsList(printer);
QCUPSSupport::setCupsOption(cupsOptions, option, value);
QCUPSSupport::setCupsOptions(printer, cupsOptions);
now you simply have to do
QCUPSSupport::setCupsOption(printer, option, value);
Change-Id: Id31583f1ec72644791d82776debbae5583a2be54
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
According to CUPS maintainer it is recommended to not show them[1].
GTK and Libreoffice behave like that.
[1] https://lists.cups.org/pipermail/cups/2015-September/027124.html
Change-Id: I82614003490554d41e38a125d44e3a599c2e7342
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Previous behavior:
* Open, change setting, cancel, open again, setting was as originally (i.e. unchanged)
* Open, change setting, accept, open, change setting, cancel, open again, the setting would be as before pressing cancel
* Open, change setting, accept, open, press cancel without changing anything, print, the initially changed setting is not applied
New behavior:
* Pressing cancel just cancels the changes since you opened the dialog, everything you accepted previously stays correctly selected
Change-Id: I483647504682f26d3d21c5229cc6530bf14fe519
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
First steps towards a public API for having multiple output sinks is
to allow this internally.
We give all the different log sinks the same signature, with a bool
return value to signify if stderr has been handled.
The logic of not logging to the alternative sinks when the function
qt_logging_to_console() returns true has been moved into each sink,
so that they in the future may choose to log even when also logging
to the console, allowing multi-sink output. They must then make sure
to return true if the native logging sink has also logged to stderr.
The logic of each sink has been kept the same when it comes to the
formatting of the message. Some of these sinks should ideally use
the raw message instead of the formatted one, as they are structured
logging sinks.
Change-Id: I441d3bc1db3e16180704e00d13a40564b6f06a6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Structured sinks such as systemd should capture each piece of information
individually, not bake it into the message via the message pattern.
Change-Id: I164c043683f123764a5445dc9faad049e25fd738
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Apparently this (undocumented) TESTDATA feature creates resource files,
but lets you use wildcards as well, which is very handy.
The reason I didn't know/realize this when adapting the tests to use a
".qrc"-file* was because some of the test-cases were using relative
paths instead of the 'testDataDir' variable.
This commit fixes the remaining uses of relative paths, removes a
usage of QDir::setCurrent, and adapts QSslSocket to use TESTDATA.
* in now-reverted commit e1600c1a73
Change-Id: Iee6d88f1e0810eeaadac90e7d44bc6db84bfeabf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
The workaround was needed in older versions of MinGW-w64 headers that
did disable some common functions for -std=c++1z. Anyhow, this is not
reproducable anymore with any recent MinGW-w64.
Change-Id: I8e34a2e055f8e2356696dd4fe131a757c1527574
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Removed unneeded \fn commands from two qdoc comments and
moved one of the comments to the file where its function
definition is located.
Change-Id: I4c4371f0541d2995398b0d32e1df409433061226
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
We seem to induce QCoreTextFontEngine to draw text the
wrong way in non-native QMenu popups. Here, we just
delegate menu items' text rendering to AppKit.
This is only a workaround pending a proper fix or better
understanding of the aforementioned issue.
Change-Id: I71088ebe2a534bebca2ad396b1ea6754be093f55
Task-number: QTBUG-65653
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>