QFileSystemModel: add a symbolic constant for the number of columns
There are other literal 4's used in the implementation, so disambiguate. Change-Id: I5b0e4ac0018f9d5734e3de8b4f75259e175b23d3 Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
parent
ae2de2fe99
commit
1aaed259e0
@ -643,7 +643,7 @@ int QFileSystemModel::rowCount(const QModelIndex &parent) const
|
|||||||
*/
|
*/
|
||||||
int QFileSystemModel::columnCount(const QModelIndex &parent) const
|
int QFileSystemModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
return (parent.column() > 0) ? 0 : 4;
|
return (parent.column() > 0) ? 0 : QFileSystemModelPrivate::NumColumns;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -70,6 +70,8 @@ class Q_AUTOTEST_EXPORT QFileSystemModelPrivate : public QAbstractItemModelPriva
|
|||||||
Q_DECLARE_PUBLIC(QFileSystemModel)
|
Q_DECLARE_PUBLIC(QFileSystemModel)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum { NumColumns = 4 };
|
||||||
|
|
||||||
class QFileSystemNode
|
class QFileSystemNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user