summaryrefslogtreecommitdiffstats
path: root/src/printsupport
Commit message (Collapse)AuthorAgeFilesLines
* Fix printsupport compilation with -no-feature...Paul Olav Tvete2017-01-254-4/+18
| | | | | Change-Id: I881e736aefd4068965edb2a57f4436ee43d2bb93 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2017-01-141-0/+4
|\ | | | | | | | | | | | | Conflicts: src/gui/painting/qcoregraphics.mm Change-Id: I4d49535cd75f2cdf0151c1dbff312cce5e159760
| * winrt: Fix Qt5PrintSupport(d).lib generationMaurice Kalinowski2017-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With QT_NO_PRINTER set via the feature system there is no symbol exported at all in a packaging build. This implies that no .lib is generated. When an application has QT+=printsupport the build will fail due to a missing file. For android and ios it only worked as there is no separation and linker works against the .so file Task-number: QTBUG-56321 Change-Id: I389adaca61669b302b6c431effed2ef6d1c499a3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add missing override into Qt modulesAlexander Volkov2016-12-013-24/+24
|/ | | | | Change-Id: I014ac8c7b590c77b054fbb01f0ab5601c44ca88e Reviewed-by: hjk <hjk@qt.io>
* winrt: Add printsupportMaurice Kalinowski2016-11-231-1/+1
| | | | | | | | | | For WinRT QPrinter and co are disabled in the new configure system. Still, we need to have printsupport enabled as a module, providing no printer. Task-number: QTBUG-56321 Change-Id: I95ce538e8f54073832af551ccf7f981e877a3b25 Reviewed-by: Oliver Wolff <oliver.wolff@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>
* | | Fix build with various features disabledLars Knoll2016-10-111-2/+2
| | | | | | | | | | | | | | | Change-Id: I95cb3cf3434306344af3f4c7556f45dbfa0b08d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* | | Convert the old feature systemLars Knoll2016-09-151-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to the new qmake based configuration system. This removes the old qfeatures.txt (distributed over configure.json files) and qfeatures.h (distributed over qconfig-<module>.h files). qfeatures.prf is gone without replacement, as attempts to use it would lead to followup errors anyway. Change-Id: I1598de19db937082283a905b9592d3849d2199d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Make things compile with the printer feature disabledLars Knoll2016-09-156-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | rename description => label in configure.jsonOswald Buddenhagen2016-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "description" suggests something slightly longer. this may seem like a gratuitous change, but the upcoming replacement of the old feature system clarifies makes it seem much less so. Change-Id: Ibe702e01cb146b59127bf1f990b4acaef1c61d55 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Modularize configure.json/.priLars Knoll2016-09-152-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the different parts of configure.json/.pri into the libraries where they belong. Gui is not yet fully modularized, and contains many things related to the different QPA plugins. Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-052-3/+7
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: I03b92b6b89ecc5a8db7c95f04ebb92ed198098a8
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-052-3/+7
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/testlib/selftests/generate_expected_output.py Change-Id: If856162abf9a24ae2c9946d336a7d1da03520fa7
| | * QWin32PrintEngine: Fix uninitialized memory read of dpi_x, dpi_yFriedemann Kleint2016-08-302-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discovered by purify: QWin32PrintEnginePrivate::initialize() called updateMetrics() via updatePageLayout() after initHDC(), so dpi_x, dpi_y were accessed before initialized from the display resolution. Fix by moving the call initHDC() up and giving default values. Change-Id: Ia360c06d156e569ca6b1472ec5b5cdc52948f913 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | fix build with various QT_NO_* definesNick Shaforostoff2016-08-261-5/+5
| | | | | | | | | | | | | | | | | | | | | Done-with: Andriy Gerasika <andriy.gerasika@gmail.com> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge dev into 5.8Oswald Buddenhagen2016-08-225-12/+12
|\ \ \ | | | | | | | | | | | | Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
| * | | Use qtConfig throughout in qtbaseLars Knoll2016-08-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-163-10/+10
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-133-10/+10
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-123-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | | Support C++17 fallthrough attributeAllan Sandfeld Jensen2016-08-192-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Replaces our mix of comments for annotating intended absence of break in switches with the C++17 attribute [[fallthrough]], or its earlier a clang extension counterpart. Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-191-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp qmake/library/qmakeevaluator.cpp qmake/library/qmakeevaluator.h qmake/project.h QMakeEvaluator: * evaluateConditional(): one side changed return type, the other changed a parameter type. * split_value_list(): one side changed a parameter adjacent to where ... * expandVariableReferences(): ... the other killed one overload and changed the survivor src/corelib/io/qlockfile_unix.cpp One side changed a #if condition, the other moved NETBSD's part of what it controlled. src/corelib/tools/qdatetime.cpp One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the other moved it from the private class to the public one, in the midst of the "short date-time" optimization, which confused diff entirely. One side changed a QStringLiteral to QLatin1String, the other rewrote adjoining code. src/network/kernel/qauthenticator.cpp Both rewrote a line, equivalently; kept the dev version. src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h One side changed #if-ery that the other removed. tools/configure/configureapp.cpp One side added a check to -target parsing; the other killed -target. tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml tests/auto/testlib/selftests/expected_cmptest.xunitxml Regenerated using generate_expected_output.py I note that quite a few other expected_* come out changed, now. There was no git-conflict in src/widgets/kernel/qformlayout.cpp but it didn't compile; one side removed some unused methods; the other found uses for one of them. Put FixedColumnMatrix<>::removeRow(int) back for its new user. Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-041-0/+3
| |\| | | | | | | | | | Change-Id: Ibd81cd1df4a0650d93fcb556a57be90be2e1f569
| | * Windows: Add support for the PdmDevicePixelRatioScaled metricAndy Shaw2016-07-011-0/+3
| | | | | | | | | | | | | | | | | | Change-Id: If65018a86e386a54f40ee12e81b5137e3412d655 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Add qtprintsupportglobal_p.h and fix qtprintsupportglobal.hLars Knoll2016-07-1426-11/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | Include qtwidgetsglobal.h from qtprintsupportglobal.h. Add qtprintsupportglobal_p.h. Include those headers from all header files in the module. Change-Id: I8d8b2012ee7d513172b985e13fdfeb3493d26d23 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-232-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| | * Doc: Remove repository name from examplesinstallpathTopi Reinio2016-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Examples in binary packages now directly match the install path. Change-Id: Ic1487bc766cfd3b0a0a340cc4ae4ba49d953eaa6 Task-number: QTBUG-52953 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | QtConcurrent/QtOpenGL(Extensions)/QtPrintSupport/QtTestLib/QtXml: add ↵Marc Mutz2016-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_NO_FOREACH Mark these libraries as what they are: Q_FOREACH-free, using QT_NO_FOREACH. Change-Id: I2a567d9fe67e15e9b6f0784525810b553dc50e1f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Add support for Apple tvOSMike Krus2016-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass -xplatform macx-tvos-clang to configure to build. Builds device and simulator by default. Added ‘uikit’ platform with the common setup. Also added QT_PLATFORM_UIKIT define (undocumented). qmake config defines tvos (but not ios). tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be embedded in the binary. A new ‘bitcode’ configuration was added. For ReleaseDevice builds (which get archived and push to the store), bitcode is actually embedded (-fembed-bitcode passed to clang). For all other configurations, only using bitcode markers to keep file size down (-fembed-bitcode-marker). Build disables Widgets in qtbase, and qtscript (unsupported, would require fixes to JavaScriptCore source code). Qpa same as on iOS but disables device orientation, status bar, clipboard, menus, dialogs which are not supported on tvOS. Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | QtPrintSupport: Remove Windows CE.Friedemann Kleint2016-04-061-4/+0
|/ / | | | | | | | | | | | | | | Remove #ifdef sections for Q_OS_WINCE from library. Task-number: QTBUG-51673 Change-Id: I857165858118be91bfb25094ee3229b36942dc4e Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* | Unify license header usage.Jani Heikkinen2016-03-299-35/+85
| | | | | | | | | | | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-03-132-5/+10
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-112-5/+10
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| | * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-03-071-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * QPlatformPrintDevice: fix uninit'ed member variableMarc Mutz2016-03-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: src/printsupport/kernel/qplatformprintdevice.cpp:370:10: runtime error: load of value 196, which is not a valid value for type 'bool' Change-Id: I184e5bf5e4917eeb492b54fe87950bcf03421887 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | QtBase (remainder): use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-122-6/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Had to fix broken qImDebug() definition. Instead of defining it as a nullary macro in the QT_NO_DEBUG case and as a variadic macro in the other, define it in both cases, as is customary, as a non-function macro so that overload selection works without requiring variadic macro support of the compiler. Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3 AMD64 builds. Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | QtPrintSupport: convert some index-based into C++11 range-for loopsMarc Mutz2016-02-175-23/+23
| | | | | | | | | | | | | | Also reserve a QList in QPrinter::supportedPaperSources(). Change-Id: I94d24b81d7adcad2b28d36efdbef5a8726412f1a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Drop most "#ifndef QT_NO_LIBRARY"Ulf Hermann2016-02-081-8/+0
| | | | | | | | | | | | | | | | | | As we can load plugins without QLibrary now, we don't have to #ifdef out the code that does so anymore. Change-Id: I1dc20216830a882dbd5a1b431183407e6b19c837 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-01-261-8/+0
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-8/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| | * Center QPrintPropertiesDialog on top of its parentAlexander Volkov2016-01-181-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove QPrintPropertiesDialog::showEvent(). It just accepts QShowEvent, it makes no sense. At the same time this method overrides QDialog::showEvent(), which centers dialogs. Change-Id: I11510feb4a946f347c19d6ac59874b4cb931020e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Updated license headersJani Heikkinen2016-01-211-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-1546-638/+914
| | | | | | | | | | | | | | | | | | | | | | 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>
* | QUnixPrintWidget: fix some poor uses of the QComboBox APIMarc Mutz2016-01-021-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - populate the widget with addItems(QStringList) instead of looping over addItem(QString) - Use findText() instead of looping over itemText(int). QComboBox::findText() delegates searching to the model (via QAbstractItemModel::match()), so is potentially much faster. I say potentially, because match() isn't properly reimplemented in most models, yet. But that is something to fix in the models. Change-Id: I6e52cf5af810ab7869c0270504a241868a5ca281 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtPrintSupport: eradicate all Q_FOREACH loopsMarc Mutz2015-12-236-16/+21
| | | | | | | | | | | | | | | | Saves more than 2KiB in text size on optimized GCC 4.9 Linux AMD64 builds, iow: ~0.5% of the total library size. Change-Id: I84e1dc208da13eefdf1573c9b7ac7c9d76a7f5c7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>