• Michael Stahl's avatar
    tdf#119856 vcl: fix Qt5FilePicker destructor to run in main thread · 621bebd8
    Michael Stahl yazdı
    During QFileDialog dtor, QSocketNotifier::setEnabled(false) is called,
    but it doesn't do anything other than print a stupid warning and so it's
    still registered and later it receives events after it's dead.
    
    0   QSocketNotifier::setEnabled(bool) (this=this@entry=0x991c058, enable=enable@entry=false) at kernel/qsocketnotifier.cpp:240
    1   QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine() (this=0x991c030, __in_chrg=<optimized out>) at io/qfilesystemwatcher_inotify.cpp:260
    2   QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine() (this=0x991c030, __in_chrg=<optimized out>) at io/qfilesystemwatcher_inotify.cpp:258
    3   QObjectPrivate::deleteChildren() (this=this@entry=0x991c240) at kernel/qobject.cpp:1997
    4   QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1025
    5   QFileSystemWatcher::~QFileSystemWatcher() (this=0x9641b60, __in_chrg=<optimized out>) at io/qfilesystemwatcher.cpp:277
    6   QObjectPrivate::deleteChildren() (this=this@entry=0x2a30130) at kernel/qobject.cpp:1997
    7   QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1025
    8   QThread::~QThread() (this=0x2a079b8, __in_chrg=<optimized out>) at thread/qmutex.h:217
    9    () at /lib64/libQt5Widgets.so.5
    10  QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) (pointer=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:52
    11  QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() (this=0x98aa4d8, __in_chrg=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107
    12  QObject::~QObject() (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:884
    13  QFileSystemModel::~QFileSystemModel() () at /lib64/libQt5Widgets.so.5
    14  QObjectPrivate::deleteChildren() (this=0x97bab00) at kernel/qobject.cpp:1997
    15  QWidget::~QWidget() () at /lib64/libQt5Widgets.so.5
    16  QFileDialog::~QFileDialog() () at /lib64/libQt5Widgets.so.5
    17  std::default_delete<QFileDialog>::operator()(QFileDialog*) const (this=0x9770f90, __ptr=0x926e970) at /usr/include/c++/8/bits/unique_ptr.h:81
    18  std::unique_ptr<QFileDialog, std::default_delete<QFileDialog> >::~unique_ptr() (this=0x9770f90, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:274
    19  Qt5FilePicker::~Qt5FilePicker() (this=0x9770ed0, __in_chrg=<optimized out>) at vcl/qt5/Qt5FilePicker.cxx:155
    
    Change-Id: Iddfa3d44de59e1760e20a389566d9e6815ab26f7
    Reviewed-on: https://gerrit.libreoffice.org/68355
    Tested-by: Jenkins
    Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
    621bebd8
Qt5FilePicker.cxx 28.7 KB