summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyfileimpl_p.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-01-10 13:07:30 +0100
committerLiang Qi <liang.qi@qt.io>2019-01-15 08:31:51 +0000
commit2ab139596d058cf9cc93e723c340467c70d93b10 (patch)
treee1b5d755bb3b74c9af9abc8aab9c9659f4013ae7 /src/network/access/qnetworkreplyfileimpl_p.h
parentc365fa49d85810c6ad09bb5f43b5081cd7543bf1 (diff)
Fix alignment-warnings about Q_DECLARE_PRIVATE's casts
Q_DECLARE_PRIVATE gets used in the declaration of the public class, where the private class is typically visible only as a forward-decl, with no knowledge of what it's based on; consequently, the macro is obliged to use reinterpret_cast<>, which is subject to warnings when the compiler *can* see both types and their alignments differ. The same applies to Q_DECLARE_PRIVATE_D. So suppress gcc's -Wcast-align around the d_func() return statements. (If we get similar problems with other compilers we can add their suppressions likewise; but, for now, we've only seen this on MIPS64, where we use gcc.) This tripped over one use of Q_DECLARE_PRIVATE in a private Q_SLOTS: section; for some reason, gcc didn't like the semicolon on the friend declaration. Changing the context to plain private fixed that. Fixes: QTBUG-72885 Change-Id: I5edc11d46bd4eb820713adede79d53191a7e2736 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Boxiang Sun <daetalusun@gmail.com>
Diffstat (limited to 'src/network/access/qnetworkreplyfileimpl_p.h')
-rw-r--r--src/network/access/qnetworkreplyfileimpl_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/access/qnetworkreplyfileimpl_p.h b/src/network/access/qnetworkreplyfileimpl_p.h
index 55aece0bed..48d82abd3f 100644
--- a/src/network/access/qnetworkreplyfileimpl_p.h
+++ b/src/network/access/qnetworkreplyfileimpl_p.h
@@ -80,6 +80,7 @@ public:
private Q_SLOTS:
void fileOpenFinished(bool isOpen);
+private:
Q_DECLARE_PRIVATE(QNetworkReplyFileImpl)
};