Skip to content

Commit fec9d2a

Browse files
committed
Use more compact syntax in button overlay code
1 parent 4baaa02 commit fec9d2a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

widgets/buttonoverlay.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,7 @@ void ButtonOverlay::showInfo()
392392
{
393393
if (lineEditForWidget()) {
394394
if (auto *const infoAction = static_cast<QAction *>(m_infoButtonOrAction)) {
395-
const auto pos = QCursor::pos();
396-
if (!pos.isNull()) {
395+
if (const auto pos = QCursor::pos(); !pos.isNull()) {
397396
QToolTip::showText(pos, infoAction->toolTip(), m_widget);
398397
}
399398
}

0 commit comments

Comments
 (0)