wxqt: correct formatting and casting, no functional change

This commit is contained in:
Sean D'Epagnier
2016-09-12 12:24:52 -04:00
committed by Vadim Zeitlin
parent 42144b93b7
commit 169d61edb7
20 changed files with 38 additions and 36 deletions

View File

@@ -21,7 +21,7 @@ protected:
virtual void DoGetSize(int *width, int *height) const wxOVERRIDE; virtual void DoGetSize(int *width, int *height) const wxOVERRIDE;
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
QImage *GetQImage(); virtual QImage *GetQImage();
wxDECLARE_ABSTRACT_CLASS(wxScreenDCImpl); wxDECLARE_ABSTRACT_CLASS(wxScreenDCImpl);
}; };

View File

@@ -62,7 +62,7 @@ wxDataFormat::wxDataFormat(const wxString &id)
wxDataFormat::wxDataFormat(const wxChar *id) wxDataFormat::wxDataFormat(const wxChar *id)
{ {
m_MimeType = (wxString)id; m_MimeType = id;
} }
wxDataFormat::wxDataFormat(const QString &id) wxDataFormat::wxDataFormat(const QString &id)
@@ -72,7 +72,7 @@ wxDataFormat::wxDataFormat(const QString &id)
void wxDataFormat::SetId( const wxChar *id ) void wxDataFormat::SetId( const wxChar *id )
{ {
m_MimeType = (wxString)id; m_MimeType = id;
} }
void wxDataFormat::SetId( const wxString& id ) void wxDataFormat::SetId( const wxString& id )

View File

@@ -111,8 +111,10 @@ wxRegion::wxRegion(const wxBitmap& bmp, const wxColour& transp, int tolerance)
QImage img(bmp.GetHandle()->toImage()); QImage img(bmp.GetHandle()->toImage());
int r = transp.Red(), g = transp.Green(), b = transp.Blue(); int r = transp.Red(), g = transp.Green(), b = transp.Blue();
for(int y=0; y<img.height(); y++) { for(int y=0; y<img.height(); y++)
for(int x=0; x<img.width(); x++) { {
for(int x=0; x<img.width(); x++)
{
QColor c = img.pixel(x, y); QColor c = img.pixel(x, y);
if ( abs(c.red() - r ) > tolerance || if ( abs(c.red() - r ) > tolerance ||
abs(c.green() - g) > tolerance || abs(c.green() - g) > tolerance ||