From 6f86fea820f7de17da9501ebb323398cd851fab3 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 7 May 2012 19:45:12 +0200 Subject: QtGui: declare some classes as shared Change-Id: I0ebb0ca8b8edcecc939021407d1755693f97e553 Reviewed-by: Gunnar Sletta --- src/gui/kernel/qpalette.h | 2 ++ src/gui/kernel/qplatformdialoghelper.h | 6 ++++++ src/gui/text/qfont.h | 1 + src/gui/text/qfontinfo.h | 2 ++ src/gui/text/qfontmetrics.h | 3 +++ src/gui/text/qglyphrun.h | 2 +- src/gui/text/qrawfont.h | 2 ++ src/gui/text/qstatictext.h | 2 ++ src/gui/text/qtextcursor.h | 2 ++ src/gui/text/qtextformat.h | 16 ++++++++++++++++ 10 files changed, 37 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h index 4b71af813b..91fa6faa5f 100644 --- a/src/gui/kernel/qpalette.h +++ b/src/gui/kernel/qpalette.h @@ -186,6 +186,8 @@ private: friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &s, const QPalette &p); }; +Q_DECLARE_SHARED(QPalette) + inline void QPalette::setColor(ColorGroup acg, ColorRole acr, const QColor &acolor) { setBrush(acg, acr, QBrush(acolor)); } diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h index a884d8b5de..58b4062fad 100644 --- a/src/gui/kernel/qplatformdialoghelper.h +++ b/src/gui/kernel/qplatformdialoghelper.h @@ -140,6 +140,8 @@ private: QSharedDataPointer d; }; +Q_DECLARE_SHARED(QColorDialogOptions) + class Q_GUI_EXPORT QPlatformColorDialogHelper : public QPlatformDialogHelper { Q_OBJECT @@ -187,6 +189,8 @@ private: QSharedDataPointer d; }; +Q_DECLARE_SHARED(QFontDialogOptions) + class Q_GUI_EXPORT QPlatformFontDialogHelper : public QPlatformDialogHelper { Q_OBJECT @@ -281,6 +285,8 @@ private: QSharedDataPointer d; }; +Q_DECLARE_SHARED(QFileDialogOptions) + class Q_GUI_EXPORT QPlatformFileDialogHelper : public QPlatformDialogHelper { Q_OBJECT diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h index 38086a989d..e833d6bf3f 100644 --- a/src/gui/text/qfont.h +++ b/src/gui/text/qfont.h @@ -316,6 +316,7 @@ private: uint resolve_mask; }; +Q_DECLARE_SHARED(QFont) inline bool QFont::bold() const { return weight() > Normal; } diff --git a/src/gui/text/qfontinfo.h b/src/gui/text/qfontinfo.h index c0c478f0c2..e9775f3a48 100644 --- a/src/gui/text/qfontinfo.h +++ b/src/gui/text/qfontinfo.h @@ -83,6 +83,8 @@ private: QExplicitlySharedDataPointer d; }; +Q_DECLARE_SHARED(QFontInfo) + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h index 3de7011cde..44fe55da75 100644 --- a/src/gui/text/qfontmetrics.h +++ b/src/gui/text/qfontmetrics.h @@ -125,6 +125,7 @@ private: QExplicitlySharedDataPointer d; }; +Q_DECLARE_SHARED(QFontMetrics) class Q_GUI_EXPORT QFontMetricsF { @@ -186,6 +187,8 @@ private: QExplicitlySharedDataPointer d; }; +Q_DECLARE_SHARED(QFontMetricsF) + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/text/qglyphrun.h b/src/gui/text/qglyphrun.h index 8188e13e27..37e9a72bbe 100644 --- a/src/gui/text/qglyphrun.h +++ b/src/gui/text/qglyphrun.h @@ -126,7 +126,7 @@ private: QExplicitlySharedDataPointer d; }; -Q_DECLARE_TYPEINFO(QGlyphRun, Q_MOVABLE_TYPE); +Q_DECLARE_SHARED(QGlyphRun) QT_END_NAMESPACE diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h index 35a17675f0..f5bdeb7958 100644 --- a/src/gui/text/qrawfont.h +++ b/src/gui/text/qrawfont.h @@ -145,6 +145,8 @@ private: QExplicitlySharedDataPointer d; }; +Q_DECLARE_SHARED(QRawFont) + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h index 6f9c9d8526..f0bd25fbbd 100644 --- a/src/gui/text/qstatictext.h +++ b/src/gui/text/qstatictext.h @@ -101,6 +101,8 @@ private: friend class QStaticTextPrivate; }; +Q_DECLARE_SHARED(QStaticText) + QT_END_NAMESPACE Q_DECLARE_METATYPE(QStaticText) diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h index f9441daf6d..abc89dc881 100644 --- a/src/gui/text/qtextcursor.h +++ b/src/gui/text/qtextcursor.h @@ -235,6 +235,8 @@ private: friend class QWidgetTextControlPrivate; }; +Q_DECLARE_SHARED(QTextCursor) + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h index 58525a3dd0..a0a1e8846e 100644 --- a/src/gui/text/qtextformat.h +++ b/src/gui/text/qtextformat.h @@ -376,6 +376,8 @@ private: friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextFormat &); }; +Q_DECLARE_SHARED(QTextFormat) + inline void QTextFormat::setObjectType(int atype) { setProperty(ObjectType, atype); } @@ -549,6 +551,8 @@ protected: friend class QTextFormat; }; +Q_DECLARE_SHARED(QTextCharFormat) + inline void QTextCharFormat::setTableCellRowSpan(int _tableCellRowSpan) { if (_tableCellRowSpan <= 1) @@ -639,6 +643,8 @@ protected: friend class QTextFormat; }; +Q_DECLARE_SHARED(QTextBlockFormat) + inline void QTextBlockFormat::setAlignment(Qt::Alignment aalignment) { setProperty(BlockAlignment, int(aalignment)); } @@ -702,6 +708,8 @@ protected: friend class QTextFormat; }; +Q_DECLARE_SHARED(QTextListFormat) + inline void QTextListFormat::setStyle(Style astyle) { setProperty(ListStyle, astyle); } @@ -738,6 +746,8 @@ protected: friend class QTextFormat; }; +Q_DECLARE_SHARED(QTextImageFormat) + inline void QTextImageFormat::setName(const QString &aname) { setProperty(ImageName, aname); } @@ -836,6 +846,8 @@ protected: friend class QTextFormat; }; +Q_DECLARE_SHARED(QTextFrameFormat) + inline void QTextFrameFormat::setBorder(qreal aborder) { setProperty(FrameBorder, aborder); } @@ -905,6 +917,8 @@ protected: friend class QTextFormat; }; +Q_DECLARE_SHARED(QTextTableFormat) + inline void QTextTableFormat::setColumns(int acolumns) { if (acolumns == 1) @@ -944,6 +958,8 @@ protected: friend class QTextFormat; }; +Q_DECLARE_SHARED(QTextTableCellFormat) + inline void QTextTableCellFormat::setTopPadding(qreal padding) { setProperty(TableCellTopPadding, padding); -- cgit v1.2.3