- Renamed dataProperty -> dataPropertyName because the function returns
variants for the property name.
- Add an enum for the column to remove magic numbers
* TechDraw: Replace annotation edit dialog with QPlainTextEdit
* Remove useless include introduced in previous commit
* Remove trailing _ for members to conform with rest of the codebase
* Add const & to string vectors that don't need copying
* Fix IWYU linter warnings
* Forward all annotation double clicks to the StringList property editor
* Remove unused dialog
* Fix Qt 5 build error
* Fix missing exports with MSVC
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
Convenience helpers function Tools::toStdString and Tools::fromStdString
were implemented for Qt4 or older to perform utf8 aware conversion as
QString::toStdString/QString::fromStdString were using toAscii/fromAscii
internally (see https://dreamswork.github.io/qt4/classQString.html).
Since Qt5 QString uses toUtf8/fromUTf8, which makes the helper functions
obsolete (see https://doc.qt.io/qt-5/qstring.html#fromStdString).
* Gui: Prepare for clang-format
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Based on a discussion in the PR, make the menu such that there is only
one level except for the status flags. This makes showall unambiguous
only meaning that it shows the hidden properties instead of showing all
the hidden properties and all options of the menu. "Show all" has
therefore been renamed to "Show hidden".
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.
The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).
Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".
The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.