summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of QRegExp from QSharedMemorySamuel Gaist2017-12-301-3/+5
| | | | | | | | | This patch updates the code from QSharedMemory to remove the use of the deprecated QRegExp class. It also updates the unique key test to avoid change of behavior going undetected. Change-Id: I649e615027507898800bb5454a62a6cf8bbb2e18 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Migrate Cocoa QPA backend to use QRegularExpressionSamuel Gaist2017-12-302-5/+9
| | | | | | | | This patch updates the Cocoa QPA backend code to use QRegularExpression in place of the deprecated QRegExp. Change-Id: I6de2774975e63f8dbff6dad0a842f35c3c4b4f83 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Bump the minimum required version for harfbuzz to 1.6.0Lars Knoll2017-12-302-25/+1
| | | | | | | | This is the first version that supports Unicode 10.0.0, which we now require for Qt. Change-Id: Iff3cb757eb7d97dace5649262c337a4ed1145199 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update bundled HarfBuzz-NG copy to 1.7.4Lars Knoll2017-12-30102-4255/+9479
| | | | | | | | | | This is the latest released version, fixing a large amount of bugs and adding Unicode 10 support. [ChangeLog] Bundled HarfBuzz-NG copy updated to 1.7.4 Change-Id: Idc8092dfc4e593d64fff2fd51ff9e1b3d84049a7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QRingBuffer: avoid reallocations of the dataAlex Trotsenko2017-12-302-109/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since its initial implementation, QRingBuffer had the following fragilities in the architecture: - it does not guarantee validity of the pointers, if new data will be appended. As an example, passing an address of the QRingBuffer chunk as a parameter to the WriteFileEx() function on Windows requires the stability of the pointer. So, we can't add new data to the QRingBuffer until the overlapped operation completed (related issues were fixed for QWindowsPipeWriter and QSerialPort in 5.6 branch by introducing an intermediate byte array); - inefficient reallocations in reserve(), if a shared chunk was inserted in the queue (we can get a reallocation in the place where we don't expect it: char *writePtr = buffers.last().data() + tail; <- line #133 ). Proposed solution is to avoid reallocation by allocating a new block instead. That was accomplished by introducing a QRingChunk class which operates on a fixed byte array and implements head/tail pointers strategy for each individual buffer in the queue. So, QRingBuffer is no longer dependent on QByteArray's internal shrink/growth algorithms. Change-Id: I05abab0ad78e22e4815a196037dfc6eff85325d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNetworkInterface: fix warning of unused functionAlex Trotsenko2017-12-291-0/+2
| | | | | | | | | | | | | | | That causes compilation error in developer build or when '-Werror' command line argument is forced: kernel/qnetworkinterface_unix.cpp:142:12: error: 'int getMtu(int, ifreq*)' defined but not used [-Werror=unused-function] static int getMtu(int socket, struct ifreq *req) ^ cc1plus: all warnings being treated as errors So, mark 'getMtu()' as unused in the appropriate branches. Change-Id: Ib4d74845835962bb12f56baf8e13834c032a0404 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Chop a possible trailing \0 from retrieved textLars Knoll2017-12-291-2/+9
| | | | | | | | | | | | Some apps (e.g. Chromium) explicitly append a \0 to the text they transmit through the clipboard. Remove that one, when we retrieve the text, so it doesn't become part of the text we're pasting. This was e.g. visible when pasting from chromium to the textedit example. Change-Id: I9445319e6e5ef304a364e14f794b16557a3cc919 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* CUPS: Refactor the code a bitAlbert Astals Cid2017-12-271-16/+28
| | | | | | | | | | Move the selected and selDescription members to a subclass of QOptionTreeItem since it's only ever used for Option type nodes of the tree Change-Id: Ic99841c4e04a3afcff0950f72abf12977850f6d3 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Cocoa QPA: Delete singletons on exitGabriel de Dietrich2017-12-262-31/+18
| | | | | | | | | | This involves QCocoaApplicationDelegate and QCocoaMenuLoader. The former has been modernized to use blocks. The latter was not being deleted previously. Change-Id: Ic4cbfed2d9598fa04130675b3330d985b9489a21 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QHeaderView: properly connect rows/columnsMovedChristian Ehrlicher2017-12-223-11/+24
| | | | | | | | | | | | | | | | | QHeaderViewPrivate reimplemented _q_layoutChanged() to handle changes of rows/columns via layoutChanged/layoutAboutToBeChanged. This worked fine for Qt4 but since Qt5 only the special signals rowsAboutToBeMoved/ rowsMoved are used for this (8021e2d5e7ccd09146896f788441c116f2ca6159). With this change, QAbstractItemViewPrivate::_q_rows/columnsMoved() is calling the virtual function _q_layoutChanged(). This resulted in a wrong call of QHP::_q_layoutChanged() for a horizontal header when a row changed and for a vertical header during a column change. In the end this can lead to an unhide of hidden sections. Task-number: QTBUG-54610 Change-Id: Ide4bfc5b24a97746fd1e5af82d3ba08257149157 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update font when text format's letter spacing type is changedEskil Abrahamsen Blomfeldt2017-12-221-2/+6
| | | | | | | | | | | | | | | | | | | The QTextFormat::FontLetterSpacingType property was added outside the span of the FirstFontProperty and LastFontProperty, so the fontDirty flag would not be set when it was changed. There is no binary compatible way to fix this before Qt 6, so for now, we add a special case for it. [ChangeLog][QtGui][Text] Fixed an issue where changing the letter spacing type of a QTextCharFormat would not cause its font to update. Task-number: QTBUG-65345 Change-Id: I5ab53d7f82d529b57edceacfc3fa688c6741cd17 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: C. Boemann <cbo@boemann.dk> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build with -no-feature-regularexpressionUlf Hermann2017-12-212-2/+3
| | | | | | | | The thing we are looking for in qstandardpaths_unix.cpp is regularexpression, not QT_BOOTSTRAPPED. Change-Id: I37eb0cdd8a52b0adfd69f592b84659e8807e35ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix build with -no-feature-networkUlf Hermann2017-12-212-4/+14
| | | | | | | | The vnc and tuiotouch plugins depend on network support. The tuiotouch plugin furthermore depends on a specific feature from network. Change-Id: I3bc1f7b1dcf3437c6ed0d41cc9e282114a95a39c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix build with ICC: it miscompiles the F16C intrinsicsThiago Macieira2017-12-211-2/+2
| | | | | | | | | | | | | | | | By not actually making them intrinsic, leading to linker errors: /home/qt/work/qt/qtbase/src/corelib/global/qfloat16_f16c.c:61: undefined reference to `_mm256_cvtps_ph' /home/qt/work/qt/qtbase/src/corelib/global/qfloat16_f16c.c:76: undefined reference to `_mm256_cvtph_ps' I had the workaround applied, but only for "intel_icl", the qmake config for the Intel compiler compatible with MS cl.exe options. The one for compatibility with Unix cc (intel_icc) was missing. Task-number: QTBUG-65367 Change-Id: I39332e0a867442d58082fffd15020e4838b6a01d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QScroller: Fix deprecation warning about QDdesktopWidget:::primaryScreen()Friedemann Kleint2017-12-212-37/+2
| | | | | | | | | | | | In file included from ..\..\include\QtWidgets/qdesktopwidget.h:1:0, from kernel\qt_widgets_pch.h:71: ..\..\include\QtWidgets/../../src/widgets/kernel/qdesktopwidget.h:71:65: note: declared here QT_DEPRECATED_X("Use QGuiApplication::primaryScreen()") int primaryScreen() const; Use QScreen directly and remove the then unused function realDpi(). Change-Id: I526adb09ba35ed0699338d6a8d044c2ff9a03a1e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix signed/unsigned comparisonTimur Pocheptsov2017-12-211-1/+1
| | | | | | | | | It breaks a build if warnings are treated as errors. Task-number: QTBUG-65357 Change-Id: I42d5cbdbd90f831662a6decaebecebef5005e735 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* QCocoaNSMenuDelegate: Improve key-equivalent logicGabriel de Dietrich2017-12-192-19/+41
| | | | | | | | | | | | | | | | | By using NSEvent.characters instead of NSEvent.charactersIgnoringModifiers, we may miss sending ShortcutOverride events. For example, when the user presses Cmd-Opt-o, characters will be "ø" (on a US keyboard layout) and therefore we'll be looking for the wrong key-equivalent among the menu items. We only fall back on the modified string when the search on the unmodified string fails. As and addendum, we also skip any submenu when doing the key search. This is not necessary since each menu delegate will get called eventually. Change-Id: Id793315293a02c99e99d793ad812cff7b4a47821 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QCocoaMenu: Derive custom NSMenu class, make delegate a singletonGabriel de Dietrich2017-12-195-218/+373
| | | | | | | | | | | | | Out of the box, this saves one delegate instance per NSMenu. It also weak-couples the NSMenu instance with its owning QCocoaMenu, making it safer to inspect from the menu delegate. In the future, this will be helpful for debugging by just overriding any NSMenu method. Change-Id: I7eb801009b97f6a8ee2003306c0e152621bbce54 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Conditionally auto-detect Xlib on Darwin platformsGabriel de Dietrich2017-12-191-0/+1
| | | | | | | Task-number: QTBUG-65040 Change-Id: I8112d2fac8acf647fc8a669ae5c7920651f0bf08 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Micro-optimize QRingBuffer::chop()Alex Trotsenko2017-12-191-1/+1
| | | | | | | | Change the condition to strong equal, as 'bytes' was checked against wrong value on the start of the function. Change-Id: Iebd785665ac7bd0941ba4ffd3f315b12efc6ce0b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor QXcbKeyboard::updateModifiers()Frank Richter2017-12-192-26/+92
| | | | | | | | | | | The current implementation is poorly documented and hides the mapping between keysyms and modifier bits. This changeset adds documentation about the inner workings and makes the keysym/modifier bit mapping reusable. (The latter will be needed for xkb keymap synthesis if the XKEYBOARD extension is unavailable.) Change-Id: I70c6d204b2357365db4dafeda680132ab6823ca3 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix print to a printer instanceRenato Araujo Oliveira Filho2017-12-191-2/+5
| | | | | | | | | | | | | | Make sure to use the printer original name as 'cupsPrintFile' function argument Testing: - Create a instance of your print with lpoptions - Try print a document using the new instance of the printer - Check if the instance properties was respected Change-Id: I884b641d1871fe04c7b119c82d4edb4aa41db2f5 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Cleanup: Use QThread::msleep to sleep instead of selectMilian Wolff2017-12-191-4/+1
| | | | | | | | | | The old code used select with all-zero parameters and a timeval struct configured to wait for 50ms. This can be drastically simplified by just calling QThread::msleep which makes the intention much more clear. Change-Id: I115b56ae67ae2c2cd03354e16a7bfdf56f8c15b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Make QT_NO_FUTURE a featureUlf Hermann2017-12-1914-62/+35
| | | | | | | | | | | ... and make sure we can compile without it. In particular, Qt Concurrent depends on QFuture, so we specify it as a condition, and QtConcurrentException should not depend on future but on concurrent. Change-Id: I65b158021cecb19f227554cc8b5df7a139fbfe78 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix support for flatpak FileChooser portalJan Grulich2017-12-191-1/+1
| | | | | | | | | FileChooser portal expects filter property in a(sa(us)) format but by default, using enum, we will end up with a(sa(is)), thus we have to specify format for the enum. Change-Id: I7de971197a0c77d6dca092edda7d428d90394574 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add i18n support for cups advance optionsRenato Araujo Oliveira Filho2017-12-191-0/+1
| | | | | | | | Used 'ppdLocalize' to translate cups options Change-Id: I7fea7c26194fd6c6ee62a17d3e35d7c2c5be6d3c Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QPageSetupWidget::setPrinter: Use printdevice default paper sizeAlbert Astals Cid2017-12-193-4/+11
| | | | | | | This means that actually the paper size set on system settings (or lpoptions) is used instead of A4 Change-Id: I2dd86fd9ba210a335773430328b0ba2d3343395f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use printer job-hold-until as default instead of the noholdAlbert Astals Cid2017-12-194-7/+54
| | | | | | | This also reads the job-hold-until from lpoptions if set there for the particular printer Change-Id: Ic60fef675ab9f4760cd99ee9ac417b0478459681 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use printer job-billing as default instead of the empty stringAlbert Astals Cid2017-12-183-1/+8
| | | | | | | | This also reads the job-billing from lpoptions if set there for the particular printer Change-Id: Ia4a6961de504005b8dcd9209da0624e9ae9ef7e4 Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use printer job-sheets as default instead of none,noneAlbert Astals Cid2017-12-184-2/+45
| | | | | | | | This also reads the job-sheets from lpoptions if set there for the particular printer Change-Id: I35aff103261ef58492779071d866e8a15ac78607 Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove declared but undefined QPageSetupWidget constructorAlbert Astals Cid2017-12-181-1/+0
| | | | | | Change-Id: I54022d00d246c83489ccd171170feec1a1a46673 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use default cups job-priority instead of 50Albert Astals Cid2017-12-185-7/+26
| | | | | | | | 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>
* CUPS: Fix lpoptions file not being taken into accountAlbert Astals Cid2017-12-181-1/+2
| | | | | | | | | | | 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>
* QScroller: maintain activeScrollers as a QList, not a QSetMarc Mutz2017-12-181-6/+5
| | | | | | | | | | | | 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>
* QtPrintSupport: Fix buildFriedemann Kleint2017-12-181-0/+1
| | | | | | | | | | | dialogs/qprintdialog_unix.cpp:1104:21: error: incomplete type 'QTextCodec' used in nested name specifier Amends b4330bc391bbb08898f192ea3469b73aed09134c. 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>
* Add support for FileChooser flatpak portalJan Grulich2017-12-169-4/+902
| | | | | | | | | | | | | | | | | | | | 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>
* QDrag: Allow setting cursor for IgnoreActionMorten Johan Sørvig2017-12-151-4/+3
| | | | | | | | | 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>
* Rework the "failed to find or load QPA plugin" message a bitSergio Martins2017-12-151-2/+8
| | | | | | | | | | | | | 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>
* Reintroduce the Advanced tab in the QPrintPropertiesDialogAlbert Astals Cid2017-12-152-6/+409
| | | | | | | | | | | | | | | | This is mostly a revert of 69de6177615de3c4c31dea529172389e92f490b0 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>
* macOS: remove existing color-profile handling codeMorten Johan Sørvig2017-12-155-200/+20
| | | | | | | | | | | | | 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>
* qfloat16_f16c.c: inline in qfloat16.cpp if F16C is permitted in thereThiago Macieira2017-12-153-4/+37
| | | | | | | | | | | | | | | | | | | | | 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>
* QAbstractItemModel: add more checks in begin{Insert,Remove}{Rows,Columns}Giuseppe D'Angelo2017-12-141-0/+4
| | | | | | | Check that the inserted/removed range is indeed valid. Change-Id: Ifccbe13f0753252ee1450c8668df782dc699f05b Reviewed-by: David Faure <david.faure@kdab.com>
* doc: fix signatures and missing module headersMartin Smith2017-12-144-45/+63
| | | | | | | | | | | | 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>
* QPlatformPrintDevice: use QVector, not QList in the APIMarc Mutz2017-12-146-29/+29
| | | | | | | | | | | 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>
* QPlatformPrintDevice: store QPageSize/QMimeType/int in QList, not QVectorMarc Mutz2017-12-142-6/+6
| | | | | | | | | | | | | | | | 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>
* Windows: Support application fonts as fallbacksEskil Abrahamsen Blomfeldt2017-12-141-12/+17
| | | | | | | | | | | | | | | | | | | 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 21c7421d4e86b6048f9c2c7a9a81ec4ff1ed278c, 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>
* Windows: Add font fallback for EUDC glyphsEskil Abrahamsen Blomfeldt2017-12-132-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Allow access to ppd file and ppdMarkOption via ↵Albert Astals Cid2017-12-134-0/+28
| | | | | | | QPpdPrintDevice::property/setProperty Change-Id: I47b49b52121950fa8e3ea7a056974d9f3033490f Reviewed-by: Liang Qi <liang.qi@qt.io>
* Introduce QPrintDevice::property/setPropertyAlbert Astals Cid2017-12-134-0/+38
| | | | | | | So we can access QPlatformPrintDevice internals if needed Change-Id: Ib37c5717713f37262ef12d7b61793d80f05baf4a Reviewed-by: Liang Qi <liang.qi@qt.io>
* doc: update dbus sources for clangqdocMartin Smith2017-12-087-23/+54
| | | | | | | | | | 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>