summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
Commit message (Collapse)AuthorAgeFilesLines
* Load winsys and gl dynamically in the windows pluginLaszlo Agocs2014-05-2214-259/+1841
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dynamic builds (-opengl dynamic) are now functional on Windows. In such a build no components in Qt link to any OpenGL libraries directly and qmake will not automatically add any such libraries to the applications' makefiles. Instead, the libraries are chosen and loaded during runtime and applications are expected to use QOpenGLFunctions instead of direct OpenGLfunction calls. Set the environment variable QT_OPENGL to desktop or angle to skip testing and force the given implementation. The application attributes (AA_UseOpenGLES and such) are also taken into account. The testing logic is same as before: We try to load opengl32 and resolve a shader related function. If this fails, ANGLE is chosen. This allows utilizing full desktop OpenGL on systems that have proper drivers, while a transparent fallback to ANGLE will be done automatically for systems that don't. The latter includes also remote desktop connections. Software rendering via Mesa llvmpipe is supported too. The fallback is automatic on systems where the desktop test fails and ANGLE fails to load or initialize (e.g. due to missing libs like d3dcompiler), as long as a suitable patched build of Mesa is available. [ChangeLog][QtGui] Dynamic OpenGL implementation loading is now supported on Windows. This requires Qt to be configured with -opengl dynamic. Task-number: QTBUG-36483 Change-Id: Ie8bb25a6d55b3a1609b00150aeccd909aec27313 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-222-2/+26
|\ | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * Windows QPA: Remove dependency on swprintf_s() pulled in via ↵Friedemann Kleint2014-05-191-1/+22
| | | | | | | | | | | | | | | | _com_error::ErrorMessage(). Task-number: QTBUG-35617 Change-Id: I0ad926ac564612ebd0eb38f16b3e69cbcd48e62f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Fix potential null pointer accessFrederik Gladhorn2014-05-191-1/+1
| | | | | | | | | | Change-Id: I7516ce88b38609ab9851419566141ba93a59aed3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix crash when loading invalid font data in QRawFontEskil Abrahamsen Blomfeldt2014-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When passing invalid data to QRawFont, we need to fail gracefully and mark the font as invalid, instead of crashing. This crashed because of different missing sanity checks in the Windows and FontConfig font databases. [ChangeLog][Text] Fixed crash when trying to load a font from invalid data. Task-number: QTBUG-37190 Change-Id: I62c81217ec7d873350b575c9d4ae8e6f0a939540 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Drop some qtextengine_win.cpp leftoversKonstantin Ritt2014-05-201-5/+0
| | | | | | | | | | Change-Id: Id0d39acfcb340b40e51b8d06a4308df809a8fc1b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Windows: Adapt custom cursors to observe the system metrics.Friedemann Kleint2014-05-201-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | Change the cursors Qt provides to use freely scalable pixmap cursors and scale them to observe system metrics. Make it possible to use pre-saled bitmap data later by passing the system cursor size and the intended target size into the creation function createBitmapCursorFromData(). Task-number: QTBUG-37862 Change-Id: I23899a77f86d0b08b858a81870a57b2e6570ebbe Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Windows: Use new clipboard API for listening to changes.Friedemann Kleint2014-05-154-10/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The currently used clipboard chain API has various problems with non- responsive applications and requires checks for hung/debugged applications when sending on notifications. The new clipboard format listener API available from Windows Vista onwards requires less code and does not have these problems, however the change notifications now arrive asynchronously. Change the tst_qclipboard to be able to deal with asynchronous change notifications. Task-number: QTBUG-38670 Task-number: QTBUG-33492 Change-Id: I3c49e346a34310431c20f3051d12eaabf330a3ad Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Windows: Refactor cursor creation code.Friedemann Kleint2014-05-153-172/+154
| | | | | | | | | | | | | | | | Factor out a function creating bitmap cursors, streamline code. Task-number: QTBUG-37862 Change-Id: Id9d4af34acb2cf15d8553d5e5a6390fae6014ff6 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | qpa: Clean up and refactor qfontengine_qpaTor Arne Vestbø2014-05-153-4/+4
| | | | | | | | | | | | | | | | | | | | | | QFontEngineQPA was really QFontEngineQPF2, and has been renamed. The multi font engine in qfontengine_qpa.cpp was really a base implementation of a multi font engine, used by other multi font engines, and has been renamed and moved accordingly into qfontengine_p.h/cpp. Change-Id: Iac7409c4dbf0fdc3ee993ce4f7dc96cb00a422e6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Friedemann Kleint2014-05-141-1/+1
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-1/+1
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp Change-Id: Ibe75603dc8a51769db6550ea3f07bc8d19b0be85
| | * Fix horizontal scrolling on Windows when ALT + mouse wheel is usedAndy Shaw2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-30833 Change-Id: I366d2979060ba67f745f7c783dee8d7669ebdf57 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Windows: Improve checking of options to the QPA plugin.Friedemann Kleint2014-05-141-6/+30
|/ / | | | | | | | | Change-Id: I59129132c7caa13d5c9d8f1e6211da68505dd838 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-133-3/+28
|\| | | | | | | | | | | | | Manually changed enum to LibGL in src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
| * Windows: Use Format_ARGB32_Premultiplied for backing store with alpha.Friedemann Kleint2014-05-061-3/+2
| | | | | | | | | | | | | | | | | | Following the logic in Qt 4's QRasterWindowSurface::setGeometry(). Task-number: QTBUG-30302 Change-Id: Ica571cfd5098e3d9faedefaff0880acfb2209958 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Add virtual function to QFontEngine report if outlines are reliableJørgen Lind2014-05-062-0/+26
| | | | | | | | | | | | | | | | | | GetGlyphOutline fails for ttf fonts with embedded bitmaps. This results in distancefield rendering not rendering glyphs (for the failed paths). We need to fall back to texture rendering if this is the case. Change-Id: Ibdf7dc5c1d34f513c436f88fabbdcc4089bb6fef Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-069-45/+99
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-014-6/+7
| |\ | | | | | | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| | * Rename new QOpenGLContext APIsLaszlo Agocs2014-04-253-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | isES() becomes isOpenGLES(). The library type enums are changed DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now unnecessary version number, the confusing "desktop" term and provides better readability. The old function/values are kept until the related qtdeclarative changes are integrated. Task-number: QTBUG-38564 Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * deprecate import_qpa_plugin and qpa_minimal_pluginOswald Buddenhagen2014-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | they have been fully superseded by 4255ba40ab073afcf2a095b135883612859af4c2. Change-Id: If7ac14c8b7d3cf00fb0cb916036b62eb86c9cee0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * | Windows: Reject focus-in caused by reparenting Windows.Friedemann Kleint2014-04-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Calling WinAPI SetParent() causes the window to be activated, which is not desired for native child widgets. Task-number: QTBUG-32867 Change-Id: Idf61931bc425a043a4b7a98eec9ae122e234dc37 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * | Windows: Add missing colors to tooltip palette.Friedemann Kleint2014-04-251-1/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-38183 Change-Id: Ic3581cc87c0d61140624ddaf6fa85d682120ad4f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Jani Heikkinen2014-04-252-5/+7
| |\ \ | | | | | | | | | | | | refs/staging/stable
| | * | Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-232-5/+7
| | |\| | | | | | | | | | | | | Change-Id: Id13b4a3803664692f32f9d57549be8a0c4a08567
| | | * Fix font merging for complex scripts on WindowsKonstantin Ritt2014-04-162-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as QWindowsFontDatabase::fallbacksForFamily() does not take script parameter into account, we should prefer QFontEngineMultiQPA's loadEngine() implementation for complex scripts; otherwise we could fall into a situation where reported fallback fonts doesn't support the requested script at all. This finishes c3b2425791ec1e17a8b1e2f5b35b8e79176fc9c4. Task-number: QTBUG-37836 Change-Id: I2c43d97f1331ad05116856f9fe77560ed4dd02c7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * | | Improve COM error handling in the Windows platform plugin.Friedemann Kleint2014-04-251-19/+51
| |/ / | | | | | | | | | | | | | | | | | | | | | Add error strings, print warning if OleInitialize() fails. Task-number: QTBUG-38398 Change-Id: I37f6b7003fd1cf524ce69d6843891943402b27a1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | Fix copy-paste error.Richard J. Moore2014-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an error identified by static analysis from http://www.viva64.com/en/b/0251/ Change-Id: I3b69f8eb8c9e10772d5ca2afad75582e8a54beb7 Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * | Fix copy-paste error.Richard J. Moore2014-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix copy-paste error identified by static analysis at http://www.viva64.com/en/b/0251/ Change-Id: I214d6bf8494a946a6c772b6dca1395e4140a471f Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * | XCB: fix that modal dialogs can go behind other process windowsJorgen Lind2014-04-162-12/+18
| |/ | | | | | | | | | | | | Task-number: QTBUG-35302 Change-Id: I1ad7a66e530710d5338a15057254360dae676451 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Windows: Start using High DPI API available from Windows 8.1 onwards.Friedemann Kleint2014-04-305-6/+94
| | | | | | | | | | | | | | | | | | | | Dynamically load shcore.dll, use SetProcessDpiAwareness() instead of SetProcessDPIAware() when available. Add command line parameter to control level. Task-number: QTBUG-37347 Change-Id: I1259b0943b41e50066e7e3870ed3136afd8f18fe Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-112-3/+5
|\| | | | | | | | | | | | | | | | | | | 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
| * QWindowsOpenGLContextFormat: Default to version 2.Friedemann Kleint2014-04-091-0/+2
| | | | | | | | | | | | | | | | | | glGetString() returns NULL when no current context exists. Task-number: QTBUG-38063 Change-Id: I5cdb265fb2d74bbc5f3e2c34528909323573b2e1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Windows CE: Fix message about freetype font rendering.Friedemann Kleint2014-04-011-3/+3
| | | | | | | | | | | | | | Task-number: QTBUG-37976 Change-Id: Ib4bf6ba8f62e2dc4f3860313442fa57c67f06d9a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devIikka Eklund2014-04-015-37/+18
|\| | | | | | | Change-Id: I2a6eb9dd7724931bc89f28bcc156e77c4e26d069
| * Make QWindowsMultiFontEngine support deferred fallback families queryKonstantin Ritt2014-03-313-33/+9
| | | | | | | | | | | | | | | | | | | | This finishes 800232e1d3ebfbac28d07014a3c646ea00fcf6ad, which encovered a tricky issue in QFontEngineMultiQPA::createMultiFontEngine(). Task-number: QTBUG-37836 Change-Id: I6d432e09e755f5d9ded09752c4c092f4857ad224 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Windows: Suppress window state change to normal when going from maximized to ↵Friedemann Kleint2014-03-272-4/+9
| | | | | | | | | | | | | | | | | | fullscreen. Task-number: QTBUG-35166 Change-Id: Idcf2d2a5fd0dc59f35a287c106ca772d801550c0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-244-6/+23
|\| | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * QOpenGLContext: Use color depth information from QSurfaceFormatKurt Pattyn2014-03-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | When a new QOpenGLContext is requested, the color depth information is now also taken into account on OS X and WGL. Task-number: QTBUG-37411 Change-Id: I69d04989a20de3ace041b009fbbdc03fa02cfdf8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Windows: Allow for custom input context plugins.Friedemann Kleint2014-03-172-2/+12
| | | | | | | | | | | | | | | | Task-number: QTBUG-37556 Change-Id: I9719138e1b09026f0971f8d3eeae525fc8951c0d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Jonathan Liu <net147@gmail.com>
| * Windows native file dialog: Allow for omitting name filter description.Friedemann Kleint2014-03-151-2/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-37329 Change-Id: I644595a292e5b1890b2088b68be595bfcdba9d4d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Windows: Change defaultNameFilterDisables() to return false.Friedemann Kleint2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | As was done in Qt 4, where QFileDialog sets NameFilterDisables() to true for Q_WS_MAC only. Task-number: QTBUG-37302 Change-Id: I162f9e79762aa4fa68aba02d1bdfc6322d472a9d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-03-1315-194/+136
|\| | | | | | | Change-Id: Idec54e19963e8d88c711cb179cffc81596323899
| * Guarantee QPFDB::fontEngine() always return non-multi font engineKonstantin Ritt2014-03-114-36/+37
| | | | | | | | | | | | | | | | | | | | After QPA refactoring, QWindowsFontDatabase::fontEngine() was returning a multi font engine w/o any particular reason. This makes the code more obvious and opens the road to further improvements. Change-Id: I4858026ddf774d3159c89357b1c905f5112b1c51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Remove unused parameter from QEGLPlatformContext constructorLaszlo Agocs2014-03-101-1/+1
| | | | | | | | | | | | | | | | The API is chosen via QSurfaceFormat, the constructor argument is ignored. Remove this historical artifact. Change-Id: I4a5c1e12cb297de22f239ad0a6747c1c36168eed Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Use QStringIterator instead of homebrewKonstantin Ritt2014-03-102-37/+17
| | | | | | | | | | | | | | Task-number: QTBUG-15664 Change-Id: I1ed3eb04ddd822e57a4d993af656dfe283f3af1a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Avoid asserting with QQuickWidget on WindowsLaszlo Agocs2014-03-071-1/+1
| | | | | | | | | | Change-Id: I8b4185a9725b27b3e3e0e049e3a001ed61bcf1d5 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Fix cursor blink time in WindowsFrederik Gladhorn2014-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | In Qt 4 there is a factor of 2 in qapplication_win.cpp, this got lost, so all our cursors were blinking twice as fast. Task-number: QTBUG-37200 Change-Id: I11ce61c51279d9ceb8bc9ba01c1bb9640a31ade8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Remove unused and unlinked qdocconf file from src/plugins.Jędrzej Nowacki2014-03-061-25/+0
| | | | | | | | | | Change-Id: Ie6fd3f9fe7d5bbbe948dd3d38d2be835fd92834d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Make QFontEngine::type() non-virtualKonstantin Ritt2014-03-054-17/+4
| | | | | | | | | | Change-Id: I24ece90d6d8f96dad0c41a474a491b4ea96d97c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>