@@ -1381,7 +1381,7 @@ void QgsProjectProperties::on_mAddWMSComposerButton_clicked()
1381
1381
QString name = QInputDialog::getItem ( this , tr ( " Select print composer" ), tr ( " Composer Title" ), composerTitles, 0 , false , &ok );
1382
1382
if ( ok )
1383
1383
{
1384
- if ( mComposerListWidget ->findItems ( name, Qt::MatchExactly ).size () < 1 )
1384
+ if ( mComposerListWidget ->findItems ( name, Qt::MatchExactly ).empty () )
1385
1385
{
1386
1386
mComposerListWidget ->addItem ( name );
1387
1387
}
@@ -1407,7 +1407,7 @@ void QgsProjectProperties::on_mAddLayerRestrictionButton_clicked()
1407
1407
QStringList::const_iterator layerIt = layerNames.constBegin ();
1408
1408
for ( ; layerIt != layerNames.constEnd (); ++layerIt )
1409
1409
{
1410
- if ( mLayerRestrictionsListWidget ->findItems ( *layerIt, Qt::MatchExactly ).size () < 1 )
1410
+ if ( mLayerRestrictionsListWidget ->findItems ( *layerIt, Qt::MatchExactly ).empty () )
1411
1411
{
1412
1412
mLayerRestrictionsListWidget ->addItem ( *layerIt );
1413
1413
}
@@ -1417,7 +1417,7 @@ void QgsProjectProperties::on_mAddLayerRestrictionButton_clicked()
1417
1417
QStringList::const_iterator groupIt = groups.constBegin ();
1418
1418
for ( ; groupIt != groups.constEnd (); ++groupIt )
1419
1419
{
1420
- if ( mLayerRestrictionsListWidget ->findItems ( *groupIt, Qt::MatchExactly ).size () < 1 )
1420
+ if ( mLayerRestrictionsListWidget ->findItems ( *groupIt, Qt::MatchExactly ).empty () )
1421
1421
{
1422
1422
mLayerRestrictionsListWidget ->addItem ( *groupIt );
1423
1423
}
@@ -1506,7 +1506,7 @@ void QgsProjectProperties::on_pbnLaunchOWSChecker_clicked()
1506
1506
duplicateNames << name;
1507
1507
}
1508
1508
1509
- if ( duplicateNames.size () != 0 )
1509
+ if ( ! duplicateNames.empty () )
1510
1510
{
1511
1511
QString nameMessage = " <h1>" + tr ( " Some layers and groups have the same name or short name" ) + " </h1>" ;
1512
1512
nameMessage += " <h2>" + tr ( " Duplicate names:" ) + " </h2>" ;
@@ -1518,7 +1518,7 @@ void QgsProjectProperties::on_pbnLaunchOWSChecker_clicked()
1518
1518
teOWSChecker->setHtml ( teOWSChecker->toHtml () + " <h1>" + tr ( " All names and short names of layer and group are unique" ) + " </h1>" );
1519
1519
}
1520
1520
1521
- if ( regExpMessages.size () != 0 )
1521
+ if ( ! regExpMessages.empty () )
1522
1522
{
1523
1523
QString encodingMessage = " <h1>" + tr ( " Some layer short names have to be updated:" ) + " </h1><ul><li>" + regExpMessages.join ( QStringLiteral ( " </li><li>" ) ) + " </li></ul>" ;
1524
1524
teOWSChecker->setHtml ( teOWSChecker->toHtml () + encodingMessage );
@@ -1528,7 +1528,7 @@ void QgsProjectProperties::on_pbnLaunchOWSChecker_clicked()
1528
1528
teOWSChecker->setHtml ( teOWSChecker->toHtml () + " <h1>" + tr ( " All layer short names are well formed" ) + " </h1>" );
1529
1529
}
1530
1530
1531
- if ( encodingMessages.size () != 0 )
1531
+ if ( ! encodingMessages.empty () )
1532
1532
{
1533
1533
QString encodingMessage = " <h1>" + tr ( " Some layer encodings are not set:" ) + " </h1><ul><li>" + encodingMessages.join ( QStringLiteral ( " </li><li>" ) ) + " </li></ul>" ;
1534
1534
teOWSChecker->setHtml ( teOWSChecker->toHtml () + encodingMessage );
0 commit comments