summaryrefslogtreecommitdiffstats
path: root/src/printsupport
Commit message (Collapse)AuthorAgeFilesLines
* QWindowsPrintDevice: Fix signedness warningsFriedemann Kleint2020-09-241-7/+6
| | | | | | | | Remove the warnings suppression. Task-number: QTBUG-83259 Change-Id: I3d8852ce8f62bac9b8f6ca4e13892164fb6d4059 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QWindowsPrintDevice: Brush up the codeFriedemann Kleint2020-09-241-19/+22
| | | | | | | | | | - Replace C-style casts, use helper wcharId() for the printer id - Replace typedef by using - Replace NULL by nullptr Task-number: QTBUG-83259 Change-Id: I066ff65bf7c1e894a6c6bb19cf0334c0b83fb759 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows: Build print support plugin directly into QtPrintSupportFriedemann Kleint2020-09-2414-25/+1078
| | | | | | Task-number: QTBUG-83259 Change-Id: I23042e1eb89d407692a96bfb2d6c4efdddbfb50f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-14/+14
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix some qdoc warnings: printer API cleanupVolker Hilsheimer2020-09-221-5/+5
| | | | | | | | | | | | Puge references from removed QPrinter methods. QPdfWriter's setter API documentation only added the word "PDF" to the QPagedPaintDevice documentation. This was not useful - when the latter talks about "page", it's obvious what is meant in the context of PDF, so remove the duplication. Change-Id: I7b16cbc82de8d35b5224288c9e36deff4e01fb44 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Correct link errors qtbaseNico Vertriest2020-09-211-1/+1
| | | | | | Task-number: QTBUG-86295 Change-Id: I27f6bbdadffb08a8794520a14dfe0e2334979575 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add links to Qt 6 changes files from module indexPaul Wicking2020-09-181-0/+4
| | | | | | Task-number: QTBUG-84051 Change-Id: Iac25df135c9d73a990b41243e08cd38ea78296a4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Add porting guide documentsPaul Wicking2020-09-161-0/+46
| | | | | | | | Also add existing such docs to the new document group Task-number: QTBUG-84051 Change-Id: I76f033f0846e09943f249d2beeb1606869eef382 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove obsolete APIs and comments from QAbstractPrintDialogVolker Hilsheimer2020-09-104-89/+26
| | | | | | | | | | | | | Merging QAbstractPrintDialog with QPrintDialog, as proposed in the removed comment, seems to have little value, given that the platform specific implementations rely on the current abstraction. Adjust examples and tests; with the QAbstractPrintDialog test now testing the QPrintDialog::options API, the corresponding test function can be removed from the QPrinter test. Change-Id: Ia8906627898332e8590ea9b27e3d71dfcc6e8d71 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove deprecated QPrinter and QPagedPaintDevice APIsVolker Hilsheimer2020-09-046-693/+16
| | | | | | | | | | | Adjusting the QPrinter test case - some use cases no longer exist, or are already tested in QPageSize and QPageLayout tests. Adjust examples and manual tests. Change-Id: I01cbc65f3d8031aea2dac86dd942126ba708b111 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Mark obsolete QPrinter functions as deprecated from 5.15 onVolker Hilsheimer2020-09-033-5/+39
| | | | | | | | | | | Some of the methods are overrides of virtuals in QPagedPaintDevice, so document and mark those as obsolete as well. Adjust code that calls those APIs to use the recommended replacement. Change-Id: I3cd1980609ea20808d17379a5f97ca595e869875 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Qpagedpaintdevice: Use marginsF instead of internal struct marginsPeng Wenhao2020-09-012-3/+3
| | | | | | | resolve remaining Qt6 TODOs Change-Id: Iad659a09ddfe136bdc545bc0635b4c695540c58b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPrinterInfo: Remove deprecated methodsMarcel Krems2020-08-252-50/+0
| | | | | Change-Id: I5089bc23308a4348dc21122dfa000d5ca6e3938d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QFileSystemModel into QtGuiVolker Hilsheimer2020-08-251-1/+1
| | | | | | | | | | | | | | This requires a QAbstractFileIconProvider in QtGui, as the standard QFileIconProvider depends on QStyle, and cannot be moved out of QtWidgets. QAbstractFileIconProvider returns strings for file types, but returns no icons yet. Support for a default icon set might be added in a follow-up commit. Change-Id: Ib9d095cd612fdcf04db62f2e40709fcffe3dc2b7 Fixes: QTBUG-66177 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Drop spurious const from parameterEdward Welbourne2020-08-231-1/+1
| | | | | | | | Quanifying a parameter passed by value (which is correct for QTime, there is no need to pass it by reference) as const is pointless. Change-Id: I86850f65dfac28ffcc4a8633dd6d212259bb33d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Re-implement configure/qmake's command line handling in CMakeJoerg Bornemann2020-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | We extend configurejson2cmake to read the "commandline" information from configure.json. This data is then translated to CMake function calls and written it into commandline.cmake files. We extend QtProcessConfigureArgs.cmake to pick up those commandline.cmake files to feed our command line handling code, which is a re-implementation of the command line handling in qt_configure.prf. The command line handler sets INPUT_xxx variables, similar to configure/qmake's config.input.xxx variables. The INPUT_xxx values are translated - to -DFEATURE_xxx=ON/OFF arguments if the input represents a feature, - to corresponding CMake variables if such a variable is known, - or to -DINPUT_xxx=yyy CMake arguments. Configure arguments that have an entry in cmake/configure-cmake-mapping.md are actually implemented. Other arguments are likely to need more work. Task-number: QTBUG-85373 Change-Id: Ia96baa673fc1fb88e73ba05a1afb473aa074b37d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix build with mingw gcc 9 and -Wsuggest-overrideKai Koehne2020-08-101-15/+15
| | | | | Change-Id: I780b0761a7f6b19022116b738efa7aca1378b715 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix some MSVC int conversion warningsFriedemann Kleint2020-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | kernel\qmetaobjectbuilder.cpp(1279): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data kernel\qmetaobjectbuilder.cpp(1432): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data sax\qxml.cpp(1275): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qfontsubset.cpp(920): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data text\qtextengine.cpp(2664): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2665): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2706): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data text\qtextengine.cpp(2707): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data itemviews\qbsptree.cpp(60): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) kernel\qprintengine_win.cpp(1558): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(804): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(822): warning C4267: 'argument': conversion from 'size_t' to 'SQLINTEGER', possible loss of data qsql_odbc.cpp(1585): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data qsql_odbc.cpp(1602): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data windows\qwindowsmime.cpp(770): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data Change-Id: I04fbe17b9782f4c2704933fc005449b1e992475e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Automatically register comparison operators in QMetaTypeFabian Kosmale2020-07-081-3/+0
| | | | | | | | | | | | | | | | | This removes the fully manual registration of comparison operators in QMetaType and replaces it with an automatic registration through Q_DECLARE_METATYPE(). [ChangeLog][QMetaType] The QMetaType::registerComparator() and QMetaType::registerEqualsComparator() have been removed. Q_DECLARE_METATYPE() now automatically registers any operator==() and/or operator<() for a type visible where it is used on that type, as part of declaring its meta-type. Change-Id: I3df451b652b735c093533838bf32f3cc785439f8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-074-15/+15
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in printsupportJarek Kobus2020-07-068-32/+31
| | | | | | Task-number: QTBUG-84469 Change-Id: I540b5574e358b100a595eb1676b051dfe25cb640 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Regenerate rest of projects under src/Alexandru Croitor2020-07-031-13/+13
| | | | | Change-Id: I7d7692306a80deb9e8d2a90454dad4b39320f380 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Remove PPD deprecation warningTor Arne Vestbø2020-07-011-4/+1
| | | | | | | We're not going to replace these any time soon, so remove the warning. Change-Id: If020d2d3cf752e9a11558a55df5d05e2d2b3c567 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Update docs with cmake package informationNico Vertriest2020-06-301-0/+1
| | | | | | Task-number: QTBUG-85179 Change-Id: I70dda9b906ecd0b8d8f4d88b0562af8e6c428143 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove winrtOliver Wolff2020-06-065-13/+4
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Build print support plugin directly into QtPrintSupportTor Arne Vestbø2020-06-044-1/+34
| | | | | | Task-number: QTBUG-83259 Change-Id: I74f60519fbccfa5f208397bf3d65f0a4f64cb6f0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move macOS print support from platform plugin into QtPrintSupportTor Arne Vestbø2020-06-0413-14/+3440
| | | | | | Task-number: QTBUG-83256 Change-Id: I29044b6c3f952c259f501f94a175c8ef2cbaae55 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Document how to use CMake for Qt PrintSupportKai Koehne2020-05-267-73/+21
| | | | | | | | | | Move the details on how to build after the index page. Remove mentioning of the central include. Instead, mention the CMake functions to use. Task-number: QTBUG-73058 Change-Id: Ibf5952530c3b86915c9fb6562f7d9e0b010720ee Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Licenses: Remove reference to change in Qt 5.4Kai Koehne2020-05-221-3/+2
| | | | | | | Qt 5.4 is not documented anymore since quite some time. Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Generate information about 3rdparty libs in module .pri filesJoerg Bornemann2020-05-191-1/+1
| | | | | | | | | | | | | For modules that are not yet ported to CMake and that use QMAKE_USE += libfoo we need to provide the information about libfoo in the qt_lib_XXX.pri files. Also, we now generate qt_ext_XXX.pri files for bundled 3rdparty libs. Task-number: QTBUG-75666 Change-Id: I9e4b057a197554ecb37c294c0bf09e2a2b3aa053 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Get rid of QTextCodec in the cups supportLars Knoll2020-05-142-12/+18
| | | | | | | | This should all be utf-8 anyway, but right now simply exchange the text codec with a string converter. Change-Id: If0a230776824598b6378bb402d692c941e371104 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support multiple page ranges in QPrinterSzabolcs David2020-04-093-96/+28
| | | | | | | | | | | | | | | | Add a new QRangeCollection type to store and manage multiple page ranges. This moves out the parser and validator logic from the platform dependent (UNIX) dialog and makes it publicly available from QPrinter. This improves the usability of QPrinter in those applications which doesn't use print dialog to configure printer. (e.g.: QTextDocument, QWebEnginePage) Change-Id: I0be5a8a64781c411f83b96a24f216605a84958e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Remove QGuiAction again and split QAction implementation up insteadVolker Hilsheimer2020-03-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | Duplicating the number of classes is a high price to pay to be able to have some QAction functionality behave differently, or be only available in widgets applications. Instead, declare the entire API in QtGui in QAction* classes, and delegate the implementation of QtWidgets specific functionality to the private. The creation of the private is then delegated to the Q(Gui)ApplicationPrivate instance through a virtual factory function. Change some public APIs that are primarily useful for specialized tools such as Designer to operate on QObject* rather than QWidget*. APIs that depend on QtWidgets types have been turned into inline template functions, so that they are instantiated only at the caller side, where we can expect the respective types to be fully defined. This way, we only need to forward declare a few classes in the header, and don't need to generate any additional code for e.g. language bindings. Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QRegExp usage from Qt PrintSupportLars Knoll2020-03-171-3/+10
| | | | | Change-Id: I32daae8e5028084dd12f0aba4da7920f995d919f Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-162-2/+2
| | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix naming when referring to Apple macOSTor Arne Vestbø2020-03-161-1/+1
| | | | | Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-111-35/+37
|\ | | | | | | Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
| * macOS: Support printing when no printers are installedTor Arne Vestbø2020-03-091-35/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if there are no printers installed, we can still show the print dialog, which gives the user feedback about no printers being installed, allows them to install one, or allows them to print to PDF as a fallback. The code for printing to PDF has been re-enabled, and the conditions of QTBUG-38820 have been removed as the problem is no longer present. The code also takes into account the possibility that the user chose to print to PostScript, which we don't yet support, but warn about. We now also support opening the printed document in Preview. This requires a minor assumption about the print operation being done synchronously after the print dialog is accepted, but this is something we can improve in the future with internal APIs if it turns out to be a problem. Printing workflows such as sending the printed document via mail or messenger are not not supported, and will give a warning. Fixes: QTBUG-36112 Change-Id: I8ba9e2c5ce31a5a06542c4a7126d005e4b27f2be Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | CMake: Regenerate configure.cmake files to get reportsAlexandru Croitor2020-03-091-0/+3
| | | | | | | | | | Change-Id: Ifa1646c7e471b3eaba552498ee1dc24f6ab864de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Pass QDate and QTime as value classesEdward Welbourne2020-02-274-5/+5
| | | | | | | | | | | | | | | | | | It's what they are, so const refs are needless burden. In the process, consolidate two of the affected methods (one of which just adds another argument to the other's signature) into one. Change-Id: I80de35ffe078a652d1999889dede0b10302abaa9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QComboBox: remove currentIndexChanged(const QString&)Vitaly Fanaskov2020-02-193-4/+4
| | | | | | | | | | | | | | Fixes: QTBUG-81913 Task-number: QTBUG-81845 Change-Id: I8f24b858ce4e35b495440001d7734cc8f169cd5f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-133-12/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-043-12/+23
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/widgets/widgets/imageviewer/imageviewer.cpp src/corelib/text/qchar.cpp src/corelib/time/qdatetime.cpp Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
| | * Doc/Printsupport: misc fixesChristian Ehrlicher2020-01-313-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | - use new signal/slot syntax - fix includes - adjust style Change-Id: Icdc9b33e72e24c39cc6e96b4f2cafa78e179efbf Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"Alexandru Croitor2020-02-111-0/+4
|\ \ \
| * | | Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | QSpinBox: remove deprecated signal valueChanged(const QString &)Vitaly Fanaskov2020-02-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-81845 Change-Id: I91148cac553f63b44968337ccc121e7376ee4465 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | | QComboBox: remove deprecated signalsVitaly Fanaskov2020-02-101-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following signals have been removed: - void activated(const QString &); - void highlighted(const QString &); Task-number: QTBUG-81845 Change-Id: I61b552d9258987d4252202953aaf4909f9bd718e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-292-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/Qt5CoreConfigExtras.cmake.in src/corelib/Qt5CoreMacros.cmake src/dbus/Qt5DBusConfigExtras.cmake.in src/widgets/Qt5WidgetsConfigExtras.cmake.in Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
| * | Deprecate all methods that use QMatrixJarek Kobus2020-01-282-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use QMatrix in implementation classes anymore. Task-number: QTBUG-46653 Fixes: QTBUG-81627 Change-Id: I4806c1302e42645dc6a608062c8d9c336ae8629b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>