summaryrefslogtreecommitdiff
path: root/src/printsupport
Commit message (Collapse)AuthorAgeFilesLines
* Clarify module changes in Qt6Jaishree Vyas2023-05-091-1/+1
| | | | | | | | | Changed Briefs for better understanding Fixes: QTBUG-109324 Pick-to: 6.5 Change-Id: I15b0c0dc12b1bf96626fb8ea4ad16d04b2b118ca Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* QPrinterInfo: fix mismatching types to ternary operatorThiago Macieira2023-05-051-1/+1
| | | | | | | | | | | | How did this ever work? Q_GLOBAL_STATIC has been a structure for a long time, but somehow this doesn't work with my latest changes. qprinterinfo.cpp:73:49: error: operands to ‘?:’ have different types ‘QtGlobalStatic::GlobalImpl<{anonymous}::Q_QGS_shared_null>’ {aka ‘const QtGlobalStatic::Impl<QtGlobalStatic::Holder<{anonymous}::Q_QGS_shared_null, {anonymous}::Q_QGS_shared_null> >’} and ‘QPrinterInfoPrivate*’ Pick-to: 6.5 Change-Id: I6f518d59e63249ddbf43fffd175a264225f0480f Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Refix printing of dpr>1 images on WindowsEirik Aavitsland2023-04-201-1/+1
| | | | | | | | | | This modifies 9e453dacc3855bafd3d7b692d76699c3bf07b9c6 to make sure that QPainter uses the adjusted DPR when doing the tile copying. Fixes: QTBUG-99990 Pick-to: 6.5 6.2 Change-Id: Id9c7b5576d5036e20bb399f3c8b82d4a467dc70f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use Qt CMake APIs to exclude files from Unity BuildAmir Masoud Abdol2023-04-031-9/+4
| | | | | | | | | | | | | | | | | | | | This is a bit of a cleanup, mainly around unity build, and a few other minor things: - I replaced the direct inclusion of sources files using `set_source_files_properties`, and instead used `NO_UNITY_BUILD_SOURCES` when possible. In most cases, they are being excluded in their respective `qt_internal_extend_target` but sometimes I had to make a new extension. - In few cases, we had to manually exclude the NO_PCH files, so, I instead passed them directly to the NO_PCH_SOURCES which also exclude them from the unity build as well. - Removed a few unnecessary "" Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I466576592c1d115a2da4d88672c1e4b9f995f2ed Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix build with -no-feature-lineeditTasuku Suzuki2023-03-041-0/+5
| | | | | | | | Introduce a new feature for password dialog in cups that needs several widgets Pick-to: 6.5 6.5.0 Change-Id: I93799b814ac06e661c19cffcd7d3c9bfa56ff814 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build with -no-feature-formlayoutTasuku Suzuki2023-02-211-1/+1
| | | | | | Pick-to: 6.5 Change-Id: I9f552942c206f16ef5e8b96cbf7255a54ff83470 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add some exclusions for CMake Unity (Jumbo) buildsFriedemann Kleint2023-02-161-0/+11
| | | | | | | | | | | | | Add exclusions for issues that are likely not fixable (3rd party code, X11 define clashes, etc) in 3rd party, tools and plugins. Pick-to: 6.5 Task-number: QTBUG-109394 Done-with: Amir Masoud Abdol <amir.abdol@qt.io> Change-Id: I698c004201a76a48389271c130e44fba20f5adf7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* src: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-101-5/+0
| | | | | | Pick-to: 6.5 Change-Id: Id644d322a602038403bb7f46c532744575fbf6d3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QtGui: Add a header declaring the Windows image conversion functionsFriedemann Kleint2023-02-081-1/+1
| | | | | | | | | | The declarations with default parameters cause conflicts in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Icf48193498d70dfacadf1b2499cb3359169f72c0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QtWidgets: Fix errors about fields from anonymous namespaces ↵Friedemann Kleint2023-02-011-2/+5
| | | | | | | | | | | | | | | | | | (-Werror=subobject-linkage) Move types to QtPrivate, fixing errors like: error: QCalendarWidgetPrivate’ has a field QCalendarWidgetPrivate::m_model whose type uses the anonymous namespace [-Werror=subobject-linkage] The error appears in CMake Unity (Jumbo) builds apparently due to multiple anonymous namespaces per file. Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: Id678af4db5633b1b2267425c7751f1312935d5d5 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Support the scaling factor of some Windows pdf print devicesEirik Aavitsland2023-01-241-3/+12
| | | | | | | | | | | | | The printer drivers of some pdf printers allows the user to set a global scaling factor, scaling up or down the number of device pixels available for the same paper size and dpi. Make sure to update the Qt print device metrics accordingly so that QPainter will see the entire page, and not more than the page. Fixes: QTBUG-106659 Pick-to: 6.5 Change-Id: Icb90c1aa742f56b2a2043ef7070530beebe541d5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix build with -no-feature-messageboxTasuku Suzuki2023-01-171-2/+2
| | | | | | Pick-to: 6.5 Change-Id: I4c34f6aa2106afc528f182d7925442acf82b7000 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtPrintSupport: Disambiguate static functionsFriedemann Kleint2023-01-122-4/+4
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: If3029d5b99499fd0e216fc080ade9842c2d11ea4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* macOS: Stop using the deprecated [NSWorkspace openFile:] APITor Arne Vestbø2023-01-021-1/+1
| | | | | | | | | We can use openURL instead, which also opens local files in the associated application. Pick-to: 6.5 Change-Id: Ieddc6fb68d6b9e64195ed261953b9fffb6b0b73e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace usages of Q_CLANG_QDOC with Q_QDOCLuca Di Sera2022-10-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | To allow the user to customize the C++ code that QDoc sees, so as to be able to work-around some limitations on QDoc itself, QDoc defines two symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an entire execution of QDoc. At a certain point in time, QDoc allowed the user the choice between a custom C++ parser and a Clang based one. The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol would be defined only when the Clang based parser was chosen. In more recent times, QDoc always uses a Clang based parser, such that both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent. To avoid using different symbols, and the possible confusion and fragmentation that derives from it, all usages of Q_CLANG_QDOC are now replaced by the equivalent usages of Q_QDOC. Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Avoid warning from QPrinter::setFromTo() in the documented 0,0 caseEirik Aavitsland2022-10-191-1/+2
| | | | | | | | | | | The doc says the setFromTo(0, 0) will print the whole document, i.e. clear the page ranges. Although this works, it creates a runtime warning. Fixes: QTBUG-105292 Pick-to: 6.4 Change-Id: Ic5de5be71ffc91762c8a4a44875ba133831d981f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Long live Q_UNREACHABLE_RETURN()!Marc Mutz2022-10-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a combination of Q_UNREACHABLE() with a return statement. ATM, the return statement is unconditionally included. If we notice that some compilers warn about return after __builtin_unreachable(), then we can map Q_UNREACHABLE_RETURN(...) to Q_UNREACHABLE() without having to touch all the code that uses explicit Q_UNREACHABLE() + return. The fact that Boost has BOOST_UNREACHABLE_RETURN() indicates that there are compilers that complain about a lack of return after Q_UNREACHABLE (we know that MSVC, ICC, and GHS are among them), as well as compilers that complained about a return being present (Coverity). Take this opportunity to properly adapt to Coverity, by leaving out the return statement on this compiler. Apply the macro around the code base, using a clang-tidy transformer rule: const std::string unr = "unr", val = "val", ret = "ret"; auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(", ifBound(val, cat(node(val)), cat("")), ")"); auto ignoringSwitchCases = [](auto stmt) { return anyOf(stmt, switchCase(subStmt(stmt))); }; makeRule( stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)), nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))), {changeTo(node(unr), cat(makeUnreachableReturn, ";")), // TODO: why is the ; lost w/o this? changeTo(node(ret), cat(""))}, cat("use ", makeUnreachableReturn)) ); where nextStmt() is copied from some upstream clang-tidy check's private implementation and subStmt() is a private matcher that gives access to SwitchCase's SubStmt. A.k.a. qt-use-unreachable-return. There were some false positives, suppressed them with NOLINTNEXTLINE. They're not really false positiives, it's just that Clang sees the world in one way and if conditonal compilation (#if) differs for other compilers, Clang doesn't know better. This is an artifact of matching two consecutive statements. I haven't figured out how to remove the empty line left by the deletion of the return statement, if it, indeed, was on a separate line, so post-processed the patch to remove all the lines matching ^\+ *$ from the diff: git commit -am meep git reset --hard HEAD^ git diff HEAD..HEAD@{1} | sed '/^\+ *$/d' | recountdiff - | patch -p1 [ChangeLog][QtCore][QtAssert] Added Q_UNREACHABLE_RETURN() macro. Change-Id: I9782939f16091c964f25b7826e1c0dbd13a71305 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-112-7/+7
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-043-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Respect CMake source tree when installing header filesAlexey Edelev2022-09-071-0/+2
| | | | | | | | | | | | | | | | Use CMake source tree when installing header files instead installing all header files that syncqt.pl produces. This avoid adding header files which cannot be used because of platform or feature incompatibility with Qt version. Since syncqt.pl doesn't respect CMake build tree when generating master header and CaMeL case header files, these header files still will be installed regardless platform or feature limitations. This will not be the case once we switch to syncqt.cpp, which will install only headers that are relevant to the selected platform and enabled features. Task-number: QTBUG-103196 Change-Id: I7d64754648747bee700d96f2fd6228fe7248512e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move QMacAutoReleasePool from qglobal.h to qcore_mac_p.hSona Kurazyan2022-09-011-0/+2
| | | | | | | | And include qcore_mac_p.h where needed. Task-number: QTBUG-99313 Change-Id: Idb1b005f1b5938e8cf329ae06ffaf0d249874db2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-233-3/+3
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix several more improperly placed #include mocThiago Macieira2022-08-043-8/+8
| | | | | | | | | | | | | Like commit qtbase/638893bea083b619b73b33a7dd5589fb2c4c4242. Script to find them: git grep -l '#include.*moc' \*.cpp \*.mm | \ xargs awk '/QT_BEGIN_NAMESPACE/ { i=1 } /QT_END_NAMESPACE/ { i=0 } /#include.*moc/ && i { print ARGV[ARGIND], $0 }' Pick-to: 6.4 Change-Id: I6f936da6f6e84d649f70fffd17058fd05cfc5c6d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-033-0/+9
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Adjust widget printing example to not use removed functionsChristian Ehrlicher2022-07-121-7/+9
| | | | | | | | QPrinter::pageRect() and paperRect() were deprecated in Qt5 and removed in Qt6 without adjusting the snippet. Change-Id: I7787283ccfeeb94bccf464bfee2bcf82f5d3d930 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix printing of dpr>1 images on WindowsEirik Aavitsland2022-07-121-0/+1
| | | | | | | | | | | | The win32 printing paint engine copies tiles of the source image into temporary target images for printing. It does that using QPainter painting. If there is a difference in DPR between source and target, the painting will be scaled, leading to distorted results. Fixes: QTBUG-99990 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Ie7368655ef3abeece49fb1a6421e2d6ea7ed5e95 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* macOS: set print dialog up with page attributes when no printer is installedVolker Hilsheimer2022-06-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | When the print dialog is opened without a printer installed, then the printer's output format is PDF rather than native. In this case, we need to set the NSPrintInfo with some page atttributes explicitly, and not default to the application-wide NSPrintInfo.sharedPrintInfo. Otherwise, the print dialog will show the wrong page size and orientation, and the printer will not have the previously set values when the dialog returns. The dialog always shows the wrong values for the page margins (only available through the presets dialog), but the printer's values are not overridden. Also, the print range is taken care of correctly by the code further down in this function, irrespective of the printer's output format. Note: this cannot be unit tested as we need to open the native print dialog on a system without printer installed, and compare the values we set on the printer before opening the dialog with the values after the dialog was successfully finished via PDF->Save as PDF. Fixes: QTBUG-100188 Pick-to: 6.4 6.3 6.2 Change-Id: I8f1561e054f6a867b131111845c9b061778e4eb0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix typos in docs and commentsKai Köhne2022-06-153-3/+3
| | | | | | | | | Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move file-static const arrays out of qprint_p.h fileØystein Heskestad2022-06-044-151/+183
| | | | | | | | | Move static arrays into new qprint.cpp file to avoid them being duplicated in many translation units. Fixes: QTBUG-102302 Change-Id: I47b7a6244e45672788792ec1a28d4fed20d233a3 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1670-2647/+143
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add missing header files to the module sourcesAlexey Edelev2022-05-121-1/+1
| | | | | | | | | All module header files should be listed in the corresponding sections of modules SOURCEs to be accessible in CMake routines. Task-number: QTBUG-103196 Change-Id: Ieb77ae70557e35e546a5b00387e1e0aa40338239 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtPrintSupport: includemocsMarc Mutz2022-04-294-0/+8
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: Ic8ceebfa270d0831a8598f98aa255acfc17e953b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Printsupport: replace remaining uses of QL1String with QL1StringViewSona Kurazyan2022-04-192-3/+3
| | | | | | Task-number: QTBUG-98434 Change-Id: Ibeb9608d3ebc3c0c2e7ea93561e24cb24c601fec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Printsupport: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-1911-50/+72
| | | | | | Task-number: QTBUG-98434 Change-Id: I415132ed381c25313e7fcccd050e522667eb6c22 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Printsupport: stop using QL1Char constructor for creating char literalsSona Kurazyan2022-04-194-13/+12
| | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: Ia186ed178239796bdf19db5b35a36ea606baf937 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rest of QtBase: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERNMarc Mutz2022-04-074-5/+21
| | | | | | | | | | | | | | | | It's one of our best tools to improve compile times. In some places, we can't do the change, yet, because there's no .cpp file for the header file. Also mark Q_DECLARE_METATYPE macros that are in the wrong place. We shouldn't have Q_D_M markup for public classes in .cpp or _p.h files. Fixes: QTBUG-102206 Change-Id: Iec0a39e4745571b24d07dacc87593321967c10e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Windows: Fix potential crash when retrieving default printerFriedemann Kleint2022-03-291-1/+1
| | | | | | | | | GetDefaultPrinter() has been observed to return size == 0. Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-53290 Change-Id: Id4c7a06d14d368c792e15e55cacf2366b6aedc7b Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Unix: Correctly update options pane for PDF printerAlexander Volkov2022-03-151-2/+2
| | | | | | | | | | Update printer and m_currentPrintDevice before calling QPrintDialogPrivate::selectPrinter() to show values for PDF printer instead of the previously selected printer. Pick-to: 6.3 6.2 5.15 Change-Id: Iacc34ca4460ec4de0b4b373cd875628733df01bd Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* QPrintDialog/win: Fix use of deprecated QMessageBox::warningMårten Nordheim2022-03-051-3/+3
| | | | | | | | by using the new one Pick-to: 6.3 6.2 Change-Id: I8779107079c4e3d4b1d48c05b6fbfef1b6e98b99 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix assert showing default-constructed QPrintPreviewDialogFriedemann Kleint2022-02-281-1/+1
| | | | | | | | | | Fix call to qBound(), avoiding an assert introduced by ad5c5bb541ae20a205ac07122153b302dee1d3e1. Pick-to: 6.3 Fixes: QTBUG-101297 Change-Id: I823cdfcd2491c6bb4c87058318479d188ca38742 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure all qtbase private headers include at least one otherThiago Macieira2022-02-244-1/+5
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Fix UI mismatch when QPrinter::setDuplexZhang Hao2022-02-181-3/+4
| | | | | | | | | | | | | | | | | | Amends fa854f214a3c812e5548ff55d179dd07ef99053b. If user call QPrinter::setDuplex method, the QPrintDialog explicitDuplexMode value won't update. Fix this by: 1) handle device-specific default and value set in QPrinter in QCupsPrintEngine(Private) 2) handle the explicitly user-selected value in QPrintDialog(Private) Done-with: Michael Weghorn <m.weghorn@posteo.de> Pick-to: 5.15 6.2 6.3 Fixes: QTBUG-99504 Change-Id: I1a471a8554e83aa4bec8bb95fcc95f9135b0ac8c Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Sync QPrinter orientation when PageSetup Orientation selectedZhang Hao2022-02-181-0/+1
| | | | | | | | | | | | QPrinter orientation will not effect when PageSetup Orientation selected Fix this by sync PageSetup orientation property to QPrinter. Fixes: QTBUG-100261 Pick-to: 5.15 6.2 6.3 Change-Id: I264852ea18317308dfcfb58c880f5e8ad8d299bd Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove unused .qrc filesJoerg Bornemann2022-01-171-38/+0
| | | | | | | | Task-number: QTBUG-94446 Change-Id: I136d8b4ab070a832866aa50b5701fc6bd863df8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiomKai Köhne2021-12-091-1/+1
| | | | | | | | | | Using REQUIRED as a prefix instead of suffix works better with OPTIONAL_COMPONENTS, and is also the order in the CMake manual. Task-number: QTBUG-98867 Pick-to: 6.2 Change-Id: I1ab68408b95d8edf06272a3b9fceccd8d8e597fc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Link printer plugins into user projects when using a static QtJoerg Bornemann2021-11-193-4/+6
| | | | | | | | | | | | When building a user project against a static Qt on Windows or macOS the static printer support plugins were not linked. Move the Q_IMPORT_PLUGIN statements to qplatformprintplugin.cpp, which is a translation unit that is guaranteed to be linked into the user project. Pick-to: 6.2 Fixes: QTBUG-97490 Change-Id: Ic35c6483a664a06461304c7e8a2b7b06ce651ed6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Enable qdoc warning count limitVenugopal Shivashankar2021-10-211-0/+3
| | | | | | | | This should restrict changes that introduce new warnings. Change-Id: I7e4b5d9d5d84b7c336509c380bc7e6d86e360f4a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Remove unsupported customFiltersKai Köhne2021-09-031-4/+0
| | | | | | | | | | | customFilters defined in .qdocconf are not supported anymore by Qt Assistant since Qt 5.13. Therefore remove them from all .qdocconf files, also to avoid cargo-culting them to new help modules. Task-number: QTBUG-95987 Change-Id: I664391460637d2e859348da0338e1a4a3ee9f570 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>