mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
mark the warning cases in QWidget::setLayout() as unlikely
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
0e491f6163
commit
a011a29d7c
1 changed files with 4 additions and 4 deletions
|
@ -8239,15 +8239,15 @@ QLayout *QWidget::layout() const
|
||||||
|
|
||||||
void QWidget::setLayout(QLayout *l)
|
void QWidget::setLayout(QLayout *l)
|
||||||
{
|
{
|
||||||
if (!l) {
|
if (Q_UNLIKELY(!l)) {
|
||||||
qWarning("QWidget::setLayout: Cannot set layout to 0");
|
qWarning("QWidget::setLayout: Cannot set layout to 0");
|
||||||
return;
|
return;
|
||||||
}
|
} else if (layout()) {
|
||||||
if (layout()) {
|
if (Q_UNLIKELY(layout() != l)) {
|
||||||
if (layout() != l)
|
|
||||||
qWarning("QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", which already has a"
|
qWarning("QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", which already has a"
|
||||||
" layout", l->objectName().toLocal8Bit().data(), metaObject()->className(),
|
" layout", l->objectName().toLocal8Bit().data(), metaObject()->className(),
|
||||||
objectName().toLocal8Bit().data());
|
objectName().toLocal8Bit().data());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue