Use isEmpty() vs "count() == 0"

Change-Id: I9b3103fbc4e881693039c1a5e81f0d2b97803978
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Montel Laurent
2017-02-21 12:33:35 +01:00
committed by Laurent Montel
parent 65e22d5a0a
commit f3c8a2db1e
5 changed files with 7 additions and 7 deletions

View File

@@ -143,7 +143,7 @@ void RemoteDialog::addRemote()
void RemoteDialog::removeRemote()
{
const QModelIndexList indexList = m_ui->remoteView->selectionModel()->selectedIndexes();
if (indexList.count() == 0)
if (indexList.isEmpty())
return;
int row = indexList.at(0).row();
@@ -159,7 +159,7 @@ void RemoteDialog::removeRemote()
void RemoteDialog::pushToRemote()
{
const QModelIndexList indexList = m_ui->remoteView->selectionModel()->selectedIndexes();
if (indexList.count() == 0)
if (indexList.isEmpty())
return;
const int row = indexList.at(0).row();
@@ -170,7 +170,7 @@ void RemoteDialog::pushToRemote()
void RemoteDialog::fetchFromRemote()
{
const QModelIndexList indexList = m_ui->remoteView->selectionModel()->selectedIndexes();
if (indexList.count() == 0)
if (indexList.isEmpty())
return;
int row = indexList.at(0).row();