summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qundostack.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QUndoStack: fix two Coverity COPY_INSTEAD_OF_MOVE warningsMarc Mutz2025-10-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | Coverity complained that, since the ActionState struct contains a QString, a copy is expensive while a move is possible. Make it so. To avoid explicit std::move() far away from the end of the scope (which impairs readability), use C++17 if-with-initializer to reduce the scope of the newX ActionState objects. This is a drive-by, since to move from them, we need to de-const the variables, anyway. Amends 31b0dadb0f371fc94652782c28024f135a0b6f4b. Pick-to: 6.10 6.8 Coverity-Id: 896353 Coverity-Id: 896351 Task-number: QTBUG-138567 Change-Id: Id365d9bd91773452d16634a3b862f3d23ad650b9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Ali Kianian <ali.kianian@qt.io>
* QUndoStack: Notify changes when the command is obsolete within redoAli Kianian2025-10-111-5/+18
| | | | | | | | | | | | If a command gets obsolete within the redo method, the index is not changed, but the status of canRedo, canUndo, redoText, and undoText might change. We should report them when any of these changes are met. Fixes: QTBUG-138567 Pick-to: 6.10 6.8 Change-Id: I172a4e0e3df3a3bc40ac6757d79dde7b376ee96a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add security headers for src/gui/tools/Paul Olav Tvete2025-09-221-0/+1
| | | | | | | | | | | | As defined in QUIP 23, security critical files should be marked with Qt-Security score:critical. This change also marks all non-critical files as significant (the default) to make it clear that all files have been considered. Fixes: QTBUG-134618 Pick-to: 6.10 6.9 6.8 Change-Id: Iecdc4ffd745116a9a8674acfd5d36b5948dcbaa3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtGui: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-131-2/+2
| | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: I308d86cefcbfd126929b68f9a853d420840c965f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Doc: fix \inmodule for classes moved to QtGuiv6.0.0-beta4Volker Hilsheimer2020-11-091-2/+2
| | | | | Change-Id: If7a42dde8c728356e0e5646743a1425b08fccbcb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move undo framework out of Qt WidgetsMitch Curtis2020-03-301-0/+1390
| | | | | | | | | | | | | | | - Moves QUndo* classes (except QUndoView) from src/widgets/utils to src/gui/utils - Moves related auto tests from widgets to gui - Replaces QUndoAction with lambdas that do text prefixing [ChangeLog][Undo Framework] QUndo* classes (except QUndoView) were moved from Qt Widgets to Qt GUI. Done-with: volker.hilsheimer@qt.io Fixes: QTBUG-40040 Change-Id: I3bd8d4d32c64f8dee548f62159a1df2126da89d8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* library splitLars Knoll2011-05-071-1127/+0
|
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+1127
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12