summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
* QFileDialog can delete files too, not just directoriesShawn Rutledge2013-10-231-0/+20
| | | | | | | | | After Ic12de12ec51c20de52d040514e90be5e783add43 this functionality was broken. Added an autotest. Task-number: QTBUG-34159 Change-Id: I8f41b7073dc57fea855ab87796f09e8a91520d13 Reviewed-by: David Faure <david.faure@kdab.com>
* tests: Replace Q_OS_MACX -> Q_OS_OSXSergio Ahumada2013-10-211-2/+2
| | | | | | | | Use the correct identifier for the OS X operating system. Change-Id: I7158a6b77e5e7418bc6b0a565f003500820a346d Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* QFileDialog: don't create widgets if the platform dialog will be usedShawn Rutledge2013-10-151-0/+17
| | | | | | | | | | | 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>
* Fix temporary file leak in tst_qfiledialog2.Friedemann Kleint2013-10-031-6/+5
| | | | | | | Change-Id: I5a1e601e3aa6e84300efa09bfbd9232fecab903e Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Mac: QWizard default background pixmap works againLiang Qi2013-09-261-16/+4
| | | | | | | | 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>
* Merge branch 'stable' into devSergio Ahumada2013-09-211-0/+45
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * xcb: QWindow never uses XCB_GRAVITY_CENTERShawn Rutledge2013-09-161-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Center gravity doesn't mean center the window, it only affects the method of converting between internal window bounds and decorated bounds. So wanting to have each dialog centered w.r.t. its transient parent is not a reason for using center gravity. Instead it caused the bug that when you resize a QMessageBox by clicking the Show Details button, it jumps downwards on the screen. Task-number: QTBUG-32473 Change-Id: I3fabf3caa1e4d10fd4f7508e297f73efe5cc51b6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Set tst_qfilesystemmodel as insiginificantSimo Fält2013-09-201-0/+2
| | | | | | | | | | | | | | | | | | | | The test has been failing on all platforms. Usually it just times out, but it also have behavied flaky, failing with different error codes when executed twice in a row. Task-number: QTBUG-29403 Change-Id: Ic06638f0ffd23131b4c1aa4136f715195727e959 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Simplify QFileSystemModel::remove by using QDir::removeRecursivelyDavid Faure2013-09-161-4/+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>
* | Revert Mac event loop changes.Morten Johan Sørvig2013-09-022-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformThemeAndy Shaw2013-08-232-3/+32
| | | | | | | | | | | | | | | | | | | | | | 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-3/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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
| * tst_qfilesystemmodel: increased test's permitted runtimeSergio Ahumada2013-08-061-1/+2
| | | | | | | | | | | | | | | | | | | | This test has recently timed out a few times on OS X test runs, with no relevant changes to account for the timeout. Task-number: QTBUG-27890 Change-Id: Ia24f7812ed2a0b3eac51847a7dacbc9f225b48b8 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * test: Remove insignificant mark from tst_qfilesystemmodelSergio Ahumada2013-07-261-2/+0
| | | | | | | | | | | | | | | | Tests are passing nowaways on OS X. Task-number: QTBUG-27890 Change-Id: I6a0a881ece844ef931cb8af51b58d33c40be4d2c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-271-28/+16
|\| | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/create_cmake.prf Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
| * tst_qfilefialog: Fix leaking temporary directories.Friedemann Kleint2013-06-261-28/+16
| | | | | | | | | | | | | | | | The test currently leaks 2 directories QFileDialogTestDir, QFileDialogTestDir4SelectFiles in /tmp. Change-Id: I396f0b069572a680d81206dd0f1ddf606cbbe9e4 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-121-5/+12
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenubar.mm Change-Id: I4a699fc8a7f30b2af9de8e496c3d5f027b7495bb
| * tst_qfilesystemmodel: Fix warnings about comparing int/bool.Friedemann Kleint2013-06-081-5/+12
| | | | | | | | | | | | | | | | | | | | warning C4804: '<=' : unsafe use of type 'bool' in operation Remove outer loop and replace ugly ROW_NAME macro by inline function. Change-Id: Id7e4ef047adaf8017b8c21621d19c151993cc6dd Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-232-1/+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
| * Fixed autotest build for configurations without printsupportOliver Wolff2013-05-211-1/+1
| | | | | | | | | | | | Change-Id: I7fc4a6e4885e9640ecfbe93547fb56868ebba309 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * QtWidgets: avoid integer divide by zero in QProgressDialogLiang Qi2013-05-151-0/+11
| | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-31046 Change-Id: Ie549b59112f458de478294fa00443a3cf6898c85 Reviewed-by: J-P Nurmi <jpnurmi@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>
* | Add QUrl based static methods to QFileDialogKevin Ottens2013-04-291-0/+46
|/ | | | | | | | | | | | | | | With QUrl variants of the static methods, it is possible to get to use VFS facilities of the platform if available. Since we can't predict if the application will use the VFS available in the platform or its own mechanisms, an extra parameter is provided to restrict the protocols allowed to the user. This extra parameter defaults to no restriction, which is the most convenient if the platform file dialog and the application use a matching VFS. It's likely to be the most common use. Change-Id: I4c9effde9d194d226cd8b7a140eb9036187ba87b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-2812-17/+0
| | | | | Change-Id: I1264784d6984edc70bf07e58ed763e1d1b001d7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren}Debao Zhang2013-03-277-106/+106
| | | | | Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtWidgets tests: Don't call the empty function QApplication::syncX()Debao Zhang2013-03-272-9/+0
| | | | | Change-Id: I2c732afd43586209cf5a2b72caac53e34abb9090 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Do not run tst_qfilesystemmodel for MinGW.Friedemann Kleint2013-02-011-0/+1
| | | | | | | | Task-number: QTBUG-29403 Change-Id: I91c938d9a6510ae91e54cd53e2d9df0a56b68d50 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Do not execute tst_qfilesystemmodel in parallel.Friedemann Kleint2013-01-291-2/+2
| | | | | | | | | It may interfere with other file system tests. Task-number: QTBUG-29014 Change-Id: I32dd7428993b0da1a2f70ec3e581050012a4ff32 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_qfilesystemmodel: Avoid commonly used folders.Friedemann Kleint2013-01-281-23/+32
| | | | | | | | | | | | Use the test's temporary directory instead of QDir::temp() and the documents folder instead of QDir::home(). Split out unrelated test from data-driven sort test. Task-number: QTBUG-29014 Change-Id: I229f0b1c0f1e43b56d19ebd43fd7cc64a85b1222 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1815-15/+15
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix warnings about not being able to set Window geometry on Windows.Friedemann Kleint2013-01-081-4/+4
| | | | | | | | | | Fully decorated windows cannot be smaller than 160x30 (Large fonts). Enlarge Windows or remove Window frame to get rid of decorations. Task-number: QTBUG-28611 Change-Id: Idb6ee94fb8d0760d5f97042b3084557f11e9fdf9 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Widgets: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-042-2/+0
| | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b Reviewed-by: David Faure <david.faure@kdab.com>
* Remove metatype registration of built-in types.Stephen Kelly2013-01-031-1/+0
| | | | | | | | As they are built-in, they are effectively registered at compile-time already. Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Stop using the name "Trolltech" in QSettingsSergio Ahumada2012-12-032-4/+4
| | | | | | | | | Also change Trolltech for QtProject in other places Task-number: QTBUG-23269 Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Made QMacStyle internalJ-P Nurmi2012-11-231-3/+0
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QMacStyle directly. Change-Id: I44a2f5ee3fe08ecc837b593a2a2737eb90e8c267 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* tst_qwizard: remove redundant includeJ-P Nurmi2012-11-231-1/+0
| | | | | Change-Id: I837aed1e5e601e67105562df2764327b7e8c44a6 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tests: Mark tst_qfilesystemmodel as insignificant on MacSamuli Piippo2012-11-131-0/+2
| | | | | | | | | Task-number: QTBUG-27890 Change-Id: I8af9f019c00d38551ce04b4cdb4bb895a61a50c5 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Fix a crash in QFileDialog when selecting an invalid name filter.Friedemann Kleint2012-10-261-1/+46
| | | | | | | | | | | When nameDetailsVisible is set to false and an invalid/empty string is passed to selectNameFilter(), the regexp used to strip the filter off the suffixes returns empty and a crash occurs. Change-Id: I926ea49514ff25a103977d8121fca1cf83d647f5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* test: Remove QSKIP from tst_QFileDialog2Sergio Ahumada2012-10-251-3/+7
| | | | | | | | In task227930_correctNavigationKeyboardBehavior() Task-number: QTBUG-23602 Change-Id: I07f40dbc3840c232e09ff1327f00e3fd9c16c22f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Core/kernel: Make some signals private.Stephen Kelly2012-10-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | There are more opportunities in QtCore and the rest of Qt to make signals private instead of public. This is a test-dart to see if there is any reason not to do this. It would be nice to make QObject::destroyed private, but as it has a default argument it would be source incompatible to anyone connecting to the SIGNAL(destroyed()) instead of SIGNAL(destroyed(QObject*)). Currently the function-pointer-based connect syntax does not accept a functor (or lambda) with a different number of arguments than the signal. Olivier says a fix for that might come in 5.1, but for now the qfiledialog2 test is changed to not use that anymore. Also, the function pointer for a private signal can not be assigned to a local variable, so the qmetamethod test is changed to not do so anymore. Change-Id: Iaf776b822f9ba364f2c184df0c6b23811da56e44 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Stabilize tst_qfontdialog test case.Miikka Heikkinen2012-10-231-6/+19
| | | | | | | | | | | | | The delayed quit signal used as failsafe to ensure exit from event loops interfere with later test if the test case works normally, as closing the last toplevel window will also exit the event loop. Fixed by stopping the quit timer if nested application exec loop is exited. Change-Id: If87655f1f28f50e27a64f3430c9f65bb3ab7dd70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-222-23/+1
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* normalise signal/slot signatures [QtWidgets tests]Marc Mutz2012-10-193-38/+38
| | | | | Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* tst_qfiledialog: fixed typo causing semi-random completer() failureRohan McGovern2012-10-091-1/+1
| | | | | | | | | | | | | | completer_data() was attempting to find the first folder which did not begin with a '.' character under QDir::root() for usage during the test. However, a typo caused it to find the first folder even if it _did_ begin with a '.'; unless the first folder returned by entryList() was ".", in which case no folder would be found. Change-Id: Ie95f1add797973d06a8d5f2fa32935366a008de5 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Run application main run loop in color/font dialog testTeemu Katajisto2012-09-272-24/+46
| | | | | | | | | | | | | | | | | | In cocoa the timers are associated with main run loop but the way font and color dialog tests are executed the modal dialog run loop is only run in cocoa. This causes timers to not to fire and test cases to hang. Unfortunately this does not completely fix the test failure because the QTest::keyClick is not working with cocoa native dialog helpers and therefore the tests are marked with QEXPECT_FAIL. Task-number: QTBUG-24320 Task-number: QTBUG-24321 Change-Id: I88740a20ad2b794b6ca15e1b6455f436ffd39335 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* tst_QDialog: fix Q_OS_WINCE & QT_NO_SIZEGRIP usageJ-P Nurmi2012-09-271-9/+23
| | | | | Change-Id: I443381ef4f10492eeda0fc681c390e0cd4d4125e Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_qsidebar: remove duplicate codeJ-P Nurmi2012-09-271-6/+3
| | | | | Change-Id: I8ee59022199fda7ea56891a2f924954cb4aefa42 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QMessageBox: fix Q_OS_MAC usageJ-P Nurmi2012-09-271-3/+5
| | | | | Change-Id: I1a3c1c88956d85343e693588ca0522c4b7d62072 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>