Gui: use empty

This commit is contained in:
berniev
2022-08-06 03:13:53 +10:00
committed by wwmayer
parent a00faca147
commit d88729d2c4
33 changed files with 154 additions and 154 deletions

View File

@@ -631,7 +631,7 @@ void PropertyEditor::contextMenuEvent(QContextMenuEvent *) {
continue;
for(auto parent=item;parent;parent=parent->parent()) {
const auto &ps = parent->getPropertyData();
if(ps.size()) {
if(!ps.empty()) {
props.insert(ps.begin(),ps.end());
break;
}
@@ -655,7 +655,7 @@ void PropertyEditor::contextMenuEvent(QContextMenuEvent *) {
}
if(PropertyView::showAll()) {
if(props.size()) {
if(!props.empty()) {
menu.addAction(tr("Add property"))->setData(QVariant(MA_AddProp));
if (std::all_of(props.begin(), props.end(), [](auto prop) {
return prop->testStatus(App::Property::PropDynamic)
@@ -681,7 +681,7 @@ void PropertyEditor::contextMenuEvent(QContextMenuEvent *) {
if(canRemove)
menu.addAction(tr("Remove property"))->setData(QVariant(MA_RemoveProp));
if(props.size()) {
if(!props.empty()) {
menu.addSeparator();
QAction *action;