Refactoring of signal/slots connection to new qt syntax

This commit is contained in:
Blue 2019-11-03 21:46:40 +03:00
parent 9d491e9e93
commit 0b57e6a77f
16 changed files with 81 additions and 83 deletions

View file

@ -32,7 +32,7 @@ Models::Group::~Group()
void Models::Group::appendChild(Models::Item* child)
{
Item::appendChild(child);
connect(child, SIGNAL(childChanged(Models::Item*, int, int)), this, SLOT(refresh()));
connect(child, &Item::childChanged, this, &Group::refresh);
changed(1);
refresh();
}
@ -59,7 +59,7 @@ QVariant Models::Group::data(int column) const
void Models::Group::_removeChild(int index)
{
Item* child = childItems[index];
disconnect(child, SIGNAL(childChanged(Models::Item*, int, int)), this, SLOT(refresh()));
disconnect(child, &Item::childChanged, this, &Group::refresh);
Item::_removeChild(index);
changed(1);
refresh();