| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlloggingcategory.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | QQmlLoggingCategory::QQmlLoggingCategory(QObject *parent) | - | ||||||
| 3 | : QObject(parent) | - | ||||||
| 4 | , m_initialized(false) | - | ||||||
| 5 | { | - | ||||||
| 6 | } executed 6 times by 1 test: end of blockExecuted by:
| 6 | ||||||
| 7 | - | |||||||
| 8 | QQmlLoggingCategory::~QQmlLoggingCategory() | - | ||||||
| 9 | { | - | ||||||
| 10 | } | - | ||||||
| 11 | - | |||||||
| 12 | QString QQmlLoggingCategory::name() const | - | ||||||
| 13 | { | - | ||||||
| 14 | return never executed: QString::fromUtf8(m_name);return QString::fromUtf8(m_name);never executed: return QString::fromUtf8(m_name); | 0 | ||||||
| 15 | } | - | ||||||
| 16 | - | |||||||
| 17 | QQmlLoggingCategory::DefaultLogLevel QQmlLoggingCategory::defaultLogLevel() const | - | ||||||
| 18 | { | - | ||||||
| 19 | return never executed: m_defaultLogLevel;return m_defaultLogLevel;never executed: return m_defaultLogLevel; | 0 | ||||||
| 20 | } | - | ||||||
| 21 | - | |||||||
| 22 | QLoggingCategory *QQmlLoggingCategory::category() const | - | ||||||
| 23 | { | - | ||||||
| 24 | return executed 42 times by 1 test: m_category.data();return m_category.data();Executed by:
executed 42 times by 1 test: return m_category.data();Executed by:
| 42 | ||||||
| 25 | } | - | ||||||
| 26 | - | |||||||
| 27 | void QQmlLoggingCategory::classBegin() | - | ||||||
| 28 | { | - | ||||||
| 29 | } | - | ||||||
| 30 | - | |||||||
| 31 | void QQmlLoggingCategory::componentComplete() | - | ||||||
| 32 | { | - | ||||||
| 33 | m_initialized = true; | - | ||||||
| 34 | if (m_name.isNull()
| 2-4 | ||||||
| 35 | qmlWarning(this) << QLatin1String("Declaring the name of the LoggingCategory is mandatory and cannot be changed later !"); | - | ||||||
| 36 | } executed 2 times by 1 test: else {end of blockExecuted by:
| 2 | ||||||
| 37 | QScopedPointer<QLoggingCategory> category(new QLoggingCategory(m_name.constData(), QtMsgType(m_defaultLogLevel))); | - | ||||||
| 38 | m_category.swap(category); | - | ||||||
| 39 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||
| 40 | } | - | ||||||
| 41 | - | |||||||
| 42 | void QQmlLoggingCategory::setDefaultLogLevel(DefaultLogLevel defaultLogLevel) | - | ||||||
| 43 | { | - | ||||||
| 44 | if (m_initialized
| 2 | ||||||
| 45 | qmlWarning(this) << QLatin1String("The defaultLogLevel of a LoggingCategory cannot be changed after the Item is created"); | - | ||||||
| 46 | return; executed 2 times by 1 test: return;Executed by:
| 2 | ||||||
| 47 | } | - | ||||||
| 48 | - | |||||||
| 49 | m_defaultLogLevel = defaultLogLevel; | - | ||||||
| 50 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||
| 51 | - | |||||||
| 52 | - | |||||||
| 53 | void QQmlLoggingCategory::setName(const QString &name) | - | ||||||
| 54 | { | - | ||||||
| 55 | if (m_initialized
| 2-4 | ||||||
| 56 | qmlWarning(this) << QLatin1String("The name of a LoggingCategory cannot be changed after the Item is created"); | - | ||||||
| 57 | return; executed 2 times by 1 test: return;Executed by:
| 2 | ||||||
| 58 | } | - | ||||||
| 59 | - | |||||||
| 60 | m_name = name.toUtf8(); | - | ||||||
| 61 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||
| 62 | - | |||||||
| Switch to Source code | Preprocessed file |