summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QFileSystemEntry: Export static helper function checking for the root pathFriedemann Kleint2017-07-032-7/+11
| | | | | | | | | | | This provides a helper function which does the check on the string. QFileInfo::isRoot() in addition checks for the existence of the directory, which can cause hangs with network drives. Use the new function in appropriate places in QtWidgets. Task-number: QTBUG-6039 Change-Id: I54d0d860713e82b28fa4069a5345b042337f9c52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QLineEdit: Document that []{} are reserved in Input MasksDaniel Teske2017-07-031-0/+1
| | | | | | | | They don't have any meaning, seems like they were meant for a future extension. Documenting them, documents that they need to be escaped. Change-Id: I90079766ffd45fab8c4676f7a9212ff6dec4a732 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add list with widgets examples using layoutsNico Vertriest2017-07-031-3/+2
| | | | | Change-Id: I585cd63f68220467de1beed3346cdaa12af2b34b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: minor correction in listNico Vertriest2017-07-031-7/+7
| | | | | | | Removed unnecessary periods in list Change-Id: Ic6e029a3271bf34db2e0b77005f58dd8b2337537 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: add tutorials to overview page Qt WidgetsNico Vertriest2017-07-031-0/+4
| | | | | | Change-Id: I62037ce2190689b2e9c8d62a9d67e1d477e1be42 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QLineEdit: Tweak selectionStart() documentationDaniel Teske2017-07-031-1/+1
| | | | | Change-Id: I55defa5ed182373f435b06c92770da5b05c01459 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: Remove obsolete screenshotsLeena Miettinen2017-07-03100-0/+0
| | | | | | | | | References to these screenshots have been removed from the docs in other commits. Change-Id: I1af72f0160382f1fe98740c664258a9b35ca0e64 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove remains of wince in .pro filesFriedemann Kleint2017-07-031-9/+0
| | | | | | | | Task-number: QTBUG-52590 Change-Id: I444fc9eedc8a8e4ad2ede224d66e7c410bedbb48 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.filesystemmodel to QT_[REQUIRE_]CONFIGStephan Binner2017-07-027-38/+29
| | | | | Change-Id: I862510387e79d04221ec075f3e79896908ee9d8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.fscompleter to QT_[REQUIRE_]CONFIGStephan Binner2017-07-024-15/+18
| | | | | | | Fix one #include as only QCompleter is used and not QFSCompleter. Change-Id: Ia1e722122f7e322c678d2db6962c6086c684ddd9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.errormessage to QT_[REQUIRE_]CONFIGStephan Binner2017-07-024-12/+10
| | | | | Change-Id: I9cc4f5190108c4bb96ddbd782ef1a031c9889f7e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.wizard to QT_[REQUIRE_]CONFIGStephan Binner2017-07-0210-30/+28
| | | | | Change-Id: I43e3d9f55a21ae0f602fc43c570321d0152cd8b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.colordialog to QT_[REQUIRE_]CONFIGStephan Binner2017-07-024-13/+11
| | | | | Change-Id: If2ac57a10f38002db5a49be3882dfc507a84a3df Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* docs: Reference QOpenGLWidget::grabFramebuffer, not QGLWidget::grabFrameBufferSérgio Martins2017-07-021-2/+5
| | | | | | | | QGLWidget is obsolete Change-Id: I8db3bfd534a328d41815d445557d899dc17d6061 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix moving a hidden QOpenGLWidget to another windowSérgio Martins2017-07-022-1/+3
| | | | | | | | | | | | A visibile QOpenGLWidget receives a QEvent::WindowChangeInternal which triggers a QOpenGLWidget::reset(). A hidden QOpenGLWidget never received this event so it was never reset, resulting in a black rendering. Includes unit-test that fails without this patch. Change-Id: I9d2c57d66fa629f631a9829a5ebf4de09998ad75 Task-Id: QTBUG-60896 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Convert features.fontcombobox to QT_[REQUIRE_]CONFIGStephan Binner2017-06-293-9/+6
| | | | | Change-Id: I98f85cdb3b1c1ceae010362a5d5747d62ba62a22 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.statustip to QT_CONFIGStephan Binner2017-06-2913-23/+23
| | | | | Change-Id: Ic719ab93ed1802fcc713885ad0421cb44c7a998b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.messagebox to QT_[REQUIRE_]CONFIGStephan Binner2017-06-298-30/+35
| | | | | Change-Id: Ie25dc672f8a675c06585c7757255f7dbadbfc5ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.inputdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-06-295-18/+13
| | | | | Change-Id: Ie480efcfc1fdc00e2b2697cf4c5abb231b42cc0e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.progressdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-06-293-11/+7
| | | | | Change-Id: Ic12a30480260e426f106baf7e2121889ea01db88 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.filedialog to QT_[REQUIRE_]CONFIGStephan Binner2017-06-297-28/+21
| | | | | Change-Id: I9bc229b0d1430b81eeb2cfca2b24474736d5d561 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.whatsthis to QT_[REQUIRE_]CONFIGStephan Binner2017-06-2930-68/+77
| | | | | | | Move feature definition to gui/configure.json Change-Id: I00b35c0e259d0a695d84a9bf6803eba74d41465a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QTabBar: fix expanded tabs appearanceOleg Yadrov2017-06-281-9/+9
| | | | | | | | | | | | | | Fix regression introduced by 175f33ed8. 'expanding' property set to true was ignored when QStyle::styleHint() returned Qt::AlignRight for SH_TabBar_Alignment. When we calculate tabs geometry, we put an empty tab at the front and back and set its expansive attribute depending on tab alignment AND 'expanding' property. Task-number: QTBUG-61480 Change-Id: I6a1827ae8a3f2c6bee5124c18c7f2b1c0a7862f3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Windows code: Add Q_FALLTHROUGH or break to unmarked fallthroughs seen by GCC 7Friedemann Kleint2017-06-282-5/+5
| | | | | | | Rearrange code handling QtWindows::DisplayChangedEvent. Change-Id: If9f32516108fb64c4a252c84392f2fd7f1872bf1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Convert features.undocommand to QT_[REQUIRE_]CONFIGStephan Binner2017-06-283-14/+12
| | | | | Change-Id: I1016f7e6bb1297e9c2f73e26e0d3641c873c4d4d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.undostack to QT_CONFIGStephan Binner2017-06-283-7/+6
| | | | | Change-Id: I7fc3aa44625fc97b802def4954f88c091c53f876 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.undogroup to QT_[REQUIRE_]CONFIGStephan Binner2017-06-286-25/+25
| | | | | Change-Id: I2fe0a3335e140875c425b28dc6e2d3081f534965 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.undoview to QT_[REQUIRE_]CONFIGStephan Binner2017-06-283-10/+8
| | | | | Change-Id: Ic2945b9317f074301acd88602e3dae45e28b7c87 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.treewidget to QT_[REQUIRE_]CONFIGStephan Binner2017-06-287-26/+17
| | | | | | | Also fix too specific #include on the way Change-Id: Ieff5f40584ecc5f680f09a8a4b95d5604ff1e940 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.listwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-06-286-16/+13
| | | | | | | Also fix too specific #includes on the way Change-Id: Id626928513e89dd4a8854640994661f0d329470b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.tablewidget to QT_[REQUIRE_]CONFIGStephan Binner2017-06-284-15/+11
| | | | | | | Also fix dependency of cupsjobwidget feature Change-Id: I2184bf3df814a6bb0f38755bb597ed1797dec587 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.tabletevent to QT_CONFIGStephan Binner2017-06-286-15/+15
| | | | | Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-2837-53/+53
| | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix current tab text color on Mac when a proxy style is installedGabriel de Dietrich2017-06-282-4/+6
| | | | | | | | | | | | | We move the code forcing white text on the current tab to QMacStyle. This removes the small encapsulation violation even though we need to check for the tab text color in the style and modify the palette. Amends 2fbc1432025dd478cf9e940e3c2a1952b218c6dc. Change-Id: If31dc11ae389ee5315e84ab03cf1c08540d81640 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge 5.9 into 5.9.1Oswald Buddenhagen2017-06-199-380/+21
|\ | | | | | | Change-Id: I229386dc3e0283dc7e5ad1c580ffcb335c67601c
| * Convert features.columnview to QT_[REQUIRE_]CONFIGStephan Binner2017-06-126-24/+19
| | | | | | | | | | | | | | Side effect: fix of QT_NO_COLUMNVIEW <-> QT_NO_QCOLUMNVIEW inconsistency. Change-Id: I42702ea7b362a4b6fb5dad78ee105e6cbbf8bcf6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Drop dead qfiledialog_embedded.uiStephan Binner2017-06-122-355/+1
| | | | | | | | | | Change-Id: Ia20fe65d08a8a477dc1c56ad5dcd3db5144c25a1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * QDialog: Fix typo in documentationhjk2017-06-121-1/+1
| | | | | | | | | | Change-Id: I0cbcd007976a974d7491595b59cc463f6443d4b0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Revert "QWidgetEffectSourcePrivate::draw(): Call render() when no shared ↵Friedemann Kleint2017-06-141-1/+1
|/ | | | | | | | | | | | | painter exists" The change causes drawing artifacts in Qt Creator. This reverts commit 8b1377fde16a2049a1c27f6d005bff84a8f85f28. Task-number: QTCREATORBUG-18322 Task-number: QTBUG-60231 Change-Id: Ic05507b0c23ea612fa5a9b92163380059b6e710d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Doc: Update widget style gallery topicLeena Miettinen2017-06-0921-736/+63
| | | | | | | | | | | To avoid repetition, remove the individual style gallery topics. Add images of the Styles and Calendar widget examples and use them instead of individual images of each widget. Task-number: QTBUG-5894 Change-Id: I1231824df60e39e8fb89ac2a764e12151636c019 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QPlainTextEdit: not show place holder when having preedit stringLiang Qi2017-06-081-1/+1
| | | | | | | Task-number: QTBUG-61210 Change-Id: I4891c21fc4e1923b5929defeacab26114c00a7e3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Help GCC understand that variable is never used unintializedThiago Macieira2017-06-071-1/+1
| | | | | | | | | | | | | | qformlayout.cpp:1982:14: error: ‘role’ may be used uninitialized in this function [-Werror=maybe-uninitialized] The variable role is never used uninitialized because the access is protected by the check for row != -1. The only condition under which QFormLayout::getItemPosition will leave role unset is if it sets row to -1. Since row == -1 ←→ col == -1 ←→ storageIndex == -1, we can simply change the variable that we check here and the warning goes away. Change-Id: Ia3e896da908f42939148fffd14c4ace6e40a808e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix crash when calling QWidget::grab() on a QOpenGLWidgetSérgio Martins2017-06-071-2/+4
| | | | | | | | | | | | | | By avoiding unneeded nested QPainters. Crash was: ASSERT: "s" in file /data/sources/qt/qt5/qtbase/src/gui/painting/qpaintengine_raster.cpp, line 2239 s was nullptr because the inner QPainter had called updateState(0), which is then dereferenced by the outer QPainter. Task-number: QTBUG-61036 Change-Id: I7aad648f805f1abac4d38dfbefa2292da8b52af4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Remove references to screenshots illustrating different stylesLeena Miettinen2017-06-0122-231/+51
| | | | | | | | | | | | | | | | ... from widget class descriptions. Use one screenshot from Windows instead. The styles change and the screenshots become outdated very fast, so it is easier to update just one screenshot now and then. The styles can still be seen in the style gallery topics. The image files will be removed in a follow-up commit after all references to them have been removed. Change-Id: Id326c141f4884a2e4f67a4fe8681d8c65f8b24ba Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-311-3/+5
|\ | | | | | | Change-Id: I2d7a3f3a80e6287e135e55b650f74f9a540332bc
| * QHeaderView: fix visual/logical index corruption when restoring statev5.9.0-rc2v5.9.0David Faure2017-05-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup to 77a8e90cddcfa1c34518ef846a4838874a7bc0c7 which didn't handle the case where no columns had been moved. visualIndices and logicalIndices are empty until initializeIndexMapping() is called, in which case appending is wrong. As a result, visualIndex(i) would return -1 for the values over those added by read(), and an assert would happen at painting time. The fix is to leave visualIndices and logicalIndices empty if they are empty already, leaving it to initializeIndexMapping() to fill them later if necessary (e.g. when moving a column). Task-number: QTBUG-60837 Change-Id: Ia7e4b9d3122647984acd434dfaa0400df319d065 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | QStackedLayout: Fix UB (invalid cast) in qt_wasDeleted()Olivier Goffart2017-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixup of commit b4995eb7491c1b4784a1bf48db834c11c42b8d9d. We can't call QWidgetPrivate::get(w) on a deleted QWidget, because of the call to the member function QWidget::d_func. We can however call QObjectPrivate::get since we still are in the QObject destructor. tst_qstackedlayout now pass without ubsan Warnings. Change-Id: I4e839a97ddbd1cf21435a8fca76523b98a1f7d9b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QWidgetWindow: don't give focus to windows that are being destroyedMitch Curtis2017-05-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the referenced bug report, dismissing a QFileDialog while the Qt Virtual Keyboard was in use would result in a crash. Dismissing a file dialog created with e.g. QFileDialog::getOpenFileName() causes it to eventually be destroyed. When this happens, it starts deleting its children. Each child widget's destructor calls clearFocus(). In clearFocus(), there is a block of code that emits QWindow::focusChanged(), passing the result of focusObject() called on that widget's window. QWidgetWindow::focusObject() could end up using itself as a fallback focus object if it had no other focus objects (e.g. children) to use instead, even though it was in the process of being destroyed; as were all of its children. The Qt Virtual Keyboard plugin would then try to use the focus object, even though it was in an invalid state. To fix this problem, we return early from QWidgetWindow::focusObject() if the window is in the process of being destroyed. Task-number: QTBUG-57193 Change-Id: I137cf9415812ce2e0419c0afe8076ce150f248cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Convert features.splashscreen to QT_REQUIRE_CONFIGStephan Binner2017-05-293-10/+10
| | | | | | | | | | Change-Id: Ie46b7c6fb52773dea25c552a77c96d800f471738 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Convert features.lcdnumber to QT_[REQUIRE_]CONFIGStephan Binner2017-05-294-10/+12
| | | | | | | | | | Change-Id: Ie99d2ce0a836c27fb882c04ff465e6cdd483d360 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>