using effectiveCount instead of count

This commit is contained in:
Uwe Rathmann 2019-07-13 11:01:48 +02:00
parent 761c05d316
commit 353cabe4ac
2 changed files with 8 additions and 6 deletions

View File

@ -4,7 +4,6 @@
*****************************************************************************/ *****************************************************************************/
#include "QskLinearLayoutEngine.h" #include "QskLinearLayoutEngine.h"
#include "QskLayoutHint.h" #include "QskLayoutHint.h"
#include "QskLayoutConstraint.h" #include "QskLayoutConstraint.h"
#include "QskLayoutChain.h" #include "QskLayoutChain.h"
@ -614,14 +613,14 @@ class QskLinearLayoutEngine::PrivateData
EntryTable entryTable; EntryTable entryTable;
Qt::LayoutDirection visualDirection = Qt::LeftToRight;
Qt::Edges extraSpacingAt;
QskLayoutChain colChain; QskLayoutChain colChain;
QskLayoutChain rowChain; QskLayoutChain rowChain;
CellGeometries geometries; CellGeometries geometries;
Qt::LayoutDirection visualDirection = Qt::LeftToRight;
Qt::Edges extraSpacingAt;
/* /*
Some weired controls do lazy updates inside of their sizeHint calculation Some weired controls do lazy updates inside of their sizeHint calculation
that lead to LayoutRequest events. While being in the process of that lead to LayoutRequest events. While being in the process of
@ -865,7 +864,7 @@ void QskLinearLayoutEngine::invalidate( int what )
void QskLinearLayoutEngine::setGeometries( const QRectF& rect ) void QskLinearLayoutEngine::setGeometries( const QRectF& rect )
{ {
if ( m_data->entryTable.count() == 0 ) if ( m_data->entryTable.effectiveCount() == 0 )
return; return;
if ( m_data->geometries.boundingSize != rect.size() ) if ( m_data->geometries.boundingSize != rect.size() )

View File

@ -6,11 +6,14 @@
#ifndef QSK_LINEAR_LAYOUT_ENGINE_H #ifndef QSK_LINEAR_LAYOUT_ENGINE_H
#define QSK_LINEAR_LAYOUT_ENGINE_H #define QSK_LINEAR_LAYOUT_ENGINE_H
#include "QskGlobal.h"
#include <qnamespace.h> #include <qnamespace.h>
#include <qrect.h>
#include <memory> #include <memory>
class QQuickItem; class QQuickItem;
class QSizeF;
class QRectF;
class QskLinearLayoutEngine class QskLinearLayoutEngine
{ {