diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-02 10:47:47 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-03 11:58:08 +0200 |
commit | c82f73666d87549e5884ddcd253ec3561d840b9b (patch) | |
tree | 96eff624e0add180490d014abce92fccf9542f5b /src/tools/moc | |
parent | 889d40ebe2d9d0e92caea2749608720f7c088173 (diff) |
Replace Q_DECL_UNUSED with [[maybe_unused]]
Use C++17 attribute directly
Change-Id: Id853e7a5117065e4adb549f81303c1820fe198ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/moc')
-rw-r--r-- | src/tools/moc/generator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |