summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Mac: Fix file dialog filters when filter doesn't start with '*'Eike Ziller2014-02-131-1/+2
| | | | | | | Task-number: QTBUG-17326 Change-Id: Ie32f2807e64aa9c90b2e7d75adcd2aef67649225 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix the Carbon buildAndy Shaw2014-02-111-0/+6
| | | | | | | | | The function does not exist when building for Carbon with the 10.5 SDK so since this means the function will effectively do nothing, so we just return false in this case. Change-Id: If41762a055ebeccfcfce751e164b6a6e7e1db437 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa File Dialog: Remove sandbox-ufriendly QDir::entryList() callGabriel de Dietrich2013-11-081-18/+48
| | | | | | | | | | | QDir::entryList() uses QDirIterator, which itself uses QFileSystemEngine, and whose backend uses POSIX API in a relatively liberal way. This is a backport of Qt 5's Ia872b9b1244f7b390d173a498011379b9309b3c6. Task-number: QTBUG-34012 Change-Id: I0a17359510e7623b4ee53dd86bb5bdc39785600e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix for OS X QFileDialog showing bundle as directorySamuel Gaist2013-06-071-1/+1
| | | | | | | | | | | | | | Also check if the selectedFile is a bundle to correctly set currentDir. This fix does not apply to Qt 5 because QFileDialog has been reimplemented differently and this file does not exist anymore. Task-number: QTBUG-31562 Change-Id: I145108647dd613cb529bb65bc6c7191154dab5b8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Ensure the native filedialog starts up with the right directoryAndy Shaw2013-02-181-0/+2
| | | | | | | | | | | | On Mac it was not starting the dialog with the specified directory when one was present. If a filename was given as well then it would start up fine. Task-number: QTBUG-28161 Change-Id: I7cce0d065dd57e6433ce62380d4263d6e20b6e7c Reviewed-by: Liang Qi <liang.qi@digia.com> (cherry picked from commit d75d86190bca85841db2040d50184f4c6886ef89) Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Make sure the correct name filter is selected in the Mac file dialogAndy Shaw2013-01-301-5/+9
| | | | | | | | | | | | | | Since we have to add the filters one by one to the Mac file dialog it was finding the one that would match the filter by comparing the start of the filter string. However it would continue to check the start of other filters even if it had already found the one it should be using. Now it uses either an exact match or the first one that it matches the start of. Change-Id: Ie6441acd48e45ec9c712afc12a2ea47755835bb3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> (cherry picked from commit d6506c129d698c677f2d7418759b147007ca15a2)
* Call endSheet when the QFileDialog was shown as a sheet on MacAndy Shaw2013-01-291-0/+2
| | | | | | | | | | If the sheet is not ended then subseqent calls to show a sheet will not work correctly. Change-Id: Ib8a43a1c96a3dadff196c433e822f7579ad87b8b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> (cherry picked from commit 7024bc70917b6837e2d1e37b1d52350a28d978c5) Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix crash when opening a file dialog in sandbox on MacPasi Matilainen2012-03-041-6/+13
| | | | | | | | | | | | | The sandboxed version of the native file dialog does not implement NSWindow methods, and does not respond to validateVisibleColumns. Calling these methods on a sandboxed file dialog results in a crash, so check support for the methods using respondsToSelector before calling. Task-number: QTBUG-21609 Change-Id: I7de7d8b24dab886a261ae02c395a4a22f0f489c0 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix modal file dialog opening on MacPasi Matilainen2012-02-281-1/+1
| | | | | | | | | | | When a modal file dialog is opened on Mac, the native file dialog is actually opened twice, first as modeless and later as modal. Normally this works (by chance), but when the application runs in a sandbox, this results in a crash. Task-number: QTBUG-21609 Change-Id: I906868e1b4bd74dc3030891bede51f32ebd16b4a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cocoa: QFileDialog: fix filename filter not applied correctlyRichard Moe Gustavsen2011-06-301-2/+3
| | | | | | | | | From before, the filename filters set on the dialog were matched against the full patch of the filenames shown in the dialog. The correct way is to only match it against the filename. This becomes evident if you set a filter that has no wild cards, e.g "qmake" Rev-By: jbache
* move some internal helper functions from qglobal.cpp to qcore_mac*Ritt Konstantin2011-06-091-3/+0
| | | | | | | | | | | | | namely: void qt_mac_to_pascal_string(const QString &s, Str255 str, TextEncoding encoding = 0, int len = -1); QString qt_mac_from_pascal_string(const Str255 pstr); OSErr qt_mac_create_fsref(const QString &file, FSRef *fsref); OSErr qt_mac_create_fsspec(const QString &file, FSSpec *spec); remove relevant "extern" declarations all over the Qt sources Merge-request: 2615 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-201-0/+8
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: demos/declarative/minehunt/minehunt.pro src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/plugins/phonon/mmf/mmf.pro src/s60installs/s60installs.pro tests/auto/qapplication/test/test.pro tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| * Cocoa: cannot use staysOnTop flag for native file dialogsRichard Moe Gustavsen2010-12-131-0/+8
| | | | | | | | | | | | | | | | | | | | We cannot mix staysOnTop and native file dialogs, since Cocoa will anyway set it back to NSModalPanelWindowLevel when running it app modal. There are ways to work around this issue, but the file dialog also has a button for showing a "create directory" modal panel, and this we cannot control. Reviewed-by: cduclos
* | Explicitly inherit from NSOpenSavePanelDelegate on Mac OS 10.6 and aboveTor Arne Vestbø2010-10-181-1/+7
| | | | | | | | | | | | Prior to Mac OS 10.6 this was an informal protocol. Reviewed-by: Morten Sørvig
* | Revert "Explicitly inherit QNSOpenSavePanelDelegate from ↵Tor Arne Vestbø2010-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | NSOpenSavePanelDelegate" This reverts commit 24e0f64b8a35ddbfeae2f0611d3f1779fb56cdb0. NSOpenSavePanelDelegate is not available on Mac OS X 10.5. Reverting this until a solution can be found so that the staging area is not blocked.
* | Fix the build on Mac OS X after 24e0f64b8a3Tor Arne Vestbø2010-10-151-0/+1
| |
* | Explicitly inherit QNSOpenSavePanelDelegate from NSOpenSavePanelDelegateTor Arne Vestbø2010-10-151-1/+1
|/ | | | Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* QFileDialog::HideNameFilterDetails breaks Cocoa QFileDIalog filterRichard Moe Gustavsen2010-08-201-8/+17
| | | | | | | | | | | | Using namefilters in the non-native file dialog is a bit broken by design, since it don't store the whole selected name filter, but only the filter with details stripped off (if this is specified). And it stores this data in gui widgets. And the native file dialog also suffers from this. At least this patch will pick the first matching name filter (with details) given a details-stripped version. Task-number: QTBUG-12870 Reviewed-by: cduclos
* QFileDialog crashes when empty selectedFilter is set on Carbon.Prasanth Ullattil2010-07-301-3/+5
| | | | | | | | We were making the wrong assumption that the selectedFilter string will be valid always, when calling functions like getSaveFileName(). Task-number: QTBUG-12461 Reviewed-by: Denis
* Newly created folders in QFileDialog are disabled on Cocoa.Prasanth Ullattil2010-06-231-9/+9
| | | | | | | | | For a newly created folder in the current path, we were returning NO for the "shouldShowFilename" callback. This patch moves the check for directories to the begining. Task-number: QTBUG-11532 Reviewed-by: Carlos Duclos
* Ensure that the Mac specific Qt classes are namespacedAndy Shaw2010-05-041-16/+16
| | | | | | | | When configuring Qt to be in a namespace then the Mac specific Qt classes should be namespaced as well to prevent any duplicated class names when a non namespaced version of Qt is used in conjunction. Reviewed-by: Richard
* Cocoa: Native QFileDialog has problems selecting name filterRichard Moe Gustavsen2010-04-271-1/+1
| | | | | | | | | | | The problem occured if you told the dialog to not show name filter details, then tried to select a filter specifying those details. The patch makes sure that we accept a filter as found in the drop down list if it matches the specified filter with or without details Task-number: QTBUG-8439 Reviewed-by: msorvig
* Carbon: Native filedialog does not apply filters on app-bundlesRichard Moe Gustavsen2010-03-091-4/+13
| | | | | | | | | | | The native file dialog (and finder) handles bundles (like .app) like normal files rather than directories, unless specified otherwise. But since they are directories at the same time, we skip sending them through the name filters. This patch makes sure that we are more consistent on this matter for the carbon port. Task-number: QTBUG-834 Reviewed-by: msorvig
* Cocoa: Native filedialog does not apply filters on app-bundlesRichard Moe Gustavsen2010-03-091-3/+7
| | | | | | | | | | | The native file dialog (and finder) handles bundles (like .app) like normal files rather than directories, unless specified otherwise. But since they are directories at the same time, we skip sending them through the name filters. This patch makes sure that we are more consistent on this matter for the cocoa port. Task-number: QTBUG-834 Reviewed-by: msorvig
* File dialog mode is not correctly updated in Mac (Cocoa).Prasanth Ullattil2010-01-141-0/+7
| | | | | | | | | | | | | | | | QFileDialog shows a customized version of the native file dialog on Mac. When user changes the fileMode, the corresponding options needs to be updated in the native dialog as well. Some options like mode, filters, button text, dialog title etc needs to be updated for this. This patch also address the changing of 'acceptMode'. When user changes this, for e.g. the native dialog needs to switch from an open panel to save panel. It is easier to recreate the internal QNSOpenSavePanelDelegate than changing options individually. Task-number: QTBUG-7086 Reviewed-by: Richard Moe Gustavsen
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Morten Johan Sørvig2009-11-051-1/+1
|\ | | | | | | | | | | Conflicts: tests/auto/qsqlquery/tst_qsqlquery.cpp tests/auto/qtextlayout/tst_qtextlayout.cpp
| * Fix a freeze in QFileDialog (Mac)Cédric Luthi2009-11-021-1/+1
| | | | | | | | | | | | | | Running an open file dialog, for example with QFileDialog::getOpenFileName() can lead to a freeze if the user selects a folder, then selects a file in the parent folder and finally confirms the open dialog. Merge-request: 1327 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Cocoa: fix double emit bug from file dialogRichard Moe Gustavsen2009-11-031-3/+7
| | | | | | | | | | | | | | | | | | For some reason, Cocoa tells us twize whenever a selection change occurs in the native file dialog. This patch inserts a check that the selection actually changed before emitting any signals Rev-By: Prasanth
* | Mac: remove obvious commentRichard Moe Gustavsen2009-10-231-1/+0
| | | | | | | | Amending the previous merge request
* | Fix weird behavior when opening a QFileDialog for non-current directory.Andreas Kling2009-10-231-0/+5
| | | | | | | | | | | | | | | | | | shouldShowFileName() can be called with an empty filename, but must not create and use a QFileInfo("") since that has known undefined behavior. So just return NO right away for empty filenames. Merge-request: 1765 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* | Cocoa: qfiledialog will not exit cleanlyRichard Moe Gustavsen2009-10-141-0/+3
| | | | | | | | | | | | | | | | | | The native filedialog will not exit if it is told to hide. To remedy this, we just add an extra interrupt call so to inform the event dispatcher that it needs to return the the event loop to check if it has been told to quit Rev-By: olivier
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | QFileDialog::getOpenFileNames() is not shown at the correct positionRichard Moe Gustavsen2009-05-041-16/+3
|/ | | | | | | | | The correct behaviour for native file dialogs on mac is to use the previous size and location settings when reopening the dialog. So we implement this behaviour with this change Task-number: 250182 Reviewed-by: Trenton Schulz
* BT: QFileDialog: A folder with a name containing diacritic is disabled on ↵Richard Moe Gustavsen2009-04-071-1/+1
| | | | | | | | | | | | Mac OS X - cocoa The filename as NSString that we get from Cocoa does not have the correct file system encoding. This means that certain characters are implemented differently than what e.g. QFile::encoded returns. This fix normalizes the string from cocoa before using it. Task-number: 249928 Reviewed-by: Trenton Schulz