From ebd98179c5c6df037a9b7c29e8d3b33f8577bbf1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 9 Jan 2012 18:48:39 +0000 Subject: [PATCH] Use wxT() instead of _T() in XTI code. _T() is deprecated and doesn't work with Solaris compiler, use wxT() instead. Also change one occurrence of _T() inside a comment in wx/debug.h. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/debug.h | 4 ++-- include/wx/xtitypes.h | 8 +++---- src/common/xti.cpp | 44 +++++++++++++++++++-------------------- src/common/xtistrm.cpp | 4 ++-- src/univ/themes/win32.cpp | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/include/wx/debug.h b/include/wx/debug.h index af091bcc7f..2ee3f6dbb0 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -162,7 +162,7 @@ inline void wxDisableAsserts() { wxSetAssertHandler(NULL); } /* wxOnAssert() is used by the debugging macros defined below. Different - overloads are needed because these macros can be used with or without _T(). + overloads are needed because these macros can be used with or without wxT(). All of them are implemented in src/common/appcmn.cpp and unconditionally call wxTheAssertHandler so the caller must check that it is non-NULL @@ -172,7 +172,7 @@ inline void wxDisableAsserts() { wxSetAssertHandler(NULL); } #if wxUSE_UNICODE // these overloads are the ones typically used by debugging macros: we have to -// provide wxChar* msg version because it's common to use _T() in the macros +// provide wxChar* msg version because it's common to use wxT() in the macros // and finally, we can't use const wx(char)* msg = NULL, because that would // be ambiguous // diff --git a/include/wx/xtitypes.h b/include/wx/xtitypes.h index 0879897f53..295a87656e 100644 --- a/include/wx/xtitypes.h +++ b/include/wx/xtitypes.h @@ -355,7 +355,7 @@ public: if ( m_toString ) (*m_toString)( data, result ); else - wxLogError( wxGetTranslation(_T("String conversions not supported")) ); + wxLogError( wxGetTranslation(wxT("String conversions not supported")) ); } // convert a string into a wxAny holding the corresponding data in this type @@ -364,7 +364,7 @@ public: if( m_fromString ) (*m_fromString)( data, result ); else - wxLogError( wxGetTranslation(_T("String conversions not supported")) ); + wxLogError( wxGetTranslation(wxT("String conversions not supported")) ); } // statics: @@ -428,7 +428,7 @@ public: if( m_toLong ) (*m_toLong)( data, result ); else - wxLogError( wxGetTranslation(_T("Long Conversions not supported")) ); + wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) ); } // convert a long into a wxAny holding the corresponding data in this type @@ -437,7 +437,7 @@ public: if( m_fromLong ) (*m_fromLong)( data, result ); else - wxLogError( wxGetTranslation(_T("Long Conversions not supported")) ); + wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) ); } private: diff --git a/src/common/xti.cpp b/src/common/xti.cpp index f207253ad7..31c2282f13 100644 --- a/src/common/xti.cpp +++ b/src/common/xti.cpp @@ -117,13 +117,13 @@ const wxChar * wxEnumData::GetEnumMemberNameByIndex( int idx ) const template<> void wxStringReadValue(const wxString &s, bool &data ) { int intdata; - wxSscanf(s, _T("%d"), &intdata ); + wxSscanf(s, wxT("%d"), &intdata ); data = (bool)(intdata != 0); } template<> void wxStringWriteValue(wxString &s, const bool &data ) { - s = wxString::Format(_T("%d"), data ); + s = wxString::Format(wxT("%d"), data ); } // char @@ -131,13 +131,13 @@ template<> void wxStringWriteValue(wxString &s, const bool &data ) template<> void wxStringReadValue(const wxString &s, char &data ) { int intdata; - wxSscanf(s, _T("%d"), &intdata ); + wxSscanf(s, wxT("%d"), &intdata ); data = char(intdata); } template<> void wxStringWriteValue(wxString &s, const char &data ) { - s = wxString::Format(_T("%d"), data ); + s = wxString::Format(wxT("%d"), data ); } // unsigned char @@ -145,106 +145,106 @@ template<> void wxStringWriteValue(wxString &s, const char &data ) template<> void wxStringReadValue(const wxString &s, unsigned char &data ) { int intdata; - wxSscanf(s, _T("%d"), &intdata ); + wxSscanf(s, wxT("%d"), &intdata ); data = (unsigned char)(intdata); } template<> void wxStringWriteValue(wxString &s, const unsigned char &data ) { - s = wxString::Format(_T("%d"), data ); + s = wxString::Format(wxT("%d"), data ); } // int template<> void wxStringReadValue(const wxString &s, int &data ) { - wxSscanf(s, _T("%d"), &data ); + wxSscanf(s, wxT("%d"), &data ); } template<> void wxStringWriteValue(wxString &s, const int &data ) { - s = wxString::Format(_T("%d"), data ); + s = wxString::Format(wxT("%d"), data ); } // unsigned int template<> void wxStringReadValue(const wxString &s, unsigned int &data ) { - wxSscanf(s, _T("%d"), &data ); + wxSscanf(s, wxT("%d"), &data ); } template<> void wxStringWriteValue(wxString &s, const unsigned int &data ) { - s = wxString::Format(_T("%d"), data ); + s = wxString::Format(wxT("%d"), data ); } // long template<> void wxStringReadValue(const wxString &s, long &data ) { - wxSscanf(s, _T("%ld"), &data ); + wxSscanf(s, wxT("%ld"), &data ); } template<> void wxStringWriteValue(wxString &s, const long &data ) { - s = wxString::Format(_T("%ld"), data ); + s = wxString::Format(wxT("%ld"), data ); } // unsigned long template<> void wxStringReadValue(const wxString &s, unsigned long &data ) { - wxSscanf(s, _T("%ld"), &data ); + wxSscanf(s, wxT("%ld"), &data ); } template<> void wxStringWriteValue(wxString &s, const unsigned long &data ) { - s = wxString::Format(_T("%ld"), data ); + s = wxString::Format(wxT("%ld"), data ); } #ifdef wxLongLong_t template<> void wxStringReadValue(const wxString &s, wxLongLong_t &data ) { - wxSscanf(s, _T("%lld"), &data ); + wxSscanf(s, wxT("%lld"), &data ); } template<> void wxStringWriteValue(wxString &s, const wxLongLong_t &data ) { - s = wxString::Format(_T("%lld"), data ); + s = wxString::Format(wxT("%lld"), data ); } template<> void wxStringReadValue(const wxString &s, wxULongLong_t &data ) { - wxSscanf(s, _T("%lld"), &data ); + wxSscanf(s, wxT("%lld"), &data ); } template<> void wxStringWriteValue(wxString &s, const wxULongLong_t &data ) { - s = wxString::Format(_T("%lld"), data ); + s = wxString::Format(wxT("%lld"), data ); } #endif // float template<> void wxStringReadValue(const wxString &s, float &data ) { - wxSscanf(s, _T("%f"), &data ); + wxSscanf(s, wxT("%f"), &data ); } template<> void wxStringWriteValue(wxString &s, const float &data ) { - s = wxString::Format(_T("%f"), data ); + s = wxString::Format(wxT("%f"), data ); } // double template<> void wxStringReadValue(const wxString &s, double &data ) { - wxSscanf(s, _T("%lf"), &data ); + wxSscanf(s, wxT("%lf"), &data ); } template<> void wxStringWriteValue(wxString &s, const double &data ) { - s = wxString::Format(_T("%lf"), data ); + s = wxString::Format(wxT("%lf"), data ); } // wxString diff --git a/src/common/xtistrm.cpp b/src/common/xtistrm.cpp index 9f0860b933..de182f0ef0 100644 --- a/src/common/xtistrm.cpp +++ b/src/common/xtistrm.cpp @@ -289,8 +289,8 @@ void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* c } else { - wxLogError( _T("Streaming delegates for not already ") - _T("streamed objects not yet supported") ); + wxLogError( wxT("Streaming delegates for not already ") + wxT("streamed objects not yet supported") ); } } } diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 095e95d37f..ca9e07313f 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -3775,7 +3775,7 @@ void wxWin32FrameInputHandler::PopupSystemMenu(wxTopLevelWindow *window) const if ( window->GetWindowStyle() & wxMAXIMIZE_BOX ) menu.Append(wxID_MAXIMIZE_FRAME , _("Ma&ximize")); menu.AppendSeparator(); - menu.Append(wxID_CLOSE_FRAME, _("&Close") + _T("\t") + _("Alt+") + _T("F4")); + menu.Append(wxID_CLOSE_FRAME, _("&Close") + wxT("\t") + _("Alt+") + wxT("F4")); if ( window->GetWindowStyle() & wxMAXIMIZE_BOX ) { -- 2.47.2