summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qcups.cpp
Commit message (Collapse)AuthorAgeFilesLines
* printsupport: use string view types moreAnton Kudryavtsev2023-09-121-2/+2
| | | | | | | | sizeof(QStringView) == 16 sizeof(QString) == 24 Change-Id: I3edf0d6869e92c47472980e5f99b9bf9c8a3b7cd Reviewed-by: Edward Welbourne <edward.welbourne@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>
* 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>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | 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>
* Printsupport: replace remaining uses of QL1String with QL1StringViewSona Kurazyan2022-04-191-2/+2
| | | | | | 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-191-13/+15
| | | | | | 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-191-2/+2
| | | | | | | | 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-071-0/+10
| | | | | | | | | | | | | | | | 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>
* 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>
* Pass QDate and QTime as value classesEdward Welbourne2020-02-271-1/+1
| | | | | | | | | 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>
* Replace usages of QVariant::value by qvariant_castOlivier Goffart2019-12-151-1/+1
| | | | | | | This is done automatically with a clazy check Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port from QStringViewLiteral to u""Marc Mutz2019-07-291-1/+1
| | | | | | | | | Now that all our supported compilers know char16_t, we no longer need QStringViewLiteral, whose only purpose in life was to turn u"" into L"" for MSVC < 2015. Change-Id: I25a094fe7992d9d5dbeb4a524d9e99e043dcb8ce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usageAllan Sandfeld Jensen2019-04-041-2/+2
| | | | | Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* cups: Take conflicts for duplex and page size into accountAlbert Astals Cid2018-03-271-0/+20
| | | | | | | | | | | | | | Duplex and Page Size are not shown in the "Advanced" options tag since they are more important options, this means we were not taking them into account for ppd conflicts since we never set their values in the ppd, we do use the new-style cups options for them when printing With this patch we add m_pageSizePpdOption and m_duplexPpdOption to set the values to the ppd struct behind the scenes. Change-Id: I48bd9fe93d0c08b7b8dd9620a07c56fc79cce13b Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* cups: Clear cups options at the start of QPrintPropertiesDialog::setupPrinterAlbert Astals Cid2018-01-241-0/+5
| | | | | | | | | | | | | | | | | | For some reason the cups options are kept globally instead of per printer at QCupsPrintEnginePrivate so when setting the printer options on accepting the print dialog, we first need to clear them and then call the other functions that set them, otherwise, we will "reuse" cups option set on the previous print. How to reproduce: * Open print dialog, set some advanced option to a non default value, easiest one is print in grayscale * Print * Check it prints in grayscale * Open print dialog, check the advanced options are all on default values * Print * Check it incorrectly prints in grayscale Change-Id: I59aacaf30db844ad40887d6b771f9354557852b6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CUPS: Rework set/clearCupsOption APIAlbert Astals Cid2018-01-121-27/+17
| | | | | | | | | | | | Previously it was a bit awkward to use, you had to do QStringList cupsOptions = QCUPSSupport::cupsOptionsList(printer); QCUPSSupport::setCupsOption(cupsOptions, option, value); QCUPSSupport::setCupsOptions(printer, cupsOptions); now you simply have to do QCUPSSupport::setCupsOption(printer, option, value); Change-Id: Id31583f1ec72644791d82776debbae5583a2be54 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CUPS: Enable printing arbitrary pages and page rangesAlbert Astals Cid2018-01-121-1/+6
| | | | | | Task-number: QTBUG-1311 Change-Id: I8e09def0e0d8c1404d3ee86845d98a30c23b6485 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CUPS: Use printer job-hold-until as default instead of the noholdAlbert Astals Cid2017-12-191-0/+31
| | | | | | | 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-sheets as default instead of none,noneAlbert Astals Cid2017-12-181-0/+26
| | | | | | | | 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>
* Printsupport: Fix compilation on gcc with -WpedanticLaurent Montel2017-10-091-1/+1
| | | | | Change-Id: Ic17079e14e90801ed40fddb12d5c1af1b1fa14be Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-4/+0
|\ | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Convert features.cups to QT_[REQUIRE_]CONFIGStephan Binner2017-05-301-4/+0
| | | | | | | | | | Change-Id: I189134b41c4f6e4ac42b5e47ae79338c744b581d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QDate/Time: add toString(QStringView) overloadsMarc Mutz2017-04-121-1/+1
|/ | | | | | | | [ChangeLog][QtCore][QDate/QTime/QDateTime] Added toString() overloads taking the format as a QStringView. Change-Id: I322fa22e6b13fe8ba4badf0a3133425bd067ef32 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Annotate more implicit fallthroughsAllan Sandfeld Jensen2017-03-271-0/+1
| | | | | | | Reduces our number of gcc 7 warnings Change-Id: I792d658cbc11cad15cf45da3a36fc93fcdcc67ea Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QCUPSSupport: clear the job-hold-until option if jobHoldToString() is emptyMarc Mutz2015-06-191-2/+14
| | | | | | | | This changes the behavior of the code such that the option, once set, can also be unset again. Change-Id: I739f77ae1f1336806aac548f6a797ed6b2770235 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QCups: avoid relocationsMarc Mutz2014-11-251-2/+5
| | | | | | | | | | | | | | | | | | Replace a string (pointer) table with arrays of char arrays of maximally occurring size. In the pageLayoutData case, this is trivial, since all strings have the same size. In the pagesPerSheetData case, I've used a trick to cram the (only) two-digit number into a char[2] array, by following it with a null entry. Effects on AMD64 Linux GCC 4.7 release stripped: text: -352B data: -160B relocs: -14 Change-Id: I6c458ff7ada0f45dab976bbe42b24757fc321302 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-111-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-armv7le-qcc/qplatformdefs.h src/printsupport/kernel/qcups.cpp src/widgets/styles/qstyle.h tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
| * QCUPSSupport: fix misuse of QDateTime::addDays()David Faure2014-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | QDateTime::addDays() is a const function and returns a new QDateTime with the given days added, thus the current statement had no effect. Found by applying Q_REQUIRED_RESULT in dev branch. Change-Id: I1b061619d45d7806feaa2bf9fb6d9f0b43d63def Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QCUPSSupport: Extract Method bannerPageToString() from setBannerPages()Marc Mutz2014-03-311-49/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The new function just converts the job-sheets cups option argument, reducing the number of almost-identical switch statements to one. Effects on a stripped Linux AMD64 GCC 4.7 -std=c++11 -O2 build: text: -1008B data: +-0B relocs: +-0 Change-Id: I56843fa963e098e5c8ae203584f34bf5798667e6 Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: John Layt <jlayt@kde.org>
* | QCUPSSupport: Extract Method jobHoldToString() from setJobHold()Marc Mutz2014-03-311-49/+37
|/ | | | | | | | | | | | | | The new function just calculates the job-hold-until cups option argument, reducing the number of setCupsOption() calls down to one. Effects on a stripped Linux AMD64 GCC 4.7 c++11 release build: text: -552B data: +-0B relocs: +-0 Change-Id: I4aa4118c3493cd302dd8fd7f4985c7e0f70ef071 Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: John Layt <jlayt@kde.org>
* QCupsSupport - Remove obsolete CUPS codeJohn Layt2014-03-171-480/+1
| | | | | | | | | All code directly using CUPS is now in the QPA plugin and QCupsSupport is no longer needed, other than the utilities for setting CUPS options which do not need direct access to CUPS. Delete all the obsolete code. Change-Id: I561ad8af2415a9b745e2d35fd0624a5acdf27648 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Set currently selected printer to QCUPSSupport in PageSetupWidgetMartin Klapetek2013-10-181-0/+11
| | | | | | | | Also adds new method to allows setting a printer in QCUPSSupport by printer name. Change-Id: Iff7a88d95eab9de2c96872c45b12e708207bda16 Reviewed-by: John Layt <jlayt@kde.org>
* If CUPS has no default printer, set up the first one in listMartin Klapetek2013-10-181-1/+3
| | | | | | | | Otherwise QCUPSSupport is instantiated without any printer being set up, which leads to bugs and/or crashes in other parts using QCUPSSupport. Change-Id: I1f4ddde5a28d6448d78aed856104ce8448e213c7 Reviewed-by: John Layt <jlayt@kde.org>
* Remove some qBinaryFind usages from the CUPS printing codeGiuseppe D'Angelo2013-09-231-2/+4
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I0f9c8db3ede32570a1fd6cc43a31e2fc76ab2a0a Reviewed-by: John Layt <jlayt@kde.org>
* Fix warnings about conversion from const char* to QString.Thiago Macieira2013-09-231-3/+3
| | | | | | Change-Id: I6d3dca0688a94eb34b55efc841a75e4ebd3a2bd7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: John Layt <jlayt@kde.org>
* Offer Page Range option for apps that can't do it themselvesMartin Klapetek2013-09-201-0/+7
| | | | | | | | | | | | | | | | Some apps may not support printing only a particular page range, but with CUPS we can do "server-side print range", ie. we can select the page range for the application. If CUPS is available, the Page Range widget is now displayed if app advertises no such capability and page range is selected on the server instead. [ChangeLog][QtPrintSupport][QPrintDialog] Added CUPS server-side print range support for apps that can't support print range option themselves Change-Id: Ia7784065ba5a8b53bb05ae46e982c718ef672fa5 Reviewed-by: John Layt <jlayt@kde.org>
* Expose more CUPS options via the 'Properties' dialogMartin Klapetek2013-09-201-0/+11
| | | | | | | | | | | | | | | | | | | On systems with CUPS support users can now choose how many pages from a document are to be printed on paper. This can vary from 1 page per document to 16 pages per document. The page preview changes upon the users selection. Also included in the patch is an option to choose the flow for text. Users can now print documents in the "Right to Left" order or "Bottom to Top", including many other options. [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Pages Per Sheet and Pages Per Sheet Layout options Change-Id: I4e60a4523c6e06d4c15fe9ee9590248fa7ae2038 Reviewed-by: John Layt <jlayt@kde.org>
* Add CUPS Page Set options to print supportMartin Klapetek2013-09-171-0/+21
| | | | | | | | | | | Adds combobox to select CUPS Page Set option (even/odd pages) into the Unix print dialog [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Page Set (even/odd pages only) in the print dialog. Change-Id: I27dd846f58c164039fe2759064aafdf726a1287e Reviewed-by: John Layt <jlayt@kde.org>
* Add CUPS Banner Pages options to print supportMartin Klapetek2013-09-111-0/+57
| | | | | | | | | | | Adds a way to set standard CUPS Banner Pages. This widget is part of the Job Options widget/tab in Properties dialog. [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Banner pages in the print dialog. Change-Id: Ia7a22b7a0f51c12d170986caee61af7109e781e9 Reviewed-by: John Layt <jlayt@kde.org>
* Add CUPS options widget to print supportMartin Klapetek2013-09-101-1/+91
| | | | | | | | | | | | | | | This adds new tab 'Job Options' into Properties dialog in print dialog. In this tab it's possible to set some advanced printing job options such as print schedule, job priority or job billing. Patch also adds new utility methods into QCUPSSupport, which are used to set particular CUPS job options. [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS job options in the print dialog. Change-Id: If2640eedb3d83f50cbb20491f7ec50b325f54f22 Reviewed-by: John Layt <jlayt@kde.org>
* Deal with unused functions, as found by the Intel compilerThiago Macieira2013-07-011-9/+0
| | | | | | | | | | | | | | | | | | | | Use Q_DECL_UNUSED for the one that is possibly unused (we have two overloads so that one gets selected): qglobal.cpp(2069): warning #177: function "<unnamed>::fromstrerror_helper(int, const QByteArray &)" was declared but never referenced Remove functions really not used: qbezier.cpp(153): warning #177: function "findInflections" was declared but never referenced qbezier.cpp(534): warning #177: function "splitBezierAt" was declared but never referenced qpathclipper.cpp(1039): warning #177: function "midPoint" was declared but never referenced qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced qdockarealayout.cpp(2580): warning #177: function "qMin(int, int, int)" was declared but never referenced qmainwindowlayout.cpp(1019): warning #177: function "validateDockWidgetArea" was declared but never referenced qgraphicsanchorlayout_p.cpp(670): warning #177: function "checkAdd" was declared but never referenced qcups.cpp(481): warning #177: function "paperSize2String" was declared but never referenced complexwidgets.cpp(373): warning #177: function "removeInvisibleWidgetsFromList" was declared but never referenced Change-Id: I1e5558e206b04edea381442030dc69536198d966 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix some warnings that have crept up since I last fixed warningsThiago Macieira2013-02-271-1/+1
| | | | | | | | | | | | qgtkstyle.cpp:3177:103: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses] qcups.cpp:517:66: error: ‘QString::QString(const char*)’ is deprecated itemviews.cpp:795:13: error: unused parameter ‘actionName’ [-Werror=unused-parameter] qeglconvenience.cpp:268:9: error: ‘cfg’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Change-Id: I9b8a175ff1c2ddc443363e08b92e09cf7c2f91cf Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add support for getting the paper names available for the printerAndy Shaw2013-02-111-0/+21
| | | | | | | Task-number: QTBUG-27714 Change-Id: I9bc6f1188f262e43f581add058d7895e1b5bd9e3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix number of available printers in CUPS support.Rafael Roquetto2012-10-131-1/+1
| | | | | | | | | | | | | | | | | If the number of available printers changes, we want to update the count. Additionally, if that number has gone to zero, we want to ensure that the number of available printers in the static object is reset to zero. This fixes a crash that occurs if: * You print * You kill cupsd (or it crashes because you're porting it and your port is unstable) * You try to print again before restarting it. Change-Id: I6c6069db9d800ce7426e75df760829fea278e56e Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* printsupport: Include own headers firstSergio Ahumada2012-09-191-1/+3
| | | | | | | | cpp files should include their own headers first (but below config.h) Change-Id: I32a2c76a39d03f543c3eb8393b5e3015276f0622 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Sergey Hambardzumyan <sergey.hambardzumyan@digia.com>