Remove casts from wxString to "const char*" in wxQt code

These casts didn't compile in Unicode build and were completely
unnecessary anyhow, just remove them.
This commit is contained in:
Vadim Zeitlin
2017-07-14 16:56:33 +02:00
parent 0d63351eef
commit b368fa2de5

View File

@@ -194,8 +194,7 @@ wxWindowQt::~wxWindowQt()
// Delete only if the qt widget was created or assigned to this base class // Delete only if the qt widget was created or assigned to this base class
if (m_qtWindow) if (m_qtWindow)
{ {
wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::~wxWindow %s m_qtWindow=%p"), wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::~wxWindow %s m_qtWindow=%p"), GetName(), m_qtWindow);
(const char*)GetName(), m_qtWindow);
// Avoid sending further signals (i.e. if deleting the current page) // Avoid sending further signals (i.e. if deleting the current page)
m_qtWindow->blockSignals(true); m_qtWindow->blockSignals(true);
// Reset the pointer to avoid handling pending event and signals // Reset the pointer to avoid handling pending event and signals
@@ -206,8 +205,7 @@ wxWindowQt::~wxWindowQt()
} }
else else
{ {
wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::~wxWindow %s m_qtWindow is NULL"), wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::~wxWindow %s m_qtWindow is NULL"), GetName());
(const char*)GetName());
} }
} }
@@ -260,8 +258,7 @@ void wxWindowQt::PostCreation(bool generic)
// store pointer to the QWidget subclass (to be used in the destructor) // store pointer to the QWidget subclass (to be used in the destructor)
m_qtWindow = GetHandle(); m_qtWindow = GetHandle();
} }
wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::Create %s m_qtWindow=%p"), wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::Create %s m_qtWindow=%p"), GetName(), m_qtWindow);
(const char*)GetName(), m_qtWindow);
// set the background style after creation (not before like in wxGTK) // set the background style after creation (not before like in wxGTK)
// (only for generic controls, to use qt defaults elsewere) // (only for generic controls, to use qt defaults elsewere)
@@ -395,7 +392,7 @@ void wxWindowQt::WarpPointer(int x, int y)
void wxWindowQt::Update() void wxWindowQt::Update()
{ {
wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::Update %s"), (const char*)GetName()); wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::Update %s"), GetName());
// send the paint event to the inner widget in scroll areas: // send the paint event to the inner widget in scroll areas:
if ( QtGetScrollBarsContainer() ) if ( QtGetScrollBarsContainer() )
{ {
@@ -422,14 +419,13 @@ void wxWindowQt::Refresh( bool WXUNUSED( eraseBackground ), const wxRect *rect )
if ( rect != NULL ) if ( rect != NULL )
{ {
wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::Refresh %s rect %d %d %d %d"), wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::Refresh %s rect %d %d %d %d"),
(const char*)GetName(), GetName(),
rect->x, rect->y, rect->width, rect->height); rect->x, rect->y, rect->width, rect->height);
widget->update( wxQtConvertRect( *rect )); widget->update( wxQtConvertRect( *rect ));
} }
else else
{ {
wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::Refresh %s"), wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::Refresh %s"), GetName());
(const char*)GetName());
widget->update(); widget->update();
} }
} }
@@ -1081,7 +1077,7 @@ bool wxWindowQt::QtHandlePaintEvent ( QWidget *handler, QPaintEvent *event )
if ( UseBgCol() && !GetHandle()->autoFillBackground() ) if ( UseBgCol() && !GetHandle()->autoFillBackground() )
{ {
wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::QtHandlePaintEvent %s clearing DC to %s"), wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::QtHandlePaintEvent %s clearing DC to %s"),
(const char*)GetName(), GetBackgroundColour().GetAsString() GetName(), GetBackgroundColour().GetAsString()
); );
dc.SetBackground(GetBackgroundColour()); dc.SetBackground(GetBackgroundColour());
dc.Clear(); dc.Clear();
@@ -1130,8 +1126,7 @@ bool wxWindowQt::QtHandlePaintEvent ( QWidget *handler, QPaintEvent *event )
else else
{ {
// Painter didn't begun, not handled by wxWidgets: // Painter didn't begun, not handled by wxWidgets:
wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::QtHandlePaintEvent %s Qt widget painter begin failed"), wxLogTrace(TRACE_QT_WINDOW, wxT("wxWindow::QtHandlePaintEvent %s Qt widget painter begin failed"), GetName() );
(const char*)GetName() );
return false; return false;
} }
} }