3

I'm migrating a project to Qt5, and I'm getting this error (it compiles fine for Qt4):

fatal error C1083: Cannot open include file: 'qtconcurrentexception.h': No such file or directory

for this line:

#include <qtconcurrentexception.h>

I include this file in order to use QtConcurrent::Exception. Has the header file for QtConcurrent::Exception changed?

sashoalm
  • 75,001
  • 122
  • 434
  • 781

1 Answers1

6

All of the below applies to Qt 5 only.

If you ever need an include of the form <QtModule/QHeader>, it means that you did not add the relevant Qt module to your project file. You will get linking errors later, even though such hacked include seems to work during compilation.

QtConcurrent::Exception is deprecated and simply forwards to QException from the core module. So:

#include <QException>

If you wish to use the concurrent module for something else in Qt 5, you should #include <QtConcurrent>. You should also add Qt += concurrent to your project file, and re-run qmake.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313