summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Windows: Fix/Improve closing of native file dialogs.Friedemann Kleint2013-09-111-11/+65
| | | | | | | | IFileDialog::close() only works from callbacks. Try to find the dialog window and send it a WM_CLOSE in addition. Change-Id: Id0f89f8781564e19e4763d43a71df55d5299fb35 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-101-2/+2
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-2/+2
| |\ | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * Windows XP file dialog: Fix appending the selected filter suffix.Friedemann Kleint2013-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The mechanism is triggered by always setting lpstrDefExt, Task-number: QTBUG-33156 Change-Id: Ib3a49410a1ad78fb433a4e0803a0751ec8c2a51e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | | Windows: Use QSharedPointer for the dialog helpers.Friedemann Kleint2013-09-091-27/+35
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dialog thread can outlive the platform dialog helper if the helper is destroyed. In that case, IFileDialog::Show() returns since the parent window is destroyed and then tried to emit signals on the destroyed helper class instance. Pass a shared pointer to the native dialog instead of a pointer to the helper class to the dialog. Task-number: QTBUG-32494 Task-number: QTBUG-30513 Change-Id: I7c2e769460270a26d886fdefee93ea59c2a17196 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Remove qFill from the Windows platform pluginGiuseppe D'Angelo2013-09-051-1/+3
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I777fc28857cc104fcd2b6c313a2840b697361be9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Give QWindowsNativeFileDialogEventHandler a virtual destructorThiago Macieira2013-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | GCC complains about this class having virtuals and no virtual destructor. C:/Qt/qt5/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp:750:20: warning: deleting object of polymorphic class type 'QWindowsNativeFileDialogEventHandler' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] Change-Id: I7494fce4bb71ed65954226259fa65fdc507ca403 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformThemeAndy Shaw2013-08-231-18/+0
| | | | | | | | | | | | | | | | | | | | | | Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is really only for the native dialogs then the SnapToDefaultButton hint is moved as it has relevance for all dialogs Task-number: QTBUG-32631 Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Do not use QWindowsFileDialogHelper for Windows Server 2003Jonathan Liu2013-08-111-1/+1
| | | | | | | | | | | | | | | | | | Windows Server 2003 is based on Windows XP and should use QWindowsXpFileDialogHelper as it does not support the CLSID-based IFileDialog interfaces that are available from Windows Vista onwards. Change-Id: Idd973f9ec4c98d1f2fb7e835de64532edeccfc72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Have QFileDialog use QUrl internallyKevin Ottens2013-07-181-108/+103
|/ | | | | | | | | | | | When using the native dialog and through the helper, we use QUrl in QFileDialog. It is preparatory work for having QUrl based methods on QFileDialog interface itself. Done-with: sean.harmer@kdab.com Done-with: faure@kde.org Change-Id: I61e99d498252241f38ec05724702a90ba050c4bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Show native file dialog on Windows XP Professional x64 Edition.Friedemann Kleint2013-07-041-2/+2
| | | | | | | | | | It claims to be WV_5_2 (WV_2003). Task-number: QTBUG-32217 Change-Id: I0c277410acc9ac29710a3eee63bec9ced42e2767 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Fix the code of the native color dialog.Friedemann Kleint2013-07-021-2/+4
| | | | | | | | | Note: The code is currently #ifdefed out, it is just there to be able to compare QColorDialog to the native dialog. Task-number: QTBUG-32054 Change-Id: I042f6701d1a076480cae56c53ae2d3ad303d37d1 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Windows XP: Fix directory chooser dialog.Friedemann Kleint2013-06-261-3/+4
| | | | | | | | | Set initial directory and title correctly in native file dialog. Task-number: QTBUG-31098 Change-Id: I87c4383bdf0b26beda6a075a186d0a951c86f8a7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows save file dialog: Set default suffix only once.Friedemann Kleint2013-06-101-18/+18
| | | | | | | | | | | | | | | | | IFileDialog::SetDefaultExtension() needs to be called for the dialog to automatically update the suffix when the user chooses a new file type. Calling it IFileDialogEvents::OnTypeChanged as introduced by 42760e43eaa64e834809ef5fb01a83cfb75f4f04 causes it to use the previous suffix when switching. Call in setNameFilters() using the first available suffix instead. Task-number: QTBUG-31381 Task-number: QTBUG-30748 Change-Id: Idd532e4190c752aa80abce963dd0389be7d22a34 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows native save file dialog: Do not append suffix afterwards.Friedemann Kleint2013-04-251-15/+39
| | | | | | | | | | | | | | | Instead, set the currently selected filter's suffix as default suffix of the dialog unless another default suffix has been set. This emulates the behavior of Qt 4 behavior which would set the selected name filter's suffix as default suffix in QFileDialog::getSaveFileName(). Task-number: QTBUG-30748 Change-Id: I111cd6190ddab8775a0fa72b94b3c728dd411c5e Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Windows: Do not use native dialogs for non-modal dialogs.Friedemann Kleint2013-04-051-4/+2
| | | | | | | | | | | | Windows file dialogs are always modal (inheriting IModalWindow). As the QtQuick dialog plugin has a widget-based fallback now, there is no need to use native dialogs for the non-modal case. Task-number: QTBUG-30513 Change-Id: I8b62af86fde34e8c0cf5e917d2e62260e16c82fb Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'gerrit/release' into stableSamuel Rødal2013-03-211-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/qt_module_headers.prf mkspecs/features/qt_tool.prf src/angle/angle.pro src/tools/bootstrap/bootstrap.pro tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
| * Windows native file dialogs: Split suffix list correctly.Friedemann Kleint2013-03-201-1/+3
| | | | | | | | | | | | | | Task-number: QTBUG-30185 Change-Id: I9a3d16eafb5417d6720a702af662fb219487549d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Fix build on MinGW, Win<7Konstantin Ritt2013-03-141-2/+2
| | | | | | | | | | | | | | | | /* broken by 26149d057a464ddafcc9694cfa94525c01a45231 */ Change-Id: I63f4d70e2a6fc1f8f1b302d188cf34d1abb0699c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Fix build with Windows SDKs pre 7.0.Friedemann Kleint2013-03-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | Check whether the IShellLibrary interface exists. Task-number: QTBUG-29447 Change-Id: I93fc54a1e6d5c090f7c1768c756571ba57a7b2d2 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-061-1/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreen.cpp src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
| * | Avoid setting initialNameFilter when mode is DirectoryIrfan Omair2013-03-051-4/+8
| |/ | | | | | | | | | | | | | | Task-number: QTBUG-30001 Change-Id: I5e854ce99137bd9d718cb2052f2c8dc1fb92b78f Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Windows native dialogs: Handle libraries.Friedemann Kleint2013-02-251-5/+114
| | | | | | | | | | | | | | Task-number: QTBUG-29447 Change-Id: I4e68e546a4eb6b5f9c3dbe6d98905109e72e600a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Windows: Fix modal dialogs for declarative.Friedemann Kleint2013-01-281-4/+34
| | | | | | | | | | | | | | | | | | Make it possible to show a modal dialog by just calling show(). Start an idle timer, which will start the dialog thread. This timer is stopped in exec(). Change-Id: I8f7352bf577b09a19be7df4484e0077bb1aa46ab Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-241-2/+18
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
| * Respect the filename specified when showing the native filedialogAndy Shaw2013-01-241-2/+18
| | | | | | | | | | | | | | | | | | When a filename was specified as part of the start up directory then it should ensure this is put in the filename lineedit in the native filedialog. Change-Id: I2b190933d46553908b5bcf17506cb2a95fb1f982 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>