const QX11Info &QPixmap::x11Info() const
{
- if (data && data->classId() == QPixmapData::X11Class)
+ if (data && data->classId() == QPixmapData::X11Class) {
return static_cast<QX11PixmapData*>(data.data())->xinfo;
- else {
+ } else {
static QX11Info nullX11Info;
return nullX11Info;
}
**
****************************************************************************/
-#define Q_TEST_QPIXMAPCACHE
+// #define Q_TEST_QPIXMAPCACHE
#include "qpixmapcache.h"
#include "qobject.h"
#include "qdebug.h"
static inline QPixmapCache::KeyData *get(const QPixmapCache::Key &key)
{return key.d;}
- static QPixmapCache::KeyData* getKeyData(QPixmapCache::Key *key);
-
QList< QPair<QString,QPixmap> > allPixmaps() const;
bool flushDetachedPixmaps(bool nt);
int id = freeKey;
freeKey = keyArray[id];
QPixmapCache::Key key;
- QPixmapCache::KeyData *d = QPMCache::getKeyData(&key);
- d->key = ++id;
+ key.d = new QPixmapCache::KeyData;
+ key.d->key = ++id;
return key;
}
QCache<QPixmapCache::Key, QPixmapCacheEntry>::clear();
}
-QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key)
-{
- if (!key->d)
- key->d = new QPixmapCache::KeyData;
- return key->d;
-}
-
QList< QPair<QString,QPixmap> > QPMCache::allPixmaps() const
{
QList< QPair<QString,QPixmap> > r;
}
}
+#ifdef Q_TEST_QPIXMAPCACHE
void QPixmapCache::flushDetachedPixmaps()
{
pm_cache()->flushDetachedPixmaps(true);
{
return pm_cache()->allPixmaps();
}
+#endif // Q_TEST_QPIXMAPCACHE
QT_END_NAMESPACE
#ifdef Q_WS_X11
extern void *qt_getClipRects(const QRegion &r, int &num); // in qpaintengine_x11.cpp
- extern QWidgetData* qt_widget_data(QWidget *);
QPoint wOffset = qt_qwidget_data(widget)->wrect.topLeft();
if (widget->window() != window()) {
if (wrgn.rectCount() != 1)
XSetClipMask(X11->display, d_ptr->gc, XNone);
-#endif // FALCON
+#endif // Q_WS_X11
#ifdef Q_WS_MAC