kernel/qplatforminputcontextfactory.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7static QFactoryLoader *loader() { static QGlobalStatic<QFactoryLoader > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QFactoryLoader *x = new QFactoryLoader ("org.qt-project.Qt.QPlatformInputContextFactoryInterface", QLatin1String("/platforminputcontexts"), Qt::CaseInsensitive); if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QFactoryLoader > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); }
never executed: delete x;
executed: return thisGlobalStatic.pointer.load();
Execution Count:1156
partially evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:187
evaluated: !thisGlobalStatic.pointer.load()
TRUEFALSE
yes
Evaluation Count:187
yes
Evaluation Count:969
partially evaluated: !thisGlobalStatic.destroyed
TRUEFALSE
yes
Evaluation Count:187
no
Evaluation Count:0
0-1156
8 -
9 -
10 -
11QStringList QPlatformInputContextFactory::keys() -
12{ -
13 -
14 return loader()->keyMap().values();
executed: return loader()->keyMap().values();
Execution Count:289
289
15 -
16 -
17 -
18} -
19 -
20QPlatformInputContext *QPlatformInputContextFactory::create(const QString& key) -
21{ -
22 QStringList paramList = key.split(QLatin1Char(':')); -
23 const QString platform = paramList.takeFirst().toLower(); -
24 -
25 -
26 if (QPlatformInputContext *ret = qLoadPlugin1<QPlatformInputContext, QPlatformInputContextPlugin>(loader(), platform, paramList))
evaluated: QPlatformInputContext *ret = qLoadPlugin1<QPlatformInputContext, QPlatformInputContextPlugin>(loader(), platform, paramList)
TRUEFALSE
yes
Evaluation Count:578
yes
Evaluation Count:289
289-578
27 return ret;
executed: return ret;
Execution Count:578
578
28 -
29 return 0;
executed: return 0;
Execution Count:289
289
30} -
31 -
32QPlatformInputContext *QPlatformInputContextFactory::create() -
33{ -
34 QPlatformInputContext *ic = 0; -
35 -
36 QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE")); -
37 -
38 if (icString == QString::fromUtf8("" "none" "", sizeof("none") - 1))
partially evaluated: icString == QString::fromUtf8("" "none" "", sizeof("none") - 1)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:289
0-289
39 return 0;
never executed: return 0;
0
40 -
41 ic = create(icString); -
42 if (ic && ic->isValid())
partially evaluated: ic
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:289
never evaluated: ic->isValid()
0-289
43 return ic;
never executed: return ic;
0
44 -
45 delete ic; -
46 ic = 0; -
47 -
48 QStringList k = keys(); -
49 for (int i = 0; i < k.size(); ++i) {
evaluated: i < k.size()
TRUEFALSE
yes
Evaluation Count:578
yes
Evaluation Count:289
289-578
50 if (k.at(i) == icString)
partially evaluated: k.at(i) == icString
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:578
0-578
51 continue;
never executed: continue;
0
52 ic = create(k.at(i)); -
53 if (ic && ic->isValid())
partially evaluated: ic
TRUEFALSE
yes
Evaluation Count:578
no
Evaluation Count:0
partially evaluated: ic->isValid()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:578
0-578
54 return ic;
never executed: return ic;
0
55 delete ic; -
56 ic = 0; -
57 }
executed: }
Execution Count:578
578
58 -
59 return 0;
executed: return 0;
Execution Count:289
289
60} -
61 -
62 -
63 -
64 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial