Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 2.1.0-rc1
-
None
-
4247519b4a8fc040e3170fd2ca3955477c67c27a
Description
http://doc.qt.nokia.com/qtcreator-snapshot/creator-mobile-example.html there is text
2. Include the System Info header file, as illustrated by the following code snippet:
#include <QSystemInfo>
If one follows these instructions, the example won't compile - the pointer later in .h is QSystemDeviceInfo* and one gets an error
BatteryIndicator/mainwindow.h:40: error: ISO C++ forbids declaration of 'QSystemDeviceInfo' with no type
One should include instead a different header, QSystemDeviceInfo. With such include the example compiles and runs as described in this docs page.
I attach a patch (to docs and example code) against the newest git version of 2.1 branch.