Don't use static_cast for downcast.
This commit is contained in:
parent
c3142b8b07
commit
4b2e8c0c82
|
@ -41,7 +41,7 @@ class VApplication;// use in define
|
|||
#if defined(qApp)
|
||||
#undef qApp
|
||||
#endif
|
||||
#define qApp (static_cast<VApplication*>(VAbstractApplication::instance()))
|
||||
#define qApp (qobject_cast<VApplication*>(VAbstractApplication::instance()))
|
||||
|
||||
/**
|
||||
* @brief The VApplication class reimplamentation QApplication class.
|
||||
|
|
|
@ -52,7 +52,7 @@ class VCommonSettings;
|
|||
#if defined(qApp)
|
||||
#undef qApp
|
||||
#endif
|
||||
#define qApp (static_cast<VAbstractApplication*>(QCoreApplication::instance()))
|
||||
#define qApp (qobject_cast<VAbstractApplication*>(QCoreApplication::instance()))
|
||||
|
||||
class VAbstractApplication : public QApplication
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ class QGraphicsScene;
|
|||
#if defined(qApp)
|
||||
#undef qApp
|
||||
#endif
|
||||
#define qApp (static_cast<VAbstractValApplication*>(QCoreApplication::instance()))
|
||||
#define qApp (qobject_cast<VAbstractValApplication*>(QCoreApplication::instance()))
|
||||
|
||||
class VAbstractValApplication : public VAbstractApplication
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user