×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    #error "The header file 'xqtelephony.h' doesn't include <QObject>."

    Hello friends...

    while building my application I am getting an error like:

    C:\QtProjects\Events\moc\moc_xqtelephony.cpp:12: #error "The header file 'xqtelephony.h' doesn't include <QObject>."
    ERROR: cpp.EXE failure
    In my Windows XP machine, it's running fine, how ever on my Windows 7 machine I got this kind of error.

    I am using "Mobile_extensions_preview_3" for my telephony usage.

    Any Idea how to remove this error.

    Thanks...

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: #error "The header file 'xqtelephony.h' doesn't include <QObject>."

    And how does line 12 of moc_xqtelephony.cpp looks like?

  3. #3
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Re: #error "The header file 'xqtelephony.h' doesn't include <QObject>."

    Quote Originally Posted by divanov View Post
    And how does line 12 of moc_xqtelephony.cpp looks like?

    The moc_xqtelephony.cpp file contents are:
    /****************************************************************************
    ** Meta object code from reading C++ file 'xqtelephony.h'
    **
    ** Created: Wed Sep 1 15:18:10 2010
    ** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3)
    **
    ** WARNING! All changes made in this file will be lost!
    *****************************************************************************/

    #include "../xqtelephony.h"
    #if !defined(Q_MOC_OUTPUT_REVISION)
    #error "The header file 'xqtelephony.h' doesn't include <QObject>."
    #elif Q_MOC_OUTPUT_REVISION != 62
    #error "This file was generated using the moc from 4.6.3. It"
    #error "cannot be used with the include files from this version of Qt."
    #error "(The moc has changed too much.)"
    #endif

    QT_BEGIN_MOC_NAMESPACE
    static const uint qt_meta_data_XQTelephony[] = {

    // content:
    4, // revision
    0, // classname
    0, 0, // classinfo
    5, 14, // methods
    0, 0, // properties
    0, 0, // enums/sets
    0, 0, // constructors
    0, // flags
    2, // signalCount

    // signals: signature, parameters, type, tag, flags
    27, 13, 12, 12, 0x05,
    84, 78, 12, 12, 0x05,

    // slots: signature, parameters, type, tag, flags
    122, 110, 12, 12, 0x0a,
    141, 12, 136, 12, 0x0a,
    163, 12, 12, 12, 0x0a,

    0 // eod
    };

    static const char qt_meta_stringdata_XQTelephony[] = {
    "XQTelephony\0\0status,number\0"
    "lineStatusChanged(XQTelephony::LineStatus,QString)\0"
    "error\0error(XQTelephony::Error)\0"
    "phoneNumber\0call(QString)\0bool\0"
    "startMonitoringLine()\0stopMonitoringLine()\0"
    };

    const QMetaObject XQTelephony::staticMetaObject = {
    { &QObject::staticMetaObject, qt_meta_stringdata_XQTelephony,
    qt_meta_data_XQTelephony, 0 }
    };

    #ifdef Q_NO_DATA_RELOCATION
    const QMetaObject &XQTelephony::getStaticMetaObject() { return staticMetaObject; }
    #endif //Q_NO_DATA_RELOCATION

    const QMetaObject *XQTelephony::metaObject() const
    {
    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
    }

    void *XQTelephony::qt_metacast(const char *_clname)
    {
    if (!_clname) return 0;
    if (!strcmp(_clname, qt_meta_stringdata_XQTelephony))
    return static_cast<void*>(const_cast< XQTelephony*>(this));
    return QObject::qt_metacast(_clname);
    }

    int XQTelephony::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
    {
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
    return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
    switch (_id) {
    case 0: lineStatusChanged((*reinterpret_cast< XQTelephony::LineStatus(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
    case 1: error((*reinterpret_cast< XQTelephony::Error(*)>(_a[1]))); break;
    case 2: call((*reinterpret_cast< const QString(*)>(_a[1]))); break;
    case 3: { bool _r = startMonitoringLine();
    if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
    case 4: stopMonitoringLine(); break;
    default: ;
    }
    _id -= 5;
    }
    return _id;
    }

    // SIGNAL 0
    void XQTelephony::lineStatusChanged(XQTelephony::LineStatus _t1, QString _t2)
    {
    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
    QMetaObject::activate(this, &staticMetaObject, 0, _a);
    }

    // SIGNAL 1
    void XQTelephony::error(XQTelephony::Error _t1)
    {
    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
    QMetaObject::activate(this, &staticMetaObject, 1, _a);
    }
    QT_END_MOC_NAMESPACE

  4. #4
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: #error "The header file 'xqtelephony.h' doesn't include <QObject>."

    I don't have sources, but it seems it wants #include <QObject> in the xqtelephony.h

  5. #5
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Re: #error "The header file 'xqtelephony.h' doesn't include <QObject>."

    Quote Originally Posted by divanov View Post
    I don't have sources, but it seems it wants #include <QObject> in the xqtelephony.h
    divanov, the file has #include <QObject>
    please check the contents:

    #ifndef XQTELEPHONY_H
    #define XQTELEPHONY_H

    // INCLUDES
    #include <QObject>
    #include "telephony_global.h"

    // FORWARD DECLARATIONS
    class XQTelephonyPrivate;

    // CLASS DECLARATION
    class XQTELEPHONY_EXPORT XQTelephony : public QObject
    {
    Q_OBJECT

    public:
    enum Error {
    NoError = 0,
    OutOfMemoryError,
    UnknownError = -1
    };

    enum LineStatus {
    StatusUnknown,
    StatusIdle,
    StatusDialling,
    StatusRinging,
    StatusAnswering,
    StatusConnecting,
    StatusConnected,
    StatusReconnectPending,
    StatusDisconnecting,
    StatusHold,
    StatusTransferring,
    StatusTransferAlerting
    };

    XQTelephony(QObject* parent = 0);
    ~XQTelephony();

    XQTelephony::Error error() const;

    public Q_SLOTS:
    void call(const QString& phoneNumber);
    bool startMonitoringLine();
    void stopMonitoringLine();

    Q_SIGNALS:
    void lineStatusChanged(XQTelephony::LineStatus status, QString number);
    void error(XQTelephony::Error error);

    private:
    friend class XQTelephonyPrivate;
    XQTelephonyPrivate* d;
    };

    #endif // XQTELEPHONY_H

    // End of file

  6. #6
    Registered User
    Join Date
    Feb 2011
    Posts
    1

    Re: #error "The header file 'xqtelephony.h' doesn't include <QObject>."

    Same question. I use N8 to run my program and moc as below. what's this suppose to mean?

    #error "The header file 'clock.h' doesn't include <QObject>."
    #elif Q_MOC_OUTPUT_REVISION != 62
    #error "This file was generated using the moc from 4.6.3. It"
    #error "cannot be used with the include files from this version of Qt."
    #error "(The moc has changed too much.)"

  7. #7
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: #error "The header file 'xqtelephony.h' doesn't include <QObject>."

    Clearly, the version of QObject being included doesn't define Q_MOC_OUTPUT_REVISION. It may well be that QObject is erroring somehow in the include step, or that there's another define (or not) that's sending QObject down the wrong #ifdef path.

  8. #8
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: #error "The header file 'xqtelephony.h' doesn't include <QObject>."

    This error usually occurs when you try to compile the MOC-generated file as a regular source/header file. For example, having something like
    Code:
    SOURCES += *.cpp
    HEADERS += *.h
    will easily lead in to such problems unless you have MOC_DIR pointing to some other directory.

Similar Threads

  1. <input type="file" name="">
    By sebtain in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2008-06-27, 22:01
  2. Can't open included files failure. "#include <coeccntx.h>"
    By Series80user in forum Symbian C++
    Replies: 1
    Last Post: 2005-08-03, 09:26
  3. <a href="test.mid">Midi</a> doens't works!
    By ernestkok in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2004-02-20, 09:35
  4. I don't understand '"1\t"<0x6BCD><0x725B>' thingy in ***.LOC files...
    By advocatee in forum Symbian User Interface
    Replies: 3
    Last Post: 2003-08-26, 03:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •