summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/tools/moc/function-with-attributes.h13
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() {}
};