Change Qt smart pointers with wx ones to fix compilation
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
#ifndef _WX_QT_APP_H_
|
#ifndef _WX_QT_APP_H_
|
||||||
#define _WX_QT_APP_H_
|
#define _WX_QT_APP_H_
|
||||||
|
|
||||||
#include <QtCore/QScopedPointer>
|
#include <wx/scopedarray.h>
|
||||||
|
|
||||||
class QApplication;
|
class QApplication;
|
||||||
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
|
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
|
||||||
@@ -21,9 +21,9 @@ public:
|
|||||||
virtual bool Initialize(int& argc, wxChar **argv);
|
virtual bool Initialize(int& argc, wxChar **argv);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<QApplication> m_qtApplication;
|
wxScopedPtr<QApplication> m_qtApplication;
|
||||||
int m_qtArgc;
|
int m_qtArgc;
|
||||||
QScopedArrayPointer<char*> m_qtArgv;
|
wxScopedArray<char*> m_qtArgv;
|
||||||
|
|
||||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxApp );
|
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxApp );
|
||||||
};
|
};
|
||||||
|
@@ -9,8 +9,6 @@
|
|||||||
#ifndef _WX_QT_WINDOW_H_
|
#ifndef _WX_QT_WINDOW_H_
|
||||||
#define _WX_QT_WINDOW_H_
|
#define _WX_QT_WINDOW_H_
|
||||||
|
|
||||||
#include <QtCore/QScopedPointer>
|
|
||||||
|
|
||||||
class QShortcut;
|
class QShortcut;
|
||||||
template < class T > class QList;
|
template < class T > class QList;
|
||||||
|
|
||||||
@@ -229,13 +227,13 @@ private:
|
|||||||
bool QtSetBackgroundStyle();
|
bool QtSetBackgroundStyle();
|
||||||
|
|
||||||
QPicture *m_qtPicture; // not owned
|
QPicture *m_qtPicture; // not owned
|
||||||
QScopedPointer<QPainter> m_qtPainter; // always allocated
|
wxScopedPtr<QPainter> m_qtPainter; // always allocated
|
||||||
|
|
||||||
bool m_mouseInside;
|
bool m_mouseInside;
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
wxVector<QShortcut*> m_qtShortcuts; // owned by whatever GetHandle() returns
|
wxVector<QShortcut*> m_qtShortcuts; // owned by whatever GetHandle() returns
|
||||||
QScopedPointer<wxQtShortcutHandler> m_qtShortcutHandler; // always allocated
|
wxScopedPtr<wxQtShortcutHandler> m_qtShortcutHandler; // always allocated
|
||||||
bool m_processingShortcut;
|
bool m_processingShortcut;
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@ bool wxApp::Initialize( int &argc, wxChar **argv )
|
|||||||
m_qtArgv[argc] = NULL;
|
m_qtArgv[argc] = NULL;
|
||||||
m_qtArgc = argc;
|
m_qtArgc = argc;
|
||||||
|
|
||||||
m_qtApplication.reset(new QApplication(m_qtArgc, m_qtArgv.data()));
|
m_qtApplication.reset(new QApplication(m_qtArgc, m_qtArgv.get()));
|
||||||
|
|
||||||
// Use the args returned by Qt as it may have deleted (processed) some of them
|
// Use the args returned by Qt as it may have deleted (processed) some of them
|
||||||
// Using QApplication::arguments() forces argument processing
|
// Using QApplication::arguments() forces argument processing
|
||||||
|
@@ -1001,8 +1001,8 @@ void wxWindowQt::SetAcceleratorTable( const wxAcceleratorTable& accel )
|
|||||||
for ( wxVector<QShortcut*>::const_iterator it = m_qtShortcuts.begin();
|
for ( wxVector<QShortcut*>::const_iterator it = m_qtShortcuts.begin();
|
||||||
it != m_qtShortcuts.end(); ++it )
|
it != m_qtShortcuts.end(); ++it )
|
||||||
{
|
{
|
||||||
QObject::connect( *it, &QShortcut::activated, m_qtShortcutHandler.data(), &wxQtShortcutHandler::activated );
|
QObject::connect( *it, &QShortcut::activated, m_qtShortcutHandler.get(), &wxQtShortcutHandler::activated );
|
||||||
QObject::connect( *it, &QShortcut::activatedAmbiguously, m_qtShortcutHandler.data(), &wxQtShortcutHandler::activated );
|
QObject::connect( *it, &QShortcut::activatedAmbiguously, m_qtShortcutHandler.get(), &wxQtShortcutHandler::activated );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
@@ -1168,7 +1168,7 @@ bool wxWindowQt::QtHandlePaintEvent ( QWidget *handler, QPaintEvent *event )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Data from wxClientDC, paint it
|
// Data from wxClientDC, paint it
|
||||||
m_qtPicture->play( m_qtPainter.data() );
|
m_qtPicture->play( m_qtPainter.get() );
|
||||||
// Reset picture
|
// Reset picture
|
||||||
m_qtPicture->setData( NULL, 0 );
|
m_qtPicture->setData( NULL, 0 );
|
||||||
handled = true;
|
handled = true;
|
||||||
@@ -1549,5 +1549,5 @@ void wxWindowQt::QtSetPicture( QPicture* pict )
|
|||||||
|
|
||||||
QPainter *wxWindowQt::QtGetPainter()
|
QPainter *wxWindowQt::QtGetPainter()
|
||||||
{
|
{
|
||||||
return m_qtPainter.data();
|
return m_qtPainter.get();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user