summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-183-4/+2
|\ | | | | | | Change-Id: Ia79c2457f20f3428ef1b4358c1094e8dc1bbc33e
| * Header-review: add Q_DECL_DEPRECATED_X macro to deprecated methodVolker Hilsheimer2020-03-171-1/+1
| | | | | | | | | | Change-Id: I486d479b2e07042b397869aab117f44e65539f1e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Fix docs suggesting that it's possible to draw to the X11 screenSimon Hausmann2020-03-171-2/+0
| | | | | | | | | | | | | | | | | | It's not possible anymore, since many years. The desktop's don't use the X11 root window anymore :) Fixes: QTBUG-82880 Change-Id: I923f29f23e61d93640cacb2ac20620c5ddc480b9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Add 'since' tag to documentation of new enum valueVolker Hilsheimer2020-03-171-1/+1
| | | | | | | | | | Change-Id: I400dc1f2d3dba0fa50b2bcb5e4efbcfc0ad912fd Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Fix compilation with -no-feature-regularexpressionEskil Abrahamsen Blomfeldt2020-03-171-0/+4
| | | | | | | | | | | | | | | | | | This -no-feature has probably not been tested for a while and seems to have rotted a bit, both some unprotected uses and some warnings on unused parameters. Change-Id: Ie20a06c78d3b4c36860dab49d6615eaa8ffc9077 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Simon Hausmann2020-03-165-12/+3
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-165-12/+3
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
| | * Doc: Remove \contentspage commandsTopi Reinio2020-03-153-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | The command is deprecated and has no effect apart from generating a documentation warning. Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Doc: Remove incorrect see-also linkTopi Reinio2020-03-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The link is actually a self-reference; setCurrentSection() is setter for the currentSection property, and has no dedicated documentation. Change-Id: I4977650566913c590d46aede92d8678b7b7ea291 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * QFileDialog: Improve default implementation of getOpenFileContent()Friedemann Kleint2020-03-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use QFileDialog::ExistingFile and check whether file can be opened, fixing warnings like: QIODevice::read (QFile, "/home/.../blub"): device not open Change-Id: I7ee1d59f01383c581bc09fb44855835aae8c246b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-163-5/+5
| | | | | | | | | | | | | | | | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | cmake: Fix naming when referring to Apple macOSTor Arne Vestbø2020-03-163-5/+5
|/ / | | | | | | | | Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-118-1/+8
|\| | | | | | | Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
| * Add default arguments to QPainterPath methods using transformJarek Kobus2020-03-067-0/+7
| | | | | | | | | | | | | | Fixes: QTBUG-82602 Change-Id: Id82f145ffb33e6d4ef9b81282ad14657b1c8fbd0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Don't use deprecated QPixmapCache::find overloadVolker Hilsheimer2020-03-041-1/+1
| | | | | | | | | | | | | | | | Silence compile time warning and show correct usage in example snippet. Change-Id: I1936f006e4b5f3ca71bbc0100ed039beeb459271 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | CMake: Regenerate configure.cmake files to get reportsAlexandru Croitor2020-03-091-0/+8
| | | | | | | | | | Change-Id: Ifa1646c7e471b3eaba552498ee1dc24f6ab864de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Lars Knoll2020-03-041-4/+5
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-03-041-4/+5
| |\| | | | | | | | | | Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
| | * QMenu: hide when a QWidgetAction fires the trigged signalVolker Hilsheimer2020-03-031-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMenu hides regularly when the user interacts with it, and manages the firing of signals based on that. It ignores if a QAction that is added to it fires the triggered() signal programmatically. With QWidgetActions added to the menu, the menu usually doesn't get interacted with directly, as the widget gets the input events. Since the action can be added to multiple menus, neither widget nor action can interact with the menus programmatically. Instead, the menu needs to hide when the widget action triggers. Test included that covers the case where a QWidgetAction is added to multiple menus that are visible. Documentation updated, and removed a redudant paragraph as a drive-by change. [ChangeLog][QtWidgets][QMenu] a popup menu hides when a QWidgetAction added to it fires the triggered signal. Change-Id: I69f378426a45c2e46cebdaa5e6f1b21c8fb03633 Fixes: QTBUG-10427 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Remove references to QTextDocumentPrivate from public APIEskil Abrahamsen Blomfeldt2020-03-041-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private object of QTextDocument has been exposed through public APIs marked internal, which we should avoid as much as possible, since it clutters the headers. For accessing private data without adding friends, we have a nice pattern of adding a static get() function to the private class itself. Fixes: QTBUG-55059 Change-Id: I03e949a677e03487e95f24e3608a06aa0a3511ab Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-038-14/+13
|\| | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * Name method parameters in declaration, even when it's obviousVolker Hilsheimer2020-02-282-8/+8
| | | | | | | | | | | | | | As pointed out during header review. Makes Qt more IDE friendly. Change-Id: Icb610dba39e39ffd6674c79d9c6e087294788489 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Avoid using deprecated QTabletEvent::device() methodAllan Sandfeld Jensen2020-02-281-1/+1
| | | | | | | | | | | | | | | | It was renamed to QTabletEvent::deviceType() in 882f340f62b8dc34633f5f296be12243b6e8999d. Change-Id: I070404bfc9a04144ae3565bfa3cc3a016040a07d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-283-3/+3
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Docs: Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Applied suitable wrapping round various char and string literals, since docs are meant to show best practice. Change-Id: Ie061905fad26f9b4dda3eedba4612704f0a19126 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove a "### Qt 6" that I forgot to removeJan Arve Sæther2020-02-281-1/+0
| | | | | | | | | | | | | | amends commit 5e83a2eed2dc42a732bd9154bebe8dcb34cd6bb5 Change-Id: I792d5d71d8c5a8b034d334de31dcd9bacfc53fa9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove various traces of QGLJohan Klokkhammer Helsing2020-02-283-8/+1
| | | | | | | | | | | | | | | | Removed friend declarations, some check etc. Task-number: QTBUG-74408 Change-Id: I1c5b46a564beee2c1d894678b908803f91df68aa Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Lars Knoll2020-02-2812-32/+83
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-2812-32/+83
| |\| | | | | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| | * Android: QFileDialog::selectedFiles() check isLocalFile()Assam Boudjelthia2020-02-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | call toLocalFile() only if the returned QUrl::isLocalFile() is true, otherwise return toString(). Same thing as done for QFileDialog static functions as in 1576f81baa8a1c992a005397edfc5d6f9e1b44c1. Change-Id: I3f8cab385e32d0943587b3382a636ea3a168d518 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Lars Knoll2020-02-272-16/+21
| | |\
| | | * Merge remote-tracking branch 'origin/5.14' into 5.15Lars Knoll2020-02-272-16/+21
| | | |\ | | | | | | | | | | | | | | | Change-Id: I4212d070d5752275085e754b96f0392113604dba
| | | | * Document the behavior of QLineEdit::inputMask correctlyVolker Hilsheimer2020-02-261-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLineEdit is unicode, and uses QChar::isLetter and QChar::isNumber to evaluate whether an input character is valid. There is no test for ASCII ranges, or converting of input characters to ASCII, so the documentation was wrong. [ChangeLog][QtWidgets][QLineEdit] the inputMask property has allowed any Letter or Number category character for the respective mask characters, not just ASCII. The documentation has been updated accordingly. Change-Id: Ied93cf6ddd334ac91bfbc275107a8eb83d231d80 Fixes: QTBUG-82291 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | | | * Documentation: correctly use see-also tags to link to related membersVolker Hilsheimer2020-02-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I764eb4730067cd704866191516dc4e8dd1820760 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
| | * | | Fix QDateTimeEdit's handling of invalid time in dst gapVolker Hilsheimer2020-02-271-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During a spring forward, a time-zone omits an hour. A QDateTime with such an hour is invalid, but QDateTimeEdit's handling of this invalid time was not done correctly. With this fix, up/down changes of any field that would result in an invalid date-time corrects the time to be valid, while leaving as much as possible of the user-entered data unchanged. To do that, we rely on QDateTime::toMSecsSinceEpoch to return a value even for such an invalid time, which then can be used to construct a valid QDateTime. Edits that would result in an invalid hour are reverted to the previous when pressing return, if correctionMode is CorrectToPreviousValue. This change also implements support for CorrectToNearestValue, which uses the same mechanism as when stepping over an invalid time. Include a test that verifies that the various interactions result in a reasonable value. Since QDateTimeEdit does not respect the timezone or timespec of the QDateTime it is initialized with, we have to find the first hour of daylight saving time for a year that we know works for most time zones. Failing that, we have to skip the tests. Verified in a wide range of time zones. Change-Id: I05b906ae3b5f6681891d23704f00f9c10cd479ae Fixes: QTBUG-79803 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | | QWizard: deprecate visitedPages and add visitedIds insteadVolker Hilsheimer2020-02-272-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the ### Qt 6 comment. A method visitedPages should, following the convention of the other QWizard APIs, return a list of QWizardPage pointers. Since the method returns a list of IDs, visitedIds is the correct name. [ChangeLog][QtWidgets][QWizard] visitedPages has been deprecated, use visitedIds instead. Change-Id: Ifdb94adf093be14cb48c84cb40818c55ff5189a0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * | | Remove ### Qt 6 comment that we won't addressVolker Hilsheimer2020-02-271-1/+0
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStatusBar is 22 years old, and those protected APIs have been around ever since. There is no good reason to make them private now. Change-Id: I62624800d8e287e21535967aa6a861b98cae97d5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * | QComboBox: deprecate SizeAdjustPolicy::AdjustToMinimumContentLengthVolker Hilsheimer2020-02-263-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per ### Qt 6 comment and pre-existing documentation, one of the other enum values should be used anyway. Only usage in QtWidgets is in QFileDialog, replace it there with appropriate alternative. [ChangeLog][QtWidgets][QComboBox] the SizeAdjustPolicy value AdjustToMinimumContentLength is deprecated, use AdjustToContents or AdjustToContentsOnFirstShow instead. Change-Id: I22deaa31fbb6c09e87c814e120eb7ee27c177ea9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | QDockWidget: mark AllDockWidgetFeatures enum value as deprecatedVolker Hilsheimer2020-02-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per ### Qt 6 comment, and the documentation which already suggests to specify the individual flags instead. Change-Id: Id236b7b13024a15fc7ad483b9481361b2ac43a02 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | QShortcut: fix ambiguity with new PMF ctorsChristian Ehrlicher2020-02-261-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new PMF ctors introduced with a4751f8824723acaee4b9d8aa78a59c2aa36cb3e created some ambiguities with existing old-style connects. Fix it by explitly checking if the given pointers are pointers from QObject derived classes. Fixes: QTBUG-82415 Change-Id: I70d51a6d50384fe6b5083fa3b94492ab6ed97086 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-262-2/+2
| | |\| | | | | | | | | | | | | Change-Id: Iad459349ea8b4090d79b4771bfff8f656a8a8189
| | | * Set the size of the buffer so it is big enough to hold the contentsAndy Shaw2020-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will prevent a crash later on when it tries to assign to an index in a QString that has not been allocated. Fixes: QTBUG-81950 Change-Id: Ia0b5648a18f15594eeca07d234bedadcfeb266ac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * Remove misplaced backslash from documentationVolker Hilsheimer2020-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A \c{} section is already rendered using monospace, no need to escape the \nullptr keyword explicitly. Change-Id: I004a409892809e968c7a73c68a5b3c54a4680425 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | Get rid of QMatrixJarek Kobus2020-02-288-214/+5
|/ / / | | | | | | | | | | | | | | | Task-number: QTBUG-81628 Change-Id: Iad66bfdf49b9ee65558a451108c086fc40dc3884 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Pass QDate and QTime as value classesEdward Welbourne2020-02-276-65/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's what they are, so const refs are needless burden. In the process, consolidate two of the affected methods (one of which just adds another argument to the other's signature) into one. Change-Id: I80de35ffe078a652d1999889dede0b10302abaa9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-2636-123/+204
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
| * | QStyle: deprecate enum values that are marked for removal in Qt 6Volker Hilsheimer2020-02-252-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Those enum values are not used by widget code. Exception is PE_PanelItemViewRow, which is used by all item views, and no replacement is provided. So removing the ### Qt 6 comment from this value. Change-Id: Id4371bda5c3b14e3565c87ab233ee621d995f081 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | QGraphicsView: Clear the rubber band when dragMode changesVolker Hilsheimer2020-02-252-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change, and ongoing rubber-band selection will not be cleared when the dragmode property changes (e.g. because of a key press) which leaves a rubber-band displayed on the view. Move the rubber-band-clearing code from mouseReleaseEvent into a private helper that is then called from setDragMode. Change-Id: I32c15f7fe4ef2b8002ef5dd58e22f4bb30dd2409 Fixes: QTBUG-65186 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-02-2421-57/+74
| |\| | | | | | | | | | Change-Id: Ibe5b4aa249863a54007180f3684dc5ce1b23cb7b
| | * QAbstractItemView: Make sure to update the editor geometriesChristian Ehrlicher2020-02-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractItemView::setIndexWidget() does not trigger a relayouting when a new widget is set. This results in a wrong editor geometry under some circumstances. Fix it by triggering a delayed relayout. Fixes: QTBUG-81763 Change-Id: I75d0e19bd5e56d63effe4990d782d202fb39e3e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>