summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtoolbar.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/qtoolbar.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/qtoolbar.cpp')
-rw-r--r--src/gui/widgets/qtoolbar.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp
index d765794..20f2c23 100644
--- a/src/gui/widgets/qtoolbar.cpp
+++ b/src/gui/widgets/qtoolbar.cpp
@@ -198,7 +198,7 @@ void QToolBarPrivate::initDrag(const QPoint &pos)
if (state != 0)
return;
- QMainWindow *win = qobject_cast<QMainWindow*>(q->parentWidget());
+ QMainWindow *win = qobject_cast<QMainWindow*>(parent);
Q_ASSERT(win != 0);
QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout());
Q_ASSERT(layout != 0);
@@ -224,7 +224,7 @@ void QToolBarPrivate::startDrag(bool moving)
if ((moving && state->moving) || state->dragging)
return;
- QMainWindow *win = qobject_cast<QMainWindow*>(q->parentWidget());
+ QMainWindow *win = qobject_cast<QMainWindow*>(parent);
Q_ASSERT(win != 0);
QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout());
Q_ASSERT(layout != 0);
@@ -283,7 +283,7 @@ bool QToolBarPrivate::mousePressEvent(QMouseEvent *event)
// drag between toolbar contents to move the window. Make this work by
// implementing the standard mouse-dragging code and then call
// window->move() in mouseMoveEvent below.
- if (QMainWindow *mainWindow = qobject_cast<QMainWindow *>(q->parentWidget())) {
+ if (QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parent)) {
if (mainWindow->toolBarArea(q) == Qt::TopToolBarArea
&& mainWindow->unifiedTitleAndToolBarOnMac()
&& q->childAt(event->pos()) == 0) {
@@ -337,7 +337,7 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event)
return false;
}
- QMainWindow *win = qobject_cast<QMainWindow*>(q->parentWidget());
+ QMainWindow *win = qobject_cast<QMainWindow*>(parent);
if (win == 0)
return true;