@@ -27,88 +27,16 @@
28#include "verticaljournal.h"
28#include "verticaljournal.h"
30−#include <qqmlengine.h>
31#pragma GCC diagnostic push
30#pragma GCC diagnostic push
32#pragma GCC diagnostic ignored "-pedantic"
31#pragma GCC diagnostic ignored "-pedantic"
33−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
34−#include <private/qquickvisualdatamodel_p.h>
36−#include <private/qqmldelegatemodel_p.h>
39#include <private/qquickitem_p.h>
32#include <private/qquickitem_p.h>
40#pragma GCC diagnostic pop
33#pragma GCC diagnostic pop
42static const qreal bufferRatio = 0.5;
35static const qreal bufferRatio = 0.5;
44VerticalJournal::VerticalJournal()
37VerticalJournal::VerticalJournal()
45− : m_delegateModel(nullptr)
46− , m_asyncRequestedIndex(-1)
47− , m_columnWidth(0)
38+ : m_columnWidth(0)
50− , m_delegateCreationBegin(0)
51− , m_delegateCreationEnd(0)
52− , m_delegateCreationBeginValid(false)
53− , m_delegateCreationEndValid(false)
54− , m_needsRelayout(false)
55− , m_delegateValidated(false)
56− , m_implicitHeightDirty(false)
58− connect(this, SIGNAL(widthChanged()), this, SLOT(relayout()));
59− connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
62−QAbstractItemModel *VerticalJournal::model() const
64− return m_delegateModel ? m_delegateModel->model().value<QAbstractItemModel *>() : nullptr;
67−void VerticalJournal::setModel(QAbstractItemModel *model)
69− if (model != this->model()) {
70− if (!m_delegateModel) {
71− createDelegateModel();
73−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
74− disconnect(m_delegateModel, SIGNAL(modelUpdated(QQuickChangeSet,bool)), this, SLOT(onModelUpdated(QQuickChangeSet,bool)));
76− m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
77− connect(m_delegateModel, SIGNAL(modelUpdated(QQuickChangeSet,bool)), this, SLOT(onModelUpdated(QQuickChangeSet,bool)));
79− disconnect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
81− m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
82− connect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
85− cleanupExistingItems();
87− Q_EMIT modelChanged();
92−QQmlComponent *VerticalJournal::delegate() const
94− return m_delegateModel ? m_delegateModel->delegate() : nullptr;
97−void VerticalJournal::setDelegate(QQmlComponent *delegate)
99− if (delegate != this->delegate()) {
100− if (!m_delegateModel) {
101− createDelegateModel();
104− cleanupExistingItems();
106− m_delegateModel->setDelegate(delegate);
108− Q_EMIT delegateChanged();
109− m_delegateValidated = false;
114qreal VerticalJournal::columnWidth() const
42qreal VerticalJournal::columnWidth() const
@@ -133,133 +61,6 @@ void VerticalJournal::setColumnWidth(qreal columnWidth)
136−qreal VerticalJournal::columnSpacing() const
138− return m_columnSpacing;
141−void VerticalJournal::setColumnSpacing(qreal columnSpacing)
143− if (columnSpacing != m_columnSpacing) {
144− m_columnSpacing = columnSpacing;
145− Q_EMIT columnSpacingChanged();
147− if (isComponentComplete()) {
153−qreal VerticalJournal::rowSpacing() const
155− return m_rowSpacing;
158−void VerticalJournal::setRowSpacing(qreal rowSpacing)
160− if (rowSpacing != m_rowSpacing) {
161− m_rowSpacing = rowSpacing;
162− Q_EMIT rowSpacingChanged();
164− if (isComponentComplete()) {
170−qreal VerticalJournal::delegateCreationBegin() const
172− return m_delegateCreationBegin;
175−void VerticalJournal::setDelegateCreationBegin(qreal begin)
177− m_delegateCreationBeginValid = true;
178− if (m_delegateCreationBegin == begin)
180− m_delegateCreationBegin = begin;
181− if (isComponentComplete()) {
184− emit delegateCreationBeginChanged();
187−void VerticalJournal::resetDelegateCreationBegin()
189− m_delegateCreationBeginValid = false;
190− if (m_delegateCreationBegin == 0)
192− m_delegateCreationBegin = 0;
193− if (isComponentComplete()) {
196− emit delegateCreationBeginChanged();
199−qreal VerticalJournal::delegateCreationEnd() const
201− return m_delegateCreationEnd;
204−void VerticalJournal::setDelegateCreationEnd(qreal end)
206− m_delegateCreationEndValid = true;
207− if (m_delegateCreationEnd == end)
209− m_delegateCreationEnd = end;
210− if (isComponentComplete()) {
213− emit delegateCreationEndChanged();
216−void VerticalJournal::resetDelegateCreationEnd()
218− m_delegateCreationEndValid = false;
219− if (m_delegateCreationEnd == 0)
221− m_delegateCreationEnd = 0;
222− if (isComponentComplete()) {
225− emit delegateCreationEndChanged();
228−void VerticalJournal::createDelegateModel()
230−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
231− m_delegateModel = new QQuickVisualDataModel(qmlContext(this), this);
232− connect(m_delegateModel, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(itemCreated(int,QQuickItem*)));
234− m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
235− connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this, SLOT(itemCreated(int,QObject*)));
237− if (isComponentComplete())
238− m_delegateModel->componentComplete();
241−void VerticalJournal::refill()
243− if (!isComponentComplete()) {
247− const bool delegateRangesValid = m_delegateCreationBeginValid && m_delegateCreationEndValid;
248− const qreal from = delegateRangesValid ? m_delegateCreationBegin : 0;
249− const qreal to = delegateRangesValid ? m_delegateCreationEnd : from + height();
250− const qreal buffer = (to - from) * bufferRatio;
251− const qreal bufferFrom = from - buffer;
252− const qreal bufferTo = to + buffer;
254− bool added = addVisibleItems(from, to, false);
255− bool removed = removeNonVisibleItems(bufferFrom, bufferTo);
256− added |= addVisibleItems(bufferFrom, bufferTo, true);
258− if (added || removed) {
259− m_implicitHeightDirty = true;
263void VerticalJournal::findBottomModelIndexToAdd(int *modelIndex, qreal *yPos)
64void VerticalJournal::findBottomModelIndexToAdd(int *modelIndex, qreal *yPos)
265 *modelIndex = 0;
66 *modelIndex = 0;
@@ -268,7 +69,7 @@ void VerticalJournal::findBottomModelIndexToAdd(int *modelIndex, qreal *yPos)
268 Q_FOREACH(const auto &column, m_columnVisibleItems) {
69 Q_FOREACH(const auto &column, m_columnVisibleItems) {
269 if (!column.isEmpty()) {
70 if (!column.isEmpty()) {
270 const ViewItem &item = column.last();
71 const ViewItem &item = column.last();
271− *yPos = qMin(*yPos, item.y() + item.height() + m_rowSpacing);
72+ *yPos = qMin(*yPos, item.y() + item.height() + rowSpacing());
272 *modelIndex = qMax(*modelIndex, item.m_modelIndex + 1);
73 *modelIndex = qMax(*modelIndex, item.m_modelIndex + 1);
274 *yPos = 0;
75 *yPos = 0;
@@ -287,7 +88,7 @@ void VerticalJournal::findTopModelIndexToAdd(int *modelIndex, qreal *yPos)
287 const auto &column = m_columnVisibleItems[i];
88 const auto &column = m_columnVisibleItems[i];
288 if (!column.isEmpty()) {
89 if (!column.isEmpty()) {
289 const ViewItem &item = column.first();
90 const ViewItem &item = column.first();
290− const auto itemTopPos = item.y() - m_rowSpacing;
91+ const auto itemTopPos = item.y() - rowSpacing();
291 if (itemTopPos > *yPos) {
92 if (itemTopPos > *yPos) {
292 *yPos = itemTopPos;
93 *yPos = itemTopPos;
293 *modelIndex = item.m_modelIndex - 1;
94 *modelIndex = item.m_modelIndex - 1;
@@ -309,38 +110,6 @@ void VerticalJournal::findTopModelIndexToAdd(int *modelIndex, qreal *yPos)
312−bool VerticalJournal::addVisibleItems(qreal fillFrom, qreal fillTo, bool asynchronous)
317− if (m_delegateModel->count() == 0)
322− findBottomModelIndexToAdd(&modelIndex, &yPos);
323− bool changed = false;
324− while (modelIndex < m_delegateModel->count() && yPos <= fillTo) {
325− if (!createItem(modelIndex, asynchronous))
329− findBottomModelIndexToAdd(&modelIndex, &yPos);
332− findTopModelIndexToAdd(&modelIndex, &yPos);
333− while (modelIndex >= 0 && yPos > fillFrom) {
334− if (!createItem(modelIndex, asynchronous))
338− findTopModelIndexToAdd(&modelIndex, &yPos);
344bool VerticalJournal::removeNonVisibleItems(qreal bufferFrom, qreal bufferTo)
113bool VerticalJournal::removeNonVisibleItems(qreal bufferFrom, qreal bufferTo)
346 bool changed = false;
115 bool changed = false;
@@ -348,12 +117,12 @@ bool VerticalJournal::removeNonVisibleItems(qreal bufferFrom, qreal bufferTo)
348 for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
117 for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
349 QList<ViewItem> &column = m_columnVisibleItems[i];
118 QList<ViewItem> &column = m_columnVisibleItems[i];
350 while (!column.isEmpty() && column.first().y() + column.first().height() < bufferFrom) {
119 while (!column.isEmpty() && column.first().y() + column.first().height() < bufferFrom) {
351− releaseItem(column.takeFirst());
120+ releaseItem(column.takeFirst().m_item);
352 changed = true;
121 changed = true;
355 while (!column.isEmpty() && column.last().y() > bufferTo) {
124 while (!column.isEmpty() && column.last().y() > bufferTo) {
356− releaseItem(column.takeLast());
125+ releaseItem(column.takeLast().m_item);
357 changed = true;
126 changed = true;
@@ -361,53 +130,20 @@ bool VerticalJournal::removeNonVisibleItems(qreal bufferFrom, qreal bufferTo)
361 return changed;
130 return changed;
364−QQuickItem *VerticalJournal::createItem(int modelIndex, bool asynchronous)
133+void VerticalJournal::positionItem(int modelIndex, QQuickItem *item)
366− if (asynchronous && m_asyncRequestedIndex != -1)
369− m_asyncRequestedIndex = -1;
370−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
371− QQuickItem *item = m_delegateModel->item(modelIndex, asynchronous);
373− QObject* object = m_delegateModel->object(modelIndex, asynchronous);
374− QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
377−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
378− m_asyncRequestedIndex = modelIndex;
381− m_delegateModel->release(object);
382− if (!m_delegateValidated) {
383− m_delegateValidated = true;
384− QObject* delegateObj = delegate();
385− qmlInfo(delegateObj ? delegateObj : this) << "Delegate must be of Item type";
388− m_asyncRequestedIndex = modelIndex;
393− if (item->width() != m_columnWidth) {
135+ if (item->width() != m_columnWidth) {
394− qWarning() << "Item" << modelIndex << "width is not the one that the columnWidth mandates, resetting it";
136+ qWarning() << "Item" << modelIndex << "width is not the one that the columnWidth mandates, resetting it";
395− item->setWidth(m_columnWidth);
137+ item->setWidth(m_columnWidth);
397− positionItem(modelIndex, item);
402−void VerticalJournal::positionItem(int modelIndex, QQuickItem *item)
404 // Check if we add it to the bottom of existing column items
140 // Check if we add it to the bottom of existing column items
405 const QList<ViewItem> &firstColumn = m_columnVisibleItems[0];
141 const QList<ViewItem> &firstColumn = m_columnVisibleItems[0];
406− qreal columnToAddY = !firstColumn.isEmpty() ? firstColumn.last().y() + firstColumn.last().height() : -m_rowSpacing;
142+ qreal columnToAddY = !firstColumn.isEmpty() ? firstColumn.last().y() + firstColumn.last().height() : -rowSpacing();
407 int columnToAddTo = 0;
143 int columnToAddTo = 0;
408 for (int i = 1; i < m_columnVisibleItems.count(); ++i) {
144 for (int i = 1; i < m_columnVisibleItems.count(); ++i) {
409 const QList<ViewItem> &column = m_columnVisibleItems[i];
145 const QList<ViewItem> &column = m_columnVisibleItems[i];
410− const qreal iY = !column.isEmpty() ? column.last().y() + column.last().height() : -m_rowSpacing;
146+ const qreal iY = !column.isEmpty() ? column.last().y() + column.last().height() : -rowSpacing();
411 if (iY < columnToAddY) {
147 if (iY < columnToAddY) {
412 columnToAddTo = i;
148 columnToAddTo = i;
413 columnToAddY = iY;
149 columnToAddY = iY;
@@ -416,8 +152,8 @@ void VerticalJournal::positionItem(int modelIndex, QQuickItem *item)
417 const QList<ViewItem> &columnToAdd = m_columnVisibleItems[columnToAddTo];
153 const QList<ViewItem> &columnToAdd = m_columnVisibleItems[columnToAddTo];
418 if (columnToAdd.isEmpty() || columnToAdd.last().m_modelIndex < modelIndex) {
154 if (columnToAdd.isEmpty() || columnToAdd.last().m_modelIndex < modelIndex) {
419− item->setX(columnToAddTo * (m_columnWidth + m_columnSpacing));
155+ item->setX(columnToAddTo * (m_columnWidth + columnSpacing()));
420− item->setY(columnToAddY + m_rowSpacing);
156+ item->setY(columnToAddY + rowSpacing());
422 m_columnVisibleItems[columnToAddTo] << ViewItem(item, modelIndex);
158 m_columnVisibleItems[columnToAddTo] << ViewItem(item, modelIndex);
423 m_indexColumnMap[modelIndex] = columnToAddTo;
159 m_indexColumnMap[modelIndex] = columnToAddTo;
@@ -426,8 +162,8 @@ void VerticalJournal::positionItem(int modelIndex, QQuickItem *item)
426 columnToAddTo = m_indexColumnMap[modelIndex];
162 columnToAddTo = m_indexColumnMap[modelIndex];
427 columnToAddY = m_columnVisibleItems[columnToAddTo].first().y();
163 columnToAddY = m_columnVisibleItems[columnToAddTo].first().y();
429− item->setX(columnToAddTo * (m_columnWidth + m_columnSpacing));
165+ item->setX(columnToAddTo * (m_columnWidth + columnSpacing()));
430− item->setY(columnToAddY - m_rowSpacing - item->height());
166+ item->setY(columnToAddY - rowSpacing() - item->height());
432 m_columnVisibleItems[columnToAddTo].prepend(ViewItem(item, modelIndex));
168 m_columnVisibleItems[columnToAddTo].prepend(ViewItem(item, modelIndex));
@@ -439,29 +175,14 @@ void VerticalJournal::cleanupExistingItems()
439 for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
175 for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
440 QList<ViewItem> &column = m_columnVisibleItems[i];
176 QList<ViewItem> &column = m_columnVisibleItems[i];
441 Q_FOREACH(const ViewItem &item, column)
177 Q_FOREACH(const ViewItem &item, column)
442− releaseItem(item);
178+ releaseItem(item.m_item);
443 column.clear();
179 column.clear();
445 m_indexColumnMap.clear();
181 m_indexColumnMap.clear();
448−void VerticalJournal::releaseItem(const ViewItem &item)
450−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
451− QQuickVisualModel::ReleaseFlags flags = m_delegateModel->release(item.m_item);
452− if (flags & QQuickVisualModel::Destroyed) {
454− QQmlDelegateModel::ReleaseFlags flags = m_delegateModel->release(item.m_item);
455− if (flags & QQmlDelegateModel::Destroyed) {
457− item.m_item->setParentItem(nullptr);
461void VerticalJournal::calculateImplicitHeight()
184void VerticalJournal::calculateImplicitHeight()
463− m_implicitHeightDirty = false;
465 int lastModelIndex = -1;
186 int lastModelIndex = -1;
466 qreal bottomMostY = 0;
187 qreal bottomMostY = 0;
467 Q_FOREACH(const auto &column, m_columnVisibleItems) {
188 Q_FOREACH(const auto &column, m_columnVisibleItems) {
@@ -479,144 +200,80 @@ void VerticalJournal::calculateImplicitHeight()
482−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
483−void VerticalJournal::itemCreated(int modelIndex, QQuickItem *item)
203+void VerticalJournal::doRelayout()
486−void VerticalJournal::itemCreated(int modelIndex, QObject *object)
488− QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
205+ QList<ViewItem> allItems;
489− if (!item) {
206+ Q_FOREACH(const auto &column, m_columnVisibleItems)
490− qWarning() << "VerticalJournal::itemCreated got a non item for index" << modelIndex;
207+ allItems << column;
211+ const int nColumns = qMax(1., floor((double)(width() + columnSpacing()) / (m_columnWidth + columnSpacing())));
212+ m_columnVisibleItems.resize(nColumns);
213+ m_indexColumnMap.clear();
214+ for (int i = 0; i < nColumns; ++i)
215+ m_columnVisibleItems[i].clear();
217+ // If the first of allItems doesn't contain index 0 we need to drop them
218+ // all since we can't consistently relayout without the first item being there
220+ if (!allItems.isEmpty()) {
221+ if (allItems.first().m_modelIndex == 0) {
222+ Q_FOREACH(const ViewItem &item, allItems)
223+ positionItem(item.m_modelIndex, item.m_item);
225+ Q_FOREACH(const ViewItem &item, allItems)
226+ releaseItem(item.m_item);
494− item->setParentItem(this);
230+
495− if (modelIndex == m_asyncRequestedIndex) {
231+void VerticalJournal::updateItemCulling(qreal visibleFrom, qreal visibleTo)
496− createItem(modelIndex, false);
232+{
497− m_implicitHeightDirty = true;
233+ Q_FOREACH(const auto &column, m_columnVisibleItems) {
498− polish();
234+ Q_FOREACH(const ViewItem &item, column) {
235+ QQuickItemPrivate::get(item.m_item)->setCulled(item.y() + item.height() <= visibleFrom || item.y() >= visibleTo);
502#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
240#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
503−void VerticalJournal::onModelUpdated(const QQuickChangeSet &changeSet, bool reset)
241+void VerticalJournal::processModelRemoves(const QVector<QQuickChangeSet::Remove> &removes)
505−void VerticalJournal::onModelUpdated(const QQmlChangeSet &changeSet, bool reset)
243+void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
509− cleanupExistingItems();
511#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
246#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
512− Q_FOREACH(const QQuickChangeSet::Remove &remove, changeSet.removes()) {
247+ Q_FOREACH(const QQuickChangeSet::Remove &remove, removes) {
514− Q_FOREACH(const QQmlChangeSet::Remove &remove, changeSet.removes()) {
249+ Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
516− for (int i = remove.count - 1; i >= 0; --i) {
251+ for (int i = remove.count - 1; i >= 0; --i) {
517− const int indexToRemove = remove.index + i;
252+ const int indexToRemove = remove.index + i;
518− // Since we only support removing from the end, indexToRemove
253+ // Since we only support removing from the end, indexToRemove
519− // must refer to the last item of one of the columns or
254+ // must refer to the last item of one of the columns or
520− // be bigger than them (because it's not in the viewport and
255+ // be bigger than them (because it's not in the viewport and
521− // thus we have not created a delegate for it)
256+ // thus we have not created a delegate for it)
522− bool found = false;
257+ bool found = false;
523− int lastCreatedIndex = INT_MIN;
258+ int lastCreatedIndex = INT_MIN;
524− for (int i = 0; !found && i < m_columnVisibleItems.count(); ++i) {
259+ for (int i = 0; !found && i < m_columnVisibleItems.count(); ++i) {
525− QList<ViewItem> &column = m_columnVisibleItems[i];
260+ QList<ViewItem> &column = m_columnVisibleItems[i];
526− if (!column.isEmpty()) {
261+ if (!column.isEmpty()) {
527− const int lastColumnIndex = column.last().m_modelIndex;
262+ const int lastColumnIndex = column.last().m_modelIndex;
528− if (lastColumnIndex == indexToRemove) {
263+ if (lastColumnIndex == indexToRemove) {
529− releaseItem(column.takeLast());
264+ releaseItem(column.takeLast().m_item);
532− lastCreatedIndex = qMax(lastCreatedIndex, lastColumnIndex);
535− if (!found) {
265+ found = true;
536− if (indexToRemove < lastCreatedIndex) {
537− qFatal("VerticalJournal only supports removal from the end of the model");
539− m_implicitHeightDirty = true;
267+ lastCreatedIndex = qMax(lastCreatedIndex, lastColumnIndex);
544− }
271+ if (indexToRemove < lastCreatedIndex) {
545− polish();
272+ qFatal("VerticalJournal only supports removal from the end of the model");
549−void VerticalJournal::relayout()
551− m_needsRelayout = true;
555−void VerticalJournal::onHeightChanged()
560−void VerticalJournal::updatePolish()
565− if (m_needsRelayout) {
566− m_implicitHeightDirty = true;
568− QList<ViewItem> allItems;
569− Q_FOREACH(const auto &column, m_columnVisibleItems)
574− const int nColumns = qMax(1., floor((double)(width() + m_columnSpacing) / (m_columnWidth + m_columnSpacing)));
575− m_columnVisibleItems.resize(nColumns);
576− m_indexColumnMap.clear();
577− for (int i = 0; i < nColumns; ++i)
578− m_columnVisibleItems[i].clear();
580− // If the first of allItems doesn't contain index 0 we need to drop them
581− // all since we can't consistently relayout without the first item being there
583− if (!allItems.isEmpty()) {
584− if (allItems.first().m_modelIndex == 0) {
585− Q_FOREACH(const ViewItem &item, allItems)
586− positionItem(item.m_modelIndex, item.m_item);
587− } else {
273+ } else {
588− Q_FOREACH(const ViewItem &item, allItems)
274+ setImplicitHeightDirty();
589− releaseItem(item);
275+ }
593− m_needsRelayout = false;
598− const bool delegateRangesValid = m_delegateCreationBeginValid && m_delegateCreationEndValid;
599− const qreal from = delegateRangesValid ? m_delegateCreationBegin : 0;
600− const qreal to = delegateRangesValid ? m_delegateCreationEnd : from + height();
601− Q_FOREACH(const auto &column, m_columnVisibleItems) {
602− Q_FOREACH(const ViewItem &item, column) {
603− QQuickItemPrivate::get(item.m_item)->setCulled(item.y() + item.height() <= from || item.y() >= to);
607− if (m_implicitHeightDirty) {
608− calculateImplicitHeight();
612−void VerticalJournal::componentComplete()
614− if (m_delegateModel)
615− m_delegateModel->componentComplete();
617− QQuickItem::componentComplete();
619− m_needsRelayout = true;