diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-04-13 15:52:14 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-04-15 09:40:53 +0000 |
commit | 95ac4edfd4276c73f0304651fe032d511a5a7c16 (patch) | |
tree | c1ebcef6ecff1292f9fa670111c39043b0f67837 /src/plugins/projectexplorer/projectwelcomepage.cpp | |
parent | 79da8a45860940f98333517c60ac388cc0b1af3a (diff) | |
download | qt-creator-95ac4edfd4276c73f0304651fe032d511a5a7c16.tar.gz |
Projectexplorer: Modernize codebase
Change-Id: I4793b58aa77bcd46af99f8b843c0f7439cdc9269
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
Diffstat (limited to 'src/plugins/projectexplorer/projectwelcomepage.cpp')
-rw-r--r-- | src/plugins/projectexplorer/projectwelcomepage.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp index 504ec3fbbc..f94d4debee 100644 --- a/src/plugins/projectexplorer/projectwelcomepage.cpp +++ b/src/plugins/projectexplorer/projectwelcomepage.cpp @@ -117,7 +117,7 @@ void SessionModel::resetSessions() void SessionModel::cloneSession(const QString &session) { - SessionNameInputDialog newSessionInputDialog(SessionManager::sessions(), 0); + SessionNameInputDialog newSessionInputDialog(SessionManager::sessions(), nullptr); newSessionInputDialog.setWindowTitle(tr("New session name")); newSessionInputDialog.setValue(session + QLatin1String(" (2)")); @@ -145,7 +145,7 @@ void SessionModel::deleteSession(const QString &session) void SessionModel::renameSession(const QString &session) { - SessionNameInputDialog newSessionInputDialog(SessionManager::sessions(), 0); + SessionNameInputDialog newSessionInputDialog(SessionManager::sessions(), nullptr); newSessionInputDialog.setWindowTitle(tr("New session name")); newSessionInputDialog.setValue(session); @@ -180,7 +180,6 @@ QVariant ProjectModel::data(const QModelIndex &index, int role) const switch (role) { case Qt::DisplayRole: return data.second; - break; case FilePathRole: return data.first; case PrettyFilePathRole: @@ -188,8 +187,6 @@ QVariant ProjectModel::data(const QModelIndex &index, int role) const default: return QVariant(); } - - return QVariant(); } QHash<int, QByteArray> ProjectModel::roleNames() const @@ -209,11 +206,6 @@ void ProjectModel::resetProjects() /////////////////// -ProjectWelcomePage::ProjectWelcomePage() : - m_sessionModel(0), m_projectModel(0) -{ -} - void ProjectWelcomePage::facilitateQml(QQmlEngine *engine) { m_sessionModel = new SessionModel(this); |