summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget_p.h')
-rw-r--r--src/widgets/kernel/qwidget_p.h60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index 85e1cf93d6..5b99809961 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtWidgets module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -177,7 +177,7 @@ struct QTLWExtra {
uint embedded : 1;
// *************************** Platform specific values (bit fields first) **********
-#if defined(Q_WS_X11) // <----------------------------------------------------------- X11
+#if defined(Q_DEAD_CODE_FROM_QT4_X11) // <----------------------------------------------------------- X11
uint spont_unmapped: 1; // window was spontaneously unmapped
uint dnd : 1; // DND properties installed
uint validWMState : 1; // is WM_STATE valid?
@@ -191,11 +191,11 @@ struct QTLWExtra {
qint32 newCounterValueHi;
quint32 newCounterValueLo;
#endif
-#elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
+#elif defined(Q_DEAD_CODE_FROM_QT4_WIN) // <--------------------------------------------------------- WIN
uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered.
HICON winIconBig; // internal big Windows icon
HICON winIconSmall; // internal small Windows icon
-#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
+#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <--------------------------------------------------------- MAC
uint resizer : 4;
uint isSetGeometry : 1;
uint isMove : 1;
@@ -253,15 +253,15 @@ struct QWExtra {
uint hasWindowContainer : 1;
// *************************** Platform specific values (bit fields first) **********
-#if defined(Q_WS_WIN) // <----------------------------------------------------------- WIN
+#if defined(Q_DEAD_CODE_FROM_QT4_WIN) // <----------------------------------------------------------- WIN
#ifndef QT_NO_DRAGANDDROP
QOleDropTarget *dropTarget; // drop target
QList<QPointer<QWidget> > oleDropWidgets;
#endif
-#elif defined(Q_WS_X11) // <--------------------------------------------------------- X11
+#elif defined(Q_DEAD_CODE_FROM_QT4_X11) // <--------------------------------------------------------- X11
uint compress_events : 1;
WId xDndProxy; // XDND forwarding to embedded windows
-#elif defined(Q_WS_MAC) // <------------------------------------------------------ MAC
+#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <------------------------------------------------------ MAC
// Cocoa Mask stuff
QImage maskBits;
CGImageRef imageMask;
@@ -612,10 +612,10 @@ public:
{ return p + data.wrect.topLeft(); }
inline QRect mapToWS(const QRect &r) const
- { QRect rr(r); rr.translate(-data.wrect.topLeft()); return rr; }
+ { return r.translated(-data.wrect.topLeft()); }
inline QRect mapFromWS(const QRect &r) const
- { QRect rr(r); rr.translate(data.wrect.topLeft()); return rr; }
+ { return r.translated(data.wrect.topLeft()); }
QOpenGLContext *shareContext() const;
@@ -653,6 +653,8 @@ public:
virtual void resolveSamples() { }
#endif
+ static void setWidgetParentHelper(QObject *widgetAsObject, QObject *newParent);
+
// Variables.
// Regular pointers (keep them together to avoid gaps on 64 bit architectures).
QWExtra *extra;
@@ -743,7 +745,7 @@ public:
#if defined(Q_OS_WIN)
uint noPaintOnScreen : 1; // see qwidget.cpp ::paintEngine()
#endif
-#if defined(Q_WS_X11) // <----------------------------------------------------------- X11
+#if defined(Q_DEAD_CODE_FROM_QT4_X11) // <----------------------------------------------------------- X11
Qt::HANDLE picture;
static QWidget *mouseGrabber;
static QWidget *keyboardGrabber;
@@ -756,7 +758,7 @@ public:
void updateX11AcceptFocus();
QPoint mapToGlobal(const QPoint &pos) const;
QPoint mapFromGlobal(const QPoint &pos) const;
-#elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
+#elif defined(Q_DEAD_CODE_FROM_QT4_WIN) // <--------------------------------------------------------- WIN
#ifndef QT_NO_GESTURES
uint nativeGesturePanEnabled : 1;
#endif
@@ -772,7 +774,7 @@ public:
void winSetupGestures();
#elif defined(Q_OS_MAC) // <--------------------------------------------------------- MAC
void macUpdateSizeAttribute();
-#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC (old stuff)
+#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <--------------------------------------------------------- MAC (old stuff)
// This is new stuff
uint needWindowChange : 1;
@@ -874,26 +876,26 @@ public:
: QGraphicsEffectSourcePrivate(), m_widget(widget), context(0), updateDueToGraphicsEffect(false)
{}
- inline void detach()
+ void detach() Q_DECL_OVERRIDE
{ m_widget->d_func()->graphicsEffect = 0; }
- inline const QGraphicsItem *graphicsItem() const
+ const QGraphicsItem *graphicsItem() const Q_DECL_OVERRIDE
{ return 0; }
- inline const QWidget *widget() const
+ const QWidget *widget() const Q_DECL_OVERRIDE
{ return m_widget; }
- inline void update()
+ void update() Q_DECL_OVERRIDE
{
updateDueToGraphicsEffect = true;
m_widget->update();
updateDueToGraphicsEffect = false;
}
- inline bool isPixmap() const
+ bool isPixmap() const Q_DECL_OVERRIDE
{ return false; }
- inline void effectBoundingRectChanged()
+ void effectBoundingRectChanged() Q_DECL_OVERRIDE
{
// ### This function should take a rect parameter; then we can avoid
// updating too much on the parent widget.
@@ -903,16 +905,16 @@ public:
update();
}
- inline const QStyleOption *styleOption() const
+ const QStyleOption *styleOption() const Q_DECL_OVERRIDE
{ return 0; }
- inline QRect deviceRect() const
+ QRect deviceRect() const Q_DECL_OVERRIDE
{ return m_widget->window()->rect(); }
- QRectF boundingRect(Qt::CoordinateSystem system) const;
- void draw(QPainter *p);
+ QRectF boundingRect(Qt::CoordinateSystem system) const Q_DECL_OVERRIDE;
+ void draw(QPainter *p) Q_DECL_OVERRIDE;
QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset,
- QGraphicsEffect::PixmapPadMode mode) const;
+ QGraphicsEffect::PixmapPadMode mode) const Q_DECL_OVERRIDE;
QWidget *m_widget;
QWidgetPaintContext *context;