summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Improve padding hole issues in QAbstractPrintDialogPrivateThiago Macieira2018-04-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Placing a boolean between two pointers means we'll have a 7-byte padding hole (64-bit). So move it to the bottom of the class, consuming the tail padding that needs to be there anyway on 64-bit systems. On 32-bit Unix systems, the better place would be at the top, as the parent class (QDialogPrivate) has a 3-byte tail padding. But that's fragile, as QDialogPrivate can change, doesn't apply to MSVC's ABI and doesn't gain us anything on 64-bit. Change-Id: I3840d727dee443318644fffd1528e4f05f4142bd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Show high DPI custom cursor on macOSFrederik Christiani2018-04-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the devicePixelRatio to 1 on the scaled down pixmap. A scaled down version of the high DPI pixmap is added to the NSCursor in addition to the high DPI one, but the devicePixelRatio must be set correctly on the smaller of the two for macOS to pick the right image to use on a high resolution display (retina). This change also fixes the problem that only a high DPI custom cursor with a hotspot in the upper left quadrant is applied by macOS. I suspect that the NSCursor was discarded by macOS, because the hotspot was outside the device independent bounds of the smaller scaled image. Task-number: QTBUG-52211 Change-Id: I7e552e8f62f5255dd3786da44b2f619f6790c37a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | | Merge drawhelper convert-from and storeAllan Sandfeld Jensen2018-05-0210-673/+585
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids using an intermediate buffer on store and simplifies the code. Change-Id: I2dc4e735eb770f90dc99fe0f513b4df3b35ee793 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | | Upgrade double-conversion to v3.0.0Ulf Hermann2018-05-0210-42/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes their issue #41, a potential undefined behavior. We preserve the locally added "__ghs" clause as well as the _M_ARM_FP clause necessary for winrt in utils.h. [ChangeLog][Third-Party Code] double-conversion got updated to upstream version 3.0.0. Task-number: QTBUG-66561 Change-Id: Id79125bdeeaebb61dca2e2885d3370accce9030c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Unix print dialog: Properly initialize duplexMichael Weghorn2018-05-021-5/+26
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the user has explicitly selected a value for the duplex mode in the print dialog before, select this one when another printer is selected and the newly selected printer supports it. Otherwise, always set to the default value of the respective device that was selected. This way, default values that the user (or admin) has set for a CUPS printer (or printer instance) are honored, but an explicit user choice made in the dialog takes precedence. Previously, the duplex values was always reset to "None" every time the printer was changed. Change-Id: Id9683a05b10cf7a4b842f8b6c8452e80cdc6ff91 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | | Make the use of -fdata-sections and --gc-sections more generic in QtMikhail Svetkin2018-04-272-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qmake feature and configure option, which optimze the size of static exectuable. Use for static build. Enabled via configure --gc-binaries, or CONFIG += gc-binaries in 3rd party projects. Change-Id: I3c25b02caaef6a4afc6019afc9c67122dd11696d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | | QGraphicsView: Improve high-DPI item cachingMorten Johan Sørvig2018-04-261-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scale cache size by target paint device devicePixelRatio. Add manual test for the cache modes. Change-Id: I9f3a2b4c4cf12571aefe54ebf534009a2448fb48 Done-with: MihailNaydenov <garfieldhq@yahoo.com> Task-number: QTBUG-26795 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | QGraphicsView: Create high-dpi background pixmapMorten Johan Sørvig2018-04-261-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scale pixmap size by the viewport devicePixelRatio, and make sure scrolling deltas and expose regions are correctly scaled. Change-Id: Ibeac34c5ecd531ca7c09802f0b5e1f45b8e31b65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | Cocoa Menus: Refactor QCocoaMenuItem::sync()Gabriel de Dietrich2018-04-262-50/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And move some logic into detectMenuRole(), where it belongs. This refactoring will enable fixes for the issues below. Change-Id: Id03bb5c26d7dd0bb3b94f01e69935e1f3321bb95 Task-number: QTBUG-17291 Task-number: QTBUG-30812 Task-number: QTBUG-38705 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | Cocoa Menus: Clean up codeGabriel de Dietrich2018-04-2613-136/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this edition: * Use Objective-C properties where appropriate. * Use recently introduced qt_objc_cast(). * Remove uses of foreach. * Update copyright headers. Change-Id: I2a07a7b6cab27b833e4deaeedf9563463ff55914 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | QToolButton: Elide text when constraints prevent from showing whole textChristian Ehrlicher2018-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QToolButton has a fixed width and the text is too long, the text was cropped which made the button look ugly. Fix it by eliding the text in the middle in this case. Task-number: QTBUG-64132 Change-Id: I7bc46d1edcf4e67b5e1a5b651d4793f9ffa15310 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | | QColorDialog: deprecate rgba()Giuseppe D'Angelo2018-04-262-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was already deprecated in the documentation, just use the QT_DEPRECATED macros. Change-Id: Ie9ba7dd36af8e4eb5bddb7429182db98c7c638f5 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-04-2611-67/+84
|\ \ \ \ | | | | | | | | | | | | | | | refs/staging/dev
| * | | | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-2611-67/+84
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
| | * | | improve documentation, mostly of the QT_TR*_NOOP macrosOswald Buddenhagen2018-04-253-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I65ccddec84a01945a6aee2a859d4f92ea830785b Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mateusz Starzycki <mstarzycki@gmail.com> Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * | | Fix build with -no-feature-graphicsviewPaul Olav Tvete2018-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Idddd353695d2a24ed90c29f557abfedf11d82fbc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * | | Doc: Show more examples on how to have multiple logging rulesKai Koehne2018-04-251-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-66050 Change-Id: I6872cd64f9b27b9849e4166af7aa6414c372cd5e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
| | * | | Windows QPA: Add missing calls to keyboard initializationFriedemann Kleint2018-04-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add calls to changeKeyboard() to the QWindowsKeyMapper constructor and the handling of WM_INPUTLANGCHANGE so that the locale is correctly initialized and changes are processed. Change-Id: Ia30d8c6434ca85165e4882240ae16f9a75dcf4ff Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | | Windows QPA: Fix handling of VK_DECIMAL/VK_SEPARATORFriedemann Kleint2018-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the hardcoded mapping from the key table for fallback keys since the keys are locale-dependent. Task-number: QTBUG-57992 Change-Id: I016ab5f7f7e8abfd30f6416d2e7597db7deecb9b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | | Don't crash on <br> following a <table>Allan Sandfeld Jensen2018-04-251-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A <br> has a new-line but no text, so be able to handle no lines. Task-number: QTBUG-60853 Change-Id: I3d4dbd529114bbe8afe760c3622b52446202ec7c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * | | Cocoa: Don’t starve the event loop on requestUpdate()Morten Johan Sørvig2018-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of our examples, and perhaps also some applications, call requestUpdate() immediately after producing a frame. This can cause Cocoa to immediately start (trying to) draw a new frame without processing e.g. input events. This should (and will) be handled by rate limiting updates with CVDisplayLink. In the mean time fall back to using the base class QPlatformWindow implementation, which is implemented using a timer, which will allow for input event processing. Change-Id: Ic2541f344b2f4018d785404a06274959a7bad2df Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| | * | | QCocoaFontDialogHelper: Fix NSFontManager delegate warningGabriel de Dietrich2018-04-241-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Apple's documentation, there's no delegate in NSFontManager. We set its target instead. The action is changeFont: by default. Change-Id: I8c01bfa97c78dd8097f38c27353748d13f51489f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | Style sheets: detect and use font set on QHeaderViewsGabriel de Dietrich2018-04-241-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We also ask the parent style to draw the header label instead of the base style which is more likely to respect other text related parameters. Change-Id: I6dd658fa4d016a76d7c450478dc42f07e4b807c4 Task-number: QTBUG-33855 Task-number: QTBUG-37153 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | | Fix division by zero in radial gradiants with NEONAllan Sandfeld Jensen2018-04-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NEON implementation uses rsqrt and thus can not be taken on 0, so replace the minimum with something close to zero instead of zero. Task-number: QTBUG-59961 Change-Id: Ia39e45be675b056c1e22900495ce9ba4e8b70e5f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | * | | QCocoaWindow: Fix handleMouseEvent() compilation warningGabriel de Dietrich2018-04-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm:408:53: warning: 'handleMouseEvent<QWindowSystemInterface::DefaultDelivery>' is deprecated [-Wdeprecated-declarations] QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint, Change-Id: Ifbf8c46e31a1de2089ce0e16cec087fdd9adb64e Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | | | High-dpi drawTiledPixmap (raster paint engine)Morten Johan Sørvig2018-04-262-1/+14
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement more consistent behavior for drawTiledPixmap(), which should produce the same visual tiling pattern independent of display devicePixelRatio Consider the following pixmaps and draw calls: QPixmap px32; // 32x32 QPixmap px64; // 64x64 drawTiledPixmap(QRect(0, 0, 128, 128), px32); drawTiledPixmap(QRect(0, 0, 128, 128), px64); On 1x displays this will produce 4x4 and 2x2 tiles, respectively. On 2x displays this would previously produce a different tiling pattern, where the paint engine would tile in the device pixel coordinate system. Change this to tile in the device independent coordinate system, producing the same visual tiling pattern as the 1x case. It is possible to produce a 4x4 tiling pattern with high-resolution output from the 64x64 pixmap by setting the devicePixelRatio: QPixmap px64; px64.setDevicePixelRatio(2); drawTiledPixmap(QRect(0, 0, 128, 128), px64); This change adds an inverse scale to the image filler transform that accounts for the pixmap devicePixelRatio. [ChangeLog][QtGui] QPainter::drawTiledPixmap() now tiles in the device independent coordinate system. Change-Id: I4918d274192967f222f181b374571c7c597dcd76 Reviewed-by: Jonathan Courtois <jonathan.courtois@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: 石博文 <sbw@sbw.so> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | Protect all accesses to the global engine cache by a mutexLars Knoll2018-04-251-34/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, we'll end up with corrupted memory when using QRegExp from multiple threads. Amends bbdc1b5ccbb19405f997cd67ec53b2c4860105f7. Change-Id: I9d35897629d0bc26503aa0c537c5f99013921fdd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Cocoa QPA: Remove uses of NULLGabriel de Dietrich2018-04-254-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia0d1f019622d20ad70b5fd8c4122b719c0286738 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | | QCocoaNSMenuItem: Add default initializerGabriel de Dietrich2018-04-253-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just tidying code a bit. Change-Id: I492535094533ee307d757bfbbcb41376291f8878 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | Fix drawTiledPixmap() and texture-brush painting with high-DPR imagesEirik Aavitsland2018-04-253-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although QPainter::drawImage()/drawPixmap() would render images scaled according to their devicePixelRatio(), that would not happen for drawTiledPixmap() and when using a textured brush. Implemented here, in combination with the pending "High-dpi drawTiledPixmap (raster paint engine)" commit. [ChangeLog][QtGui] Fix drawTiledPixmap() and texture-brush painting with high-DPR images Task-number: QTBUG-67248 Change-Id: I037e3f897fa708038a0222d3b0c61c7842d87961 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Fix crash in QMainWindow::tabifyDockWidgets()Friedemann Kleint2018-04-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The list of tab bars in QMainWindowLayout::animationFinished() is apparently modified by animations. Take a copy before iterating over it and showing the tab bars. Amends ba2221bd7314c42353cd7ab2895c043d06d837ac. Task-number: QTBUG-67916 Change-Id: Ib3a70eeac1f3b3f0dd7bd5d37aa6c34b92a55086 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | | Support std::unique_ptr and others in Q_DECLARE_PRIVATEJüri Valdmann2018-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ptr.operator->() instead of ptr.data() for getting the raw pointer. [ChangeLog][QtCore][QtGlobal] Q_DECLARE_PRIVATE can now be used with std::unique_ptr and other smart pointer types. Change-Id: I7f3f698d7bac477f2185837681e366057d292588 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Fix include style in qreadwritelock_p.hJoerg Bornemann2018-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ...to make that file bootstrap-compatible. Change-Id: Ic7c3b64cb27f3fd81f0140b6ee899310fa04f4c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-248-24/+57
|\| | | | | | | | | | | | | | | Change-Id: If950406391f79d99f0101f0b6755395accb26f34
| * | | Fix QML integration of widgetsLars Knoll2018-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to mark the object as deleted before destroying it's declarative data, otherwise all sorts of bad things can happen. This fixes the qwidgetsinqml autotest in qtdeclarative. Change-Id: I05a645ebe1ca7a50c8927e3dbd9ebb5aaf369a71 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 3e91625b58b4d7d2757678de9d77eef91e84df36) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | doc: Make both qEnvironmentVariable() functions visible in the docsMartin Smith2018-04-231-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There had been a fake declaration for qEnvironmentVariable() in qglobal.h thaqt was only visible to QDoc. It was removed in favor of documenting both the actual declarations of qEnvironmentVariable(), one with a 2nd parameter for passing a defualt value and one without that parameter. But the one without the default value parameter was marked internal, so it didn't appear in the docs. When both functions were documented with a shared comment, a bug in QDoc was revealed, because these functions are global, while the shared comment functionality had only been implemented for class member functions. Now the shared comment functionality has been implemented for global functions, so these two functions are now documented with a shared comment. We can, of course, reintroduce the #ifdef QCLANG_QDOC trick, if that is pre3ferred. Change-Id: I41d85def5daa3215a995d7697d064dfae37e8b2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Windows QPA: Fix Korean IME removing words when using CTRL shortcutsFriedemann Kleint2018-04-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore the WM_IME_ENDCOMPOSITION message in that case. Done-with: Tobias Koenig <tobias.koenig@kdab.com> Task-number: QTBUG-58300 Change-Id: I9506754a149905222a324b85634964fce398d3ac Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | | Doc: Mark local functions in qlogging.cpp as internalKai Koehne2018-04-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes qdoc warnings introduced by 67d5f79fe6f86726eff. Change-Id: I4b199e6243d9a7706befe4bc9549c78c11026d9e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Doc: Advocate use of std::initializer_list constructor in Q[String]ListKai Koehne2018-04-234-15/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're relying on C++11 since a while, so lets not advertise creating lists of strings with operator<<() anymore. Change-Id: I14a3442ff852ac2c106d90c63504eb9ebb737609 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
| * | | Style sheets: Include margin while calculating QHeaderview section sizePeng Wu2018-04-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Align with QCommonstyle QHeaderview section size calculation. Change-Id: I4c11e1881f48850ace3bdbb3c96f999cc298c91e Task-number: QTBUG-56457 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | | Make it easier to use resources in plugins when using static linkingSimon Hausmann2018-04-231-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCC generates code that registers resources automatically on program startup via global constructors. When linking statically and nothing references the symbols in the .o file compiled from the RCC generated code, then the linker will discard the embedded resources and they will not get initialized. That is why for static linking it is necessary to explicitly initialize resources using the Q_INIT_RESOURCE macro. We can avoid the need for the explicit initialization in the context of plugins that are statically linked into the application. resources.prf can generate a .cpp file with a helper function that contains all the Q_INIT_RESOURCE calls for all resources in the plugin. That helper function in turn is injected into the plugin entry point, which in turn is guaranteed to be included in the final binary. Change-Id: If1abf9c85ef92935020af073b989c58c1ae6ca63 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | | Introduce QPasswordDigestor functionsMårten Nordheim2018-04-233-0/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a few functions to derive keys from passwords. Currently it supports PBKDF1 and PBKDF2 as defined in RFC 8018 ( https://tools.ietf.org/html/rfc8018 ). [ChangeLog][QtNetwork][QPasswordDigestor] Added QPasswordDigestor Task-number: QTBUG-30550 Change-Id: I2166b518bd8b54e3486514166e76fd9ba2f219c8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | QSslKey: Implement PKCS#8 support for the generic backendMårten Nordheim2018-04-234-6/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to decode keys which are encoded with PKCS#8 using the generic back-end (used in winrt and secure transport). It works on both WinRT and macOS; however QSslKey seems unused in the WinRT backend and it seems only RSA keys can be used for certificates on macOS. Meaning that DSA and Ec, which in theory* should represent their unencrypted versions, can't currently be tested properly. * Can also be confirmed by loading the key using the ST or WinRT backend, calling toPem(), writing the output to a file and then loading the unencrypted key using openssl. [ChangeLog][QtNetwork][QSslKey] Added support for PKCS#8-encoded keys in the generic SSL back-end (used for SecureTransport on macOS and for WinRT). Note that it does not support keys encrypted with a PKCS#12 algorithm. Task-number: QTBUG-59068 Change-Id: Ib27338edc7dbcb5c5e4b02addfdb4b62ac93a4c3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | iOS: Document why we're using a runloop mode tracker in our event dispatcherTor Arne Vestbø2018-04-231-0/+18
| | | | | | | | | | | | | | | | | | | | Change-Id: I71093ca05988c3e1ad6d51be7363952dd3f0518e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Speed up QTimeZone::isTimeZoneIdAvailable by a factor 43David Faure2018-04-234-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating and sorting a list of bytearrays just to check if one entry is present, is really overkill. By adding a new virtual method isTimeZoneIdAvailable() in the backend classes, we can do this much more efficiently. Implemented for Utc and Tz backends, the others fall back to the slow way. The new benchmark shows, in release mode: Before: 43 msecs per iteration (total: 86, iterations: 2) After: 1.1 msecs per iteration (total: 73, iterations: 64) Change-Id: Ic0d79a41d74e2ce6aa088fa7986c41d33902c36b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QHeaderView: emit geometriesChanged() when the header is resizedChristian Ehrlicher2018-04-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the QHeaderView is resized (e.g. due to setFixedWidth), the views are not notified about it and the layout is not updated which leads to a wrong painting. Therefore we have to listen for QEvent::Resize the same way as when the font or style changes. Task-number: QTBUG-67532 Task-number: QTBUG-34095 Change-Id: Id70daf083e0dddc2500d8e5aad47513266887a2c Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | | | Add image quality handling to QTextImageFormatDaniel Savi2018-04-223-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enhances QTextImageFormat with a property for image quality. Default will be quality of 100. The user may set different values with setQuality(int). QTextODFexport will export images as png if quality is set to 100 and as jpg with the compression quality set to the given value if smaller than 100. [ChangeLog][QtGui][QTextImageFormat] Adds two new functions to the class: setQuality(int=100) and quality(). Is currently used by QTextODFWriter to determine the image type and quality when exporting images to ODT files. Change-Id: Iaa8ec0246aaba004d98c9e8c66609795101519a9 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-226-42/+113
|\| | | | | | | | | | | | | | | Change-Id: Id32f0ae002772444c0b61cd132ef81f96fe3b895
| * | | QSslSocket: Call transmit when encrypted on WinRTMårten Nordheim2018-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once connection is established the socket emits 'connected', and then you can start writing. But it will end up in the write-buffer and won't get sent until 'transmit' is called. Some code (e.g. QWebSocket) relies on QSslSocket transmitting once it's encrypted. This is done in the OpenSSL backend but was not done in the WinRT backend. Task-number: QTBUG-56558 Change-Id: I8cf5d3257f3597a4bb80f35369490a3816506a34 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | QByteArray: Use nullptr for "Safe and portable C string functions"Andre Hartmann2018-04-211-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the documentation to use nullptr and modify the related code also while at it. Change-Id: I6264a254828159cda54e90393835ea04e131350b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>