summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* macOS QComboBox: Don't show scrollers if they aren't neededDaniel Teske2017-07-102-0/+14
| | | | | | | Task-number: QTBUG-13925 Task-number: QTBUG-18788 Change-Id: Id155ea26824e1cb470cc6174704436d99fb7ac87 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-081-1/+1
| | | | | | | | | | | | Changes internal data-size and pointer calculations to qssize_t. Adds new sizeInBytes() accessor to read byte size, and marks the old one deprecated. Task-number: QTBUG-50912 Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Deliver native events to windows, as well as to event filtersTor Arne Vestbø2017-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | Qt has two APIs to intercept native events today: - QAbstractEventDispatcher::installNativeEventFilter() - Q{Window|Widget}::nativeEvent() On macOS we only implemented one of them, the native event filter code path, by calling filterNativeEvent from the Cocoa event dispatcher. We now also propagate the native event to the corresponding QWindow, and QWidget if applicable. It would be nice if there was only one Qt API for this, or at least only one codepath for platform plugins to care about, but since the event filter might catch more event types than gets delivered to the window, we probably need both code paths going forward. Task-number: QTBUG-40116 Change-Id: I0796bd62a2b7c08b2eaaf6f15db8088e9703af02 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-0681-28/+32
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Fix build with MSVC 2015 Update 2 if constexpr is enabledThiago Macieira2017-07-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This compiler seems to require explicit initialization of all member variables in a constexpr constructor, even if they have an implicit default constructor of their own. We probably fixed the rest of Qt a couple of years ago, but not these two places because they were arrays and those require the C++11 syntax for uniform initialization. All compilers that support constexpr do support uniform initialization. MSVC 2015 fixed our issues with it on the same update. Change-Id: Ibc1eb23e3ae093f5c6928ded3a041be35eb9baae Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-04114-479/+441
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * 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
| * | 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>
* | | QDateTimeEdit: update cursor blinking code to match new APIRichard Moe Gustavsen2017-06-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Update old, if-deffed out, code to match changed method signatures. Change-Id: If9751599c9446f8dbd554a41ab97f597258fa1c5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Restrict QStyleHints::showShortcutsInContextMenus() to context menusFriedemann Kleint2017-06-262-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends c2c3452ba5b4c32d0c2d5df9193bf89986623ab5. Task-number: QTBUG-49435 Task-number: QTBUG-61181 Change-Id: I4de9dcb45a86fc2db07185a4a499a511fb1a1567 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | QtWidgets: Change QTLWExtra::window from QWindow to QWidgetWindowMorten Johan Sørvig2017-06-222-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit a1d4e4c9: We’re now using QWidgetWindow API from QWidget code. Add QWidgetPrivate::windowHandle() which returns a QWidgetWindow pointer. Use this function to remove casts where QWidgetWindow API is used. Change-Id: Ie66a69b5c0461f297996118dc907e1d7b3d78df5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Correctly set native widget window visibilityMorten Johan Sørvig2017-06-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After d7a9e08f, calling QWindow::setVisible(true) is a no-op if the widget is already visible. Use QWidgetWindow::setNativeWindowVisibility() instead to set visibility for the native window directly. “Upgrading” widgets to be native widgets now works again. Change-Id: Id68dd8241f3afe00670c07e30e2b2ade9c150354 Task-number: QTBUG-61006 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | macOS: Remove support for child NSWindowsTor Arne Vestbø2017-06-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private feature was only used by QToolBar to solve QTBUG-33082, but the solution doesn't work, and complicates the macOS platform plugin quite a bit. A better solution is likely to use Core Animation layers, which is a direction we're going in anyways. To make it easier to modernize the macOS platform plugin, including moving to using layers, we remove the child NSWindows codepaths for now. Change-Id: I4b19464be3980fd84dd7af8316d4d5e85ba813b1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | QStyleHelper: add missing forward declarationsSamuli Piippo2017-06-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fixes build with -no-accessibility. Change-Id: Ia58c11b22f08a51d5978e4a002480d265aa10fbd Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Item widgets: API cleanupsGiuseppe D'Angelo2017-06-203-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few functions ended up in the wrong visibility section. For instance, it should be perfectly fine to call indexFromItem even from non-subclasses. We can't change that in Qt 5, make a note for Qt 6. Change-Id: I277d831ef1a4b3dcae99bef299ea334954d5b0d3 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Eliminate in/out arguments from QDateTimeParser::parse()Edward Welbourne2017-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its first two arguments were non-const references that it modified. A copy of the first was already being passed back in the returned struct; and the one caller that wanted the modified value was in fact copying this copy back over the QString it had passed in (that was thus equal already). So passing by value is fine. The second's only change was increment by a field I've just added to StateNode in refactoring parse(); so we can let the caller do that adding, instead. Change-Id: I05abb644f3e5a60f94b03292302dd1bbe996cce9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>