1

In C++14, quotes are introduced as digit separator. But Qt MOC interprets those quotes wrongly. Here is an code fragment which explains the problem:

enum Access : int32_t
{
    GRANTED = 0b0000'0001,
    DENIED  = 0b0000'0011
};

If MOC runs on this code fragment, it causes the errors described in MOC adding namespace to class names. The moc version is 5.9.0. Does this issue is fixed in newer Qt versions?

Azeem
  • 11,148
  • 4
  • 27
  • 40
  • Please post exactly what your problem is inside your question, including the wrong output relevant to your code sample. The other question you linked is 8 years old, a lot of has changed in moc since then. Anyway, moc doesn't need to know about such enum, so you could put it inside `#ifndef Q_MOC_RUN` block... Not the best solution, but it should work. – Jaa-c Jul 20 '18 at 09:06
  • 3
    According to [this changeset](https://codereview.qt-project.org/#/c/187820/) it has been fixed in the 5.9 branch already. – Torben L. Jul 20 '18 at 10:01

0 Answers0