1
0
Jan Engelhardt 2015-03-29 14:31:15 +00:00 committed by Git OBS Bridge
parent 22e7a38884
commit 243d2eb3ac

View File

@ -18,37 +18,42 @@ Change code to use full PIMPL so that wx headers do not depend on Qt at all
include/wx/qt/accel.h | 3 --
include/wx/qt/app.h | 2 -
include/wx/qt/colour.h | 29 +++++++++++-------------
include/wx/qt/window.h | 1
src/common/colourdata.cpp | 2 +
src/qt/accel.cpp | 2 -
src/qt/app.cpp | 1
src/qt/bitmap.cpp | 2 -
src/qt/brush.cpp | 6 ++---
src/qt/calctrl.cpp | 14 +++++------
src/qt/checkbox.cpp | 2 -
src/qt/clipbrd.cpp | 1
src/qt/colordlg.cpp | 4 +--
src/qt/colour.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++++++
src/qt/dc.cpp | 16 ++++++-------
src/qt/dcscreen.cpp | 1
src/qt/evtloop.cpp | 1
src/qt/listctrl.cpp | 4 +--
src/qt/pen.cpp | 6 ++---
14 files changed, 97 insertions(+), 49 deletions(-)
19 files changed, 103 insertions(+), 48 deletions(-)
Index: wxWidgets-trunk/include/wx/qt/accel.h
Index: wxWidgets/include/wx/qt/accel.h
===================================================================
--- wxWidgets-trunk.orig/include/wx/qt/accel.h
+++ wxWidgets-trunk/include/wx/qt/accel.h
@@ -9,9 +9,6 @@
--- wxWidgets.orig/include/wx/qt/accel.h
+++ wxWidgets/include/wx/qt/accel.h
@@ -9,8 +9,7 @@
#ifndef _WX_QT_ACCEL_H_
#define _WX_QT_ACCEL_H_
-#include <QtCore/QList>
-#include <QtWidgets/QShortcut>
-
+#include <QShortcut>
/* wxQt accelerators implementation:
*
* Storing:
Index: wxWidgets-trunk/include/wx/qt/app.h
Index: wxWidgets/include/wx/qt/app.h
===================================================================
--- wxWidgets-trunk.orig/include/wx/qt/app.h
+++ wxWidgets-trunk/include/wx/qt/app.h
--- wxWidgets.orig/include/wx/qt/app.h
+++ wxWidgets/include/wx/qt/app.h
@@ -9,8 +9,6 @@
#ifndef _WX_QT_APP_H_
#define _WX_QT_APP_H_
@ -58,10 +63,10 @@ Index: wxWidgets-trunk/include/wx/qt/app.h
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
{
public:
Index: wxWidgets-trunk/include/wx/qt/colour.h
Index: wxWidgets/include/wx/qt/colour.h
===================================================================
--- wxWidgets-trunk.orig/include/wx/qt/colour.h
+++ wxWidgets-trunk/include/wx/qt/colour.h
--- wxWidgets.orig/include/wx/qt/colour.h
+++ wxWidgets/include/wx/qt/colour.h
@@ -10,37 +10,34 @@
#ifndef _WX_QT_COLOUR_H_
#define _WX_QT_COLOUR_H_
@ -113,10 +118,22 @@ Index: wxWidgets-trunk/include/wx/qt/colour.h
DECLARE_DYNAMIC_CLASS(wxColour)
};
Index: wxWidgets-trunk/src/common/colourdata.cpp
Index: wxWidgets/include/wx/qt/window.h
===================================================================
--- wxWidgets-trunk.orig/src/common/colourdata.cpp
+++ wxWidgets-trunk/src/common/colourdata.cpp
--- wxWidgets.orig/include/wx/qt/window.h
+++ wxWidgets/include/wx/qt/window.h
@@ -11,6 +11,7 @@
#include <QtWidgets/QWidget>
#include <QtWidgets/QScrollArea>
+#include <QShortcut>
class WXDLLIMPEXP_FWD_CORE wxScrollBar;
class WXDLLIMPEXP_FWD_CORE wxQtShortcutHandler;
Index: wxWidgets/src/common/colourdata.cpp
===================================================================
--- wxWidgets.orig/src/common/colourdata.cpp
+++ wxWidgets/src/common/colourdata.cpp
@@ -24,6 +24,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourData, wx
wxColourData::wxColourData()
@ -133,10 +150,10 @@ Index: wxWidgets-trunk/src/common/colourdata.cpp
(*this) = data;
}
Index: wxWidgets-trunk/src/qt/accel.cpp
Index: wxWidgets/src/qt/accel.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/accel.cpp
+++ wxWidgets-trunk/src/qt/accel.cpp
--- wxWidgets.orig/src/qt/accel.cpp
+++ wxWidgets/src/qt/accel.cpp
@@ -85,7 +85,7 @@ QList< QShortcut* > wxAcceleratorTable::
{
QList< QShortcut* > qtList;
@ -146,11 +163,23 @@ Index: wxWidgets-trunk/src/qt/accel.cpp
{
qtList << ConvertAccelerator( node->GetData(), parent );
}
Index: wxWidgets-trunk/src/qt/bitmap.cpp
Index: wxWidgets/src/qt/app.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/bitmap.cpp
+++ wxWidgets-trunk/src/qt/bitmap.cpp
@@ -496,7 +496,7 @@ bool wxMask::Create(const wxBitmap& bitm
--- wxWidgets.orig/src/qt/app.cpp
+++ wxWidgets/src/qt/app.cpp
@@ -13,6 +13,7 @@
#include "wx/qt/private/utils.h"
#include "wx/qt/private/converter.h"
#include <QtCore/QStringList>
+#include <QApplication>
IMPLEMENT_DYNAMIC_CLASS( wxApp, wxAppBase )
Index: wxWidgets/src/qt/bitmap.cpp
===================================================================
--- wxWidgets.orig/src/qt/bitmap.cpp
+++ wxWidgets/src/qt/bitmap.cpp
@@ -504,7 +504,7 @@ bool wxMask::Create(const wxBitmap& bitm
if (m_qtBitmap)
delete m_qtBitmap;
@ -159,10 +188,10 @@ Index: wxWidgets-trunk/src/qt/bitmap.cpp
return true;
}
Index: wxWidgets-trunk/src/qt/brush.cpp
Index: wxWidgets/src/qt/brush.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/brush.cpp
+++ wxWidgets-trunk/src/qt/brush.cpp
--- wxWidgets.orig/src/qt/brush.cpp
+++ wxWidgets/src/qt/brush.cpp
@@ -95,7 +95,7 @@ wxBrush::wxBrush()
wxBrush::wxBrush(const wxColour& col, wxBrushStyle style )
{
@ -190,10 +219,10 @@ Index: wxWidgets-trunk/src/qt/brush.cpp
}
void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
Index: wxWidgets-trunk/src/qt/calctrl.cpp
Index: wxWidgets/src/qt/calctrl.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/calctrl.cpp
+++ wxWidgets-trunk/src/qt/calctrl.cpp
--- wxWidgets.orig/src/qt/calctrl.cpp
+++ wxWidgets/src/qt/calctrl.cpp
@@ -229,7 +229,7 @@ void wxCalendarCtrl::SetHoliday(size_t d
date.setDate(date.year(), date.month(), day);
@ -239,10 +268,10 @@ Index: wxWidgets-trunk/src/qt/calctrl.cpp
wxMISSING_IMPLEMENTATION( "Setting font" );
Index: wxWidgets-trunk/src/qt/checkbox.cpp
Index: wxWidgets/src/qt/checkbox.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/checkbox.cpp
+++ wxWidgets-trunk/src/qt/checkbox.cpp
--- wxWidgets.orig/src/qt/checkbox.cpp
+++ wxWidgets/src/qt/checkbox.cpp
@@ -116,7 +116,7 @@ wxCheckBoxState wxCheckBox::DoGet3StateV
case Qt::Checked:
return wxCHK_CHECKED;
@ -252,10 +281,22 @@ Index: wxWidgets-trunk/src/qt/checkbox.cpp
return wxCHK_UNDETERMINED;
}
}
Index: wxWidgets-trunk/src/qt/colordlg.cpp
Index: wxWidgets/src/qt/clipbrd.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/colordlg.cpp
+++ wxWidgets-trunk/src/qt/colordlg.cpp
--- wxWidgets.orig/src/qt/clipbrd.cpp
+++ wxWidgets/src/qt/clipbrd.cpp
@@ -13,6 +13,7 @@
#include "wx/scopeguard.h"
#include "wx/qt/private/converter.h"
+#include <QApplication>
#include <QClipboard>
// ----------------------------------------------------------------------------
Index: wxWidgets/src/qt/colordlg.cpp
===================================================================
--- wxWidgets.orig/src/qt/colordlg.cpp
+++ wxWidgets/src/qt/colordlg.cpp
@@ -29,10 +29,10 @@ bool wxColourDialog::Create(wxWindow *pa
if ( m_data.GetChooseFull() )
{
@ -269,10 +310,10 @@ Index: wxWidgets-trunk/src/qt/colordlg.cpp
return wxTopLevelWindow::Create( parent, wxID_ANY, "");
}
Index: wxWidgets-trunk/src/qt/colour.cpp
Index: wxWidgets/src/qt/colour.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/colour.cpp
+++ wxWidgets-trunk/src/qt/colour.cpp
--- wxWidgets.orig/src/qt/colour.cpp
+++ wxWidgets/src/qt/colour.cpp
@@ -10,11 +10,65 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@ -339,11 +380,11 @@ Index: wxWidgets-trunk/src/qt/colour.cpp
int wxColour::GetPixel() const
{
wxMISSING_IMPLEMENTATION( "wxColour::GetPixel" );
Index: wxWidgets-trunk/src/qt/dc.cpp
Index: wxWidgets/src/qt/dc.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/dc.cpp
+++ wxWidgets-trunk/src/qt/dc.cpp
@@ -128,7 +128,7 @@ void wxQtDCImpl::SetBrush(const wxBrush&
--- wxWidgets.orig/src/qt/dc.cpp
+++ wxWidgets/src/qt/dc.cpp
@@ -142,7 +142,7 @@ void wxQtDCImpl::SetBrush(const wxBrush&
{
// Use a monochrome mask: use foreground color for the mask
QBrush b(brush.GetHandle());
@ -352,7 +393,7 @@ Index: wxWidgets-trunk/src/qt/dc.cpp
b.setTexture(b.texture().mask());
m_qtPainter->setBrush(b);
}
@@ -553,7 +553,7 @@ void wxQtDCImpl::DoDrawEllipse(wxCoord x
@@ -572,7 +572,7 @@ void wxQtDCImpl::DoDrawEllipse(wxCoord x
// Save pen/brush
savedBrush = m_qtPainter->brush();
// Fill with text background color ("no fill" like in wxGTK):
@ -361,7 +402,7 @@ Index: wxWidgets-trunk/src/qt/dc.cpp
}
// Draw
@@ -598,8 +598,8 @@ void wxQtDCImpl::DoDrawBitmap(const wxBi
@@ -617,8 +617,8 @@ void wxQtDCImpl::DoDrawBitmap(const wxBi
QPen savedPen = m_qtPainter->pen();
//Use text colors
@ -372,7 +413,7 @@ Index: wxWidgets-trunk/src/qt/dc.cpp
//Draw
m_qtPainter->drawPixmap(x, y, pix);
@@ -629,7 +629,7 @@ void wxQtDCImpl::DoDrawBitmap(const wxBi
@@ -648,7 +648,7 @@ void wxQtDCImpl::DoDrawBitmap(const wxBi
void wxQtDCImpl::DoDrawText(const wxString& text, wxCoord x, wxCoord y)
{
QPen savedPen = m_qtPainter->pen();
@ -381,7 +422,7 @@ Index: wxWidgets-trunk/src/qt/dc.cpp
// Disable logical function
QPainter::CompositionMode savedOp = m_qtPainter->compositionMode();
@@ -643,7 +643,7 @@ void wxQtDCImpl::DoDrawText(const wxStri
@@ -662,7 +662,7 @@ void wxQtDCImpl::DoDrawText(const wxStri
QBrush savedBrush = m_qtPainter->background();
//Use text colors
@ -390,7 +431,7 @@ Index: wxWidgets-trunk/src/qt/dc.cpp
//Draw
m_qtPainter->drawText(x, y, 1, 1, Qt::TextDontClip, wxQtConvertString(text));
@@ -672,7 +672,7 @@ void wxQtDCImpl::DoDrawRotatedText(const
@@ -691,7 +691,7 @@ void wxQtDCImpl::DoDrawRotatedText(const
m_qtPainter->rotate(-angle);
QPen savedPen = m_qtPainter->pen();
@ -399,7 +440,7 @@ Index: wxWidgets-trunk/src/qt/dc.cpp
// Disable logical function
QPainter::CompositionMode savedOp = m_qtPainter->compositionMode();
@@ -686,7 +686,7 @@ void wxQtDCImpl::DoDrawRotatedText(const
@@ -705,7 +705,7 @@ void wxQtDCImpl::DoDrawRotatedText(const
QBrush savedBrush = m_qtPainter->background();
//Use text colors
@ -408,10 +449,34 @@ Index: wxWidgets-trunk/src/qt/dc.cpp
//Draw
m_qtPainter->drawText(x, y, 1, 1, Qt::TextDontClip, wxQtConvertString(text));
Index: wxWidgets-trunk/src/qt/listctrl.cpp
Index: wxWidgets/src/qt/dcscreen.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/listctrl.cpp
+++ wxWidgets-trunk/src/qt/listctrl.cpp
--- wxWidgets.orig/src/qt/dcscreen.cpp
+++ wxWidgets/src/qt/dcscreen.cpp
@@ -14,6 +14,7 @@
#include <QtWidgets/QDesktopWidget>
#include <QtGui/QScreen>
#include <QPixmap>
+#include <QApplication>
IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl)
Index: wxWidgets/src/qt/evtloop.cpp
===================================================================
--- wxWidgets.orig/src/qt/evtloop.cpp
+++ wxWidgets/src/qt/evtloop.cpp
@@ -16,6 +16,7 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QAbstractEventDispatcher>
#include <QtCore/QSocketNotifier>
+#include <QApplication>
wxQtIdleTimer::wxQtIdleTimer( wxQtEventLoopBase *eventLoop )
{
Index: wxWidgets/src/qt/listctrl.cpp
===================================================================
--- wxWidgets.orig/src/qt/listctrl.cpp
+++ wxWidgets/src/qt/listctrl.cpp
@@ -336,9 +336,9 @@ bool wxListCtrl::SetItem(wxListItem& inf
if ( info.GetFont().IsOk() )
qitem->setFont(col, info.GetFont().GetHandle() );
@ -424,10 +489,10 @@ Index: wxWidgets-trunk/src/qt/listctrl.cpp
}
return true;
}
Index: wxWidgets-trunk/src/qt/pen.cpp
Index: wxWidgets/src/qt/pen.cpp
===================================================================
--- wxWidgets-trunk.orig/src/qt/pen.cpp
+++ wxWidgets-trunk/src/qt/pen.cpp
--- wxWidgets.orig/src/qt/pen.cpp
+++ wxWidgets/src/qt/pen.cpp
@@ -247,7 +247,7 @@ wxPen::wxPen( const wxColour &colour, in
m_refData = new wxPenRefData();
M_PENDATA.setWidth(width);