Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.1.1
-
None
-
MSVC2010 C++/CLI
-
704616605b571f126bce59243c8bc3be48f5ace8
Description
This issue came up for me in using any class that had QAbstractItemModel as the base class compiled as C++/CLI. Including QAbstractItemModel gave error C2217 "override requires virtual". It seems that the CLI compiler requires the virtual keyword wherever "override" is used, even though the function is implicitly virtual. While this seems to be a bug in the implementation of CLI, it prevents these classes from compiling. Adding "virtual" or removing Q_DECL_OVERRIDE from qabstractitemmodel.h removed the problem.
As a workaround, I can trick the compiler detection defines by #defining Q_CC_INTEL, but this doesn't seem like a great solution and not sure what other consequences it will have.
Normal C++ compilation in MSVC2010 works just fine. This is only when compiled as a managed project.