mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Use directly "isEmpty()"
This commit is contained in:
parent
7165ea7afd
commit
da83e8cbdb
|
@ -359,7 +359,7 @@ void DolphinMainWindow::addToPlaces()
|
||||||
QString name;
|
QString name;
|
||||||
|
|
||||||
// If nothing is selected, act on the current dir
|
// If nothing is selected, act on the current dir
|
||||||
if (m_activeViewContainer->view()->selectedItems().count() == 0) {
|
if (m_activeViewContainer->view()->selectedItems().isEmpty()) {
|
||||||
url = m_activeViewContainer->url();
|
url = m_activeViewContainer->url();
|
||||||
name = m_activeViewContainer->placesText();
|
name = m_activeViewContainer->placesText();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -460,7 +460,7 @@ void KFileItemModelTest::testModelConsistencyWhenInsertingItems()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_model->m_dirLister->updateDirectory(m_testDir->url());
|
m_model->m_dirLister->updateDirectory(m_testDir->url());
|
||||||
if (itemsInsertedSpy.count() == 0) {
|
if (itemsInsertedSpy.isEmpty()) {
|
||||||
QVERIFY(itemsInsertedSpy.wait());
|
QVERIFY(itemsInsertedSpy.wait());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ void KItemSetTest::testIterators()
|
||||||
QVERIFY(itemSet.isValid());
|
QVERIFY(itemSet.isValid());
|
||||||
QVERIFY(itemSet.count() == itemsQVector.count());
|
QVERIFY(itemSet.count() == itemsQVector.count());
|
||||||
|
|
||||||
if (itemSet.count() == 0) {
|
if (itemSet.isEmpty()) {
|
||||||
QVERIFY(itemSet.isEmpty());
|
QVERIFY(itemSet.isEmpty());
|
||||||
QVERIFY(itemSet.begin() == itemSet.end());
|
QVERIFY(itemSet.begin() == itemSet.end());
|
||||||
QVERIFY(itemSet.constBegin() == itemSet.constEnd());
|
QVERIFY(itemSet.constBegin() == itemSet.constEnd());
|
||||||
|
@ -342,7 +342,7 @@ void KItemSetTest::testFind()
|
||||||
int min;
|
int min;
|
||||||
int max;
|
int max;
|
||||||
|
|
||||||
if (itemSet.count() == 0) {
|
if (itemSet.isEmpty()) {
|
||||||
// Use some arbitrary values for the upcoming tests.
|
// Use some arbitrary values for the upcoming tests.
|
||||||
min = 0;
|
min = 0;
|
||||||
max = 5;
|
max = 5;
|
||||||
|
@ -401,7 +401,7 @@ void KItemSetTest::testChangingOneItem()
|
||||||
int min;
|
int min;
|
||||||
int max;
|
int max;
|
||||||
|
|
||||||
if (itemSet.count() == 0) {
|
if (itemSet.isEmpty()) {
|
||||||
// Use some arbitrary values for the upcoming tests.
|
// Use some arbitrary values for the upcoming tests.
|
||||||
min = 0;
|
min = 0;
|
||||||
max = 5;
|
max = 5;
|
||||||
|
|
Loading…
Reference in a new issue