summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmdisubwindow.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/widgets/qmdisubwindow.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/widgets/qmdisubwindow.cpp')
-rw-r--r--src/gui/widgets/qmdisubwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/qmdisubwindow.cpp b/src/gui/widgets/qmdisubwindow.cpp
index b366c28..e5cc6b6 100644
--- a/src/gui/widgets/qmdisubwindow.cpp
+++ b/src/gui/widgets/qmdisubwindow.cpp
@@ -1006,7 +1006,7 @@ void QMdiSubWindowPrivate::removeBaseWidget()
Q_Q(QMdiSubWindow);
baseWidget->removeEventFilter(q);
- if (QLayout *layout = q->layout())
+ if (layout)
layout->removeWidget(baseWidget);
if (baseWidget->windowTitle() == q->windowTitle()) {
ignoreWindowTitleChange = true;
@@ -1102,7 +1102,7 @@ void QMdiSubWindowPrivate::updateCursor()
void QMdiSubWindowPrivate::updateDirtyRegions()
{
// No update necessary
- if (!q_func()->parent())
+ if (!parent)
return;
foreach (Operation operation, operationMap.keys())
@@ -2180,17 +2180,17 @@ void QMdiSubWindowPrivate::setSizeGrip(QSizeGrip *newSizeGrip)
if (!newSizeGrip || sizeGrip || q->windowFlags() & Qt::FramelessWindowHint)
return;
- if (q->layout() && q->layout()->indexOf(newSizeGrip) != -1)
+ if (layout && layout->indexOf(newSizeGrip) != -1)
return;
newSizeGrip->setFixedSize(newSizeGrip->sizeHint());
- bool putSizeGripInLayout = q->layout() ? true : false;
+ bool putSizeGripInLayout = layout ? true : false;
#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
if (qobject_cast<QMacStyle *>(q->style()))
putSizeGripInLayout = false;
#endif
if (putSizeGripInLayout) {
- q->layout()->addWidget(newSizeGrip);
- q->layout()->setAlignment(newSizeGrip, Qt::AlignBottom | Qt::AlignRight);
+ layout->addWidget(newSizeGrip);
+ layout->setAlignment(newSizeGrip, Qt::AlignBottom | Qt::AlignRight);
} else {
newSizeGrip->setParent(q);
newSizeGrip->move(q->isLeftToRight() ? q->width() - newSizeGrip->width() : 0,