summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qmessagebox.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-06-11 08:51:54 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-06-11 14:07:01 (GMT)
commit0f60b6e05a707630e02655c60ae60884262a4b8e (patch)
tree564982f5dc6a2266818e050b2576ef4f5e74eaf5 /src/gui/dialogs/qmessagebox.cpp
parentf0a4a37a5182660580fd361110d3fd51463221d8 (diff)
downloadQt-0f60b6e05a707630e02655c60ae60884262a4b8e.zip
Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.tar.gz
Qt-0f60b6e05a707630e02655c60ae60884262a4b8e.tar.bz2
remove q->layout() and q->parentWidget() code where unnecessary
Diffstat (limited to 'src/gui/dialogs/qmessagebox.cpp')
-rw-r--r--src/gui/dialogs/qmessagebox.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index 648cda8..c526c7d 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -258,10 +258,8 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
int QMessageBoxPrivate::layoutMinimumWidth()
{
- Q_Q(QMessageBox);
-
- q->layout()->activate();
- return q->layout()->totalMinimumSize().width();
+ layout->activate();
+ return layout->totalMinimumSize().width();
}
void QMessageBoxPrivate::updateSize()
@@ -339,10 +337,10 @@ void QMessageBoxPrivate::updateSize()
if (windowTitleWidth > width)
width = windowTitleWidth;
- q->layout()->activate();
- int height = (q->layout()->hasHeightForWidth())
- ? q->layout()->totalHeightForWidth(width)
- : q->layout()->totalMinimumSize().height();
+ layout->activate();
+ int height = (layout->hasHeightForWidth())
+ ? layout->totalHeightForWidth(width)
+ : layout->totalMinimumSize().height();
q->setFixedSize(width, height);
QCoreApplication::removePostedEvents(q, QEvent::LayoutRequest);
}