From c82f73666d87549e5884ddcd253ec3561d840b9b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 2 Oct 2020 10:47:47 +0200 Subject: Replace Q_DECL_UNUSED with [[maybe_unused]] Use C++17 attribute directly Change-Id: Id853e7a5117065e4adb549f81303c1820fe198ce Reviewed-by: Thiago Macieira --- src/tools/moc/generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/moc') diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 4ee68102b9..c562d4acc1 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -683,7 +683,7 @@ void Generator::generateCode() fprintf(out, "// If you get a compile error in this function it can be because either\n"); fprintf(out, "// a) You are using a NOTIFY signal that does not exist. Fix it.\n"); fprintf(out, "// b) You are using a NOTIFY signal that does exist (in a parent class) but has a non-empty parameter list. This is a moc limitation.\n"); - fprintf(out, "Q_DECL_UNUSED static void checkNotifySignalValidity_%s(%s *t) {\n", qualifiedClassNameIdentifier.constData(), cdef->qualified.constData()); + fprintf(out, "[[maybe_unused]] static void checkNotifySignalValidity_%s(%s *t) {\n", qualifiedClassNameIdentifier.constData(), cdef->qualified.constData()); for (const QByteArray &nonClassSignal : qAsConst(cdef->nonClassSignalList)) fprintf(out, " t->%s();\n", nonClassSignal.constData()); fprintf(out, "}\n"); -- cgit v1.2.3