Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error while compiling PythonQt (including code-snippets) - hoping for ideas
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 764 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thEClaw
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved