summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/snapshothandler.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2018-07-23 22:28:49 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2018-07-25 12:52:43 +0000
commit0558db7b54a60297444ff3a9a0d49651383bf825 (patch)
treedc7bc8757ebda56fc687b3605a3276f9449eff6d /src/plugins/debugger/snapshothandler.cpp
parentbabf038ce8f9174578545df843ff183a1583fd08 (diff)
downloadqt-creator-0558db7b54a60297444ff3a9a0d49651383bf825.tar.gz
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>
Diffstat (limited to 'src/plugins/debugger/snapshothandler.cpp')
-rw-r--r--src/plugins/debugger/snapshothandler.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/debugger/snapshothandler.cpp b/src/plugins/debugger/snapshothandler.cpp
index 225e572017..21dcaf9d1e 100644
--- a/src/plugins/debugger/snapshothandler.cpp
+++ b/src/plugins/debugger/snapshothandler.cpp
@@ -116,10 +116,7 @@ QDebug operator<<(QDebug d, const SnapshotData &f)
A snapshot represents a debugging session.
*/
-SnapshotHandler::SnapshotHandler()
-{
- m_currentIndex = -1;
-}
+SnapshotHandler::SnapshotHandler() = default;
SnapshotHandler::~SnapshotHandler()
{
@@ -196,10 +193,10 @@ QVariant SnapshotHandler::headerData(int section, Qt::Orientation orientation, i
Qt::ItemFlags SnapshotHandler::flags(const QModelIndex &index) const
{
if (index.row() >= m_snapshots.size())
- return 0;
+ return nullptr;
if (index.row() == m_snapshots.size())
return QAbstractTableModel::flags(index);
- return true ? QAbstractTableModel::flags(index) : Qt::ItemFlags(0);
+ return true ? QAbstractTableModel::flags(index) : Qt::ItemFlags({});
}
void SnapshotHandler::activateSnapshot(int index)