Error while compiling PythonQt (including code-snippets) - hoping for ideas



  • I am not sure if it is acceptable behavior, but I'll try it:
    "Here":http://qt-project.org/forums/viewthread/32104/ I got some help on enabling a Qt application to run Python scripts.
    I tried to compile "this":https://github.com/Orochimarufan/PythonQt respository and got a huge amount of errors, 95% of them like this (slightly edited to coincide with the code snippets following):

    @generator_50\parser\binder.cpp: In member function 'FileModelItem Binder::run(AST*)':
    parser\binder.cpp:7:38: error: base operand of '->' has non-pointer type 'FileModelItem {aka CodeModelPointer<_FileModelItem>}'
    updateItemPosition (_M_current_file->toItem(), node);
    ^@

    I tried to trace down the problem, but I personally do not see it. Maybe somebody with more experience does. The error is given in the code-snippet at the bottom and I climbed up the food-chain until I landed in a dead end, it seems - the first mentioning of CodeModelPointer .

    generator_50\parser\codemodel_pointer.h
    @template <class T> class CodeModelPointer: public QAtomicPointer<T>

    template <class T>
    Q_INLINE_TEMPLATE CodeModelPointer<T>::CodeModelPointer(T *adata) : d(adata)
    { if (d) d->ref.ref(); }@

    generator_50\parser\codemodel_fwd.h
    @class _FileModelItem;

    typedef CodeModelPointer<_FileModelItem> FileModelItem;@

    generator_50\parser\codemodel.h
    @class _FileModelItem: public _NamespaceModelItem
    {
    public:
    DECLARE_MODEL_NODE(File)

    static FileModelItem create(CodeModel *model);

    protected:
    _FileModelItem(CodeModel *model, int kind = __node_kind)
    : _NamespaceModelItem(model, kind) {}

    private:
    _FileModelItem(const _FileModelItem &other);
    void operator = (const _FileModelItem &other);
    };@

    generator_50\parser\binder.h
    @FileModelItem _M_current_file;//member of some class@

    generator_50\parser\binder.cpp
    @FileModelItem Binder::run(AST *node)
    {
    FileModelItem old = _M_current_file;
    _M_current_access = CodeModel::Public;

    _M_current_file = model()->create<FileModelItem>();
    updateItemPosition (_M_current_file->toItem(), node);//this produces the "non-pointer" error
    visit(node);
    FileModelItem result = _M_current_file;

    _M_current_file = old; // restore

    return result;
    }@

    If I need to collect any more information, just tell me. If this thread is considered a duplicate...well, I hope it isn't. But since this is about a very specific compilation, I thought that the odds of somebody even reading it in the other thread are pretty slim.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.