summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
* QFileDialog::setDirectory() and directory() should be symmetricShawn Rutledge2014-01-061-1/+5
| | | | | | | | | | | | QFileDialog::setDirectory() calls options->setInitialDirectory(). Then QFileDialogPrivate::helperPrepareShow() calls it again with the result of QFileDialog::directory(). Assuming there are cases where that's actually necessary, we need QFileDialog::directory() to return the same one which was previously set in setDirectory(). Task-number: QTBUG-35779 Change-Id: Iac1f88c770ff1ef06a7f884f9a42d72674c967ba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Android native message dialogBogDan Vatra2013-11-096-7/+93
| | | | | Change-Id: Ief8c3ce3b8683c6960f046245844c1835a327d51 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix QFileDialog::getSaveFilename() with a given default nameShawn Rutledge2013-11-081-9/+10
| | | | | | | | | | The QFileDialogOptions::initiallySelectedFiles were overridden, and the given filename was also not properly converted to a local file URL. Task-number: QTBUG-34408 Task-number: QTBUG-34446 Change-Id: I51d05b954a5393d10db9232945ba05bda7068e73 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix potential BC break in QColorDialog.Friedemann Kleint2013-11-083-47/+61
| | | | | | | | | | | Replace newly reimplemented virtuals in d928dbbc919f5f39af9ce5c69eb8e9ffa9da71d3 . Task-number: QTBUG-34663 Task-number: QTBUG-14332 Change-Id: Idb2cc2ec237c96f7157470728bb79ff3efc504d0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QFileDialog: document the consequences of being "widgetless"Shawn Rutledge2013-10-311-1/+9
| | | | | | | | | After 37ca2224eca671200a2710f57f970d2993e62aa5 it's an exposed behavior change that the widgets and related paraphernalia don't exist. Task-number: QTBUG-34100 Change-Id: Ie0ebcb8c5c5668b6c12c5447f25bfbfd893dec6c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QWizard: provoke 'enum value not handled in switch' warnings in ↵Marc Mutz2013-10-281-1/+13
| | | | | | | | | | | object_name_for_button This is strictly speaking a behavior change, since we're no longer returning something for Stretch and NoButton, but - guessing here - that shouldn't matter. Yet, better safe than sorry, thus submitted as a separate patch. Change-Id: I20cb084147f8c9257ce37d1e87ea38febabec28d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QWizard: give all buttons an objectNameMarc Mutz2013-10-281-13/+16
| | | | | | | | | | | | Only Commit, Finish and Cancel didn't have an object name, yet. Also Extract Method on the switch statement, add a test, and use QStringBuilder. Task-number: QTBUG-29924 Reported-by: Leo Arias Change-Id: I8c29606bc53e9d4caab631da2089e971a9da2d75 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QFileDialog can delete files too, not just directoriesShawn Rutledge2013-10-231-0/+2
| | | | | | | | | After Ic12de12ec51c20de52d040514e90be5e783add43 this functionality was broken. Added an autotest. Task-number: QTBUG-34159 Change-Id: I8f41b7073dc57fea855ab87796f09e8a91520d13 Reviewed-by: David Faure <david.faure@kdab.com>
* QFileDialog: don't create widgets if the platform dialog will be usedShawn Rutledge2013-10-152-79/+193
| | | | | | | | | | | 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>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-087-31/+31
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix race condition in ~QFileInfoGathererFrederik Gladhorn2013-10-021-0/+2
| | | | | | | | | | | | | | | | tst_qfilesystemmodel was hanging regularly. In QFileInfoGatherer::~QFileInfoGatherer() it would be stuck on wait() and in QFileInfoGatherer::run() it would be at condition.wait(&mutex); It looks like while abort was set to true, the while in run() had just entered so that it would wait for condition indefinitely. Task-number: QTBUG-29403 Change-Id: If6cebbc98ec7f54fbdf347804780bbfc5e177b3b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QMessageBox - make detail text work on set after showThorbjørn Martsum2013-09-301-1/+3
| | | | | | | | | | Our manual test reveals that a setting a detailed text after it is shown does not work. This patch fixes that minor issue. Change-Id: I4930880def2d8361d247e943e1a848dd49ca3882 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Mac: QWizard default background pixmap works againLiang Qi2013-09-261-29/+20
| | | | | | | | Task-number: QTBUG-26722 Change-Id: I579111b5d34f8e3cdc6bb016d9c0e42ec3ffb8c9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Stephen Chu <stephen@ju-ju.com>
* Remove some qBinaryFind usages from QtWidgetsGiuseppe D'Angelo2013-09-231-5/+3
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I7e4a5a4010b0ded59dbe2cacc6afe23ae4121bfe Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* QFileSystemModel: Fix build when QT_NO_FILESYSTEMWATCHER is definedAndrew Knight2013-09-231-2/+45
| | | | | | | | This class already has some guards for QT_NO_FILESYSTEMWATCHER; implement the rest. Change-Id: I97072c9cd1debb726f9d10ff49ff0c01bbb9bc6e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix some doc errors.Frederik Gladhorn2013-09-211-1/+1
| | | | | | | Change-Id: Ib874d7e9671d9cee75fe41f4dac5d0de7b09245e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QMessageBox - make it possible to have a checkbox on the dialogThorbjørn Martsum2013-09-202-3/+62
| | | | | | | | | This (partly) solves Task-number: QTBUG-2450 Change-Id: Ie2280c87b96e72acc76e806a83c4e8cc0d4e4ee4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Simplify QFileSystemModel::remove by using QDir::removeRecursivelyDavid Faure2013-09-161-24/+2
| | | | | | | | This also fixes it in case of hidden or system files, which were missing from the filter (found by Denis Kovalskiy). Change-Id: Ic12de12ec51c20de52d040514e90be5e783add43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-141-1/+10
|\
| * Merge branch 'stable' into devSergio Ahumada2013-09-131-1/+10
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| | * QMessageBox: implemented shortcut for selectAllShawn Rutledge2013-09-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context menu all along has indicated that Ctrl-A selects all the text, so now that is actually implemented. Task-number: QTBUG-6731 Change-Id: I82dac3aea530e5a3fcd59217c4c0118025061c7d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QMessageBox: shortcuts for selectAll, copy don't conflict with buttonsShawn Rutledge2013-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can hit a key with no modifier to select a dialog button that has the corresponding mnemonic, but it doesn't make sense to do that if the Control or Meta key is being held. Now you can hit Ctrl-A, Ctrl-C to select all the message detail text and copy it to the clipboard, even if the dialog has buttons with mnemonics like &Continue and Save &Again. But as before, Alt-C, plain C, Alt-A and plain A select the mnemonic buttons on the dialog. Change-Id: I40c052dbb7730bde444ac2de405724a3203d1472 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QMessageBox - move margins to a left spacerThorbjørn Martsum2013-09-131-27/+24
|/ / | | | | | | | | | | | | | | | | This patch moves labels indent and contents margins into a left spacer, and it only puts the iconLabel in the layout if there is an icon. Change-Id: I6f3563a08fc15ec6ec267e095adf1734f7828355 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Adding QPlatformMessageDialogHelper and QMessageDialogOptionsShawn Rutledge2013-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We plan to add support for native message/alert dialogs on Android and iOS because it's otherwise impossible to have a true popup window. Then we might as well have native message/alert dialogs on other platforms too. It will become an alternative implementation behind QMessageBox and perhaps QErrorMessage. Task-number: QTBUG-30883 Task-number: QTBUG-29462 Change-Id: I73dcfc6438e696189b6d37091874c7ad69b4ec68 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Remove qSort from QtWidgetsGiuseppe D'Angelo2013-09-051-2/+2
| | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Iec5c10fc4c3b4e684b51f6223bf3cb56acc42b58 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | QColorDialog: wrap setCursor calls in #ifndef QT_NO_CURSORAndrew Knight2013-09-031-0/+4
| | | | | | | | | | | | | | QColorDialog mistakenly assumes setCursor will work everywhere. Change-Id: Ia5e513f6825c931ce42276ea2eb581e049c5b41a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Revert Mac event loop changes.Morten Johan Sørvig2013-09-022-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Make QGuiApplication::exec() run within NSApplicationMain()" "Make Qt process native and timer events on Cocoa applications" "Cocoa: Fix QFontDialog, QColorDialog auto-tests" This reverts commits 1e14762b8d79118540bd09a84dd3e48f4f5e113e e4b2a0b4bab2a17a65fedafe9bae50af1fe019f6 df7944e7d7dd8b2bbccbd639eff0ab09745d6cc3 Change-Id: I80b65b5ee0297b090f807bd420664233dfc44f7b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Cocoa: Fix QFontDialog, QColorDialog auto-testsGabriel de Dietrich2013-08-292-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The new Cocoa event dispatcher made apparent some deficiencies in the way the dialog helpers were being hidden. In particular, we would not stop a dialog helper's modal loop when closing the dialog, resulting in the auto-tests hanging. Also, since the QApplication event loop is runnig with [NSApp run] in the stack, the previous workarounds are no longer needed. Task-number: QTBUG-24321 Change-Id: Ifba713c286638d78a699c319a15683d09714f06f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | QFileDialog: add MIME Type filtersDavid Faure2013-08-292-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently just a convenience method for setNameFilters(), it uses QMimeType to create a name filter from the glob patterns and description defined in each MIME type. In the longer term, this API could be used to do proper mimetype-based filtering using QMimeDatabase::mimeTypeForFile() in the builtin QFileDialog (aka "not native"), instead of only looking at globs via the name filters. Change-Id: I0edccf5f30c514481b47cd100d743d1ed7a24024 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | QMessageBox - move informative+details text to new layout functionThorbjørn Martsum2013-08-271-39/+47
| | | | | | | | | | | | | | | | Controlling the layout from different functions is not easy, so lets move it to the setupLayout function. Change-Id: I3120a2e98b2f8425befa135595d4ad7ce1b8ca56 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformThemeAndy Shaw2013-08-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* | QMessageBox - merge some mac and non-mac codeThorbjørn Martsum2013-08-221-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | I have not located any significant behavior changes in this, and it is annoying having too much similar code in different branches. The main change is a removal of Qt::AlignLeft, but the icon Label should be in its own column. Change-Id: Iaf07fc503075e61e2af1a93d5fc9e6e34a24451d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | QMessageBox - move layout handlingThorbjørn Martsum2013-08-221-12/+18
| | | | | | | | | | | | | | | | This patch moves some layout handling to a new function. That will be helpful later since we can re-use the new function. Change-Id: I4cc846f9958d9530ec2b07292093b94bd27ee055 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Add QUrl based API to QFileDialogKevin Ottens2013-07-182-6/+139
| | | | | | | | | | Change-Id: Iaf4f8e57e8df956dec9105eb00c193645f2db098 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Have QFileDialog use QUrl internallyKevin Ottens2013-07-183-33/+95
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'stable' into devSergio Ahumada2013-07-113-1/+12
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Set correct cell when selecting custom color cell with arrow keysJ-P Nurmi2013-07-033-1/+12
| | | | | | | | | | | | | | | | | | | | Correct cell is now set when selecting a custom color cell with arrow keys so that the custom coor is actually added to the selected cell (as with mouse events). Task-number: QTBUG-32054 Change-Id: Ic271a0be76070b4f5364954b2dfe464964c1380b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QColorDialog: don't create widgets if the platform dialog will be usedShawn Rutledge2013-07-053-26/+47
| | | | | | | | | | | | | | | | | | | | | | It will save memory and also prevent bugs where it's assumed that if the widgets exist, they should be painted, maintained and/or used as a current value store. Task-number: QTBUG-31998 Change-Id: I04e3b016018221a405dd7da1fd455e0ede2233fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-06-282-3/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-272-3/+5
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/create_cmake.prf Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
| | * Cocoa color dialog cannot be modal, but should show anywayShawn Rutledge2013-06-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silently failing doesn't seem the right way to handle this. Updated docs for DontUseNativeDialog option: it's not just for the Mac anymore. Ensure that the Qt dialog and Mac panel will never be shown at the same time. Change-Id: Ia9e80754df6c7622d9039c8dd050ac4de771a030 Task-number: QTBUG-29161 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| | * Fix crash for pressing Ctrl+C in a message boxKai Koehne2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced with e34dccc9e Task-number: QTBUG-31635 Change-Id: I7c991f3b98f5c51e5fb3c12db04d3ace7be87010 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Add getMultiLineText static method to QInputDialogDavid Gil2013-06-272-11/+110
|/ / | | | | | | | | | | Change-Id: I6d43772f6ee66c6c43d64fb3d18f2a5f0c894a00 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-121-6/+5
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenubar.mm Change-Id: I4a699fc8a7f30b2af9de8e496c3d5f027b7495bb
| * Doc: Fixed typo in QDialog.Jerome Pasion2013-06-071-6/+5
| | | | | | | | | | | | Task-number: QTBUG-31493 Change-Id: I7bb7b249a0336dd949f8c74bcc22c0b7c39d0885 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* | Add web color QLineEdit to QColorDialog.David Gil2013-05-271-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | This web color QLineEdit shows the hex number of the selected color. Besides, it can be edited and accepts 3 and 6 digit hex numbers. Change-Id: Idf629fbdc203fc099d446b31cbb49f2ff56be810 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-232-11/+12
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * QtWidgets: avoid integer divide by zero in QProgressDialogLiang Qi2013-05-151-0/+1
| | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-31046 Change-Id: Ie549b59112f458de478294fa00443a3cf6898c85 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * Fix typos and style in QInputDialog's docsDavid Gil2013-05-081-11/+11
| | | | | | | | | | | | Change-Id: I1285938efd252346c4016c8f059c7e4f78ca12a9 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Silently strip leading dot off QFileDialog default suffixes.Friedemann Kleint2013-05-211-0/+2
| | | | | | | | | | | | Change-Id: Ie41fafe8c2ce7e8ac8dd595ca3809c1da3b386f4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>