kernel/qplatformthemefactory.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6static QFactoryLoader *loader() { static QGlobalStatic<QFactoryLoader > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QFactoryLoader *x = new QFactoryLoader ("org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", QLatin1String("/platformthemes"), 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:289
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:102
partially evaluated: !thisGlobalStatic.destroyed
TRUEFALSE
yes
Evaluation Count:187
no
Evaluation Count:0
0-289
7 -
8static QFactoryLoader *directLoader() { static QGlobalStatic<QFactoryLoader > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QFactoryLoader *x = new QFactoryLoader ("org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", QLatin1String(""), Qt::CaseInsensitive); if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QFactoryLoader > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); }
never evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x)
never executed: delete x;
never evaluated: !thisGlobalStatic.pointer.load()
never evaluated: !thisGlobalStatic.destroyed
never executed: return thisGlobalStatic.pointer.load();
0
9 -
10 -
11 -
12QPlatformTheme *QPlatformThemeFactory::create(const QString& key, const QString &platformPluginPath) -
13{ -
14 QStringList paramList = key.split(QLatin1Char(':')); -
15 const QString platform = paramList.takeFirst().toLower(); -
16 -
17 -
18 -
19 if (!platformPluginPath.isEmpty()) {
partially evaluated: !platformPluginPath.isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:289
0-289
20 QCoreApplication::addLibraryPath(platformPluginPath); -
21 if (QPlatformTheme *ret = qLoadPlugin1<QPlatformTheme, QPlatformThemePlugin>(directLoader(), platform, paramList))
never evaluated: QPlatformTheme *ret = qLoadPlugin1<QPlatformTheme, QPlatformThemePlugin>(directLoader(), platform, paramList)
0
22 return ret;
never executed: return ret;
0
23 }
never executed: }
0
24 if (QPlatformTheme *ret = qLoadPlugin1<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList))
partially evaluated: QPlatformTheme *ret = qLoadPlugin1<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:289
0-289
25 return ret;
never executed: return ret;
0
26 -
27 return 0;
executed: return 0;
Execution Count:289
289
28} -
29 -
30 -
31 -
32 -
33 -
34 -
35 -
36QStringList QPlatformThemeFactory::keys(const QString &platformPluginPath) -
37{ -
38 -
39 QStringList list; -
40 -
41 if (!platformPluginPath.isEmpty()) {
never evaluated: !platformPluginPath.isEmpty()
0
42 QCoreApplication::addLibraryPath(platformPluginPath); -
43 list += directLoader()->keyMap().values(); -
44 if (!list.isEmpty()) {
never evaluated: !list.isEmpty()
0
45 const QString postFix = QString::fromUtf8("" " (from " "", sizeof(" (from ") - 1) -
46 + QDir::toNativeSeparators(platformPluginPath) -
47 + QLatin1Char(')'); -
48 const QStringList::iterator end = list.end(); -
49 for (QStringList::iterator it = list.begin(); it != end; ++it)
never evaluated: it != end
0
50 (*it).append(postFix);
never executed: (*it).append(postFix);
0
51 }
never executed: }
0
52 }
never executed: }
0
53 list += loader()->keyMap().values(); -
54 return list;
never executed: return list;
0
55 -
56 -
57 -
58} -
59 -
60 -
61 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial