Allow creating wxSingleInstanceChecker with default name.
This makes it easier to use in common cases: there is no need to come up with a unique name for the checker any more as sufficiently unique combination of wxApp::GetAppName() and wxGetUserId() is used if no name was explicitly given. This is done by calling the new CreateDefault() on demand from IsAnotherRunning() instead of simply creating the checker with the default name in the default ctor for compatibility (you had to call Create() after using the default ctor before and it can only be called once) and because wxTheApp might not exist yet when wxSingleInstanceChecker is created. Closes #11166. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -117,7 +117,7 @@ bool wxSingleInstanceChecker::Create(const wxString& name,
|
||||
return m_impl->Create(name);
|
||||
}
|
||||
|
||||
bool wxSingleInstanceChecker::IsAnotherRunning() const
|
||||
bool wxSingleInstanceChecker::DoIsAnotherRunning() const
|
||||
{
|
||||
wxCHECK_MSG( m_impl, false, wxT("must call Create() first") );
|
||||
|
||||
|
Reference in New Issue
Block a user