Improve conversion of bytes to human readable string
Fixes issues like showing 0 MiB when the value is just slightly less then 1 MiB.
This commit is contained in:
parent
db2594a87c
commit
5bdd3fa95d
7 changed files with 125 additions and 44 deletions
|
|
@ -29,7 +29,8 @@ protected:
|
|||
virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override;
|
||||
|
||||
private:
|
||||
AbstractEditorFactory *m_editorFactory = nullptr;
|
||||
AbstractEditorFactory *m_editorFactory = nullptr;
|
||||
QString HandleBytes(qlonglong s, QColor &forground_color) const;
|
||||
};
|
||||
|
||||
#endif // PGLABITEMDELEGATE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue