Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 1e45a31

Browse files
committed
Activities: use Q_ASSERT instead of assert (fix build on linux)
1 parent 54109ce commit 1e45a31

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Libs/libActivities/Activity.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
#include "libActivities/StepPrivate.hpp"
2323
#include "libActivities/ManagerPrivate.hpp"
2424

25-
#include <cassert>
26-
2725
namespace Activities
2826
{
2927

@@ -78,7 +76,7 @@ namespace Activities
7876
return State::PartiallyFinishedWithErrors;
7977
}
8078

81-
assert(running + success > 0);
79+
Q_ASSERT(running + success > 0);
8280
return State::InProgress;
8381
}
8482
}

Libs/libActivities/Manager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ namespace Activities
207207
return false;
208208
}
209209

210-
assert(a.activity && b.activity);
210+
Q_ASSERT(a.activity && b.activity);
211211

212212
if (a.activity->generation() < b.activity->generation()) {
213213
return true;
@@ -220,7 +220,7 @@ namespace Activities
220220
a.type == EventTypes::StepRemoved ||
221221
a.type == EventTypes::StepUpdated) {
222222

223-
assert(a.step && b.step);
223+
Q_ASSERT(a.step && b.step);
224224

225225
if (a.step->generation() < b.step->generation()) {
226226
return true;
@@ -233,7 +233,7 @@ namespace Activities
233233
// If we're still here, then we're the same type and neither one of the activity nor
234234
// step generation number is either less or greater -> We're equal! But we want to be
235235
// unique, so equality is impossible...
236-
assert(false);
236+
Q_ASSERT(false);
237237
Q_UNREACHABLE();
238238
});
239239

0 commit comments

Comments
 (0)