Fixes for wxQt build under Cygwin

Include the missing headers, notable QtGui/QFont from wx/fontutil.h which uses
a QFont object.

Closes #16750.
This commit is contained in:
Tim Stahlhut
2015-10-25 18:00:05 +01:00
committed by Vadim Zeitlin
parent db966da330
commit fb5d1a002c
23 changed files with 195 additions and 41 deletions

View File

@@ -25,6 +25,10 @@
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif
#if defined(__WXQT__)
#include <QtGui/QFont>
#endif
class WXDLLIMPEXP_FWD_BASE wxArrayString; class WXDLLIMPEXP_FWD_BASE wxArrayString;
struct WXDLLIMPEXP_FWD_CORE wxNativeEncodingInfo; struct WXDLLIMPEXP_FWD_CORE wxNativeEncodingInfo;

View File

@@ -14,6 +14,8 @@
#include "wx/defs.h" #include "wx/defs.h"
#include <QtCore/Qt> #include <QtCore/Qt>
#include "wx/kbdstate.h"
// Rely on overloading and let the compiler pick the correct version, which makes // Rely on overloading and let the compiler pick the correct version, which makes
// them easier to use then to write wxQtConvertQtRectToWxRect() or wxQtConvertWxRectToQtRect() // them easier to use then to write wxQtConvertQtRectToWxRect() or wxQtConvertWxRectToQtRect()

View File

@@ -11,6 +11,7 @@
#ifndef _WX_QT_EVENTSIGNALFORWARDER_H_ #ifndef _WX_QT_EVENTSIGNALFORWARDER_H_
#define _WX_QT_EVENTSIGNALFORWARDER_H_ #define _WX_QT_EVENTSIGNALFORWARDER_H_
#include "wx/log.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#include "wx/qt/private/utils.h" #include "wx/qt/private/utils.h"

View File

@@ -10,6 +10,7 @@
#ifndef _WX_QT_TOOLBAR_H_ #ifndef _WX_QT_TOOLBAR_H_
#define _WX_QT_TOOLBAR_H_ #define _WX_QT_TOOLBAR_H_
class QActionGroup;
class wxQtToolBar; class wxQtToolBar;
class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase

View File

