OpenCoverage

qqmlloggingcategory.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlloggingcategory.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2QQmlLoggingCategory::QQmlLoggingCategory(QObject *parent)-
3 : QObject(parent)-
4 , m_initialized(false)-
5{-
6}
executed 6 times by 1 test: end of block
Executed by:
  • tst_qqmlconsole
6
7-
8QQmlLoggingCategory::~QQmlLoggingCategory()-
9{-
10}-
11-
12QString QQmlLoggingCategory::name() const-
13{-
14 return
never executed: return QString::fromUtf8(m_name);
QString::fromUtf8(m_name);
never executed: return QString::fromUtf8(m_name);
0
15}-
16-
17QQmlLoggingCategory::DefaultLogLevel QQmlLoggingCategory::defaultLogLevel() const-
18{-
19 return
never executed: return m_defaultLogLevel;
m_defaultLogLevel;
never executed: return m_defaultLogLevel;
0
20}-
21-
22QLoggingCategory *QQmlLoggingCategory::category() const-
23{-
24 return
executed 42 times by 1 test: return m_category.data();
Executed by:
  • tst_qqmlconsole
m_category.data();
executed 42 times by 1 test: return m_category.data();
Executed by:
  • tst_qqmlconsole
42
25}-
26-
27void QQmlLoggingCategory::classBegin()-
28{-
29}-
30-
31void QQmlLoggingCategory::componentComplete()-
32{-
33 m_initialized = true;-
34 if (m_name.isNull()
m_name.isNull()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlconsole
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlconsole
) {
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: end of block
Executed by:
  • tst_qqmlconsole
else {
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 block
Executed by:
  • tst_qqmlconsole
4
40}-
41-
42void QQmlLoggingCategory::setDefaultLogLevel(DefaultLogLevel defaultLogLevel)-
43{-
44 if (m_initialized
m_initializedDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlconsole
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlconsole
) {
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:
  • tst_qqmlconsole
2
47 }-
48-
49 m_defaultLogLevel = defaultLogLevel;-
50}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlconsole
2
51-
52-
53void QQmlLoggingCategory::setName(const QString &name)-
54{-
55 if (m_initialized
m_initializedDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlconsole
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlconsole
) {
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:
  • tst_qqmlconsole
2
58 }-
59-
60 m_name = name.toUtf8();-
61}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qqmlconsole
4
62-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0