diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-09-23 21:28:54 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-24 10:09:14 +0200 |
commit | 72d6717b268e66e3ba8d222deb74513337368a60 (patch) | |
tree | 9f561dc329410e3f26887844cd6a54e3f884fba6 /tests | |
parent | 2ff3cbbb563f2e6176b3a153c233ae737246fe23 (diff) |
moc: Don't stumble over MSVC __declspec.
Commit 310031188c6 (Fix moc stumbling over gcc __attribute__
extensions, 2012-10-01) applied similar logic for GNU style
attributes.
Change-Id: I550eaefd703b4e974e6ffae7716f02074c8a8823
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/tools/moc/function-with-attributes.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/auto/tools/moc/function-with-attributes.h b/tests/auto/tools/moc/function-with-attributes.h index 21a7405af7..afa02e6f3a 100644 --- a/tests/auto/tools/moc/function-with-attributes.h +++ b/tests/auto/tools/moc/function-with-attributes.h @@ -43,15 +43,22 @@ // test support for gcc attributes with functions #if defined(Q_CC_GNU) || defined(Q_MOC_RUN) -#define DEPRECATED __attribute__ ((__deprecated__)) +#define DEPRECATED1 __attribute__ ((__deprecated__)) #else -#define DEPRECATED +#define DEPRECATED1 +#endif + +#if defined(Q_CC_MSVC) || defined(Q_MOC_RUN) +#define DEPRECATED2 __declspec(deprecated) +#else +#define DEPRECATED2 #endif class FunctionWithAttributes : public QObject { Q_OBJECT public slots: - DEPRECATED void test() {} + DEPRECATED1 void test1() {} + DEPRECATED2 void test2() {} }; |