summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qboxlayout.cpp6
-rw-r--r--src/widgets/kernel/qdesktopwidget.qdoc8
-rw-r--r--src/widgets/kernel/qgesture.cpp2
-rw-r--r--src/widgets/kernel/qlayout.cpp2
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp34
-rw-r--r--src/widgets/kernel/qwidget.cpp4
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp2
-rw-r--r--src/widgets/kernel/qwidgetaction.h4
-rw-r--r--src/widgets/kernel/qwidgetaction_p.h2
9 files changed, 32 insertions, 32 deletions
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp
index c3661f5c50..3fed14cd4f 100644
--- a/src/widgets/kernel/qboxlayout.cpp
+++ b/src/widgets/kernel/qboxlayout.cpp
@@ -248,7 +248,7 @@ void QBoxLayoutPrivate::effectiveMargins(int *left, int *top, int *right, int *b
if (right)
r = qMax(r, wr.right() - lir.right());
}
- }
+ }
}
#endif
if (left)
@@ -509,7 +509,7 @@ void QBoxLayoutPrivate::calcHfw(int w)
\list
\li setContentsMargins() sets the width of the outer border on
- each side of the widget. This is the width of the reserved space
+ each side of the widget. This is the width of the reserved space
along each of the QBoxLayout's four sides.
\li setSpacing() sets the width between neighboring boxes. (You
can use addSpacing() to get more space at a particular spot.)
@@ -595,7 +595,7 @@ int QBoxLayout::spacing() const
/*!
Reimplements QLayout::setSpacing(). Sets the spacing
- property to \a spacing.
+ property to \a spacing.
\sa QLayout::setSpacing(), spacing()
*/
diff --git a/src/widgets/kernel/qdesktopwidget.qdoc b/src/widgets/kernel/qdesktopwidget.qdoc
index 15ddd3b32f..789a812afb 100644
--- a/src/widgets/kernel/qdesktopwidget.qdoc
+++ b/src/widgets/kernel/qdesktopwidget.qdoc
@@ -120,9 +120,9 @@
/*!
\fn int QDesktopWidget::numScreens() const
-
+
Returns the number of available screens.
-
+
\obsolete
This function is deprecated. Use screenCount instead.
@@ -239,7 +239,7 @@
\brief the number of screens currently available on the system.
\since 4.6
-
+
\sa screenCountChanged()
*/
@@ -265,6 +265,6 @@
\since 4.6
This signal is emitted when the number of screens changes to \a newCount.
-
+
\sa screenCount
*/
diff --git a/src/widgets/kernel/qgesture.cpp b/src/widgets/kernel/qgesture.cpp
index 24ae437b48..2767bd9924 100644
--- a/src/widgets/kernel/qgesture.cpp
+++ b/src/widgets/kernel/qgesture.cpp
@@ -367,7 +367,7 @@ void QPanGesture::setAcceleration(qreal value)
/*!
\enum QPinchGesture::ChangeFlag
-
+
This enum describes the changes that can occur to the properties of
the gesture object.
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index 493a04d2ba..c32eddd148 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -1270,7 +1270,7 @@ QRect QLayout::alignmentRect(const QRect &r) const
Removes the widget \a widget from the layout. After this call, it
is the caller's responsibility to give the widget a reasonable
geometry or to put the widget back into a layout.
-
+
\b{Note:} The ownership of \a widget remains the same as
when it was added.
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 31276d015d..6524d8f2b8 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -150,7 +150,7 @@ QSizePolicy::operator QVariant() const
\brief The QWidgetItem class is a layout item that represents a widget.
\inmodule QtWidgets
-
+
Normally, you don't need to use this class directly. Qt's
built-in layout managers provide the following functions for
manipulating widgets in layouts:
@@ -446,20 +446,20 @@ void QWidgetItem::setGeometry(const QRect &rect)
QRect r = !wid->testAttribute(Qt::WA_LayoutUsesWidgetRect)
? fromLayoutItemRect(wid->d_func(), rect)
: rect;
- const QSize widgetRectSurplus = r.size() - rect.size();
-
- /*
- For historical reasons, this code is done using widget rect
- coordinates, not layout item rect coordinates. However,
- QWidgetItem's sizeHint(), maximumSize(), and heightForWidth()
- all work in terms of layout item rect coordinates, so we have to
- add or subtract widgetRectSurplus here and there. The code could
- be much simpler if we did everything using layout item rect
- coordinates and did the conversion right before the call to
- QWidget::setGeometry().
- */
-
- QSize s = r.size().boundedTo(maximumSize() + widgetRectSurplus);
+ const QSize widgetRectSurplus = r.size() - rect.size();
+
+ /*
+ For historical reasons, this code is done using widget rect
+ coordinates, not layout item rect coordinates. However,
+ QWidgetItem's sizeHint(), maximumSize(), and heightForWidth()
+ all work in terms of layout item rect coordinates, so we have to
+ add or subtract widgetRectSurplus here and there. The code could
+ be much simpler if we did everything using layout item rect
+ coordinates and did the conversion right before the call to
+ QWidget::setGeometry().
+ */
+
+ QSize s = r.size().boundedTo(maximumSize() + widgetRectSurplus);
int x = r.x();
int y = r.y();
if (align & (Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask)) {
@@ -474,8 +474,8 @@ void QWidgetItem::setGeometry(const QRect &rect)
s.setWidth(qMin(s.width(), pref.width()));
if (align & Qt::AlignVertical_Mask) {
if (hasHeightForWidth())
- s.setHeight(qMin(s.height(),
- heightForWidth(s.width() - widgetRectSurplus.width())
+ s.setHeight(qMin(s.height(),
+ heightForWidth(s.width() - widgetRectSurplus.width())
+ widgetRectSurplus.height()));
else
s.setHeight(qMin(s.height(), pref.height()));
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 7840cddd5d..39cbe1da3f 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -678,7 +678,7 @@ void QWidget::setAutoFillBackground(bool enabled)
(to move the keyboard focus), and passes on most of the other events to
one of the more specialized handlers above.
- Events and the mechanism used to deliver them are covered in
+ Events and the mechanism used to deliver them are covered in
\l{The Event System}.
\section1 Groups of Functions and Properties
@@ -9284,7 +9284,7 @@ int QWidget::heightForWidth(int w) const
\since 5.0
Returns true if the widget's preferred height depends on its width; otherwise returns false.
-*/
+*/
bool QWidget::hasHeightForWidth() const
{
Q_D(const QWidget);
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index b65ce29b84..43a49e52f9 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -1033,6 +1033,6 @@ void qt_qpa_set_cursor(QWidget *w, bool force)
unsetCursor(nativeParent);
}
}
-#endif //QT_NO_CURSOR
+#endif //QT_NO_CURSOR
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qwidgetaction.h b/src/widgets/kernel/qwidgetaction.h
index 3956445bc8..93c0898197 100644
--- a/src/widgets/kernel/qwidgetaction.h
+++ b/src/widgets/kernel/qwidgetaction.h
@@ -59,13 +59,13 @@ class Q_WIDGETS_EXPORT QWidgetAction : public QAction
public:
explicit QWidgetAction(QObject *parent);
virtual ~QWidgetAction();
-
+
void setDefaultWidget(QWidget *w);
QWidget *defaultWidget() const;
QWidget *requestWidget(QWidget *parent);
void releaseWidget(QWidget *widget);
-
+
protected:
virtual bool event(QEvent *);
virtual bool eventFilter(QObject *, QEvent *);
diff --git a/src/widgets/kernel/qwidgetaction_p.h b/src/widgets/kernel/qwidgetaction_p.h
index a95fe07534..2fc5dcd86c 100644
--- a/src/widgets/kernel/qwidgetaction_p.h
+++ b/src/widgets/kernel/qwidgetaction_p.h
@@ -66,7 +66,7 @@ public:
QList<QWidget *> createdWidgets;
uint defaultWidgetInUse : 1;
uint autoCreated : 1; // created by QToolBar::addWidget and the like
-
+
inline void _q_widgetDestroyed(QObject *o) {
createdWidgets.removeAll(static_cast<QWidget *>(o));
}