| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | void QException::raise() const | - |
| 7 | { | - |
| 8 | QException e = *this; | - |
| 9 | throw e; executed: throw e;Execution Count:12 | 12 |
| 10 | } | - |
| 11 | | - |
| 12 | QException *QException::clone() const | - |
| 13 | { | - |
| 14 | return new QException(*this); executed: return new QException(*this);Execution Count:12 | 12 |
| 15 | } | - |
| 16 | | - |
| 17 | void QUnhandledException::raise() const | - |
| 18 | { | - |
| 19 | QUnhandledException e = *this; | - |
| 20 | throw e; executed: throw e;Execution Count:3 | 3 |
| 21 | } | - |
| 22 | | - |
| 23 | QUnhandledException *QUnhandledException::clone() const | - |
| 24 | { | - |
| 25 | return new QUnhandledException(*this); executed: return new QUnhandledException(*this);Execution Count:4 | 4 |
| 26 | } | - |
| 27 | | - |
| 28 | | - |
| 29 | | - |
| 30 | namespace QtPrivate { | - |
| 31 | | - |
| 32 | class Base : public QSharedData | - |
| 33 | { | - |
| 34 | public: | - |
| 35 | Base(QException *exception) | - |
| 36 | : exception(exception), hasThrown(false) { } executed: }Execution Count:666411 | 666411 |
| 37 | ~Base() { delete exception; } executed: }Execution Count:667145 | 667145 |
| 38 | | - |
| 39 | QException *exception; | - |
| 40 | bool hasThrown; | - |
| 41 | }; | - |
| 42 | | - |
| 43 | ExceptionHolder::ExceptionHolder(QException *exception) | - |
| 44 | : base(new Base(exception)) {} executed: }Execution Count:667660 | 667660 |
| 45 | | - |
| 46 | ExceptionHolder::ExceptionHolder(const ExceptionHolder &other) | - |
| 47 | : base(other.base) | - |
| 48 | {} | 0 |
| 49 | | - |
| 50 | void ExceptionHolder::operator=(const ExceptionHolder &other) | - |
| 51 | { | - |
| 52 | base = other.base; | - |
| 53 | } executed: }Execution Count:18 | 18 |
| 54 | | - |
| 55 | ExceptionHolder::~ExceptionHolder() | - |
| 56 | {} | - |
| 57 | | - |
| 58 | QException *ExceptionHolder::exception() const | - |
| 59 | { | - |
| 60 | return base->exception; executed: return base->exception;Execution Count:607398 | 607398 |
| 61 | } | - |
| 62 | | - |
| 63 | void ExceptionStore::setException(const QException &e) | - |
| 64 | { | - |
| 65 | if (hasException() == false) evaluated: hasException() == false| yes Evaluation Count:18 | yes Evaluation Count:31 |
| 18-31 |
| 66 | exceptionHolder = ExceptionHolder(e.clone()); executed: exceptionHolder = ExceptionHolder(e.clone());Execution Count:18 | 18 |
| 67 | } executed: }Execution Count:49 | 49 |
| 68 | | - |
| 69 | bool ExceptionStore::hasException() const | - |
| 70 | { | - |
| 71 | return (exceptionHolder.exception() != 0); executed: return (exceptionHolder.exception() != 0);Execution Count:606942 | 606942 |
| 72 | } | - |
| 73 | | - |
| 74 | ExceptionHolder ExceptionStore::exception() | - |
| 75 | { | - |
| 76 | return exceptionHolder; never executed: return exceptionHolder; | 0 |
| 77 | } | - |
| 78 | | - |
| 79 | void ExceptionStore::throwPossibleException() | - |
| 80 | { | - |
| 81 | if (hasException() ) { evaluated: hasException()| yes Evaluation Count:17 | yes Evaluation Count:607120 |
| 17-607120 |
| 82 | exceptionHolder.base->hasThrown = true; | - |
| 83 | exceptionHolder.exception()->raise(); | - |
| 84 | } | 0 |
| 85 | } executed: }Execution Count:606754 | 606754 |
| 86 | | - |
| 87 | bool ExceptionStore::hasThrown() const { return exceptionHolder.base->hasThrown; } never executed: return exceptionHolder.base->hasThrown; | 0 |
| 88 | | - |
| 89 | } | - |
| 90 | | - |
| 91 | | - |
| 92 | | - |
| 93 | | - |
| 94 | | - |
| | |