summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Migrate Windows system libs to external dependenciesJoerg Bornemann2019-05-081-1/+4
| | | | | | Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix notification of QDockWidget when it gets undockedDmitry Kazakov2019-05-071-0/+2
| | | | | | | | | | | Before the patch the notification was emitted only when the docker was attached to the panel or changed a position on it. It looks like the old behavior was documented in a unittest, so this patch might actually be a "behavior change". Change-Id: Id3ffbd2018a8e68844d174328dd1c4ceb7fa01d3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Deprecate conversion functions between QList and QSetLars Knoll2019-05-076-11/+11
| | | | | | | | | | Users should use range constructors instead to do the conversion. Keep conversion methods between QList and QVector as these will turn into a no-op in Qt 6, whereas forcing people to use range constructors would lead to deep copies of the data. Change-Id: Id9fc9e4d007044e019826da523e8418857c91283 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-076-15/+42
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qvariant.h src/corelib/tools/qlist.h Done-With: Milian Wolff <milian.wolff@kdab.com> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-063-1/+9
| |\ | | | | | | | | | Change-Id: Iaad9509712c848ed42ada2c25065162a6fc5a930
| | * fix compilation with various -no-feature-* optionsNick Shaforostov2019-05-053-1/+9
| | | | | | | | | | | | | | | Change-Id: Ic1975db497613e3efe50be4246c167efe10d8e31 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-032-14/+10
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/pcre2/qt_attribution.json Change-Id: Ibae941cb12662f27bd6962ee02bc235971c59a15
| | * Reduce amount of tracepoints required for event trackingMilian Wolff2019-05-022-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Encode the consumed/filtered state in the _exit tracepoint and remove the separate tracking of receiver event handling. Combined, this reduces the size of the trace file. Change-Id: Icb3cb2dd47798543905cea450046d6fad559a15b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-021-1/+1
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I8ca1163a1fa8072dcd16ea4426c58219149599fd
| | * Don't pass scope args to _exit trace pointsMilian Wolff2019-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we trace a scope, then we pass the scope args to the _entry trace point. There is no need to do that also for the _exit trace points, it just blows up the trace data for no obvious gain. Any decent tracing consumer can easily find the args for the _exit call by matching it to its _entry call. Note that this is standard practice in trace points, and also done like this in the Linux Kernel trace points for example. Change-Id: I273293b0c7e799767acc1960b50ab675fc765a36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix -Wdeprecated-copy warningsAllan Sandfeld Jensen2019-05-011-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit copy constructors or methods are considered deprecated for classes that has one of the two or a destructor. The warning is enabled with -Wextra in gcc 9 Change-Id: Ic9be654f2a142fb186a4d5a7d6b4f7d6f4e611d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix API for Qt 6Lars Knoll2019-05-021-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic07b5cf09ed410a27ca95f106747f98de4d86d68 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Prefix textstream operators with Qt::Lars Knoll2019-05-023-7/+7
| | | | | | | | | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Remove handling of missing =delete and =default supportAllan Sandfeld Jensen2019-05-022-2/+2
| | | | | | | | | | | | | | | Change-Id: I006dfd0b7cfa3bda5e5ab01bcefa851f031dfe0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QTextMarkdownWriter, QTextEdit::markdown property etc.Shawn Rutledge2019-05-014-7/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QTextDocument can now be written out in Markdown format. - Add the QTextMarkdownWriter as a private class for now - Add QTextDocument::toMarkdown() - QTextDocumentWriter uses QTextMarkdownWriter if setFormat("markdown") is called or if the file suffix is .md or .mkd - Add QTextEdit::toMarkdown() and the markdown property [ChangeLog][QtGui][Text] Markdown (CommonMark or GitHub dialect) is now a supported format for reading into and writing from QTextDocument. Change-Id: I663a77017fac7ae1b3f9a400f5cd357bb40750af Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | QtBase: introduce QT_DEPRECATED_VERSION/QT_DEPRECATED_VERSION_XChristian Ehrlicher2019-04-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_DEPRECATED_VERSION(major, minor) and QT_DEPRECATED_VERSION_X(major, minor, text) outputs a deprecation warning if QT_DEPRECATED_WARNINGS_SINCE is equal or greater than the version specified as major, minor. This allows the user to hide deprecation warnings which can't yet be fixed for their codebase because the minimum required Qt version does not provide the replacement function. If QT_DEPRECATED_WARNINGS_SINCE is not set by the user, it's set to QT_DISABLE_DEPRECATED_BEFORE if available, otherwise to QT_VERSION. [ChangeLog][QtCore][QtGlobal] Add new macros QT_DEPRECATED_VERSION and QT_DEPRECATED_VERSION_X to conditionally display deprecation warnings Change-Id: I61b1a7624c9b870695c9e3274313de636f804b5d Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | | Add startOfDay() and endOfDay() methods to QDateEdward Welbourne2019-04-242-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods give the first and last QDateTime values in the given day, for a given time-zone or time-spec. These are usually the relevant midnight, or the millisecond before, except when time-zone transitions (typically DST changes) skip it, when care is needed to select the right moment. Adapted some code to make use of the new API, eliminating some old cruft from qdatetimeparser_p.h in the process. [ChangeLog][QtCore][QDate] Added startOfDay() and endOfDay() methods to provide a QDateTime at the start and end of a given date, taking account of any time skipped by transitions, e.g. a DST spring-forward, which can lead to a day starting at 01:00 or ending just before 23:00. Task-number: QTBUG-64485 Change-Id: I3dd7a34bedfbec8f8af00c43d13f50f99346ecd0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-2411-47/+118
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/util/qshaderformat.cpp src/gui/util/qshaderformat_p.h src/widgets/graphicsview/qgraphicsitem_p.h Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-242-22/+57
| |\| | | | | | | | | | Change-Id: I26da00aa71b0f0b91c9bfb4a9e8550345ee62875
| | * QSystemTrayIcon/X11: Create tray icon window when system tray appearsAlexander Volkov2019-04-232-22/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and destroy it otherwise. Fixes: QTBUG-61898 Fixes: QTBUG-73459 Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I6bd8f397f7ccdb123f6a60d4fa466f7b0d760dfc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | QListWidgetItem constructors: don't emit dataChanged(invalid, invalid)David Faure2019-04-231-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression introduced by 63967313f57add which blocked signals on the view, but not on the model. Change-Id: Ib2f93fe6ef842264aaba200c98ee4a19065ca220 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| * | QHeaderView: fix assert when restoring section sizes over less columnsDavid Faure2019-04-231-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If columns are removed and we get notified via layoutChanged, the code tries to restore old section sizes, and went out of bounds, leading to an assert in QVector. Simply add an if() to skip restoring out-of-bounds columns. This comes from https://bugs.kde.org/show_bug.cgi?id=395181, which translates into the unittest that is part of this commit. Change-Id: Ide42176a758f87b21957c40508127d67f1d5a2d9 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-167-16/+46
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale.qdoc tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
| | * QStyleSheetStyle::repolish: only run on direct childrenFrederik Gladhorn2019-04-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When re-parenting, some widgets change their children. For example QLabel, when set to rich text, will not update, until receiving a polish call, at which time getting a list of all children recursively and then trying to call functions on them will crash, since the children change in the middle of this operation. Fixes: QTBUG-69204 Fixes: QTBUG-74667 Change-Id: I95dd83ebeed14c017e22552ddd47658ae8a09353 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Fix effects for highdpi graphical itemsAlexander Volkov2019-04-103-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | Create a highdpi pixmap as a source for graphical effects. Fixes: QTBUG-74963 Change-Id: Ie144df3dbe61421fb28e639e640857aca6e6320f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Doc: Note Q[Plain]TextEdit keeping formatting in some casesKai Koehne2019-04-102-8/+31
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-72427 Change-Id: Ifddabb175c480b64282bd8c8fdb9edab4c7ecf44 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | * Fix context loss in QOpenGLWidget upon tlw change with AA_ShareOpenGLContextsLaszlo Agocs2019-04-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic introduced in 2ea90c56 has an issue: it resets (destroy the context and co.) upong TLW change even when AA_ShareOpenGLContexts is set, and that is just wrong and goes against what the docs claim. Fixes: QTBUG-74307 Change-Id: Ib519045c1d9842664cbe602d4e6425660cf638b5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | QRegExp include cleanupSamuel Gaist2019-04-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp includes can be found in several files where there's not even a use of the class. This patch aims to avoid needless includes as well as follow the "include only what you use" moto. This patch removes a QRegExp include from the QStringList header which means that there is likely going to be code breaking since QStringList is used in many places and would get QRegExp in. [ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no longer includes qregexp.h. Change-Id: I32847532f16e419d4cb735ddc11a26551127e923 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QTextMarkdownImporterShawn Rutledge2019-04-175-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides the ability to read from a Markdown string or file into a QTextDocument, such that the formatting will be recognized and can be rendered. - Add QTextDocument::setMarkdown(QString) - Add QTextEdit::setMarkdown(QString) - Add TextFormat::MarkdownText - QWidgetTextControl::setContent() calls QTextDocument::setMarkdown() if that's the format Fixes: QTBUG-72349 Change-Id: Ief2ad71bf840666c64145d58e9ca71d05fad5659 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-116-48/+31
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyle_p.h Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09
| * | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into ↵Liang Qi2019-04-106-48/+31
| |\ \ | | | | | | | | | | | | refs/staging/5.13
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-106-48/+31
| | |\| | | | | | | | | | | | | Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
| | | * QTableView: don't draw additional grid lines top and leftChristian Ehrlicher2019-04-091-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTableView drew additional grid lines on the top and left side when the corresponding header was not visible and the ScrollMode was ScrollPerItem. After 8f2bacea41443af8564ff78f284016b6615a001b they were also drawn for ScrolPerPixel for consistency. But they are not needed at all and only create visual artifacts. Therefore remove the drawing of the additional lines completely. Fixes: QTBUG-74706 Change-Id: I5c77d53a2eeefab9b9bfe0efea6439f5afede4ac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | * QTableView: fix Ctrl+End behavior with disabled columnsChristian Ehrlicher2019-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ctrl+End moves the visual index to the bottom left index. This does not work correctly when the item in the bottom left is disabled. It should be fixed with 7863be311570fa219066df5fe8720d5b92ddb680 but does not due to a typo. Fix the typo by using the newly calculated visualColumn instead the initial column. There are cases where the algorithm still does not work as expected when there are more disabled items but fixing them would add a lot of complexity with no (much) gain. Fixes: QTBUG-72400 Change-Id: Ie90f6b3e41e00f54e826c2b4e7303e85ac1e4115 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * QMenu/QComboBox: Extract helper for determining the pop up geometryFriedemann Kleint2019-04-085-24/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code returning whether a popup should use the full screen to QStylePrivate and use for QMenu and QComboBox. Task-number: QTBUG-73231 Change-Id: I1901ecedfa90edf16329ce3b13ef4abea5ab44e8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-104-34/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/gui/image/qpnghandler.cpp Change-Id: Ied79d02912ffb3a307a99483df7db08c7f9d0cd8
| * | | Update precompiled headersAllan Sandfeld Jensen2019-04-091-31/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | Include many headers that are commonly used now, and avoid listing them twice. Change-Id: I679dc24cff2cb3a3c9c18585ec78007ab3550743 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-091-2/+0
| |\| | | | | | | | | | Change-Id: I05d14a40e17554691bad369d0363e88413afd9b3
| | * Merge remote-tracking branch 'origin/5.12.3' into 5.12Qt Forward Merge Bot2019-04-081-2/+0
| | |\ | | | | | | | | | | | | Change-Id: Id60d508c0f25fd5e67be07daafd2d4c56ae73934
| | | * Drag'n'Drop: fix dnd regressionGatis Paeglis2019-03-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DragEnter events always should start with the default state, which is accepted = false. This was a copy-and-paste error introduced by f8944a7f07112c85dc4f66848cabb490514cd28e. Fixes: QTBUG-73977 Change-Id: I34b3ea97c9b4f4fc040a9e6f1befd6124533361d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-062-1/+8
| |\| | | | | | | | | | | | | | Change-Id: Iec860bb703f983b7438e67c695b9c454e72b3e0f
| | * | Add missing _exit tracepoints for event handlingMilian Wolff2019-04-052-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows tools that look for matching `foo_entry/exit` pairs in the trace data to work properly. An unmatched `_entry` would otherwise confuse them, making them think that the call stack is continuously increasing. Change-Id: Idff7f587ea25c46ec86ad623cc82d503db34a194 Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Forward declare all types required for compilation with `-trace`Milian Wolff2019-04-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes compilation with `-trace lttng` or `-trace etw`. We need to forward declare QEvent, QImageReader etc., otherwise the types will be unknown while compiling the trace points. In order to handle this generically, the tracegen utility is extended to support a 'prefix text' in the `*.tracepoints` input files. Any text within curly braces will be embedded as-is in the generated file. This can then be used to add forward declarations for the types we need, including potential namespaces and such. Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
* | | | QFileDialog (widgets-based): Remember selection in historyFriedemann Kleint2019-04-092-11/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the history by a persistent model index list reflecting the selection. [ChangeLog][QtWidgets][QFileDialog] The widgets-based dialog now remembers the selected files when navigating the history Fixes: QTBUG-71415 Change-Id: I86774439be070c1b922acd0e9a27d029f02f68d3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | QStyle/QWidget: Avoid repetitive invocation of QStyleHelper::dpiScaled()Friedemann Kleint2019-04-083-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the result of QStyleHelper::dpiScaled() or functions dependent on it in a variable, preparing the addition of a DPI parameter. Task-number: QTBUG-45055 Change-Id: Ic70d65b590793c29a4b1f7a7a5312dd169517fc5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Replace qMove with std::moveAllan Sandfeld Jensen2019-04-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-061-2/+0
|\| | | | | | | | | | | | | | | Change-Id: Ib7c4fc52915b5e6c72b9aa262fb59f2a041dccd7
| * | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-051-2/+0
| |\| | | | | | | | | | | | | | Change-Id: I010a6322d12e038fdce247a58dfb05e204c2ff3b
| | * | Remove superfluous inclusion of qtwidgets-config.priJoerg Bornemann2019-04-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Every module already includes its own config. Change-Id: I1ef630092f61f118d79dc9b39ce38f4bdea14f43 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | | Windows code: Replace deprecated QVariant APIFriedemann Kleint2019-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-74043 Change-Id: I6f5f47b74830597eec74e2582e24d2d7dd235a80 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>