{"id":170,"date":"2010-01-17T11:30:00","date_gmt":"2010-01-17T11:30:00","guid":{"rendered":"https:\/\/www.root42.de\/blog\/?p=170"},"modified":"2010-01-17T11:30:00","modified_gmt":"2010-01-17T11:30:00","slug":"not-happy-with-qt-on-os-x","status":"publish","type":"post","link":"https:\/\/www.root42.de\/blog\/?p=170","title":{"rendered":"Not happy with Qt on OS X&#8230;"},"content":{"rendered":"<p>I really don&#8217;t get happy with Qt 4.6 on OS X 10.6. Nokia rates Qt on that platform as <a href=\"http:\/\/doc.trolltech.com\/4.6\/supported-platforms.html#tier-2-platforms\">Tier 2<\/a>. Which means, it is not fully supported. This results in stupid things happening. With <a href=\"http:\/\/www.licq.org\/\">Licq<\/a>, I currently have the problem that the whole program crashes with the following message:<\/p>\n<div><\/div>\n<div><span   style=\"  ;font-family:Courier;font-size:medium;\">+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.<\/span><\/div>\n<div><span  style=\"font-family:Courier, serif;\"><span  style=\"font-size:medium;\"><br \/><\/span><\/span><\/div>\n<div>The problem here is that Qt 4.6 for 64 Bit is (rightly so) built using the Cocoa API, instead of the C-only Carbon API. Now it seems that Qt uses the <a href=\"http:\/\/developer.apple.com\/mac\/library\/documentation\/Cocoa\/Reference\/Foundation\/Classes\/NSUndoManager_Class\/Reference\/Reference.html\">NSUndoManager<\/a>, which in turn has an undocumented (?) function _endTopLevelGroupings. And as the above mentioned message tells you, it is only safe to call that function from the main thread. Since the qt4-gui plugin of Licq runs in a separate thread, this assertion fails, and the whole program crashes. So this basically means you cannot start up your GUI from a secondary thread with Cocoa based Qt. This, I think, constitutes a bug in Qt.<\/div>\n<div><\/div>\n<div><i>Update<\/i>: I submitted a bug tracker <a href=\"http:\/\/bugreports.qt.nokia.com\/browse\/QTBUG-7393\">item<\/a>, and erijo is producing a minimal example that will hopefully show the bug in action. Now let&#8217;s wait and see.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I really don&#8217;t get happy with Qt 4.6 on OS X 10.6. Nokia rates Qt on that platform as Tier 2. Which means, it is not fully supported. This results in stupid things happening. With Licq, I currently have the problem that the whole program crashes with the following message: +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe &hellip; <a href=\"https:\/\/www.root42.de\/blog\/?p=170\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Not happy with Qt on OS X&#8230;&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,24,67],"tags":[],"_links":{"self":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/170"}],"collection":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=170"}],"version-history":[{"count":0,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/170\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}