| 46 | const auto getIndex = [d, bar](int index) { |
| 47 | return index < 0 ? -1 : index + (bar == d->_tabBar ? d->_pinnedTabBar->count() : 0); |
| 48 | }; |
| 49 | connect(bar, &QTabBar::currentChanged, this, [this, getIndex](int index) { |
| 50 | setCurrentIndex(getIndex(index)); |
| 51 | }); |
| 52 | connect(bar, &QTabBar::tabBarClicked, this, [this, getIndex](int index) { |
| 53 | setCurrentIndex(getIndex(index)); |
| 54 | }); |
| 55 | connect(bar, &QTabBar::tabMoved, this, [this, d, getIndex](int from, int to) { |
| 56 | d->_pages.move(getIndex(from), getIndex(to)); |
| 57 | Q_EMIT tabMoved(getIndex(from), getIndex(to)); |
nothing calls this directly
no outgoing calls
no test coverage detected