Readability: Rename Item::guest() and Item::widget()

Their name wasn't matching their return value
This commit is contained in:
Sergio Martins
2020-05-24 20:52:23 +01:00
parent 45f4d9f6a8
commit ab90da3b19
6 changed files with 33 additions and 33 deletions

View File

@@ -62,7 +62,7 @@ Frame *DropArea::frameContainingPos(QPoint globalPos) const
{
const Layouting::Item::List &items = m_layout->items();
for (Layouting::Item *item : items) {
auto frame = static_cast<Frame*>(item->widget());
auto frame = static_cast<Frame*>(item->guestAsQObject());
if (!frame || !frame->QWidget::isVisible()) {
continue;
}
@@ -76,7 +76,7 @@ Frame *DropArea::frameContainingPos(QPoint globalPos) const
Layouting::Item *DropArea::centralFrame() const
{
for (Layouting::Item *item : m_layout->items()) {
if (auto f = static_cast<Frame*>(item->widget())) {
if (auto f = static_cast<Frame*>(item->guestAsQObject())) {
if (f->isCentralFrame())
return item;
}