Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-3844

wrong include in creator-mobile-example.html

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 2.1.0
    • Qt Creator 2.1.0-rc1
    • Documentation
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            leenam Leena Miettinen
            wiecko Marek Wieckowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes