forked from qt-creator/qt-creator
Debugger: Modernize
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-default-member-init modernize-use-equals-default Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -46,7 +46,7 @@ SourceFilesHandler::SourceFilesHandler(DebuggerEngine *engine)
|
||||
: m_engine(engine)
|
||||
{
|
||||
setObjectName("SourceFilesModel");
|
||||
QSortFilterProxyModel *proxy = new QSortFilterProxyModel(this);
|
||||
auto proxy = new QSortFilterProxyModel(this);
|
||||
proxy->setObjectName("SourceFilesProxyModel");
|
||||
proxy->setSourceModel(this);
|
||||
m_proxyModel = proxy;
|
||||
@@ -78,9 +78,9 @@ QVariant SourceFilesHandler::headerData(int section,
|
||||
Qt::ItemFlags SourceFilesHandler::flags(const QModelIndex &index) const
|
||||
{
|
||||
if (index.row() >= m_fullNames.size())
|
||||
return 0;
|
||||
return nullptr;
|
||||
QFileInfo fi(m_fullNames.at(index.row()));
|
||||
return fi.isReadable() ? QAbstractItemModel::flags(index) : Qt::ItemFlags(0);
|
||||
return fi.isReadable() ? QAbstractItemModel::flags(index) : Qt::ItemFlags({});
|
||||
}
|
||||
|
||||
QVariant SourceFilesHandler::data(const QModelIndex &index, int role) const
|
||||
|
||||
Reference in New Issue
Block a user