summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
* Do not rely on the list of standard font sizes for QFontDialog.Leonard Lee2014-03-281-8/+10
| | | | | | | | | | | | | QFontDialog should always show the correct size, even if the size is not available in the list of standard font sizes. Native font dialogs across common platforms show the correct size at all times. Inside init() function, the size list requires proper initialization since the initial value of size is zero. Task-number: QTBUG-10317 Change-Id: Idc9e922ac95f797ac98bbf6c885e52828c4c48fd Reviewed-by: Liang Qi <liang.qi@digia.com>
* Update year in About Qt dialogKai Koehne2014-03-201-1/+1
| | | | | | Change-Id: Ibbca2026c21394b68309cafe71e6d46065785f9b Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* QFileDialog: documentation clarifications about file type filteringShawn Rutledge2014-03-171-2/+14
| | | | | | | | | | *.* is not a portable file type filter. Anyway it's better to filter by mime types, because it's more inclusive now and may even get better in the future. Task-number: QTBUG-37393 Change-Id: Ide3c3dfc47cd4b4c55d842b73de5369a0596a546 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove the _qt_filedialog_xxx hooksJ-P Nurmi2014-03-151-45/+4
| | | | | | | | | | These internal and obsolete hooks are no longer used. The correct way to provide platform dialogs in Qt 5.x is to implement a platform theme plugin, as was done for GTK+ 2.x. Change-Id: I3f1474fbf760130106b3c47173eaedd2f1a919bf Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Don't block Key_Back in file dialogPaul Olav Tvete2014-03-142-7/+2
| | | | | | | | | | Update the 10 year old FIXME hack to allow Key_Back (which will close the dialog on Android). Also clean up nearby code that has been dead for seven years. Task-number: QTBUG-35784 Change-Id: I609858afb2caefe7025e421406288ae56717fea5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Doc: fix documentation of QProgressDialog::openJoerg Bornemann2014-03-041-1/+1
| | | | | | | | | | The slot is connected to the canceled() signal and not to the accepted() signal since the introduction of the open method. Task-number: QTBUG-37210 Change-Id: I0604c612f6054611a69876d53908bb58ec048b09 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Doc: Replace obsolete types with their newer counterpartsSze Howe Koh2014-02-251-1/+1
| | | | | | | | | This patch ignores: - Docs for obsolete types themselves - Comparisons between new and obsolete types Change-Id: Id9b1e628255113e7c44520abe0f8a4e0db4a283d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Normalize signal & slot signatures in connectionThiago Macieira2014-02-221-2/+2
| | | | | | | | | | | Profiling showed that Qt Creator spent 2% of its load time normalizing signals and slots. By pre-normalizing everything, we ensure that there is no runtime cost. Profiling after this commit and the others in this series shows that the cost dropped down to zero. Change-Id: Ifc5a2c2552e245fb9a5f31514e9dd683c5c55327 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Strip any trailing spaces from the filename before trying to open itAndy Shaw2014-02-211-2/+11
| | | | | | | | | | | | | | | On Windows, trailing spaces in a filename are silently ignored, so we need to strip it before trying to open a file with it. Otherwise it ends up being stripped later and in a case like " ." it will end up causing Qt to think that a folder exists when it does not. [ChangeLog][Platform Specific Changes][Windows][QtWidgets][QFileDialog] Handled the case of having trailing spaces in a filename correctly so if the filename ends up being empty that the parent path is used instead. Change-Id: I6500cc3a44746bf4a65e73bcfb63265a0a97c8a3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QFileDialog: restore state from QSettings after creating widgetsShawn Rutledge2014-02-201-3/+7
| | | | | | | | | | | | After 37ca2224eca671200a2710f57f970d2993e62aa5 it's necessary to read the saved QSettings again after creating widgets, in order to deal with the settings which only affect widgets (such as saved bookmarks). It's also necessary to read them if widgets are not used though, because some of the settings affect native dialog options. Task-number: QTBUG-36888 Change-Id: I8cf53db864b173c50a876a1d5ce29c1e073fcaa6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Consolidate StandardButton, ButtonRole and related static functionsShawn Rutledge2014-02-152-9/+10
| | | | | | | | | | Moving them into QPlatformDialogHelper for the convenience of both widgets and QtQuick.Dialogs. The main reason is to ensure that QtQuick.Dialogs does not need to depend on the widgets module, in order to re-implement the button box concept in a generic dialog. Change-Id: If400d215338d7cb6dade39d9de60e50b5e7515ef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Konstantin Ritt2014-02-131-1/+3
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| | * QPA fix: allow setting the initially selected name filter (KDE)Dominik Haumann2014-02-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In KDE, without this patch, the Q_ASSERT in the following code fragment fails: QFileDialog dialog; QStringList list = QStringList() << "c (*.cpp)" << "h (*.h)"; dialog.setNameFilters(list); QString filter("h (*.h)"); dialog.selectNameFilter(filter); dialog.show(); Q_ASSERT(dialog.selectedNameFilter() == filter); The reason for the fail is that the selectNameFilter() does not properly propagate the filter to the QPA plugin. So the first part of this patch adds d->options->setInitiallySelectedNameFilter(filter); in the function QFileDialog::selectNameFilter(). The second part of this patch makes sure that the initially set name filter in the QFileDialogOptions "options" is not overwritten in the helperPrepareShow() function. This is achieved by adding an if(), following the if() for the initiallySelectedfiles() the line below. With this patch, the Q_ASSERT() holds true in KDE Framework 5's file dialog integration. Change-Id: I15d8c88a0fa3cdc03e3330f3458bbad139a71212 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | Respect the DontUseNativeDialog option for QColorDialogAndy Shaw2014-02-122-0/+17
|/ / | | | | | | | | | | | | | | | | | | | | By reimplementing canBeNativeDialog() we ensure it is only shown natively if the circumstances are correct. The change was modelled on how QFileDialog implements the same checks. Change-Id: If58e33d6d0547e95975d7c0453901fa592eb96a0 [ChangeLog][QtWidgets][QColorDialog] Ensured QColorDialog::DontUseNativeDialog is respected when showing the dialog. Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QWizard: Fix QWizardPrivate::QWizardPrivate()Friedemann Kleint2014-01-311-2/+5
| | | | | | | | | | | | | | | | | | Initialize wizStyle and other variables, silencing a purify warning about uninitialized memory read; use std::fill to initialize the button array. Change-Id: I29ad90a29d406be62179fd33688f05bb5f6b7368 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | QColorDialog: Emit done after setting the selected color.Friedemann Kleint2014-01-311-1/+1
| | | | | | | | | | | | Task-number: QTBUG-35859 Change-Id: I8b23d0283e9678c6698c174d0362cf8d85b2f813 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | QColorDialog: Streamline painting code of QColorLuminancePicker.Friedemann Kleint2014-01-291-7/+5
| | | | | | | | | | | | Task-number: QTBUG-36078 Change-Id: Iea7dcb1fdae955615345aa835dc0b1a67840f39d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | QWizard: Fix frame when using Vista style/MSVC2012Friedemann Kleint2014-01-172-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Work around GetSystemMetrics() returning the wrong value using MSVC2012 and later. The special handling of Windows 8 and later is then no longer required. [ChangeLog][QtWidgets][QWizard] Fixed frame when using Vista style/MSVC2012. Task-number: QTBUG-36192 Change-Id: I39c2ab70a266f12cd65fa740b10b86edffa60417 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-133-9/+9
| | | | | | | | | | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QWizard/Windows: Add keyboard shortcut for 'Next'/'Back'.Friedemann Kleint2014-01-102-0/+7
| | | | | | | | | | | | | | Task-number: QTBUG-35203 Change-Id: If7312e8675b21be9dc6836b92805dc87007205e7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-101-1/+5
|\| | | | | | | Change-Id: I99af0bef7f1c931533a324ebcfb27c40ee871a5e
| * 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>
* | Add option NoCancelButtonOnLastPage to QWizardChristian Loose2014-01-092-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Add support to hide the cancel button on the last page of a wizard. This is useful for wizards where the last page is used as a summary page that should not be cancelled. [ChangeLog][QtWidgets][QWizard] Added NoCancelButtonOnLastPage option. Task-number: QTBUG-7484 Change-Id: I282bda55a8dec9cde6439a9285d79e0a5c6df96a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QWizard: Replace another pointer table with char arraysMarc Mutz2013-12-241-15/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like in I53284066, the result of the SIGNALS() macro is handled in a switch statement, while the other two character pointers in the struct are replaced by character arrays of 'maximum occurring size'. If this looks wasteful, it really isn't: Linux AMD64 GCC 4.9-pre stripped -O2 effects: text size: -280B data size: -160B relocs: -21 When adding longer strings, compilers will warn, so this doesn't hurt maintainability, either. Change-Id: I5ac1cdffd8ac0ea0a1ede1ea4edcc6d3e22dcaa2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QWizard: Replace a static char* table with a switch statement.Marc Mutz2013-12-241-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usual way of concatenating the strings with NUL bytes and recording the relative offset of each in a separate offset table doesn't work here, because the entries are the results of SLOT() and SIGNAL() macros, which might, in debug mode, inject a runtime function call (to qFlagLocation()). Linux AMD64 GCC 4.9-pre stripped -O2 effects: text size: +16B data size: -64B relocs: -6 Change-Id: I532840668bb57ab72ef3fecb01a450c4c46516e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-2610-77/+201
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * 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>
* | QInputDialog: use QSignalBlockerMarc Mutz2013-10-301-4/+5
| | | | | | | | | | Change-Id: I711dbc0c35bc51ad3149e3d7b41e716bc9ab94b5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QFontDialog: use QSignalBlockerMarc Mutz2013-10-301-4/+2
| | | | | | | | | | Change-Id: I7be3ac4a7e6988d768e1db68f10a6920aa825a76 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QFileDialog: use QSignalBlockerMarc Mutz2013-10-301-2/+1
| | | | | | | | | | Change-Id: I32a631493138a777458557232da084f497adc526 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QColorDialog: use QSignalBlockerMarc Mutz2013-10-301-3/+1
| | | | | | | | | | Change-Id: Id680d9b934760cdd6a20579518199bd388b56e5d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-243-79/+195
|\| | | | | | | Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
| * 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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-117-31/+31
|\| | | | | | | Change-Id: Ib8cfeee7d9ca15e8ad520e428b72c200827a8628
| * 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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-042-1/+5
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/minimal/qminimalintegration.cpp src/plugins/platforms/offscreen/qoffscreenintegration.cpp Change-Id: Ica85deeab5c5038ac004718e25194b1157343480
| * 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>
* | Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-271-29/+20
|\|
| * 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>
* | WinRT: Fix Widget buildsAndrew Knight2013-09-273-4/+4
|/ | | | | | | | Tweak pri files and preprocessor usage to support widgets under WinRT. Change-Id: I6dc7d160078c0da343d6d39d2a0d52112c6f9f59 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.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>