summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qlayoutitem.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-05-12 15:46:52 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-05-12 19:41:50 (GMT)
commit8a4fbf2edfd88128aeead769adb9842338e09623 (patch)
tree812f90ad481cf00b62187766e5741f869c07e4a9 /src/gui/kernel/qlayoutitem.cpp
parent4ffda2918b3f5c789ef325cdeaac72e5e7ef2c0c (diff)
downloadQt-8a4fbf2edfd88128aeead769adb9842338e09623.zip
Qt-8a4fbf2edfd88128aeead769adb9842338e09623.tar.gz
Qt-8a4fbf2edfd88128aeead769adb9842338e09623.tar.bz2
Cleanup private QWidget functions.
I actually found a few functions that were not even implemented, only declared. Those should obviously not be in the header file. I've also removed a few functions not in use / not belonging to QWidgetPrivate. Reviewed-by: Olivier
Diffstat (limited to 'src/gui/kernel/qlayoutitem.cpp')
-rw-r--r--src/gui/kernel/qlayoutitem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qlayoutitem.cpp b/src/gui/kernel/qlayoutitem.cpp
index 0fd73b8..c70ab2d 100644
--- a/src/gui/kernel/qlayoutitem.cpp
+++ b/src/gui/kernel/qlayoutitem.cpp
@@ -54,7 +54,8 @@ QT_BEGIN_NAMESPACE
inline static QRect fromLayoutItemRect(QWidgetPrivate *priv, const QRect &rect)
{
- return priv->fromOrToLayoutItemRect(rect, -1);
+ return rect.adjusted(priv->leftLayoutItemMargin, priv->topLayoutItemMargin,
+ -priv->rightLayoutItemMargin, -priv->bottomLayoutItemMargin);
}
inline static QSize fromLayoutItemSize(QWidgetPrivate *priv, const QSize &size)
@@ -64,7 +65,8 @@ inline static QSize fromLayoutItemSize(QWidgetPrivate *priv, const QSize &size)
inline static QRect toLayoutItemRect(QWidgetPrivate *priv, const QRect &rect)
{
- return priv->fromOrToLayoutItemRect(rect, +1);
+ return rect.adjusted(-priv->leftLayoutItemMargin, -priv->topLayoutItemMargin,
+ priv->rightLayoutItemMargin, priv->bottomLayoutItemMargin);
}
inline static QSize toLayoutItemSize(QWidgetPrivate *priv, const QSize &size)