Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEARCH_VIEW] Investigate high RAM consumption #201

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dltmessageanalyzerplugin/src/common/BaseDefinitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

bool QOptionalColor::operator== ( const QOptionalColor& rhs ) const
{
return color == rhs.color && isSet == rhs.isSet;
return color_code == rhs.color_code && isSet == rhs.isSet;
}
2 changes: 1 addition & 1 deletion dltmessageanalyzerplugin/src/common/BaseDefinitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Q_DECLARE_METATYPE(tQStringPtrWrapper)
struct QOptionalColor
{
bool isSet = false;
QColor color;
QRgb color_code;
bool operator== ( const QOptionalColor& rhs ) const;
};
typedef QVector<QOptionalColor> QOptionalColorVec;
Expand Down
18 changes: 9 additions & 9 deletions dltmessageanalyzerplugin/src/common/CTreeItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,18 +423,18 @@ CTreeItem::CTreeItem(CTreeItem *pParent,
const tHandleDuplicateFunc& handleDuplicateFunc,
const tFindItemFunc& findFunc)
:
mData(),
mHandleDuplicateFunc(handleDuplicateFunc),
mChildItems(),
mpParentItem(pParent),
mSortedChildren(),
mbFirstLevelSorted(true),
mbWholeSorted(true),
mSortingColumn(defaultSortingColumn),
mSortOrder(Qt::SortOrder::DescendingOrder),
mSortingFunction(sortingFunction),
mFindFunc(findFunc),
mpGuard(std::make_shared<int>(0))
mHandleDuplicateFunc(handleDuplicateFunc),
mData(),
mSortedChildren(),
mpGuard(std::make_shared<int>(0)),
mpParentItem(pParent),
mSortOrder(Qt::SortOrder::DescendingOrder),
mSortingColumn(defaultSortingColumn),
mbFirstLevelSorted(true),
mbWholeSorted(true)
{}

tTreeItemPtr CTreeItem::appendChild(const tDataItem& key, const tData& additionItems)
Expand Down
19 changes: 10 additions & 9 deletions dltmessageanalyzerplugin/src/common/CTreeItem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,20 @@ class CTreeItem
void setIdx(const int& val);

private:
tData mData;
tHandleDuplicateFunc mHandleDuplicateFunc;

tChildrenMap mChildItems;
tTreeItemPtr mpParentItem;
QVector<tTreeItemPtr> mSortedChildren;
bool mbFirstLevelSorted;
bool mbWholeSorted;
int mSortingColumn;
Qt::SortOrder mSortOrder;
tSortingFunction mSortingFunction;
tFindItemFunc mFindFunc;
int mIdx; // idx in parent's collection
tHandleDuplicateFunc mHandleDuplicateFunc;
tData mData;
QVector<tTreeItemPtr> mSortedChildren;
tGuarded mpGuard;
tTreeItemPtr mpParentItem;
Qt::SortOrder mSortOrder;
int mIdx; // idx in parent's collection
int mSortingColumn;
bool mbFirstLevelSorted;
bool mbWholeSorted;
};

#endif // CTreeItem_HPP
Loading
Loading