compilation fix for g++ which doesn't like using wxLogMessage in wxON_BLOCK_SCOPE_EXIT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,7 +32,6 @@
|
|||||||
#include "wx/socket.h"
|
#include "wx/socket.h"
|
||||||
#include "wx/url.h"
|
#include "wx/url.h"
|
||||||
#include "wx/sstream.h"
|
#include "wx/sstream.h"
|
||||||
#include "wx/scopeguard.h"
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -104,6 +103,24 @@ private:
|
|||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// simple helper class to log start and end of each test
|
||||||
|
class TestLogger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TestLogger(const wxString& name) : m_name(name)
|
||||||
|
{
|
||||||
|
wxLogMessage("=== %s test begins ===", m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
~TestLogger()
|
||||||
|
{
|
||||||
|
wxLogMessage("=== %s test ends ===", m_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
const wxString m_name;
|
||||||
|
};
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -595,8 +612,7 @@ void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event))
|
|||||||
s_urlname = urlname;
|
s_urlname = urlname;
|
||||||
|
|
||||||
|
|
||||||
wxLogMessage("=== URL test begins ===");
|
TestLogger logtest("URL");
|
||||||
wxON_BLOCK_EXIT1( wxLogMessage, "=== URL test ends ===" );
|
|
||||||
|
|
||||||
// Parse the URL
|
// Parse the URL
|
||||||
wxURL url(urlname);
|
wxURL url(urlname);
|
||||||
|
Reference in New Issue
Block a user