mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
replace QT_NO_PAINT_DEBUG with QT_NO_DEBUG
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
d797e1893b
commit
740c82a0a0
5 changed files with 19 additions and 29 deletions
|
@ -224,7 +224,6 @@
|
|||
#cmakedefine QT_NO_NETWORKPROXY
|
||||
#cmakedefine QT_NO_NIS
|
||||
#cmakedefine QT_NO_NSL
|
||||
#cmakedefine QT_NO_PAINT_DEBUG
|
||||
#cmakedefine QT_NO_PDF
|
||||
#cmakedefine QT_NO_PLUGIN_CHECK
|
||||
#cmakedefine QT_NO_PRINTDIALOG
|
||||
|
|
|
@ -771,10 +771,6 @@ Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line);
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(QT_NO_DEBUG) && !defined(QT_PAINT_DEBUG)
|
||||
#define QT_NO_PAINT_DEBUG
|
||||
#endif
|
||||
|
||||
Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *file, int line);
|
||||
|
||||
#if !defined(Q_ASSERT_X)
|
||||
|
|
|
@ -4807,7 +4807,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
|
|||
q->setAttribute(Qt::WA_WState_InPaintEvent);
|
||||
|
||||
//clip away the new area
|
||||
#ifndef QT_NO_PAINT_DEBUG
|
||||
#ifndef QT_NO_DEBUG
|
||||
bool flushed = QWidgetBackingStore::flushPaint(q, toBePainted);
|
||||
#endif
|
||||
QPaintEngine *paintEngine = pdev->paintEngine();
|
||||
|
@ -4855,7 +4855,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
|
|||
if (q->paintingActive() && !q->testAttribute(Qt::WA_PaintOutsidePaintEvent))
|
||||
qWarning("QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent");
|
||||
|
||||
#ifndef QT_NO_PAINT_DEBUG
|
||||
#ifndef QT_NO_DEBUG
|
||||
if (flushed)
|
||||
QWidgetBackingStore::unflushPaint(q, toBePainted);
|
||||
#endif
|
||||
|
|
|
@ -88,7 +88,7 @@ static inline void qt_flush(QWidget *widget, const QRegion ®ion, QWindowSurfa
|
|||
Q_ASSERT(windowSurface);
|
||||
Q_ASSERT(tlw);
|
||||
|
||||
#if !defined(QT_NO_PAINT_DEBUG)
|
||||
#if !defined(QT_NO_DEBUG)
|
||||
static int flushUpdate = qgetenv("QT_FLUSH_UPDATE").toInt();
|
||||
if (flushUpdate > 0)
|
||||
QWidgetBackingStore::showYellowThing(widget, region, flushUpdate * 10, false);
|
||||
|
@ -115,7 +115,7 @@ static inline void qt_flush(QWidget *widget, const QRegion ®ion, QWindowSurfa
|
|||
windowSurface->flush(widget, region, tlwOffset);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_PAINT_DEBUG
|
||||
#ifndef QT_NO_DEBUG
|
||||
void QWidgetBackingStore::showYellowThing(QWidget *widget, const QRegion &toBePainted, int msec, bool unclipped)
|
||||
{
|
||||
QRegion paintRegion = toBePainted;
|
||||
|
@ -213,7 +213,7 @@ void QWidgetBackingStore::unflushPaint(QWidget *widget, const QRegion &rgn)
|
|||
const QPoint offset = widget->mapTo(tlw, QPoint());
|
||||
qt_flush(widget, rgn, tlwExtra->backingStore->windowSurface, tlw, offset);
|
||||
}
|
||||
#endif // QT_NO_PAINT_DEBUG
|
||||
#endif // QT_NO_DEBUG
|
||||
|
||||
/*
|
||||
Moves the whole rect by (dx, dy) in widget's coordinate system.
|
||||
|
@ -245,16 +245,16 @@ void QWidgetBackingStore::releaseBuffer()
|
|||
The \a toClean region might be clipped by the window surface.
|
||||
*/
|
||||
void QWidgetBackingStore::beginPaint(QRegion &toClean, QWidget *widget, QWindowSurface *windowSurface,
|
||||
BeginPaintInfo *returnInfo, bool toCleanIsInTopLevelCoordinates)
|
||||
BeginPaintInfo *returnInfo)
|
||||
{
|
||||
Q_UNUSED(widget);
|
||||
Q_UNUSED(toCleanIsInTopLevelCoordinates);
|
||||
|
||||
// Always flush repainted areas.
|
||||
dirtyOnScreen += toClean;
|
||||
|
||||
#ifdef QT_NO_PAINT_DEBUG
|
||||
#ifdef QT_NO_DEBUG
|
||||
windowSurface->beginPaint(toClean);
|
||||
Q_UNUSED(returnInfo);
|
||||
#else
|
||||
returnInfo->wasFlushed = QWidgetBackingStore::flushPaint(tlw, toClean);
|
||||
// Avoid deadlock with QT_FLUSH_PAINT: the server will wait for
|
||||
|
@ -264,14 +264,12 @@ void QWidgetBackingStore::beginPaint(QRegion &toClean, QWidget *widget, QWindowS
|
|||
if (!returnInfo->wasFlushed)
|
||||
windowSurface->beginPaint(toClean);
|
||||
#endif
|
||||
|
||||
Q_UNUSED(returnInfo);
|
||||
}
|
||||
|
||||
void QWidgetBackingStore::endPaint(const QRegion &cleaned, QWindowSurface *windowSurface,
|
||||
BeginPaintInfo *beginPaintInfo)
|
||||
{
|
||||
#ifndef QT_NO_PAINT_DEBUG
|
||||
#ifndef QT_NO_DEBUG
|
||||
if (!beginPaintInfo->wasFlushed)
|
||||
windowSurface->endPaint(cleaned);
|
||||
else
|
||||
|
@ -644,9 +642,9 @@ void QWidgetBackingStore::removeDirtyWidget(QWidget *w)
|
|||
resetWidget(w);
|
||||
|
||||
QWidgetPrivate *wd = w->d_func();
|
||||
const int n = wd->children.count();
|
||||
for (int i = 0; i < n; ++i) {
|
||||
if (QWidget *child = qobject_cast<QWidget*>(wd->children.at(i)))
|
||||
foreach (QObject *objchild, wd->children) {
|
||||
QWidget *child = qobject_cast<QWidget*>(objchild);
|
||||
if (child)
|
||||
removeDirtyWidget(child);
|
||||
}
|
||||
}
|
||||
|
@ -656,13 +654,10 @@ void QWidgetBackingStore::updateLists(QWidget *cur)
|
|||
if (!cur)
|
||||
return;
|
||||
|
||||
QList<QObject*> children = cur->children();
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
QWidget *child = qobject_cast<QWidget*>(children.at(i));
|
||||
if (!child)
|
||||
continue;
|
||||
|
||||
updateLists(child);
|
||||
foreach (QObject *objchild, cur->children()) {
|
||||
QWidget *child = qobject_cast<QWidget*>(objchild);
|
||||
if (child)
|
||||
updateLists(child);
|
||||
}
|
||||
|
||||
if (cur->testAttribute(Qt::WA_StaticContents))
|
||||
|
@ -1373,13 +1368,13 @@ void QWidgetPrivate::repaint_sys(const QRegion &rgn)
|
|||
if (toBePainted.isEmpty())
|
||||
return; // Nothing to repaint.
|
||||
|
||||
#ifndef QT_NO_PAINT_DEBUG
|
||||
#ifndef QT_NO_DEBUG
|
||||
bool flushed = QWidgetBackingStore::flushPaint(q, toBePainted);
|
||||
#endif
|
||||
|
||||
drawWidget(q, toBePainted, QPoint(), QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawPaintOnScreen, 0);
|
||||
|
||||
#ifndef QT_NO_PAINT_DEBUG
|
||||
#ifndef QT_NO_DEBUG
|
||||
if (flushed)
|
||||
QWidgetBackingStore::unflushPaint(q, toBePainted);
|
||||
#endif
|
||||
|
|
|
@ -110,7 +110,7 @@ private:
|
|||
void releaseBuffer();
|
||||
|
||||
void beginPaint(QRegion &toClean, QWidget *widget, QWindowSurface *windowSurface,
|
||||
BeginPaintInfo *returnInfo, bool toCleanIsInTopLevelCoordinates = true);
|
||||
BeginPaintInfo *returnInfo);
|
||||
void endPaint(const QRegion &cleaned, QWindowSurface *windowSurface, BeginPaintInfo *beginPaintInfo);
|
||||
|
||||
QRegion dirtyRegion(QWidget *widget = 0) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue