Make wxQt build again, with less compiler warnings
This fixes a missing include in qt/nonownedwnd.cpp and a missing method in qt/glcanvas.cpp, allowing the build to complete again. A number of missing wxOVERRIDE statements were added to reduce the important number of compiler warnings about those missing labels.
This commit is contained in:
committed by
Vadim Zeitlin
parent
1c249a6934
commit
3da6b9c14f
@@ -38,7 +38,7 @@
|
|||||||
// resources
|
// resources
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
|
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__) || defined(__WXQT__)
|
||||||
// application icon
|
// application icon
|
||||||
#include "mondrian.xpm"
|
#include "mondrian.xpm"
|
||||||
|
|
||||||
|
@@ -52,18 +52,18 @@ public:
|
|||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxComboBoxNameStr);
|
const wxString& name = wxComboBoxNameStr);
|
||||||
|
|
||||||
virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
|
virtual void SetSelection(int n) wxOVERRIDE { wxChoice::SetSelection(n); }
|
||||||
virtual void SetSelection(long from, long to);
|
virtual void SetSelection(long from, long to) wxOVERRIDE;
|
||||||
|
|
||||||
virtual int GetSelection() const { return wxChoice::GetSelection(); }
|
virtual int GetSelection() const wxOVERRIDE { return wxChoice::GetSelection(); }
|
||||||
virtual void GetSelection(long *from, long *to) const;
|
virtual void GetSelection(long *from, long *to) const wxOVERRIDE;
|
||||||
|
|
||||||
virtual wxString GetStringSelection() const
|
virtual wxString GetStringSelection() const wxOVERRIDE
|
||||||
{
|
{
|
||||||
return wxItemContainer::GetStringSelection();
|
return wxItemContainer::GetStringSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Clear()
|
virtual void Clear() wxOVERRIDE
|
||||||
{
|
{
|
||||||
wxTextEntry::Clear();
|
wxTextEntry::Clear();
|
||||||
wxItemContainer::Clear();
|
wxItemContainer::Clear();
|
||||||
@@ -79,7 +79,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
// From wxTextEntry:
|
// From wxTextEntry:
|
||||||
virtual wxString DoGetValue() const;
|
virtual wxString DoGetValue() const wxOVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@@ -40,10 +40,10 @@ public:
|
|||||||
long style = wxTB_DEFAULT_STYLE | wxNO_BORDER,
|
long style = wxTB_DEFAULT_STYLE | wxNO_BORDER,
|
||||||
const wxString& name = wxToolBarNameStr);
|
const wxString& name = wxToolBarNameStr);
|
||||||
|
|
||||||
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
|
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const wxOVERRIDE;
|
||||||
virtual QToolBar *GetQToolBar() const { return m_qtToolBar; }
|
virtual QToolBar *GetQToolBar() const { return m_qtToolBar; }
|
||||||
|
|
||||||
virtual void SetWindowStyleFlag( long style );
|
virtual void SetWindowStyleFlag( long style ) wxOVERRIDE;
|
||||||
virtual bool Realize() wxOVERRIDE;
|
virtual bool Realize() wxOVERRIDE;
|
||||||
|
|
||||||
virtual wxToolBarToolBase *CreateTool(int toolid,
|
virtual wxToolBarToolBase *CreateTool(int toolid,
|
||||||
@@ -53,20 +53,20 @@ public:
|
|||||||
wxItemKind kind,
|
wxItemKind kind,
|
||||||
wxObject *clientData,
|
wxObject *clientData,
|
||||||
const wxString& shortHelp,
|
const wxString& shortHelp,
|
||||||
const wxString& longHelp);
|
const wxString& longHelp) wxOVERRIDE;
|
||||||
|
|
||||||
virtual wxToolBarToolBase *CreateTool(wxControl *control,
|
virtual wxToolBarToolBase *CreateTool(wxControl *control,
|
||||||
const wxString& label);
|
const wxString& label) wxOVERRIDE;
|
||||||
QWidget *GetHandle() const;
|
QWidget *GetHandle() const wxOVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
QActionGroup* GetActionGroup(size_t pos);
|
QActionGroup* GetActionGroup(size_t pos);
|
||||||
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
|
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool) wxOVERRIDE;
|
||||||
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
|
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool) wxOVERRIDE;
|
||||||
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
|
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable) wxOVERRIDE;
|
||||||
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
|
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle) wxOVERRIDE;
|
||||||
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
|
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle) wxOVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
long GetButtonStyle();
|
long GetButtonStyle();
|
||||||
|
@@ -65,82 +65,82 @@ public:
|
|||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = wxPanelNameStr);
|
const wxString& name = wxPanelNameStr);
|
||||||
|
|
||||||
bool Create(wxWindowQt *parent,
|
bool Create(wxWindowQt *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = wxPanelNameStr);
|
const wxString& name = wxPanelNameStr);
|
||||||
|
|
||||||
// Used by all window classes in the widget creation process.
|
// Used by all window classes in the widget creation process.
|
||||||
void PostCreation( bool generic = true );
|
void PostCreation( bool generic = true );
|
||||||
|
|
||||||
void AddChild( wxWindowBase *child );
|
void AddChild( wxWindowBase *child ) wxOVERRIDE;
|
||||||
|
|
||||||
virtual bool Show( bool show = true );
|
virtual bool Show( bool show = true ) wxOVERRIDE;
|
||||||
|
|
||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label) wxOVERRIDE;
|
||||||
virtual wxString GetLabel() const;
|
virtual wxString GetLabel() const wxOVERRIDE;
|
||||||
|
|
||||||
virtual void DoEnable( bool enable );
|
virtual void DoEnable( bool enable ) wxOVERRIDE;
|
||||||
virtual void SetFocus();
|
virtual void SetFocus() wxOVERRIDE;
|
||||||
|
|
||||||
// Parent/Child:
|
// Parent/Child:
|
||||||
static void QtReparent( QWidget *child, QWidget *parent );
|
static void QtReparent( QWidget *child, QWidget *parent );
|
||||||
virtual bool Reparent( wxWindowBase *newParent );
|
virtual bool Reparent( wxWindowBase *newParent ) wxOVERRIDE;
|
||||||
|
|
||||||
// Z-order
|
|
||||||
virtual void Raise();
|
|
||||||
virtual void Lower();
|
|
||||||
|
|
||||||
// move the mouse to the specified position
|
|
||||||
virtual void WarpPointer(int x, int y);
|
|
||||||
|
|
||||||
virtual void Update();
|
// Z-order
|
||||||
|
virtual void Raise() wxOVERRIDE;
|
||||||
|
virtual void Lower() wxOVERRIDE;
|
||||||
|
|
||||||
|
// move the mouse to the specified position
|
||||||
|
virtual void WarpPointer(int x, int y) wxOVERRIDE;
|
||||||
|
|
||||||
|
virtual void Update() wxOVERRIDE;
|
||||||
virtual void Refresh( bool eraseBackground = true,
|
virtual void Refresh( bool eraseBackground = true,
|
||||||
const wxRect *rect = (const wxRect *) NULL );
|
const wxRect *rect = (const wxRect *) NULL ) wxOVERRIDE;
|
||||||
|
|
||||||
virtual bool SetCursor( const wxCursor &cursor ) wxOVERRIDE;
|
virtual bool SetCursor( const wxCursor &cursor ) wxOVERRIDE;
|
||||||
virtual bool SetFont(const wxFont& font);
|
virtual bool SetFont(const wxFont& font) wxOVERRIDE;
|
||||||
|
|
||||||
// get the (average) character size for the current font
|
// get the (average) character size for the current font
|
||||||
virtual int GetCharHeight() const;
|
virtual int GetCharHeight() const wxOVERRIDE;
|
||||||
virtual int GetCharWidth() const;
|
virtual int GetCharWidth() const wxOVERRIDE;
|
||||||
|
|
||||||
virtual void SetScrollbar( int orient,
|
virtual void SetScrollbar( int orient,
|
||||||
int pos,
|
int pos,
|
||||||
int thumbvisible,
|
int thumbvisible,
|
||||||
int range,
|
int range,
|
||||||
bool refresh = true );
|
bool refresh = true ) wxOVERRIDE;
|
||||||
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
|
virtual void SetScrollPos( int orient, int pos, bool refresh = true ) wxOVERRIDE;
|
||||||
virtual int GetScrollPos( int orient ) const;
|
virtual int GetScrollPos( int orient ) const wxOVERRIDE;
|
||||||
virtual int GetScrollThumb( int orient ) const;
|
virtual int GetScrollThumb( int orient ) const wxOVERRIDE;
|
||||||
virtual int GetScrollRange( int orient ) const;
|
virtual int GetScrollRange( int orient ) const wxOVERRIDE;
|
||||||
|
|
||||||
// scroll window to the specified position
|
// scroll window to the specified position
|
||||||
virtual void ScrollWindow( int dx, int dy,
|
virtual void ScrollWindow( int dx, int dy,
|
||||||
const wxRect* rect = NULL );
|
const wxRect* rect = NULL ) wxOVERRIDE;
|
||||||
|
|
||||||
// Styles
|
// Styles
|
||||||
virtual void SetWindowStyleFlag( long style );
|
virtual void SetWindowStyleFlag( long style ) wxOVERRIDE;
|
||||||
virtual void SetExtraStyle( long exStyle );
|
virtual void SetExtraStyle( long exStyle ) wxOVERRIDE;
|
||||||
|
|
||||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style);
|
virtual bool SetBackgroundStyle(wxBackgroundStyle style) wxOVERRIDE;
|
||||||
virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const;
|
virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const wxOVERRIDE;
|
||||||
virtual bool SetTransparent(wxByte alpha);
|
virtual bool SetTransparent(wxByte alpha) wxOVERRIDE;
|
||||||
virtual bool CanSetTransparent() { return true; }
|
virtual bool CanSetTransparent() wxOVERRIDE { return true; }
|
||||||
|
|
||||||
QWidget *GetHandle() const;
|
QWidget *GetHandle() const wxOVERRIDE;
|
||||||
|
|
||||||
|
virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE;
|
||||||
|
|
||||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
// accelerators
|
// accelerators
|
||||||
// ------------
|
// ------------
|
||||||
virtual void SetAcceleratorTable( const wxAcceleratorTable& accel );
|
virtual void SetAcceleratorTable( const wxAcceleratorTable& accel ) wxOVERRIDE;
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
// wxQt implementation internals:
|
// wxQt implementation internals:
|
||||||
|
|
||||||
virtual QPicture *QtGetPicture() const;
|
virtual QPicture *QtGetPicture() const;
|
||||||
@@ -174,34 +174,34 @@ protected:
|
|||||||
int *x, int *y,
|
int *x, int *y,
|
||||||
int *descent = NULL,
|
int *descent = NULL,
|
||||||
int *externalLeading = NULL,
|
int *externalLeading = NULL,
|
||||||
const wxFont *font = NULL) const;
|
const wxFont *font = NULL) const wxOVERRIDE;
|
||||||
|
|
||||||
// coordinates translation
|
// coordinates translation
|
||||||
virtual void DoClientToScreen( int *x, int *y ) const;
|
virtual void DoClientToScreen( int *x, int *y ) const wxOVERRIDE;
|
||||||
virtual void DoScreenToClient( int *x, int *y ) const;
|
virtual void DoScreenToClient( int *x, int *y ) const wxOVERRIDE;
|
||||||
|
|
||||||
// capture/release the mouse, used by Capture/ReleaseMouse()
|
// capture/release the mouse, used by Capture/ReleaseMouse()
|
||||||
virtual void DoCaptureMouse();
|
virtual void DoCaptureMouse() wxOVERRIDE;
|
||||||
virtual void DoReleaseMouse();
|
virtual void DoReleaseMouse() wxOVERRIDE;
|
||||||
|
|
||||||
// retrieve the position/size of the window
|
// retrieve the position/size of the window
|
||||||
virtual void DoGetPosition(int *x, int *y) const;
|
virtual void DoGetPosition(int *x, int *y) const wxOVERRIDE;
|
||||||
|
|
||||||
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
|
||||||
virtual void DoGetSize(int *width, int *height) const;
|
virtual void DoGetSize(int *width, int *height) const wxOVERRIDE;
|
||||||
|
|
||||||
// same as DoSetSize() for the client size
|
// same as DoSetSize() for the client size
|
||||||
virtual void DoSetClientSize(int width, int height);
|
virtual void DoSetClientSize(int width, int height) wxOVERRIDE;
|
||||||
virtual void DoGetClientSize(int *width, int *height) const;
|
virtual void DoGetClientSize(int *width, int *height) const wxOVERRIDE;
|
||||||
|
|
||||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE;
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
virtual void DoSetToolTip( wxToolTip *tip );
|
virtual void DoSetToolTip( wxToolTip *tip ) wxOVERRIDE;
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
|
||||||
#if wxUSE_MENUS
|
#if wxUSE_MENUS
|
||||||
virtual bool DoPopupMenu(wxMenu *menu, int x, int y);
|
virtual bool DoPopupMenu(wxMenu *menu, int x, int y) wxOVERRIDE;
|
||||||
#endif // wxUSE_MENUS
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
QWidget *m_qtWindow;
|
QWidget *m_qtWindow;
|
||||||
|
@@ -318,6 +318,10 @@ wxGLAttributes& wxGLAttributes::Defaults()
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxGLAttributes::AddDefaultsForWXBefore31()
|
||||||
|
{
|
||||||
|
Defaults();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// wxGlContext
|
// wxGlContext
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include "wx/nonownedwnd.h"
|
#include "wx/nonownedwnd.h"
|
||||||
#include "wx/qt/private/converter.h"
|
#include "wx/qt/private/converter.h"
|
||||||
|
#include "wx/qt/private/utils.h"
|
||||||
|
|
||||||
#include <QtGui/QBitmap>
|
#include <QtGui/QBitmap>
|
||||||
#include <QtGui/QPainter>
|
#include <QtGui/QPainter>
|
||||||
|
Reference in New Issue
Block a user