summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-02-281-1/+1
|\ | | | | | | Change-Id: I7d84cfed0b2a122d334b8a920e6e4f18472d2f11
| * Make better use of new QStringList::join(QLatin1String) overloadMarc Mutz2017-02-191-1/+1
| | | | | | | | | | | | | | | | It was added in Qt 5.8. Change-Id: I7194fbfaef9219110604f3b03a893a658c996c06 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows: Introduce helper class for implementing COM interfacesFriedemann Kleint2017-02-171-24/+2
|/ | | | | | | Task-number: QTBUG-43190 Change-Id: I565e3c57631c32a88ac7598758526c349ddf3312 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA/Open file dialog: Copy non-filesystem itemsFriedemann Kleint2017-01-111-6/+73
| | | | | | | | | | | | | | | | With the introduction of the new IFileDialog interfaces in Qt 5, the open file dialog no longer was able to open items on MTP mounted devices. The Win32 API GetOpenFileName() used in Qt 4 would hide this by creating a local copy of the file in the INetCache folder. Add code to emulate the behavior in QWindowsNativeOpenFileDialog::dialogResult(). Task-number: QTBUG-57070 Change-Id: I88cccfbf9697585225356cc864df67c86a912c91 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows QPA: Refactor conversion of IShellItemFriedemann Kleint2017-01-111-119/+229
| | | | | | | | | Introduce a light wrapper class around IShellItem which hides its idiosyncracies. Task-number: QTBUG-57070 Change-Id: I60a825ea7a826d67859ab82537d614ecc3367692 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows QPA: Implement setting the "Cancel" button text of file dialogsFriedemann Kleint2017-01-101-1/+15
| | | | | | | | | The functionality was missing in IFileDialog. As of Windows 7; IFileDialog can be queried for IFileDialog2, which provides it. Task-number: QTBUG-44112 Change-Id: I0c0345d516bbc36f9bb519545f5eda1289c9ef23 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-081-34/+34
| | | | | | | | We can use 'override' directly since Qt 5.7. Also remove redundant 'virtual'. Change-Id: Ib478f19381d53642e1ed1c2a589d6b9c4d663e3c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA plugin: Use member initializationFriedemann Kleint2016-11-301-18/+8
| | | | | | | | Use C++ 11 member initialization in value-type structs. Task-number: QTBUG-51673 Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-051-4/+9
|\ | | | | | | | | | | | | | | 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-051-4/+9
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/testlib/selftests/generate_expected_output.py Change-Id: If856162abf9a24ae2c9946d336a7d1da03520fa7
| | * Windows QPA: Fix leaks in native file dialogsFriedemann Kleint2016-08-301-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Release the IShellItem instances according to the documentation of IFile[Open]Dialog. Task-number: QTBUG-55509 Task-number: QTBUG-55459 Change-Id: Ib79622cde21982b1bda0be7d0483c6e652a1d5fe Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | Remove Windows CE vestigesJoerg Bornemann2016-06-021-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove every usage of the _WIN32_WCE macro outside of 3rd party source code directories. Change-Id: Ia7e859bd6dcaef10c66674612c8e440f9a2dee56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Windows QPA: Remove qtwindows_additional.h.Friedemann Kleint2016-05-171-291/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up helper definitions required for old SDKs and MinGW and move the remaining ones to the files that require them. Ensure compilations with MinGW 4.9. Task-number: QTBUG-51673 Change-Id: I607989dd1d9197f237c6d021209a2c94aeb84021 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-051-1/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-041-1/+9
| |\| | | | | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| | * wince: Disable Native Filedialogs for WEC2013Andreas Holzammer2016-03-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Qt crashes when opening a native file dialog. Disable this feature to fix this issue. Change-Id: I1ee17d858238c2531964a63ddbe3e11c5a85483c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * Windows QPA: Fix regular expression to match CLSIDs in file dialog.Friedemann Kleint2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Match correct number of digits and entire string, amending change 4347e811611ab15e544765a3a34761d2f5c68cb3. Task-number: QTBUG-33962 Task-number: QTBUG-51373 Change-Id: I56de00bd5ffb3a3a700efbb20970154faf86f923 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Windows QPA: Increase API level to 0x600 (Windows Vista).Friedemann Kleint2016-04-011-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Directly link against dwmapi which should be present on Windows Vista and remove duplicated header constants. - Remove struct QWindowsShell32DL since all required functions are present on Windows Vista. - Remove functions that are no longer needed from QWindowsUser32DLL with exception of the clipboard functions which are not present in the MinGW stub libraries until v5. Task-number: QTBUG-51673 Change-Id: Ia4a8a3f1db0f0d02322317d547e61ae39f9008b5 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | | Windows QPA: Remove Windows CE.Friedemann Kleint2016-03-291-22/+4
|/ / | | | | | | | | | | Task-number: QTBUG-51673 Change-Id: I5b58a7d1651fce7f868a4d3fdd8fa46f35e67695 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-3/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Windows: Extract the suffix from the simple file filter caseAndy Shaw2016-03-021-3/+6
| | | | | | | | | | | | | | | | Since the filter can either be something like "*.txt" or "Text Files (*.txt)" then it should have the suffix default to "txt" in both cases. Change-Id: I36a72f5bf0fb12c84db103f91c4fca94d0d933ae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-11/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * Fix usage of QMutexLocker, destroy it only at end of scopeSérgio Martins2016-02-101-4/+4
| | | | | | | | | | | | Change-Id: I87f2c433c987b5f7b4680639cae51cdf6ce9ddc6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Windows QPA: Remove dead code as detected by Clang.Friedemann Kleint2016-02-051-5/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-50804 Change-Id: Id87ca4ac98eb17b1e743a10080554da38d609588 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * Windows QPA: Add missing override declarations.Friedemann Kleint2016-02-051-2/+2
| | | | | | | | | | | | Task-number: QTBUG-50804 Change-Id: I27017b0d0fd44cf746d180fdb126d1e6593e7d7b Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-27/+25
|\| | | | | | | | | | | | | | | | | | | | | 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
| * Windows/Direct2D QPA plugins: Fix overrides.Friedemann Kleint2016-01-141-27/+25
| | | | | | | | | | | | | | Fix warnings found by clang. Change-Id: Ia8e7a271e9d33011eded1e63e61dbcaeaf692600 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.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>
* Windows QPA: Fix debug operators.Friedemann Kleint2015-10-271-0/+2
| | | | | | | | | | Enclose all debug operators within QT_NO_DEBUG_STREAM, declare all public ones and make the others static. Add operators for POINT and WINDOWPLACEMENT. Task-number: QTBUG-48449 Change-Id: I33f2dba2bf486a8f5cb11f11f4e2b37cce086def Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows QPA plugin: Fix debug formatting.Friedemann Kleint2015-04-301-1/+6
| | | | | | | | | | | | | | | | - Introduce QDebugStateSaver for all debug operators. - Remove the "Flags=" from enumerations since their type is now output by default. - Added some spaces since the previous formatting relied on space=true as a result of some debug operators erroneously returning debug.space(), which is now fixed in qtbase. - Fixed formatting, added noquote() where necessary, added some newlines, used stream modifiers instead of QString::number(n, 16) to output hex numbers. - Fix indentation. Change-Id: I64123a4262916e21448cda2aa61ae1100f07291a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: Support virtual folders as initial directory for file dialog.Friedemann Kleint2015-03-271-19/+61
| | | | | | | | | | | | | Use the scheme "clsid" to be able to pass them as "clsid:<GUID>" (with '{', '}' stripped). Task-number: QTBUG-33962 Change-Id: Ib045fe81518bca6e91588007ce8a245a48479b1f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Patrick Spendrin <patrick.spendrin@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.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>
* Use Qt 5 signals & slot syntax in the Windows QPA plugin.Friedemann Kleint2014-12-201-12/+12
| | | | | Change-Id: Ide8f79e82c9d22e40577e6fb0116ebaa2a6d90d9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows native file dialog: Work around display bug of IFileDialog.Friedemann Kleint2014-11-051-4/+9
| | | | | | | | | Any filter not filtering on suffix shows up duplicated in filter combo. Change-Id: I9fc9e33b6081cf6894fabc6dd52c12a4d3dfd393 Task-number: QTBUG-42405 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.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>
* Remove superfluous "break" in QWindowsNativeFileDialogBase::setLabelText()Maks Naumov2014-09-011-1/+0
| | | | | Change-Id: I889dfa00daf60e393e3d95ee2d0ecb73f7871e4c Reviewed-by: Konstantin Ritt <ritt.ks@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>
* Windows file dialogs: Use FOS_NOREADONLYRETURN only for mode AcceptSave.Friedemann Kleint2014-02-251-6/+10
| | | | | | | | Task-number: QTBUG-36886 Change-Id: I727abb92675187f15d1357b1df60f2fb609dc4d5 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Force alignment for SSE2 to not crash with mingwKonstantin Ritt2014-02-131-2/+2
| | | | | | | | | | Make sure that stacks are properly aligned by replacing CALLBACK with QT_WIN_CALLBACK so that we don't crash in SSE2 code. Task-number: QTBUG-36807 Change-Id: I6952d0f252c7b8e481c48521ed1377b7d7510e15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows file dialog: Clean up thread manually.Friedemann Kleint2014-02-071-4/+25
| | | | | | | | | | Do not use deleteLater() to delete the thread. Task-number: QTBUG-36357 Change-Id: Ie7c87b92a7c73d5fbac01d4951d387ee2facd05c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Port Windows QPA plugin to new logger API.Friedemann Kleint2014-01-221-33/+16
| | | | | | | | | | | | | | | | Introduce logging categories and change most debug statements to qCDebug(). Retrieve the filter rules from the environment variable QT_QPA_VERBOSE (should be removed once the logging framework offers a more convenient way of configuring). Replace the old per-category variables controlling verboseness of the output by a single variable which can be set on the command line. Change-Id: Iae55ecdb0e150efd165b7d3e90b371f72853f194 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Use focusWindow() as native dialog parent when 0 is passed.Friedemann Kleint2014-01-141-0/+2
| | | | | | | | | | A parent is required, otherwise the application gets deactivated when the dialog closes. The same is done in Qt 4. Task-number: QTBUG-36039 Change-Id: I56688b3259f1d207edd1bec499afd1365ae511dc Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Silence warning in QWindowsFileDialogHelper::selectFile().Friedemann Kleint2014-01-091-2/+2
| | | | | | | | | | The function is invoked from the QFileDialog constructor in save file mode when passing a non-existing file. Task-number: QTBUG-35703 Change-Id: I5c13efb9b6789404b28739f6ce88ed87b594b6e4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows platform plugin: Add missing case statementKurt Pattyn2013-12-301-0/+6
| | | | | | Change-Id: I9b9fc6cf000b262277711374e0a2fe119328849e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix typo in check for MINGW_W64 versionKai Koehne2013-10-231-1/+1
| | | | | | | | Got introduced in 9b187bcd6a256b53cc2fb85500 Change-Id: I1d713f8309d3d8568ea836cc1d29f9dca685ac01 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix compilation with latest MinGW-w64 (release 3)Kai Koehne2013-10-221-1/+3
| | | | | | | Now that MinGW-w64 fixed the headers the old hack actually break stuff. Change-Id: I1f60b9176982f6c07e01f3960bc1d7e70d7f9481 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QFileDialog: don't create widgets if the platform dialog will be usedShawn Rutledge2013-10-151-2/+2
| | | | | | | | | | | This is a performance and memory optimization which also fixes bugs that are related to creating widgets, file system models etc. despite using platform native dialogs. Similar to 785bc64f8e743ac269f15cbe7fecba93d3d507ac for QColorDialog. Task-number: QTBUG-33039 Change-Id: Ia1aa7ec1f43b47006b9ebd377aed15c958538a17 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Require Windows VistaKai Koehne2013-10-071-0/+2
| | | | | | | | | | The structure FDAP is only available as Windows Vista, and MinGW-w64 do not actually define it if _WIN32_WINNT isn't set. Needed to fix compilation with latest MinGW-w64 headers (version 3). Change-Id: I566ea6bd4c3d8d5a495b644aedffb7de42a6d6e4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix typo in define guardsKai Koehne2013-10-071-1/+1
| | | | | | | Needed to fix compilation with latest Mingw-w64 headers (version 3) Change-Id: I70c7ff3d833e15e99a915a2df83f04d03a968300 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>