This also reads the job-priority from lpoptions if set there for the particular printer
Change-Id: I75d983c377d2135a0b0d3e028829a7384a5e1897
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This is actually two fixes.
* We need to call cupsMarkOptions
* CUPS differentiates between the "" and the nullptr instance, so we need
to change the call to cupsGetNamedDest accordingly
Change-Id: If2692e405b6b71f8ee91362e6e72eabd9202d704
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
The number of active scrollers is probably very low, so O(N) vs. O(1)
search can be neglected, compared to the higher cost of allocating and
iterating a QSet. The tipping point is that the public API uses QList,
and the QSet needs to be converted toList() on each (external) access.
Just use a QList.
Change-Id: I5f0b37761923dc94d6dbbbf92973da73f5335e4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
dialogs/qprintdialog_unix.cpp:1104:21: error: incomplete type 'QTextCodec' used in nested name specifier
Amends b4330bc391.
Task-number: QTBUG-54464
Change-Id: I555431d11a5c3f247d4f055d94255d2708c92374
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Adds support for FileChooser Flatpak portal. To support them we just do
specific DBus calls, which are then caught and forwarded by xdg-desktop-
portal daemon/service. This is needed for Qt applications running in
sandbox.
[ChangeLog][Platform Specific Changes][Linux] Added support for flatpak
portals. Flatpak is a software utility for software deployment and
package management. It provides a sandbox environment in which users
can run applications in isolation from the rest of the system. To
communicate with the system flatpak uses portals, which are designed to
be a bridge between sandboxed applications and desktop/system running on
user's computer. Flatpak runs this service (called xdg-desktop-portal)
automatically. It exports the portals via DBus and they are visible by
default to all applications running under Flatpak.
Change-Id: I4de1402434ba7cbcc805eab51c30f84f8ba0c5c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is especially useful on macOS where the default
ignore cursor is the pointer cursor.
Change-Id: I5e14814abd2d59a7f4c4cd1029829ebbed5b3017
Task-number: QTBUG-26724
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This is one of the most frequent problems users ask for help with, and they
don't even know if the plugin was found but not loaded or simply not found.
Qt knows what happened, so communicate it to the user.
Change-Id: I6003ed4ab3d147a5d159b2002004e53c251cb512
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is mostly a revert of 69de617761 adapted to the new code.
The commit that removed this code said:
a) there's duplicate settings in the advanced tabs and in the rest of the ui: this easily
solved with a blacklist
b) you can set these options in the system settings: probably true, but it is very cumbersome
to go to the printer settings every time i print to select from which tray the
paper should be used
Task Number: QTBUG-54464
Change-Id: I7b1cacf51006dadb10aa6e00fe6dd2ff748fe576
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This code is unused/not functional.
Use sRGB everywhere instead. This is not a change
of effective color profile: the backing store has
had the sRGB profile assigned since commit ac899f6d
changed it as a side effect.
Change-Id: Ib45cec3acad90db2a0873b052d6bc4a61c894b18
Task-number: QTBUG-47660
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is going to be the most common scenario for GCC: all recent
versions allow compiling F16C code in the same source, thus generating
better code.
MSVC is excluded unless AVX is already turned on by the user in the
mkspec file, because it fails to use the VEX-prefixed instructions for
everything else, printing a warning that it knows it should have done
so.
ICC is excluded because it's known to generate invalid code when using
the F16C intrinsics unless F16C is turned explicitly on.
Clang is excluded because it runs into an internal error compiling this
code unless F16C is turned explicitly on.
Change-Id: I57a1bd6e0c194530b732fffd14f58de6a46f0de1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Check that the inserted/removed range is indeed valid.
Change-Id: Ifccbe13f0753252ee1450c8668df782dc699f05b
Reviewed-by: David Faure <david.faure@kdab.com>
The update adds the moduleheader variable to the qdocconf
file for qttestlib.qdocconf and qmake.qdocconf. The problem with
qmake is that it doesn't have a module header file, but it does
have qmake_pch.h, which is used here. This update also corrects
several \fn commands in the qttestlib docs.
Change-Id: I2202b9db96390bac1ee491ca8a99ca9010057ce3
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QPlaformPrintDevice uses QVector to store, but QList in the getters to
retrieve these data. Port API from QList to QVector to avoid
conversion between the two containers on every access.
Saves almost 4KiB in text size (another 0.9% of QtPrintSupport).
Change-Id: If33df141b87753803c45d9f4dae501a68abe49af
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit pains me, because we want Qt to migrate away from QList,
but the QtPrint API stack (all the way to public API, for QPageSize,
and int) is formulated in terms of QList, not QVector, so it makes
zero sense to store data in QVectors just to convert to QList on every
opportunity.
Store QMimeType in QList, too, since that's what QtCore uses.
Saves 3KiB in text size (0.7% of QtPrintSupport).
Change-Id: I71249f60be517cc06973b38d9ccad7a31f348be3
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
In order to support the generated EUDC.TTE font for
End-User Defined Characters on Windows, we need to allow
fallback fonts which are not part of the default font
collection. This is the same as change
21c7421d4e, but adapted to
the fallback font code path.
Without this change, the EUDC file would still be loaded,
but it would be loaded through the GDI fallback, and we
would display an error message on the console.
Task-number: QTBUG-44594
Change-Id: Id2404228c7fd345523e4e5c99f31862e256930e3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
EUDC, or "End-User Defined Characters", is a concept in Windows,
where the end-user can create a local fallback font of default
glyphs for the PUA (Private Use Area, a range of Unicode
not reserved to any writing system), and these glyphs will be
used when displaying the character using a font which does not
itself support the code point.
To support this in Qt we look up the default EUDC font in the registry
and add it to the fallback fonts if it is available. We use the
font for code page 1252. This has been tested on a couple of systems,
and appears to always be present. The font is added to the front of
all fallback lists, so that it will override other fallbacks,
such as Segoe UI Symbol, which happens to assign glyphs to the PUA.
If there is no end-user defined fallback, then Segoe UI Symbol will still
be used as before.
Note that this required a small change in the code to get canonical
font names. The EUDC font that Windows generates will only have a
name set for the current locale, and we expected all fonts to have
an English name. Instead, the code has now been changed to prefer
the English name if one is present, but accept any other name if
there is nothing in English.
[ChangeLog][Windows][Text] Added support for End-User Defined Characters
in Qt.
Task-number: QTBUG-44594
Change-Id: I83ae68b6d16e9b50e990dfb3ac3d294b7b2a5113
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Changed some uses of Q_QDOC to Q_CLANG_QDOC;
eliminated some uses of Q_QDOC; correct some
function signatures used for qdoc; added docs
for swap() functions.
Change-Id: I0d3c62d462bd3b10fd35d411bdfb93d952e6423d
Reviewed-by: Martin Smith <martin.smith@qt.io>
QT_NO_OPENGL must not be defined when running clangqdoc
because there are opengl elements that must be documented.
That means clang will see uses of GLxxx, which might not
be included on some platforms. For example, clang must
parse the declaration for class QOpenGLFramebufferObject,
which uses GLuint, GLenum, and GLbitfield, because there
is documentation to be published for that class in
qopenglframebufferobject.cpp.
This change uses Q_CLANG_QDOC to first undef the needed
GLxxx types and then provide suitable typedefs for them.
This technique is also used in qglshader.h.
This works for macOS, but is it the right way to solve the
problem?
This change also removes some \overload commands, because
they shouldn't be used on constructors. And some \fn commands
that are made unnecessary by upgrading to clang.
Change-Id: I4ac658e951b3f2011698005f0238d4dea85fc403
Reviewed-by: Martin Smith <martin.smith@qt.io>
QColorDialog does not save custom colors after application
relaunching, if those colors were changed with drag'n'drop
Task-number: QTBUG-64500
Change-Id: I8ba6e1ef4e078f7b93463e7b20c9e21659d4777e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QFontMetrics(F)::width() has been deprecated and is replaced by
horizontalAdvance(). This updates all usage of it in tests and
documentation.
It is worth noting that many or most of the usages of
QFontMetrics::width() probably intended to use boundingRect().width(),
but since it currently works, I have not looked into that, just
replaced the function name mechanically.
Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use being()/end() instead.
The region of whose rects() we iterate here is modified in the loop
body, so take a copy of the rectangles. Since QVector is still
missing a range constructor, use std::vector. This does not cause
extra copies, since the QVector inside QRegion would detach anyway,
when the QRegion is modified inside the loop.
Change-Id: Ib973e825b55d9c9568936cb80180858163d87379
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
These errors resulted from the improved parsing provided
by clang, which required rethinking which elements of the
QtConcurrent API should be visible to clangqdoc. The basic
problem is that clang must see declarations for all types
used by a type, or else it either gets lost and fails to
parse a type correctly, or it simply refuses to include
the type in its AST.
Change-Id: Iaa699c287e67d1288fcb2d83a9dbbaf07521d0cc
Reviewed-by: Martin Smith <martin.smith@qt.io>
This change updates the \fn commands in the QtConcurrent
module, which makes extensive use of templates. Some of the
update \fn commands are very long as a result.
A few cases of the tag trick were used to fix qdoc errors
for some complicated template function signatures that were
marked \internal anyway.
Change-Id: I8546b89030c51bb9dddf38fa10bc0248d901aa51
Reviewed-by: Martin Smith <martin.smith@qt.io>
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters.
Change-Id: If45465880933174f1481a8be292474be191cfd45
Reviewed-by: Martin Smith <martin.smith@qt.io>
This update corrects many qdoc warnings in qglobal.cpp caused by
incomplete \fn commands. It also corrects many undocumented parameter
errors caused by clang's requirement that the formal parameter names
be the same in both the declaration in the include file and the \fn
command.
Some formal parameter names were changed in the declarations in the
header file.
Change-Id: I4cd38f30461c585b97ec11923cdbc81a41fe00b8
Reviewed-by: Martin Smith <martin.smith@qt.io>
There were four dummy declarations for struct QMetaObject that were
needed by old qdoc to allow documentation of some very complicated
function signatures that old qdoc could not parse. clangqdoc can now
parse these signatures, but, unfortunately, old qdoc is still used to
parse \fn commands in .cpp and .qdoc files, so the dummy declarations
are still needed in struct QMetaObject. However, clangqdoc now
sees that two of the four dummy declarations are actually duplicates
of the other two, and then old qdoc complains when it can't find all
four of the function nodes, when it parses the four \fn commands.
This update removes the duplicate dummy declarations and the two
redundant \fn comments. The remaining two \fn comments are
updated accordingly.
This change also moves a couple of qdoc comments so they are located
with the function definitions that they are documenting.
Change-Id: I85e2492ba0380b01c3700b3dc7db0913d6429701
Reviewed-by: Martin Smith <martin.smith@qt.io>
All of QLocalePrivate::codeToLanguage()'s legacy codes were
two-letter, so duplicated a "third letter is 0" check; pulling it out
in front of them all will get any three-letter code more promptly to
the final fall-back, while saving the two-letter codes repetition of
the check.
Change-Id: I8ee81a526adaa7b24c11c1de7a1750d87deb5fb3
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The documentation claims that function objects just work with
map-reduce. They work for the map function, but not for the reduce
function. Making them work for the reduce function was deemed
too complex for questionable benefit, so this patch explains
the situation and provides a work-around.
Task-number: QTBUG-22710
Change-Id: I7f706468e36031bc261234310d331001b96e5137
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- There was a typo
- It has not been limited to the 4D mouse for some time now
- The Apple Pencil now supports rotation too
Change-Id: I96e20a56491fbcb80e19dc39d0b48b543217aa24
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
It was superseded by begin()/end() in Qt 5.8.
The eventual removal of rects() will allow greater flexibility
in the implementation's choice of data structure (std::vector,
e.g., or QVarLengthArray).
Remove all traces of rects() from the documentation. This means
we need to copy information previously contained in the rects()
docs to functions which previously just referred to rects(), in
particular the begin()/end() familiy of functions.
Change-Id: I90809809783252f7c552f24b4841f1e965580284
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Add the command line switch added in change
184c5470f534119b27c1a4caec29d699aba9c234 on qtdeclarative to the
help output of the qmltestrunner application.
Change-Id: I9f42719500e0039afa6a5b0f1f365611855229b3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
I don't know when it ceased to be needed, but QRegion no longer
does anything fancy with QVector.
Change-Id: I1bdfefc84724c379fab76dada35575666144df12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use begin()/end() instead.
The old code extracted the rects from the region, then checked for a 'complex'
region (by comparing the number of rectangles against 10), and replacing the
region with the bounding rect if it was too complex. It then went on to adjust
the rectangle list it had gotten from the original region to match the new.
Simply delay getting the rectangles until after we have modified the region.
Since there are many member function calls in-between, take a copy of the
region to iterate over later, rather than relying on the region to be left
untouched by all the code in-between.
Change-Id: I49ddf4d545520ab435ab6b89eec3d24cf371823e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use begin()/end() instead.
In QXcbShmImage::flushPixmap(), instead of gettings different rects(),
depending on a bool parameter, just call yourself again with the
modified QRegion, which we can then just iterate over.
Change-Id: I6d4f7c6e4e5d2a24520716847ca9331bf39337c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... between QXcbWindow and QxcbShmImage.
Replaces one QRegion::rects() call (to be deprecated), fixes potential overflows
that QXcbShmImage did not handle, but QXcbWindow did, and saves ~1KiB of text size.
Change-Id: I55d37021164feefe0cb3e60bd6d22b1976a6467b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use begin()/end()/rectCount() instead, which don't require QRegionPrivate
::vectorize() calls.
In QPaintEngineEx::clip(), the rectCount() == 1 case called clip(QRect), but
forgot to return, causing another clip(QVectorPath) call with the same
arguments. Fixed.
Change-Id: Ife33112fc8006ed4bdff6409e2b8465ce7acb9d1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Wrap std::free() in a function object, to avoid having to carry around
state (the function pointer) inside unique_ptr objects. This shrinks
unique_ptrs back to sizeof(void*).
Change-Id: I32a711192c5485dc04e3b36a1ddabf02d1e9d4f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This update corrects many qdoc warnings in qsharedpointer.cpp and
qshareddata.cpp caused by incomplete \fn commands. Template stuff
was added to the \fn commands.
Change-Id: Ic10bcf04477d5f3d5380aeb1e58050a88f03005a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update corrects several uses of #ifdef macros
that needed updating because qdoc now uses clang to
parse header files.
Change-Id: I285efa4629a1a5d5bcbfaf701eeafbd0e9f1e43e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
It is only ever called after the constructor, so merge the code
Change-Id: I5c75a2cd367af401b41920f51754a64dc6c6eb40
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It is only ever called after the constructor so merge the code
Change-Id: I381165ad90c85342e5db3c16327d729388b71fb2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It's only ever called after the constructor so merge its code to the constructor
Change-Id: Icca88764f725b9aeaa08ee7387da8885be247fba
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
And move it's code to the only place it is called, the QUnixPrintWidget constructor,
that means we can remove the if that checks if propertiesDialog is not null since
at that stage we know it is null
Change-Id: I81cdaa0505fa6fe64a45c7d1f5c3e277400cbbf7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
In Qt 5.4 these envvars were replaced with categorized logging
59ba84d31c. This is not a public
API, the log output is useful mostly for developers and it can
still be used via QT_LOGGING_RULES, so there is no good reason
to keep the old envvars around. By using QT_LOGGING_RULES, we
can access even more xinput2 logs than is available via
QT_XCB_DEBUG_XINPUT*.
Change-Id: I2b12b8696043bc8bf8310f49f0cdc2ba1b8708ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>