Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QTBUG47714 Workaround #113

Merged
merged 1 commit into from
Sep 6, 2015
Merged

Conversation

metellius
Copy link
Contributor

No description provided.

@ddennedy
Copy link
Member

ddennedy commented Sep 6, 2015

This is not working on Windows. It actually makes it crash. It is at least in part due to the new signal/slot connect syntax you are using. That does not work in our Windows builds. I do not know if it is related to using MinGW or what. In any case you will see that we are generally not using it. It gives errors in debug log such as "signal not found in QQuickView." Then, if you do not make it declare the slots as "private slots:" it will give errors such as "No such slot." After making those changes, I get a link error: "undefined reference to vtable." Adding a Q_OBJECT macro alone did not help. I had to split declare the class in the header and include the macro. After doing all that and throwing in some qDebugs, not only does it no longer crash here, but I confirm that it is actually doing its job

@ddennedy
Copy link
Member

ddennedy commented Sep 6, 2015

Also works for me on Linux and OS X.

@ddennedy ddennedy merged commit f29a1bf into mltframework:master Sep 6, 2015
@metellius
Copy link
Contributor Author

If you want to have a Q_OBJECT class without including it in the header, you need to add #include "qmlview.moc" to the bottom in order to have qmake pick it up and invoke moc on it.

Too bad we have to stick to the old style connects, it's hard to notice when they fail and just print a warning. At work we use a special assert around the connect statements that upon invalid signatures asserts in debug but just leave the code as it is in release builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants