From e67fbf1579849571dd602d1b52dd210ba2a1ec62 Mon Sep 17 00:00:00 2001 From: Mariano Reingart Date: Mon, 19 Jan 2015 02:57:06 +0000 Subject: [PATCH] wxQT: move destroyed debug log into class method (remove global function to handle destroyed signal) This is needed for applications because the global function is not exported, yet it is used by the opengl library. An alternative is to add utils.cpp to the opengl library Thanks @seandepagnier git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/qt/private/utils.h | 3 --- include/wx/qt/private/winevent.h | 3 ++- src/qt/utils.cpp | 7 ------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/include/wx/qt/private/utils.h b/include/wx/qt/private/utils.h index 6bbd7340e8..a91f03bd7d 100644 --- a/include/wx/qt/private/utils.h +++ b/include/wx/qt/private/utils.h @@ -24,7 +24,4 @@ void wxMissingImplementation( const char fileName[], unsigned lineNumber, #define wxMISSING_FUNCTION() \ wxMISSING_IMPLEMENTATION( __WXFUNCTION__ ) -// global function handle Qt objects destruction (just for debugging now) -void wxQtHandleDestroyedSignal(QObject *qobj = 0); - #endif // _WX_QT_UTILS_H_ diff --git a/include/wx/qt/private/winevent.h b/include/wx/qt/private/winevent.h index 45e94f0672..13c3ad6b18 100644 --- a/include/wx/qt/private/winevent.h +++ b/include/wx/qt/private/winevent.h @@ -62,7 +62,8 @@ public: void HandleDestroyedSignal() { - wxQtHandleDestroyedSignal(this); + wxLogDebug( wxT("%s was destroyed by Qt. pointer=%p"), + QObject::staticMetaObject.className(), this ); } virtual Handler *GetHandler() const diff --git a/src/qt/utils.cpp b/src/qt/utils.cpp index cca032fcaa..907e1c19de 100644 --- a/src/qt/utils.cpp +++ b/src/qt/utils.cpp @@ -163,10 +163,3 @@ bool wxLaunchDefaultApplication(const wxString& path, int WXUNUSED( flags ) ) { return QDesktopServices::openUrl( QUrl::fromLocalFile( wxQtConvertString( path ) ) ); } - -// Generic "Slot" to conect destruction signal for debugging purposes: -void wxQtHandleDestroyedSignal(QObject *qobj) -{ - wxLogDebug( wxT("%s was destroyed by Qt. pointer=%p"), - QObject::staticMetaObject.className(), qobj ); -}