summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs
Commit message (Collapse)AuthorAgeFilesLines
...
* CUPS: Fix advanced options cancel of the print properties dialogAlbert Astals Cid2018-01-041-0/+36
| | | | | | | | | | | When the user changes the advanced settings we call setProperty PDPK_PpdOption so if the user cancels we need to set them back to what they were originally Change-Id: Idd0cb413fb1e68dd28cf66f7f66f7e0afb38393e Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Refactor QPPDOptionsModel a bitAlbert Astals Cid2018-01-041-36/+59
| | | | | | | | | | Make the members private and add getters Make some other functions also private Move setCupsOptionsFromItems from QPrintPropertiesDialog to QPPDOptionsModel Change-Id: Ibb555a6e6be53550f30c159c3ad611d55e2a767a Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-027-27/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-12-051-1/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/quiview.mm Change-Id: I88384c70047391c75d9ff166c8d9881ff6751dbf
| | * Fix unix QPrintDialog initially selected printerJoni Poikelin2017-11-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unix QPrintDialog always set default printer as selected printer even though something was explicitly requested. [ChangeLog][QtPrintSupport][QPrintDialog] Properly pre-select explicitly requested printer on Unix. Task-number: QTBUG-63933 Change-Id: I6289f759d480b4891f4ddd7ff5aad3ae9ab4bc75 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | PrintSupport: modernize connection signal/slotLaurent Montel2017-11-303-14/+14
| | | | | | | | | | | | | | | Change-Id: I6e482cd9503e96cc43ead21122d3690cdb18151c Reviewed-by: David Faure <david.faure@kdab.com>
| * | Printsupport: not necessary to check pointer before to delete itLaurent Montel2017-11-301-2/+1
| | | | | | | | | | | | | | | Change-Id: Ib2a7823224c45b6e9110016b2f5756e1b2fd8f3c Reviewed-by: David Faure <david.faure@kdab.com>
| * | PrintSupport: convert 0 with nullptr (c++11)Laurent Montel2017-11-3011-19/+19
| | | | | | | | | | | | | | | Change-Id: I35a8022c78427c9b4d4a9d9941770d22c36c3be8 Reviewed-by: David Faure <david.faure@kdab.com>
* | | 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>
* | | 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>
* | | 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-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | 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>
* | | 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>
* | | Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Remove QPageSetupWidget::selectPrinterAlbert Astals Cid2017-12-063-14/+4
| | | | | | | | | | | | | | | | | | | | | t's only ever called after setPrinter so merge the code Change-Id: I4b5d593edbe62b64354e81c19112fa87b0555fdc Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Remove QPrintPropertiesDialog::selectPrinterAlbert Astals Cid2017-12-061-15/+15
| | | | | | | | | | | | | | | | | | | | | It is only ever called after the constructor, so merge the code Change-Id: I5c75a2cd367af401b41920f51754a64dc6c6eb40 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Remove QCupsJobWidget::setPrinterAlbert Astals Cid2017-12-061-2/+1
| | | | | | | | | | | | | | | | | | | | | It is only ever called after the constructor so merge the code Change-Id: I381165ad90c85342e5db3c16327d729388b71fb2 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Remove QPrintPropertiesDialog::applyPrinterPropertiesAlbert Astals Cid2017-12-061-15/+6
| | | | | | | | | | | | | | | | | | | | | 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>
* | | Remove QUnixPrintWidgetPrivate::applyPrinterPropertiesAlbert Astals Cid2017-12-061-45/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Remove QPrintDialogPrivate::applyPrinterProperties, no one calls itAlbert Astals Cid2017-12-061-8/+0
| | | | | | | | | | | | | | | Change-Id: Ic140f62e5cb63c6a4b7f4fa10ca243d8bb055c4e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-174-15/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | Printsupport: Not necessary to call setLayout when we added the parentLaurent Montel2017-10-122-2/+0
| | | | | | | | | | | | | | | Change-Id: I3504afbc7bb1aaa8c2619532fa4e05740dd6f3c4 Reviewed-by: David Faure <david.faure@kdab.com>
| * | PrintSupport: Layout constructor already uses "this"Laurent Montel2017-10-091-1/+0
| | | | | | | | | | | | | | | | | | | | | Not necessary to call setLayout here. Change-Id: I761215b46ab4f778786e92338906b5ec7515c53d Reviewed-by: David Faure <david.faure@kdab.com>
| * | PrintSupport: replace 0 with nullptrLaurent Montel2017-10-093-12/+12
| |/ | | | | | | | | Change-Id: Ic5e0000e384989239965f269474d17fa29669db1 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-1/+3
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * Convert features.completer to QT_[REQUIRE_]CONFIGStephan Binner2017-09-041-1/+3
| | | | | | | | | | Change-Id: If45a46c08b37d245229a39f3d6ffbb34154934f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-194-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-196-15/+15
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Convert features.filesystemmodel to QT_[REQUIRE_]CONFIGStephan Binner2017-07-021-1/+3
| | | | | Change-Id: I862510387e79d04221ec075f3e79896908ee9d8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.fscompleter to QT_[REQUIRE_]CONFIGStephan Binner2017-07-021-1/+1
| | | | | | | Fix one #include as only QCompleter is used and not QFSCompleter. Change-Id: Ia1e722122f7e322c678d2db6962c6086c684ddd9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.messagebox to QT_[REQUIRE_]CONFIGStephan Binner2017-06-292-8/+10
| | | | | Change-Id: Ie25dc672f8a675c06585c7757255f7dbadbfc5ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.filedialog to QT_[REQUIRE_]CONFIGStephan Binner2017-06-292-1/+5
| | | | | Change-Id: I9bc229b0d1430b81eeb2cfca2b24474736d5d561 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.printdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-05-3015-86/+42
| | | | | Change-Id: Ifb016ae2a0986b436f788b34513c81ea91f3804a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.printpreviewdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-05-303-15/+9
| | | | | Change-Id: If38d70b1e098c0cc680b913b2c4087681ad2a41e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.cups to QT_[REQUIRE_]CONFIGStephan Binner2017-05-302-8/+10
| | | | | Change-Id: I189134b41c4f6e4ac42b5e47ae79338c744b581d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix build without features.cupsjobwidgetTasuku Suzuki2017-04-301-5/+7
| | | | | | | Change-Id: I1b49a9f63a6a071457a3b9305dc87abe5f3b5b19 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add feature.dialogStephan Binner2017-03-227-18/+22
| | | | | Change-Id: I160d0f270d7f41671459358b9c180d71dd7786d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add feature.label and feature.formlayoutStephan Binner2017-03-031-2/+3
| | | | | | Change-Id: Ic8dc0aee7f3fc0d8218ba709352b1378078c6070 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix deprecated API usageJake Petroules2017-01-242-4/+4
| | | | | | Change-Id: I62448507f80daf6be72994ee99f0fb1aa107eb78 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAGAlbert Astals Cid2017-01-022-1/+2
| | | | | Change-Id: I3cdc7338354da40ab20bdaeb9d5745264ea27228 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add missing override into Qt modulesAlexander Volkov2016-12-011-1/+1
| | | | | Change-Id: I014ac8c7b590c77b054fbb01f0ab5601c44ca88e Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-162-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/linux-android.conf src/gui/opengl/qopengl.h src/network/socket/qnativesocketengine_winrt.cpp src/network/socket/qnativesocketengine_winrt_p.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/api/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp sync.profile Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-152-0/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/plugins/platforms/eglfs/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
| | * macOS: Clear event dispatcher interrupt stateGabriel de Dietrich2016-11-082-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A pending interrupt of a QEventLoop may interfere with native runModal calls, resulting in Cocoa's main event loop to be stopped unexpectedly. After commit 9ab60b9c processEvents() no longer resets the event dispatcher interrupt flag. Add QCocoaEventDispatcher::clearCurrentThreadCocoa EventDispatcherInterruptFlag(). Use it to clear the interrupt state before calling runModal and variants. Work around the inability to use platform API in the print support code. Change-Id: I52f26f99a63cbb46969db42f65b09a3c3119ad15 Task-number: QTBUG-56746 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Change confusing Q_DEAD_CODE_FROM_QT4_FOO defineTor Arne Vestbø2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Use QString::fromLatin1() less to avoid string allocationsAnton Kudryavtsev2016-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QString::fromLatin1 always allocates memory, but there are cases where we can avoid/reduce allocations or/and reduce text size, e.g.: QStringBuilder expressions Fix: replace QString::fromLatin1 with QL1S QString::fromLatin1().arg(String) pattern Fix: replace with QStringBuilder Overloaded functions with QL1S arg Fix: replace QString::fromLatin1 with QL1S In rare cases if there is no overloaded function with QL1S and we have deal with string literal, replace QString::fromLatin1 with QStringLiteral. Change-Id: Iabe1a3cc0830f40ef78a0548afa4368583c31def Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Make things compile with the printer feature disabledLars Knoll2016-09-152-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Always include qtprintsupportglobal.h before checking the ifdef, and add ifdef's where they where missing. Change-Id: I535dce33b26955fb0196ea05d54be41fe93e9151 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-162-7/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-132-7/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03