mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +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)
|
||||
{
|
||||
if (!l) {
|
||||
if (Q_UNLIKELY(!l)) {
|
||||
qWarning("QWidget::setLayout: Cannot set layout to 0");
|
||||
return;
|
||||
}
|
||||
if (layout()) {
|
||||
if (layout() != l)
|
||||
} else if (layout()) {
|
||||
if (Q_UNLIKELY(layout() != l)) {
|
||||
qWarning("QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", which already has a"
|
||||
" layout", l->objectName().toLocal8Bit().data(), metaObject()->className(),
|
||||
objectName().toLocal8Bit().data());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue