summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-27 13:00:36 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-27 13:00:36 +0100
commit2eb26c170920d28213b71e549d5dac4663febb14 (patch)
tree8df5223ac114d758c2112a8fc787992175556418 /src/gui
parent49ddae28e0dcd1c59dd5d742cffedd5290d1224a (diff)
parent81998b4e8e440076bd22a9164f0a93481c0e597a (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: src/gui/text/qfontdatabase.cpp Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessible.cpp1
-rw-r--r--src/gui/accessible/qaccessible.h2
-rw-r--r--src/gui/image/qiconloader.cpp1
-rw-r--r--src/gui/image/qimagereader.cpp23
-rw-r--r--src/gui/image/qimagewriter.cpp17
-rw-r--r--src/gui/kernel/qguiapplication.cpp5
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp10
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h4
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h4
-rw-r--r--src/gui/opengl/qopenglpixeltransferoptions.cpp93
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp5
-rw-r--r--src/gui/painting/qpdf.cpp6
-rw-r--r--src/gui/text/qfont.cpp12
-rw-r--r--src/gui/text/qfontdatabase.cpp9
-rw-r--r--src/gui/text/qfontengine_ft.cpp1
-rw-r--r--src/gui/text/qfontengine_p.h4
-rw-r--r--src/gui/util/qgridlayoutengine.cpp2
-rw-r--r--src/gui/util/qgridlayoutengine_p.h1
18 files changed, 164 insertions, 36 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index 858c2e1b9c..01827c807a 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -166,6 +166,7 @@ QT_BEGIN_NAMESPACE
\value playsSound The object produces sound when interacted with.
\value pressed The object is pressed.
\value readOnly The object can usually be edited, but is explicitly set to read-only.
+ \value searchEdit The object is a line edit that is the input for search queries.
\value selectable The object is selectable.
\value selectableText The object has text which can be selected. This is different from selectable which refers to the object's children.
\value selected The object is selected, this is independent of text selection.
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 0583a8c691..7b5d7a1bfd 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -185,6 +185,8 @@ public:
quint64 selectableText : 1;
quint64 supportsAutoCompletion : 1;
+ quint64 searchEdit : 1;
+
// quint64 horizontal : 1;
// quint64 vertical : 1;
// quint64 invalidEntry : 1;
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index 750e253dee..06491f1155 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -223,6 +223,7 @@ QIconTheme::QIconTheme(const QString &themeName)
// Parent themes provide fallbacks for missing icons
m_parents = indexReader.value(
QLatin1String("Icon Theme/Inherits")).toStringList();
+ m_parents.removeAll(QString());
// Ensure a default platform fallback for all themes
if (m_parents.isEmpty()) {
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index e847a45a85..ad84b0a091 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -877,15 +877,22 @@ QString QImageReader::fileName() const
/*!
\since 4.2
- This is an image format specific function that sets the quality
- level of the image to \a quality. For image formats that do not
- support setting the quality, this value is ignored.
+ Sets the quality setting of the image format to \a quality.
- The value range of \a quality depends on the image format. For
- example, the "jpeg" format supports a quality range from 0 (low
- quality, high compression) to 100 (high quality, low compression).
+ Some image formats, in particular lossy ones, entail a tradeoff between a)
+ visual quality of the resulting image, and b) decoding execution time.
+ This function sets the level of that tradeoff for image formats that
+ support it.
- \sa quality()
+ In case of scaled image reading, the quality setting may also influence the
+ tradeoff level between visual quality and execution speed of the scaling
+ algorithm.
+
+ The value range of \a quality depends on the image format. For example,
+ the "jpeg" format supports a quality range from 0 (low visual quality) to
+ 100 (high visual quality).
+
+ \sa quality() setScaledSize()
*/
void QImageReader::setQuality(int quality)
{
@@ -895,7 +902,7 @@ void QImageReader::setQuality(int quality)
/*!
\since 4.2
- Returns the quality level of the image.
+ Returns the quality setting of the image format.
\sa setQuality()
*/
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index d172d4008f..fa261df1a5 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -434,13 +434,16 @@ QString QImageWriter::fileName() const
}
/*!
- This is an image format specific function that sets the quality
- level of the image to \a quality. For image formats that do not
- support setting the quality, this value is ignored.
+ Sets the quality setting of the image format to \a quality.
- The value range of \a quality depends on the image format. For
- example, the "jpeg" format supports a quality range from 0 (low
- quality, high compression) to 100 (high quality, low compression).
+ Some image formats, in particular lossy ones, entail a tradeoff between a)
+ visual quality of the resulting image, and b) encoding execution time and
+ compression level. This function sets the level of that tradeoff for image
+ formats that support it. For other formats, this value is ignored.
+
+ The value range of \a quality depends on the image format. For example,
+ the "jpeg" format supports a quality range from 0 (low visual quality, high
+ compression) to 100 (high visual quality, low compression).
\sa quality()
*/
@@ -450,7 +453,7 @@ void QImageWriter::setQuality(int quality)
}
/*!
- Returns the quality level of the image.
+ Returns the quality setting of the image format.
\sa setQuality()
*/
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index e7fdbde432..8c71fb23de 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1630,8 +1630,9 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv
QWindowSystemInterfacePrivate::ApplicationStateChangedEvent * changeEvent = static_cast<QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *>(e);
QGuiApplicationPrivate::setApplicationState(changeEvent->newState, changeEvent->forcePropagate); }
break;
- case QWindowSystemInterfacePrivate::FlushEvents:
- QWindowSystemInterface::deferredFlushWindowSystemEvents();
+ case QWindowSystemInterfacePrivate::FlushEvents: {
+ QWindowSystemInterfacePrivate::FlushEventsEvent *flushEventsEvent = static_cast<QWindowSystemInterfacePrivate::FlushEventsEvent *>(e);
+ QWindowSystemInterface::deferredFlushWindowSystemEvents(flushEventsEvent->flags); }
break;
case QWindowSystemInterfacePrivate::Close:
QGuiApplicationPrivate::processCloseEvent(
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index bd95a8614f..722a695481 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -526,16 +526,16 @@ void QWindowSystemInterface::handleExposeEvent(QWindow *tlw, const QRegion &regi
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
}
-void QWindowSystemInterface::deferredFlushWindowSystemEvents()
+void QWindowSystemInterface::deferredFlushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)
{
Q_ASSERT(QThread::currentThread() == QGuiApplication::instance()->thread());
QMutexLocker locker(&QWindowSystemInterfacePrivate::flushEventMutex);
- flushWindowSystemEvents();
+ flushWindowSystemEvents(flags);
QWindowSystemInterfacePrivate::eventsFlushed.wakeOne();
}
-void QWindowSystemInterface::flushWindowSystemEvents()
+void QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)
{
const int count = QWindowSystemInterfacePrivate::windowSystemEventQueue.count();
if (!count)
@@ -549,11 +549,11 @@ void QWindowSystemInterface::flushWindowSystemEvents()
}
if (QThread::currentThread() != QGuiApplication::instance()->thread()) {
QMutexLocker locker(&QWindowSystemInterfacePrivate::flushEventMutex);
- QWindowSystemInterfacePrivate::FlushEventsEvent *e = new QWindowSystemInterfacePrivate::FlushEventsEvent();
+ QWindowSystemInterfacePrivate::FlushEventsEvent *e = new QWindowSystemInterfacePrivate::FlushEventsEvent(flags);
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
QWindowSystemInterfacePrivate::eventsFlushed.wait(&QWindowSystemInterfacePrivate::flushEventMutex);
} else {
- sendWindowSystemEvents(QEventLoop::AllEvents);
+ sendWindowSystemEvents(flags);
}
}
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index 9784757d3a..30c236b51f 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -208,8 +208,8 @@ public:
// For event dispatcher implementations
static bool sendWindowSystemEvents(QEventLoop::ProcessEventsFlags flags);
static void setSynchronousWindowsSystemEvents(bool enable);
- static void flushWindowSystemEvents();
- static void deferredFlushWindowSystemEvents();
+ static void flushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents);
+ static void deferredFlushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags);
static int windowSystemEventsQueued();
};
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index 32a5aaa318..57411d8101 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -187,9 +187,11 @@ public:
class FlushEventsEvent : public WindowSystemEvent {
public:
- FlushEventsEvent()
+ FlushEventsEvent(QEventLoop::ProcessEventsFlags f = QEventLoop::AllEvents)
: WindowSystemEvent(FlushEvents)
+ , flags(f)
{ }
+ QEventLoop::ProcessEventsFlags flags;
};
class UserEvent : public WindowSystemEvent {
diff --git a/src/gui/opengl/qopenglpixeltransferoptions.cpp b/src/gui/opengl/qopenglpixeltransferoptions.cpp
index 4f72b43f37..9ea2e0ecc1 100644
--- a/src/gui/opengl/qopenglpixeltransferoptions.cpp
+++ b/src/gui/opengl/qopenglpixeltransferoptions.cpp
@@ -36,6 +36,23 @@
QT_BEGIN_NAMESPACE
+/*!
+ * \class QOpenGLPixelTransferOptions
+ *
+ * \brief The QOpenGLPixelTransferOptions class describes the pixel storage
+ * modes that affect the unpacking of pixels during texture upload.
+ */
+
+/*!
+ * \fn QOpenGLPixelTransferOptions & QOpenGLPixelTransferOptions::operator=(QOpenGLPixelTransferOptions &&other)
+ * \internal
+ */
+
+/*!
+ * \fn void QOpenGLPixelTransferOptions::swap(QOpenGLPixelTransferOptions &other)
+ * \internal
+ */
+
class QOpenGLPixelTransferOptionsData : public QSharedData
{
public:
@@ -60,16 +77,25 @@ public:
bool swapBytes;
};
+/*!
+ * Constructs a new QOpenGLPixelTransferOptions instance with the default settings.
+ */
QOpenGLPixelTransferOptions::QOpenGLPixelTransferOptions()
: data(new QOpenGLPixelTransferOptionsData)
{
}
+/*!
+ * \internal
+ */
QOpenGLPixelTransferOptions::QOpenGLPixelTransferOptions(const QOpenGLPixelTransferOptions &rhs)
: data(rhs.data)
{
}
+/*!
+ * \internal
+ */
QOpenGLPixelTransferOptions &QOpenGLPixelTransferOptions::operator=(const QOpenGLPixelTransferOptions &rhs)
{
if (this != &rhs)
@@ -77,85 +103,152 @@ QOpenGLPixelTransferOptions &QOpenGLPixelTransferOptions::operator=(const QOpenG
return *this;
}
+/*!
+ * Destructor.
+ */
QOpenGLPixelTransferOptions::~QOpenGLPixelTransferOptions()
{
}
+/*!
+ * Sets the \a alignment requirements for each pixel row. Corresponds to \c GL_UNPACK_ALIGNMENT.
+ * The default value is 4, as specified by OpenGL.
+ */
void QOpenGLPixelTransferOptions::setAlignment(int alignment)
{
data->alignment = alignment;
}
+/*!
+ * \return the current alignment requirement for each pixel row.
+ */
int QOpenGLPixelTransferOptions::alignment() const
{
return data->alignment;
}
+/*!
+ * Sets the number of images that are skipped to \a skipImages.
+ * Corresponds to \c GL_UNPACK_SKIP_IMAGES. Equivalent to incrementing the pointer
+ * passed to QOpenGLTexture::setData(). The default value is 0.
+ */
void QOpenGLPixelTransferOptions::setSkipImages(int skipImages)
{
data->skipImages = skipImages;
}
+/*!
+ * \return the number of images that are skipped.
+ */
int QOpenGLPixelTransferOptions::skipImages() const
{
return data->skipImages;
}
+/*!
+ * Sets the number of rows that are skipped to \a skipRows.
+ * Corresponds to \c GL_UNPACK_SKIP_ROWS. Equivalent to incrementing the pointer
+ * passed to QOpenGLTexture::setData(). The default value is 0.
+ */
void QOpenGLPixelTransferOptions::setSkipRows(int skipRows)
{
data->skipRows = skipRows;
}
+/*!
+ * \return the number of rows that are skipped.
+ */
int QOpenGLPixelTransferOptions::skipRows() const
{
return data->skipRows;
}
+/*!
+ * Sets the number of pixels that are skipped to \a skipPixels.
+ * Corresponds to \c GL_UNPACK_SKIP_PIXELS. Equivalent to incrementing the pointer
+ * passed to QOpenGLTexture::setData(). The default value is 0.
+ */
void QOpenGLPixelTransferOptions::setSkipPixels(int skipPixels)
{
data->skipPixels = skipPixels;
}
+/*!
+ * \return the number of pixels that are skipped.
+ */
int QOpenGLPixelTransferOptions::skipPixels() const
{
return data->skipPixels;
}
+/*!
+ * Sets the image height for 3D textures to \a imageHeight.
+ * Corresponds to \c GL_UNPACK_IMAGE_HEIGHT.
+ * The default value is 0.
+ */
void QOpenGLPixelTransferOptions::setImageHeight(int imageHeight)
{
data->imageHeight = imageHeight;
}
+/*!
+ * \return the currently set image height.
+ */
int QOpenGLPixelTransferOptions::imageHeight() const
{
return data->imageHeight;
}
+/*!
+ * Sets the number of pixels in a row to \a rowLength.
+ * Corresponds to \c GL_UNPACK_ROW_LENGTH.
+ * The default value is 0.
+ */
void QOpenGLPixelTransferOptions::setRowLength(int rowLength)
{
data->rowLength = rowLength;
}
+/*!
+ * \return the currently set row length.
+ */
int QOpenGLPixelTransferOptions::rowLength() const
{
return data->rowLength;
}
+/*!
+ * \a lsbFirst specifies if bits within a byte are ordered from least to most significat.
+ * The default value is \c false, meaning that the first bit in each byte is the
+ * most significant one. This is significant for bitmap data only.
+ * Corresponds to \c GL_UNPACK_LSB_FIRST.
+ */
void QOpenGLPixelTransferOptions::setLeastSignificantByteFirst(bool lsbFirst)
{
data->lsbFirst = lsbFirst;
}
+/*!
+ * \return \c true if bits within a byte are ordered from least to most significant.
+ */
bool QOpenGLPixelTransferOptions::isLeastSignificantBitFirst() const
{
return data->lsbFirst;
}
+/*!
+ * \a swapBytes specifies if the byte ordering for multibyte components is reversed.
+ * The default value is \c false.
+ * Corresponds to \c GL_UNPACK_SWAP_BYTES.
+ */
void QOpenGLPixelTransferOptions::setSwapBytesEnabled(bool swapBytes)
{
data->swapBytes = swapBytes;
}
+/*!
+ * \return \c true if the byte ordering for multibyte components is reversed.
+ */
bool QOpenGLPixelTransferOptions::isSwapBytesEnabled() const
{
return data->swapBytes;
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index 6e16b2df75..0f70a01014 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -240,7 +240,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
QOpenGLShaderProgram *blitProgram = 0;
if (pex == 0) {
if (m_blitProgram == 0) {
- m_blitProgram = new QOpenGLShaderProgram(ctx);
+ m_blitProgram = new QOpenGLShaderProgram;
const bool isCoreProfile = ctx->format().profile() == QSurfaceFormat::CoreProfile;
{
@@ -444,6 +444,9 @@ void QOpenGLTextureGlyphCache::clear()
m_textureResource->free();
m_textureResource = 0;
+ delete m_blitProgram;
+ m_blitProgram = 0;
+
m_w = 0;
m_h = 0;
m_cx = 0;
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 23412c4633..30421ea2fa 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1347,6 +1347,8 @@ void QPdfEngine::setPen()
int pdfJoinStyle = 0;
switch(d->pen.joinStyle()) {
case Qt::MiterJoin:
+ case Qt::SvgMiterJoin:
+ *d->currentPage << d->pen.miterLimit() << "M ";
pdfJoinStyle = 0;
break;
case Qt::BevelJoin:
@@ -2081,8 +2083,10 @@ int QPdfEnginePrivate::writeImage(const QByteArray &data, int width, int height,
}
if (maskObject > 0)
xprintf("/Mask %d 0 R\n", maskObject);
- if (softMaskObject > 0)
+ if (softMaskObject > 0) {
xprintf("/SMask %d 0 R\n", softMaskObject);
+ xprintf("/Decode [1 0 1 0 1 0]\n");
+ }
int lenobj = requestObject();
xprintf("/Length %d 0 R\n", lenobj);
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 54fcbac308..a0cbd052e4 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1014,8 +1014,8 @@ void QFont::setStyle(Style style)
}
/*!
- Returns the weight of the font which is one of the enumerated
- values from \l{QFont::Weight}.
+ Returns the weight of the font, using the same scale as the
+ \l{QFont::Weight} enumeration.
\sa setWeight(), Weight, QFontInfo
*/
@@ -1028,8 +1028,8 @@ int QFont::weight() const
\enum QFont::Weight
Qt uses a weighting scale from 0 to 99 similar to, but not the
- same as, the scales used in Windows or CSS. A weight of 0 is
- ultralight, whilst 99 will be extremely black.
+ same as, the scales used in Windows or CSS. A weight of 0 will be
+ thin, whilst 99 will be extremely black.
This enum contains the predefined font weights:
@@ -1041,8 +1041,8 @@ int QFont::weight() const
*/
/*!
- Sets the weight the font to \a weight, which should be a value
- from the \l QFont::Weight enumeration.
+ Sets the weight of the font to \a weight, using the scale defined by
+ \l QFont::Weight enumeration.
\sa weight(), QFontInfo
*/
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index dcd0521362..decf2fe121 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -91,9 +91,10 @@ static int getFontWeight(const QString &weightString)
// order of "expense".
//
// A simple string test is the cheapest, so let's do that first.
- if (s == QLatin1String("medium") ||
- s == QLatin1String("normal"))
+ if (s == QLatin1String("normal"))
return QFont::Normal;
+ if (s == QLatin1String("medium"))
+ return qt_mediumFontWeight;
if (s == QLatin1String("bold"))
return QFont::Bold;
if (s == QLatin1String("demibold") || s == QLatin1String("demi bold"))
@@ -102,6 +103,10 @@ static int getFontWeight(const QString &weightString)
return QFont::Black;
if (s == QLatin1String("light"))
return QFont::Light;
+ if (s == QLatin1String("thin"))
+ return qt_thinFontWeight;
+ if (s == QLatin1String("extralight"))
+ return qt_extralightFontWeight;
// Next up, let's see if contains() matches: slightly more expensive, but
// still fast enough.
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 062d2e5301..b44eb43be5 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1062,6 +1062,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
(format == Format_A8 ? (info.width + 3) & ~3 : info.width * 4));
glyph_buffer_size = pitch * info.height;
glyph_buffer = new uchar[glyph_buffer_size];
+ memset(glyph_buffer, 0, glyph_buffer_size);
if (slot->format == FT_GLYPH_FORMAT_OUTLINE) {
FT_Bitmap bitmap;
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 8c40189ed2..50b1bb9e9d 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -78,6 +78,10 @@ enum HB_Compat_Error {
typedef void (*qt_destroy_func_t) (void *user_data);
typedef bool (*qt_get_font_table_func_t) (void *user_data, uint tag, uchar *buffer, uint *length);
+const QFont::Weight qt_mediumFontWeight = static_cast<QFont::Weight>(57);
+const QFont::Weight qt_extralightFontWeight = static_cast<QFont::Weight>(12);
+const QFont::Weight qt_thinFontWeight = static_cast<QFont::Weight>(0);
+
class Q_GUI_EXPORT QFontEngine
{
public:
diff --git a/src/gui/util/qgridlayoutengine.cpp b/src/gui/util/qgridlayoutengine.cpp
index ed15e460f3..65f2297fce 100644
--- a/src/gui/util/qgridlayoutengine.cpp
+++ b/src/gui/util/qgridlayoutengine.cpp
@@ -1289,7 +1289,7 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData,
if (rowIsIdenticalToPrevious && item != itemAt(row - 1, column, orientation))
rowIsIdenticalToPrevious = false;
- if (item)
+ if (item && !item->isIgnored())
rowIsEmpty = false;
}
diff --git a/src/gui/util/qgridlayoutengine_p.h b/src/gui/util/qgridlayoutengine_p.h
index bf34e816b5..b75312bfe8 100644
--- a/src/gui/util/qgridlayoutengine_p.h
+++ b/src/gui/util/qgridlayoutengine_p.h
@@ -295,6 +295,7 @@ public:
virtual QLayoutPolicy::Policy sizePolicy(Qt::Orientation orientation) const = 0;
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const = 0;
+ virtual bool isIgnored() const { return false; }
virtual void setGeometry(const QRectF &rect) = 0;
/*