@@ -8,16 +8,25 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/bitmap.h" #ifdef __BORLANDC__
#include "wx/image.h" #pragma hdrstop
#include "wx/rawbmp.h" #endif
#include "wx/qt/private/converter.h"
#include "wx/qt/private/utils.h"
#include <QtGui/QPixmap> #include <QtGui/QPixmap>
#include <QtGui/QBitmap> #include <QtGui/QBitmap>
#include <QtWidgets/QLabel> #include <QtWidgets/QLabel>
#ifndef WX_PRECOMP
#include "wx/icon.h"
#include "wx/image.h"
#endif // WX_PRECOMP
#include "wx/bitmap.h"
#include "wx/rawbmp.h"
#include "wx/qt/private/converter.h"
#include "wx/qt/private/utils.h"
static wxImage ConvertImage( QImage qtImage ) static wxImage ConvertImage( QImage qtImage )
{ {
bool hasAlpha = qtImage.hasAlphaChannel(); bool hasAlpha = qtImage.hasAlphaChannel();

View File

@@ -8,8 +8,16 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/bitmap.h"
#endif // WX_PRECOMP
#include "wx/button.h" #include "wx/button.h"
#include "wx/bitmap.h" #include "wx/stockitem.h"
#include "wx/qt/private/utils.h" #include "wx/qt/private/utils.h"
#include "wx/qt/private/winevent.h" #include "wx/qt/private/winevent.h"

View File

@@ -8,12 +8,18 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QApplication>
#include <QClipboard>
#include "wx/clipbrd.h" #include "wx/clipbrd.h"
#include "wx/scopedarray.h" #include "wx/scopedarray.h"
#include "wx/scopeguard.h" #include "wx/scopeguard.h"
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#include <QClipboard>
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxClipboard ctor/dtor // wxClipboard ctor/dtor

View File

@@ -9,12 +9,18 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/qt/private/utils.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP
#include "wx/colour.h"
#endif // WX_PRECOMP
#include "wx/qt/private/utils.h"
int wxColour::GetPixel() const int wxColour::GetPixel() const
{ {
wxMISSING_IMPLEMENTATION( "wxColour::GetPixel" ); wxMISSING_IMPLEMENTATION( "wxColour::GetPixel" );

View File

@@ -9,8 +9,9 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/gdicmn.h" #ifdef __BORLANDC__
#include "wx/gdicmn.h" #pragma hdrstop
#endif
#include <QtCore/QRect> #include <QtCore/QRect>
#include <QtCore/QString> #include <QtCore/QString>
@@ -22,6 +23,11 @@
#include <QtCore/QDate> #include <QtCore/QDate>
#endif // wxUSE_DATETIME #endif // wxUSE_DATETIME
#include "wx/kbdstate.h"
#include "wx/gdicmn.h"
#include "wx/gdicmn.h"
wxPoint wxQtConvertPoint( const QPoint &point ) wxPoint wxQtConvertPoint( const QPoint &point )
{ {
if (point.isNull()) if (point.isNull())

View File

@@ -7,11 +7,21 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/cursor.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QApplication> #include <QApplication>
#include <QBitmap> #include <QBitmap>
#ifndef WX_PRECOMP
#include "wx/bitmap.h"
#endif // WX_PRECOMP
#include "wx/cursor.h"
void wxSetCursor(const wxCursor& cursor) void wxSetCursor(const wxCursor& cursor)
{ {
if (cursor.m_qtCursor.shape() == Qt::ArrowCursor) if (cursor.m_qtCursor.shape() == Qt::ArrowCursor)

View File

@@ -8,6 +8,12 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QObject>
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#include "wx/qt/private/utils.h" #include "wx/qt/private/utils.h"
#include "wx/dataobj.h" #include "wx/dataobj.h"

View File

@@ -8,12 +8,22 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QtGui/QBitmap>
#ifndef WX_PRECOMP
#include "wx/icon.h"
#include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/icon.h"
#include "wx/qt/dc.h" #include "wx/qt/dc.h"
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#include "wx/qt/private/utils.h" #include "wx/qt/private/utils.h"
#include <QtGui/QBitmap>
static void SetPenColour( QPainter *qtPainter, QColor col ) static void SetPenColour( QPainter *qtPainter, QColor col )
{ {

View File

@@ -8,12 +8,21 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/dcclient.h" #ifdef __BORLANDC__
#include "wx/log.h" #pragma hdrstop
#include "wx/qt/dcclient.h" #endif
#include <QtGui/QPicture> #include <QtGui/QPicture>
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/window.h"
#endif // WX_PRECOMP
#include "wx/dcclient.h"
#include "wx/qt/dcclient.h"
//############################################################################## //##############################################################################
wxWindowDCImpl::wxWindowDCImpl( wxDC *owner ) wxWindowDCImpl::wxWindowDCImpl( wxDC *owner )

View File

@@ -8,13 +8,18 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QtGui/QFont>
#include <QtGui/QFontInfo>
#include "wx/font.h" #include "wx/font.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/qt/private/utils.h" #include "wx/qt/private/utils.h"
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#include <QtGui/QFont>
#include <QtGui/QFontInfo>
static QFont::StyleHint ConvertFontFamily(wxFontFamily family) static QFont::StyleHint ConvertFontFamily(wxFontFamily family)
{ {

View File

@@ -8,6 +8,12 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QtGui/QFont>
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/encinfo.h" #include "wx/encinfo.h"

View File

@@ -8,12 +8,21 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QtWidgets/QScrollArea>
#ifndef WX_PRECOMP
#include "wx/menu.h"
#include "wx/toolbar.h"
#endif // WX_PRECOMP
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/menu.h"
#include "wx/qt/private/utils.h" #include "wx/qt/private/utils.h"
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#include "wx/qt/private/winevent.h" #include "wx/qt/private/winevent.h"
#include <QtWidgets/QScrollArea>
class wxQtMainWindow : public wxQtEventSignalHandler< QMainWindow, wxFrame > class wxQtMainWindow : public wxQtEventSignalHandler< QMainWindow, wxFrame >

View File

@@ -8,12 +8,20 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QHeaderView>
#ifndef WX_PRECOMP
#include "wx/bitmap.h"
#endif // WX_PRECOMP
#include "wx/listctrl.h" #include "wx/listctrl.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/qt/private/winevent.h" #include "wx/qt/private/winevent.h"
#include <QHeaderView>
class wxQtTreeWidget : public wxQtEventSignalHandler< QTreeWidget, wxListCtrl > class wxQtTreeWidget : public wxQtEventSignalHandler< QTreeWidget, wxListCtrl >
{ {

View File

@@ -8,8 +8,16 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/bitmap.h"
#endif // WX_PRECOMP
#include "wx/stockitem.h"
#include "wx/tglbtn.h" #include "wx/tglbtn.h"
#include "wx/bitmap.h"
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#include "wx/qt/private/winevent.h" #include "wx/qt/private/winevent.h"

View File

@@ -8,14 +8,23 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/toolbar.h" #ifdef __BORLANDC__
#include "wx/qt/private/winevent.h" #pragma hdrstop
#include "wx/qt/private/converter.h" #endif
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
#include <QActionGroup>
#include <QtWidgets/QToolButton> #include <QtWidgets/QToolButton>
#ifndef WX_PRECOMP
#include "wx/menu.h"
#endif // WX_PRECOMP
#include "wx/toolbar.h"
#include "wx/qt/private/winevent.h"
#include "wx/qt/private/converter.h"
class wxQtToolButton; class wxQtToolButton;
class wxToolBarTool : public wxToolBarToolBase class wxToolBarTool : public wxToolBarToolBase
{ {

View File

@@ -8,6 +8,14 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/window.h"
#endif // WX_PRECOMP
#include "wx/tooltip.h" #include "wx/tooltip.h"
#include "wx/qt/private/utils.h" #include "wx/qt/private/utils.h"

View File

@@ -8,12 +8,17 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <QtTest/QtTestGui>
#include "wx/qt/defs.h" #include "wx/qt/defs.h"
#include "wx/qt/private/utils.h" #include "wx/qt/private/utils.h"
#include "wx/uiaction.h" #include "wx/uiaction.h"
#include "wx/qt/private/converter.h" #include "wx/qt/private/converter.h"
#include <QtTest/QtTestGui>
#if wxUSE_UIACTIONSIMULATOR #if wxUSE_UIACTIONSIMULATOR

View File

@@ -8,11 +8,9 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/utils.h" #ifdef __BORLANDC__
#include "wx/window.h" #pragma hdrstop
#include "wx/cursor.h" #endif
#include "wx/qt/private/utils.h"
#include "wx/qt/private/converter.h"
#include <QtGui/QCursor> #include <QtGui/QCursor>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
@@ -20,6 +18,17 @@
#include <QtGui/QDesktopServices> #include <QtGui/QDesktopServices>
#include <QtCore/QUrl> #include <QtCore/QUrl>
#ifndef WX_PRECOMP
#include "wx/cursor.h"
#include "wx/log.h"
#include "wx/window.h"
#endif // WX_PRECOMP
#include "wx/utils.h"
#include "wx/qt/private/utils.h"
#include "wx/qt/private/converter.h"
void wxMissingImplementation( const char fileName[], unsigned lineNumber, void wxMissingImplementation( const char fileName[], unsigned lineNumber,
const char feature[] ) const char feature[] )
{ {

View File

@@ -8,14 +8,9 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/window.h" #ifdef __BORLANDC__
#include "wx/log.h" #pragma hdrstop
#include "wx/menu.h" #endif
#include "wx/tooltip.h"
#include "wx/scrolbar.h"
#include "wx/qt/private/utils.h"
#include "wx/qt/private/converter.h"
#include "wx/qt/private/winevent.h"
#include <QtGui/QPicture> #include <QtGui/QPicture>
#include <QtGui/QPainter> #include <QtGui/QPainter>
@@ -24,6 +19,20 @@
#include <QtWidgets/QWidget> #include <QtWidgets/QWidget>
#include <QtWidgets/QScrollArea> #include <QtWidgets/QScrollArea>
#ifndef WX_PRECOMP
#include "wx/dcclient.h"
#include "wx/frame.h"
#include "wx/log.h"
#include "wx/menu.h"
#include "wx/scrolbar.h"
#endif // WX_PRECOMP
#include "wx/window.h"
#include "wx/tooltip.h"
#include "wx/qt/private/utils.h"
#include "wx/qt/private/converter.h"
#include "wx/qt/private/winevent.h"
#define VERT_SCROLLBAR_POSITION 0, 1 #define VERT_SCROLLBAR_POSITION 0, 1
#define HORZ_SCROLLBAR_POSITION 1, 0 #define HORZ_SCROLLBAR_POSITION 1, 0