Remove QT_JAMBI_BUILD code
Change-Id: Ic9231b11293af4352f11cf075893175f0c9a471f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
0501c9d8f1
commit
2561ab5841
@ -61,7 +61,7 @@ Qt {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN))
|
#if defined(Q_MOC_RUN)
|
||||||
// NOTE: Generally, do not add Q_ENUMS if a corresponding Q_FLAGS exists.
|
// NOTE: Generally, do not add Q_ENUMS if a corresponding Q_FLAGS exists.
|
||||||
Q_ENUMS(ScrollBarPolicy FocusPolicy ContextMenuPolicy)
|
Q_ENUMS(ScrollBarPolicy FocusPolicy ContextMenuPolicy)
|
||||||
Q_ENUMS(ArrowType ToolButtonStyle PenStyle PenCapStyle PenJoinStyle BrushStyle)
|
Q_ENUMS(ArrowType ToolButtonStyle PenStyle PenCapStyle PenJoinStyle BrushStyle)
|
||||||
@ -97,7 +97,7 @@ Qt {
|
|||||||
Q_ENUMS(GestureType)
|
Q_ENUMS(GestureType)
|
||||||
#endif
|
#endif
|
||||||
Q_ENUMS(CursorMoveStyle)
|
Q_ENUMS(CursorMoveStyle)
|
||||||
#endif // (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN))
|
#endif // defined(Q_MOC_RUN)
|
||||||
|
|
||||||
#if defined(Q_MOC_RUN)
|
#if defined(Q_MOC_RUN)
|
||||||
public:
|
public:
|
||||||
|
@ -802,26 +802,7 @@ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
|
|||||||
QObjectPrivate *d = receiver->d_func();
|
QObjectPrivate *d = receiver->d_func();
|
||||||
QThreadData *threadData = d->threadData;
|
QThreadData *threadData = d->threadData;
|
||||||
QScopedLoopLevelCounter loopLevelCounter(threadData);
|
QScopedLoopLevelCounter loopLevelCounter(threadData);
|
||||||
|
return notify(receiver, event);
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
int deleteWatch = 0;
|
|
||||||
int *oldDeleteWatch = QObjectPrivate::setDeleteWatch(d, &deleteWatch);
|
|
||||||
|
|
||||||
bool inEvent = d->inEventHandler;
|
|
||||||
d->inEventHandler = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool returnValue;
|
|
||||||
returnValue = notify(receiver, event);
|
|
||||||
|
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
// Restore the previous state if the object was not deleted..
|
|
||||||
if (!deleteWatch) {
|
|
||||||
d->inEventHandler = inEvent;
|
|
||||||
}
|
|
||||||
QObjectPrivate::resetDeleteWatch(d, oldDeleteWatch, deleteWatch);
|
|
||||||
#endif
|
|
||||||
return returnValue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,10 +172,6 @@ QObjectPrivate::QObjectPrivate(int version)
|
|||||||
extraData = 0;
|
extraData = 0;
|
||||||
connectedSignals[0] = connectedSignals[1] = 0;
|
connectedSignals[0] = connectedSignals[1] = 0;
|
||||||
inThreadChangeEvent = false;
|
inThreadChangeEvent = false;
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
inEventHandler = false;
|
|
||||||
deleteWatch = 0;
|
|
||||||
#endif
|
|
||||||
metaObject = 0;
|
metaObject = 0;
|
||||||
isWindow = false;
|
isWindow = false;
|
||||||
}
|
}
|
||||||
@ -194,10 +190,6 @@ QObjectPrivate::~QObjectPrivate()
|
|||||||
threadData->deref();
|
threadData->deref();
|
||||||
|
|
||||||
delete static_cast<QAbstractDynamicMetaObject*>(metaObject);
|
delete static_cast<QAbstractDynamicMetaObject*>(metaObject);
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
if (deleteWatch)
|
|
||||||
*deleteWatch = 1;
|
|
||||||
#endif
|
|
||||||
#ifndef QT_NO_USERDATA
|
#ifndef QT_NO_USERDATA
|
||||||
if (extraData)
|
if (extraData)
|
||||||
qDeleteAll(extraData->userData);
|
qDeleteAll(extraData->userData);
|
||||||
@ -205,25 +197,6 @@ QObjectPrivate::~QObjectPrivate()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
int *QObjectPrivate::setDeleteWatch(QObjectPrivate *d, int *w) {
|
|
||||||
int *old = d->deleteWatch;
|
|
||||||
d->deleteWatch = w;
|
|
||||||
return old;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void QObjectPrivate::resetDeleteWatch(QObjectPrivate *d, int *oldWatch, int deleteWatch) {
|
|
||||||
if (!deleteWatch)
|
|
||||||
d->deleteWatch = oldWatch;
|
|
||||||
|
|
||||||
if (oldWatch)
|
|
||||||
*oldWatch = deleteWatch;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*!\internal
|
/*!\internal
|
||||||
For a given metaobject, compute the signal offset, and the method offset (including signals)
|
For a given metaobject, compute the signal offset, and the method offset (including signals)
|
||||||
*/
|
*/
|
||||||
@ -837,13 +810,6 @@ QObject::~QObject()
|
|||||||
|
|
||||||
if (d->parent) // remove it from parent object
|
if (d->parent) // remove it from parent object
|
||||||
d->setParent_helper(0);
|
d->setParent_helper(0);
|
||||||
|
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
if (d->inEventHandler) {
|
|
||||||
qWarning("QObject: Do not delete object, '%s', during its event handler!",
|
|
||||||
objectName().isNull() ? "unnamed" : qPrintable(objectName()));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QObjectPrivate::Connection::~Connection()
|
QObjectPrivate::Connection::~Connection()
|
||||||
@ -1031,9 +997,6 @@ bool QObject::event(QEvent *e)
|
|||||||
|
|
||||||
case QEvent::MetaCall:
|
case QEvent::MetaCall:
|
||||||
{
|
{
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
d_func()->inEventHandler = false;
|
|
||||||
#endif
|
|
||||||
QMetaCallEvent *mce = static_cast<QMetaCallEvent*>(e);
|
QMetaCallEvent *mce = static_cast<QMetaCallEvent*>(e);
|
||||||
|
|
||||||
QConnectionSenderSwitcher sw(this, const_cast<QObject*>(mce->sender()), mce->signalId());
|
QConnectionSenderSwitcher sw(this, const_cast<QObject*>(mce->sender()), mce->signalId());
|
||||||
@ -1338,15 +1301,6 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData
|
|||||||
currentSender->ref = 0;
|
currentSender->ref = 0;
|
||||||
currentSender = 0;
|
currentSender = 0;
|
||||||
|
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
// the current event thread also shouldn't restore the delete watch
|
|
||||||
inEventHandler = false;
|
|
||||||
|
|
||||||
if (deleteWatch)
|
|
||||||
*deleteWatch = 1;
|
|
||||||
deleteWatch = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// set new thread data
|
// set new thread data
|
||||||
targetData->ref();
|
targetData->ref();
|
||||||
threadData->deref();
|
threadData->deref();
|
||||||
@ -3891,11 +3845,6 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
|
|||||||
|
|
||||||
void qDeleteInEventHandler(QObject *o)
|
void qDeleteInEventHandler(QObject *o)
|
||||||
{
|
{
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
if (!o)
|
|
||||||
return;
|
|
||||||
QObjectPrivate::get(o)->inEventHandler = false;
|
|
||||||
#endif
|
|
||||||
delete o;
|
delete o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,10 +103,9 @@ public:
|
|||||||
uint ownObjectName : 1;
|
uint ownObjectName : 1;
|
||||||
uint sendChildEvents : 1;
|
uint sendChildEvents : 1;
|
||||||
uint receiveChildEvents : 1;
|
uint receiveChildEvents : 1;
|
||||||
uint inEventHandler : 1; //only used if QT_JAMBI_BUILD
|
|
||||||
uint inThreadChangeEvent : 1;
|
uint inThreadChangeEvent : 1;
|
||||||
uint isWindow : 1; //for QWindow
|
uint isWindow : 1; //for QWindow
|
||||||
uint unused : 21;
|
uint unused : 22;
|
||||||
int postedEvents;
|
int postedEvents;
|
||||||
QMetaObject *metaObject; // assert dynamic
|
QMetaObject *metaObject; // assert dynamic
|
||||||
};
|
};
|
||||||
|
@ -179,10 +179,6 @@ public:
|
|||||||
static inline void resetCurrentSender(QObject *receiver,
|
static inline void resetCurrentSender(QObject *receiver,
|
||||||
Sender *currentSender,
|
Sender *currentSender,
|
||||||
Sender *previousSender);
|
Sender *previousSender);
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
static int *setDeleteWatch(QObjectPrivate *d, int *newWatch);
|
|
||||||
static void resetDeleteWatch(QObjectPrivate *d, int *oldWatch, int deleteWatch);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static QObjectPrivate *get(QObject *o) {
|
static QObjectPrivate *get(QObject *o) {
|
||||||
return o->d_func();
|
return o->d_func();
|
||||||
@ -211,9 +207,6 @@ public:
|
|||||||
// these objects are all used to indicate that a QObject was deleted
|
// these objects are all used to indicate that a QObject was deleted
|
||||||
// plus QPointer, which keeps a separate list
|
// plus QPointer, which keeps a separate list
|
||||||
QAtomicPointer<QtSharedPointer::ExternalRefCountData> sharedRefcount;
|
QAtomicPointer<QtSharedPointer::ExternalRefCountData> sharedRefcount;
|
||||||
#ifdef QT_JAMBI_BUILD
|
|
||||||
int *deleteWatch;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user