D24150: Fix crash on exit in kio_file

2019-09-22 Thread Loïc Yhuel
hwti added a comment.


  In D24150#536169 , @dfaure wrote:
  
  > I (thought I) fixed this crash already in commit 512967f6f4e887d4a5a0 
 by 
removing the ::exit() call (which appears in the backtrace of that bug report).
  >
  > This being said, I'm not objecting to this patch, but I am wondering if you 
can still experience this crash with a kio that includes my commit above (from 
Sep 6).
  
  
  QCoreGlobalData destructor is called on any exit, even when returning from 
main (but there is an exit call in kdeinit5 anyway).
  If there is no other possible exit() call before the kdemain function in 
file.cpp returns, then you avoided the issue for Qt >= 5.12 : destroying the 
QTextCodec unregisters it, so it isn't in the list any more when 
QCoreGlobalData destructor is called.
  But older Qt versions do not have this logic, so QCoreGlobalData destructor 
often crashes when trying to call the LegacyTextCodec destructor, since the 
object has already been destroyed and is above the stack pointer. Even if it 
doesn't crash, free() would then be called on a stack address.

REVISION DETAIL
  https://phabricator.kde.org/D24150

To: hwti, cfeck, dfaure, broulik
Cc: aacid, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24150: Fix crash on exit in kio_file

2019-09-22 Thread Loïc Yhuel
hwti updated this revision to Diff 66633.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24150?vs=66630=66633

REVISION DETAIL
  https://phabricator.kde.org/D24150

AFFECTED FILES
  src/ioslaves/file/file.cpp

To: hwti, cfeck, dfaure, broulik
Cc: aacid, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24150: Fix crash on exit in kio_file

2019-09-22 Thread Loïc Yhuel
hwti added a comment.


  In D24150#536113 , @aacid wrote:
  
  > why the void? do you get a warning otherwise?
  
  
  No, but it is used in several places in the repository (and in Qt), so I 
suppose it might generate one depending on the compiler.
  
  > Also a comment in that line quoting the Qt docs "Note that you should not 
delete codecs yourself: once created they become Qt's responsibility." makes 
sense IMHO otherwise someone will move it back to the old code to not have a 
leak
  
  OK, done (but the void should already show that not storing it in a variable, 
so not deleting it, is deliberate).

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D24150

To: hwti, cfeck, dfaure, broulik
Cc: aacid, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24150: Fix crash on exit in kio_file

2019-09-22 Thread Loïc Yhuel
hwti created this revision.
hwti added a reviewer: cfeck.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
hwti requested review of this revision.

REVISION SUMMARY
  All QTextCodec are deleted by QCoreGlobalData on exit, so they must be 
allocated on the heap.
  Before Qt 5.12, it is even not allowed to delete them.
  
  BUG: 408797

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D24150

AFFECTED FILES
  src/ioslaves/file/file.cpp

To: hwti, cfeck
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D15872: Fix Oxygen background gradient for QML modules

2018-10-01 Thread Loïc Yhuel
hwti created this revision.
hwti added reviewers: mart, VDG.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
hwti requested review of this revision.

REVISION SUMMARY
  We need to make the QQuickWidget transparent, so we see the window 
background, which can be a gradient with Oxygen, instead of a solid color which 
doesn't match the top and bottom of the window.

REPOSITORY
  R295 KCMUtils

REVISION DETAIL
  https://phabricator.kde.org/D15872

AFFECTED FILES
  src/kcmoduleqml.cpp

To: hwti, mart, #vdg
Cc: kde-frameworks-devel, michaelh, ngraham, bruns