-
Notifications
You must be signed in to change notification settings - Fork 1
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
more samples are working #43
Conversation
@seandepagnier: great work! I was in doubt too regarding the base destructor (see my comments in your previous merge) Just cosmetic: according wxQT naming conventions, specific methods should be prefixed with Qt to maintain consistency with the rest of the code -and like in other ports- (specially with Anyway, if
Also, there is code already using
It depends on which one is NULL to determine if it is a multiline or not (see Even Maybe the Another solution is that each subclass could implement it own destructor (like you did in @vadz, what do you think? |
As far as the casts.. what is wrong with them? The result is a lot more verbose than GetHandle(). Having an instance in each class, yes you can do this, and also have the virtual GetHandle. Then you need to delete them in every class. This ends up creating more lines of code to do the same thing and I see no real advantage. In any case it would do the same thing. I'm more interested in finishing the port than reworking things that might have to change again later anyway. I got wxGLCanvas working but there is something wrong and some widget or something draws a small rectangle in the corner. Most of the dialogs work but there are some bugs.
|
I also want to note, there is zero performance cost for the conversions On Wed, Jul 30, 2014 at 12:49 AM, Mariano Reingart <notifications@github.com
|
Static cast is unsafe at least in the
Also, GetHandle() should not be used in the dtor (m_qtWindow should be used instead), or it shouldn't not be virtual:
Also, Finally, your're using
I fixed that in your last PRs (and this one) going back to About your priorities:
As I commented @seandepagnier (by private mail) and @vadz (in wx-dev), I'm a bit overwhelm (starting to be no comfortable at all due the GSOC deadline), and anyway, I cannot decide due my limited c++ / wx / qt experience. Again, thanks for your contributions, waiting for @vadz response, I'll keep thinking how this can be merged / solved (specially for dd22866) PS: please, pardon if there is any misunderstanding due my English, I'm doing my best effort |
Please see 6ab2ff3 with my solution to remove the virtual call in wxWindow dtor (maybe it is not optimal but I think it is less disruptive at this stage). @seandepagnie: if you could rollback dd22866 changes and use m_qtWindow pointer directly, I think we could advance and merge this PR sooner. I've created the issue #44 to work on the SIGSEGV caused by signal handled after deletion, I think a solution like using GTKDisconnect could be doable. Also, I splitted and commited some of your changes (b17f9e5 and f3efa9c), thanks again! |
We should not be using deleteLater. The Qt objects are created after the In this case deleteLater causes a lot more problems than it solves. Try running the toolbar sample, and The cases that still crash, are using helper classes which don't map to wxObjects wxQtShortcutHandler:: these need to be cleaned up differently, perhaps changing the qt parent. There are also cases with wxRichToolTips, whatever they are. The alternative using deleteLater would be to set the handler pointer in It's a case of a this library having a more lines of code than it needs to The static cast is safe for the textctrl, because I only call the helper I On Wed, Jul 30, 2014 at 8:51 AM, Mariano Reingart notifications@github.com
|
By the way, great work so far. I don't think I would have much interest in this project if it wasn't so Don't worry about your english, it's better than most. On Wed, Jul 30, 2014 at 3:37 PM, sean d'epagnier seandepagnier@gmail.com
|
@reingart I appreciate your desire for stability but we also need to be sure that the chosen approach does basically work. If @seandepagnier is right and Personally I just don't know enough about Qt to know who is right here, but I do admit feeling very suspicious about |
We managed to fix the issue so far that it can run without crashing using I still think delete is better, and the code is also simpler, but this On Thu, Jul 31, 2014 at 3:37 AM, VZ notifications@github.com wrote:
|
@vadz |
BTW, @vadz, the opossite is true, no other major port seems to be using
The wxGTK comment is more descriptive:
Of course, then it release the reference that should be the last one. |
Vaz, I really need your opinion because I am stuck. I tried to merge because in my tree, all the dialogs in the dialogs demo In reingart's branch, none of these things, many of the same sample I am guessing he refuses to merge because he would rather write m_qtLabel m_qtWindow = m_qtDialog = m_qtDirDialog = new wxQtDirDialog( parent, this, Because m_qtWindow is used to delete, m_qtDialog is needed for exec from If you ask any Qt developer you should nearly always using delete, and The question is, can wxWidgets programs delete the widget from the event 9f3e771 I don't think it makes sense for the QObject to outlive the wxObject that I am waiting for feedback. On Thu, Jul 31, 2014 at 3:54 AM, Mariano Reingart notifications@github.com
|
There where nothing related to
File, fonts and color dialogs don't work because they are just stubs mostly unimplemented, and I didn't applied your patches that add them. So far I skipped your commit "Fix major issues with memory destruction, now the help sample works!" dd22866 and everything works correctly in my branch too, no crashes and even no debug messages I added to trace this destruction issues. About my commits, sanity checks are all over wxGTK, and that port also disconnect the signals prior calling the destoy function (BTW, it is just a line), so I don't see any major issue. About the m_qtWindow, you don't need to assign it directly anymore, you could call I could continue, but I need to go to sleep (here it is 5 AM), sorry. I wonder if you can adapt the rest of your changes not applied yet to conform to my branch, that is, skip dd22866 and rollback any change to GetHandle / GetQWhatever, that would be great. We could also left this discussion for after the GSOC, the conflict is clearly identified and your solution do not involves rewriting everything anyway. Thanks again |
The issue is, we are both fixing the same bugs, like the invalid pixmap I Maybe I am wrong, but I always try to write the fewest number of lines of I am open to any solutions that use less lines of code and are easier to On Thu, Jul 31, 2014 at 4:26 PM, Mariano Reingart notifications@github.com
|
If things work right now in @reingart's branch, let's keep them like this until the end of the GSoC to avoid any disruptive changes at this late stage. However I am globally still in favour of @seandepagnier's approach:
|
On Fri, Aug 1, 2014 at 6:26 AM, VZ notifications@github.com wrote:
I'm now having issues running an application that calls Yeild() at startup |
Sorry, queue which event? I'm starting to get slightly lost here, I think it would be more productive to discuss this via email on wx-dev, could you please post there? |
I tried a few times to post to wx-dev and nothing seems to appear |
Just for reference: the pending changes (except for the conflict one) where adopted to the current coding approach and merged manually in bed605f (color, font, file and dir dialogs) by me. Then, the following commits where necessary to stabilize dialogs: 76940df & 4e1fd1e (finally removed m_qtDialog pointer) As with OpenGL support previously merged, this dialogs now use a mixture of the current coding approach ( Thanks again! |
WXValidateStyle was failing (assertion) so the constructor wasn't calling QtCreateControl properly to initialize internal m_qtWindow pointer. Then the checkbox Qt widget wasn't cleanly deleted. Also, removed the guard in the exec test that was causing a crash due the deletion problem, now all tests run without crashing.
No description provided.