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
This commit is contained in:
Mariano Reingart
2015-01-19 02:57:06 +00:00
parent 3be53c43d7
commit e67fbf1579
3 changed files with 2 additions and 11 deletions

View File

@@ -24,7 +24,4 @@ void wxMissingImplementation( const char fileName[], unsigned lineNumber,
#define wxMISSING_FUNCTION() \ #define wxMISSING_FUNCTION() \
wxMISSING_IMPLEMENTATION( __WXFUNCTION__ ) wxMISSING_IMPLEMENTATION( __WXFUNCTION__ )
// global function handle Qt objects destruction (just for debugging now)
void wxQtHandleDestroyedSignal(QObject *qobj = 0);
#endif // _WX_QT_UTILS_H_ #endif // _WX_QT_UTILS_H_

View File

@@ -62,7 +62,8 @@ public:
void HandleDestroyedSignal() void HandleDestroyedSignal()
{ {
wxQtHandleDestroyedSignal(this); wxLogDebug( wxT("%s was destroyed by Qt. pointer=%p"),
QObject::staticMetaObject.className(), this );
} }
virtual Handler *GetHandler() const virtual Handler *GetHandler() const

View File

@@ -163,10 +163,3 @@ bool wxLaunchDefaultApplication(const wxString& path, int WXUNUSED( flags ) )
{ {
return QDesktopServices::openUrl( QUrl::fromLocalFile( wxQtConvertString( path ) ) ); 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 );
}