Fix several build errors in WXQT

Move declaration of wxOwnerDrawnBase::ms_defaultMargin to correct file.
Do not include headers when wxUSE_UIACTIONSIMULATOR is disabled.
Add guards for wxUSE_DRAG_AND_DROP.
Use a different wxFont constructor in printing sample, which is also available in WXQT.
This commit is contained in:
Maarten Bent 2018-09-25 21:28:30 +02:00
parent 4e23b3e7f4
commit 7f0d7ef520
7 changed files with 16 additions and 9 deletions

View File

@ -133,7 +133,9 @@ public:
QWidget *GetHandle() const wxOVERRIDE; QWidget *GetHandle() const wxOVERRIDE;
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE; virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE;
#endif
#if wxUSE_ACCEL #if wxUSE_ACCEL
// accelerators // accelerators

View File

@ -106,7 +106,7 @@ bool MyApp::OnInit(void)
m_bitmap = image; m_bitmap = image;
#endif #endif
m_angle = 30; m_angle = 30;
m_testFont.Create(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); m_testFont = wxFontInfo(10).Family(wxFONTFAMILY_SWISS);
// Create the main frame window // Create the main frame window

View File

@ -36,6 +36,12 @@
#include "wx/utils.h" #include "wx/utils.h"
#endif #endif
// ----------------------------------------------------------------------------
// constants for base class
// ----------------------------------------------------------------------------
int wxOwnerDrawnBase::ms_defaultMargin = 3;
// ============================================================================ // ============================================================================
// implementation // implementation
// ============================================================================ // ============================================================================

View File

@ -23,12 +23,6 @@
#include "wx/msw/private/dc.h" #include "wx/msw/private/dc.h"
#include "wx/msw/wrapcctl.h" // for HIMAGELIST #include "wx/msw/wrapcctl.h" // for HIMAGELIST
// ----------------------------------------------------------------------------
// constants for base class
// ----------------------------------------------------------------------------
int wxOwnerDrawnBase::ms_defaultMargin = 3;
// ============================================================================ // ============================================================================
// implementation of wxOwnerDrawn class // implementation of wxOwnerDrawn class
// ============================================================================ // ============================================================================

View File

@ -8,6 +8,8 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h" #include "wx/dnd.h"
wxDropTarget::wxDropTarget(wxDataObject *WXUNUSED(dataObject)) wxDropTarget::wxDropTarget(wxDataObject *WXUNUSED(dataObject))
@ -58,3 +60,4 @@ wxDragResult wxDropSource::DoDragDrop(int WXUNUSED(flags))
return wxDragResult(); return wxDragResult();
} }
#endif // wxUSE_DRAG_AND_DROP

View File

@ -12,6 +12,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_UIACTIONSIMULATOR
#include "wx/uiaction.h" #include "wx/uiaction.h"
#include "wx/private/uiaction.h" #include "wx/private/uiaction.h"
@ -24,8 +26,6 @@
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#if wxUSE_UIACTIONSIMULATOR
using namespace Qt; using namespace Qt;
using namespace QTest; using namespace QTest;

View File

@ -650,10 +650,12 @@ void wxWindowQt::ScrollWindow( int dx, int dy, const wxRect *rect )
} }
#if wxUSE_DRAG_AND_DROP
void wxWindowQt::SetDropTarget( wxDropTarget * WXUNUSED( dropTarget ) ) void wxWindowQt::SetDropTarget( wxDropTarget * WXUNUSED( dropTarget ) )
{ {
wxMISSING_IMPLEMENTATION( __FUNCTION__ ); wxMISSING_IMPLEMENTATION( __FUNCTION__ );
} }
#endif
void wxWindowQt::SetWindowStyleFlag( long style ) void wxWindowQt::SetWindowStyleFlag( long style )
{ {