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:
Alessandro Portale
2018-07-23 22:28:49 +02:00
parent babf038ce8
commit 0558db7b54
104 changed files with 718 additions and 820 deletions

View File

@@ -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