qgenericunixthemes.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10extern const QLoggingCategory &qLcTray();-
11-
12ResourceHelper::ResourceHelper()-
13{-
14 std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(0));-
15 std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(0));-
16}
never executed: end of block
0
17-
18void ResourceHelper::clear()-
19{-
20 qDeleteAll(palettes, palettes + QPlatformTheme::NPalettes);-
21 qDeleteAll(fonts, fonts + QPlatformTheme::NFonts);-
22 std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(0));-
23 std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(0));-
24}
never executed: end of block
0
25const char *QGenericUnixTheme::name = "generic";-
26-
27-
28-
29static const char defaultSystemFontNameC[] = "Sans Serif";-
30enum { defaultSystemFontSize = 9 };-
31-
32-
33static bool isDBusTrayAvailable() {-
34 static bool dbusTrayAvailable = false;-
35 static bool dbusTrayAvailableKnown = false;-
36 if (!dbusTrayAvailableKnown
!dbusTrayAvailableKnownDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSystemTrayIcon
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QSystemTrayIcon
) {
1-4
37 QDBusMenuConnection conn;-
38 if (conn.isStatusNotifierHostRegistered()
conn.isStatusN...stRegistered()Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSystemTrayIcon
)
0-1
39 dbusTrayAvailable = true;
never executed: dbusTrayAvailable = true;
0
40 dbusTrayAvailableKnown = true;-
41 for (bool qt_category_enabled = qLcTray().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSystemTrayIcon
; qt_category_enabled = false) QMessageLogger(__FILE__, 105, __PRETTY_FUNCTION__, qLcTray().categoryName()).debug() << "D-Bus tray available:" << dbusTrayAvailable;
never executed: QMessageLogger(__FILE__, 105, __PRETTY_FUNCTION__, qLcTray().categoryName()).debug() << "D-Bus tray available:" << dbusTrayAvailable;
0-1
42 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QSystemTrayIcon
1
43 return
executed 5 times by 1 test: return dbusTrayAvailable;
Executed by:
  • tst_QSystemTrayIcon
dbusTrayAvailable;
executed 5 times by 1 test: return dbusTrayAvailable;
Executed by:
  • tst_QSystemTrayIcon
5
44}-
45-
46-
47class QGenericUnixThemePrivate : public QPlatformThemePrivate-
48{-
49public:-
50 QGenericUnixThemePrivate()-
51 : QPlatformThemePrivate()-
52 , systemFont(QLatin1String(defaultSystemFontNameC), defaultSystemFontSize)-
53 , fixedFont(([]() -> QString { enum { Size = sizeof(u"" "monospace")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "monospace" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()), systemFont.pointSize())-
54 {-
55 fixedFont.setStyleHint(QFont::TypeWriter);-
56 }
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
57-
58 const QFont systemFont;-
59 QFont fixedFont;-
60};-
61-
62QGenericUnixTheme::QGenericUnixTheme()-
63 : QPlatformTheme(new QGenericUnixThemePrivate())-
64{-
65}
executed 129 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
66-
67const QFont *QGenericUnixTheme::font(Font type) const-
68{-
69 const QGenericUnixThemePrivate * const d = d_func();-
70 switch (type) {-
71 case
executed 203 times by 169 tests: case QPlatformTheme::SystemFont:
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QComplexText
  • tst_QCssParser
  • ...
QPlatformTheme::SystemFont:
executed 203 times by 169 tests: case QPlatformTheme::SystemFont:
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QComplexText
  • tst_QCssParser
  • ...
203
72 return
executed 203 times by 169 tests: return &d->systemFont;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QComplexText
  • tst_QCssParser
  • ...
&d->systemFont;
executed 203 times by 169 tests: return &d->systemFont;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QComplexText
  • tst_QCssParser
  • ...
203
73 case
executed 275 times by 2 tests: case QPlatformTheme::FixedFont:
Executed by:
  • tst_QTextDocument
  • tst_QTextDocumentFragment
QPlatformTheme::FixedFont:
executed 275 times by 2 tests: case QPlatformTheme::FixedFont:
Executed by:
  • tst_QTextDocument
  • tst_QTextDocumentFragment
275
74 return
executed 275 times by 2 tests: return &d->fixedFont;
Executed by:
  • tst_QTextDocument
  • tst_QTextDocumentFragment
&d->fixedFont;
executed 275 times by 2 tests: return &d->fixedFont;
Executed by:
  • tst_QTextDocument
  • tst_QTextDocumentFragment
275
75 default
executed 4466 times by 14 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QLayout
  • tst_QPushButton
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
:
executed 4466 times by 14 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QLayout
  • tst_QPushButton
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
4466
76 return
executed 4466 times by 14 tests: return 0;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QLayout
  • tst_QPushButton
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
0;
executed 4466 times by 14 tests: return 0;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QLayout
  • tst_QPushButton
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
4466
77 }-
78}-
79-
80-
81QStringList QGenericUnixTheme::xdgIconThemePaths()-
82{-
83 QStringList paths;-
84-
85 const QFileInfo homeIconDir(QDir::homePath() + ([]() -> QString { enum { Size = sizeof(u"" "/.icons")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/.icons" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 25 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
qstring_literal_temp;
executed 25 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
}()));
25
86 if (homeIconDir.isDir()
homeIconDir.isDir()Description
TRUEnever evaluated
FALSEevaluated 25 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
)
0-25
87 paths.prepend(homeIconDir.absoluteFilePath());
never executed: paths.prepend(homeIconDir.absoluteFilePath());
0
88-
89 QString xdgDirString = QFile::decodeName(qgetenv("XDG_DATA_DIRS"));-
90 if (xdgDirString.isEmpty()
xdgDirString.isEmpty()Description
TRUEevaluated 25 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
FALSEnever evaluated
)
0-25
91 xdgDirString = QLatin1String("/usr/local/share/:/usr/share/");
executed 25 times by 25 tests: xdgDirString = QLatin1String("/usr/local/share/:/usr/share/");
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
25
92 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(xdgDirString.split(QLatin1Char(':')))>::type> _container_((xdgDirString.split(QLatin1Char(':')))); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &xdgDir = *_container_.i; _container_.control; _container_.control = 0) {-
93 const QFileInfo xdgIconsDir(xdgDir + ([]() -> QString { enum { Size = sizeof(u"" "/icons")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/icons" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 50 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
qstring_literal_temp;
executed 50 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
}()));
50
94 if (xdgIconsDir.isDir()
xdgIconsDir.isDir()Description
TRUEevaluated 25 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 25 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
)
25
95 paths.append(xdgIconsDir.absoluteFilePath());
executed 25 times by 25 tests: paths.append(xdgIconsDir.absoluteFilePath());
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
25
96 }
executed 50 times by 25 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
50
97-
98 const QFileInfo pixmapsIconsDir(([]() -> QString { enum { Size = sizeof(u"" "/usr/share/pixmaps")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/usr/share/pixmaps" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 25 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
qstring_literal_temp;
executed 25 times by 25 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
}()));
25
99 if (pixmapsIconsDir.isDir()
pixmapsIconsDir.isDir()Description
TRUEevaluated 25 times by 25 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
FALSEnever evaluated
)
0-25
100 paths.append(pixmapsIconsDir.absoluteFilePath());
executed 25 times by 25 tests: paths.append(pixmapsIconsDir.absoluteFilePath());
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
25
101-
102 return
executed 25 times by 25 tests: return paths;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
paths;
executed 25 times by 25 tests: return paths;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
25
103}-
104-
105-
106QPlatformSystemTrayIcon *QGenericUnixTheme::createPlatformSystemTrayIcon() const-
107{-
108 if (isDBusTrayAvailable()
isDBusTrayAvailable()Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QSystemTrayIcon
)
0-5
109 return
never executed: return new QDBusTrayIcon();
new QDBusTrayIcon();
never executed: return new QDBusTrayIcon();
0
110 return
executed 5 times by 1 test: return nullptr;
Executed by:
  • tst_QSystemTrayIcon
nullptr;
executed 5 times by 1 test: return nullptr;
Executed by:
  • tst_QSystemTrayIcon
5
111}-
112-
113-
114QVariant QGenericUnixTheme::themeHint(ThemeHint hint) const-
115{-
116 switch (hint) {-
117 case
executed 76 times by 42 tests: case QPlatformTheme::SystemIconFallbackThemeName:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QLabel
  • tst_QLayout
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • ...
QPlatformTheme::SystemIconFallbackThemeName:
executed 76 times by 42 tests: case QPlatformTheme::SystemIconFallbackThemeName:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QLabel
  • tst_QLayout
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • ...
76
118 return
executed 76 times by 42 tests: return QVariant(QString(([]() -> QString { enum { Size = sizeof(u"" "hicolor")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "hicolor" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QLabel
  • tst_QLayout
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • ...
QVariant(QString(([]() -> QString { enum { Size = sizeof(u"" "hicolor")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "hicolor" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 76 times by 42 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QLabel
  • tst_QLayout
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • ...
qstring_literal_temp;
executed 76 times by 42 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QLabel
  • tst_QLayout
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • ...
}())));
executed 76 times by 42 tests: return QVariant(QString(([]() -> QString { enum { Size = sizeof(u"" "hicolor")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "hicolor" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QIcon
  • tst_QLabel
  • tst_QLayout
  • tst_QLineEdit
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • ...
76
119 case
executed 25 times by 25 tests: case QPlatformTheme::IconThemeSearchPaths:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
QPlatformTheme::IconThemeSearchPaths:
executed 25 times by 25 tests: case QPlatformTheme::IconThemeSearchPaths:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
25
120 return
executed 25 times by 25 tests: return xdgIconThemePaths();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
xdgIconThemePaths();
executed 25 times by 25 tests: return xdgIconThemePaths();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • tst_QToolButton
  • tst_QTreeWidget
  • tst_languageChange
25
121 case
executed 2 times by 1 test: case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
Executed by:
  • tst_QStyle
QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
executed 2 times by 1 test: case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
Executed by:
  • tst_QStyle
2
122 return
executed 2 times by 1 test: return QVariant(true);
Executed by:
  • tst_QStyle
QVariant(true);
executed 2 times by 1 test: return QVariant(true);
Executed by:
  • tst_QStyle
2
123 case
executed 198 times by 17 tests: case QPlatformTheme::StyleNames:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QLayout
  • tst_QPushButton
  • tst_QSplitter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
QPlatformTheme::StyleNames:
executed 198 times by 17 tests: case QPlatformTheme::StyleNames:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QLayout
  • tst_QPushButton
  • tst_QSplitter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
{
198
124 QStringList styleNames;-
125 styleNames << ([]() -> QString { enum { Size = sizeof(u"" "Fusion")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Fusion" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 198 times by 17 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QLayout
  • tst_QPushButton
  • tst_QSplitter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
qstring_literal_temp;
executed 198 times by 17 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QLayout
  • tst_QPushButton
  • tst_QSplitter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
}()) << ([]() -> QString { enum { Size = sizeof(u"" "Windows")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Windows" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 198 times by 17 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QLayout
  • tst_QPushButton
  • tst_QSplitter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
qstring_literal_temp;
executed 198 times by 17 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QLayout
  • tst_QPushButton
  • tst_QSplitter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
}());
198
126 return
executed 198 times by 17 tests: return QVariant(styleNames);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QLayout
  • tst_QPushButton
  • tst_QSplitter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
QVariant(styleNames);
executed 198 times by 17 tests: return QVariant(styleNames);
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QApplication
  • tst_QComboBox
  • tst_QFontDialog
  • tst_QGraphicsLinearLayout
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QLayout
  • tst_QPushButton
  • tst_QSplitter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QToolTip
  • tst_QTreeView
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
198
127 }-
128 case
executed 210688 times by 75 tests: case QPlatformTheme::KeyboardScheme:
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
QPlatformTheme::KeyboardScheme:
executed 210688 times by 75 tests: case QPlatformTheme::KeyboardScheme:
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
210688
129 return
executed 210688 times by 75 tests: return QVariant(int(X11KeyboardScheme));
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
QVariant(int(X11KeyboardScheme));
executed 210688 times by 75 tests: return QVariant(int(X11KeyboardScheme));
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
210688
130 default
executed 26600 times by 117 tests: default:
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
:
executed 26600 times by 117 tests: default:
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
26600
131 break;
executed 26600 times by 117 tests: break;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
26600
132 }-
133 return
executed 26600 times by 117 tests: return QPlatformTheme::themeHint(hint);
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
QPlatformTheme::themeHint(hint);
executed 26600 times by 117 tests: return QPlatformTheme::themeHint(hint);
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • ...
26600
134}-
135-
136-
137class QKdeThemePrivate : public QPlatformThemePrivate-
138{-
139public:-
140 QKdeThemePrivate(const QStringList &kdeDirs, int kdeVersion)-
141 : kdeDirs(kdeDirs)-
142 , kdeVersion(kdeVersion)-
143 , toolButtonStyle(Qt::ToolButtonTextBesideIcon)-
144 , toolBarIconSize(0)-
145 , singleClick(true)-
146 , wheelScrollLines(3)-
147 { }
never executed: end of block
0
148-
149 static QString kdeGlobals(const QString &kdeDir, int kdeVersion)-
150 {-
151 if (kdeVersion > 4
kdeVersion > 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
152 return
never executed: return kdeDir + ([]() -> QString { enum { Size = sizeof(u"" "/kdeglobals")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/kdeglobals" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
kdeDir + ([]() -> QString { enum { Size = sizeof(u"" "/kdeglobals")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/kdeglobals" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return kdeDir + ([]() -> QString { enum { Size = sizeof(u"" "/kdeglobals")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/kdeglobals" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
153 return
never executed: return kdeDir + ([]() -> QString { enum { Size = sizeof(u"" "/share/config/kdeglobals")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/share/config/kdeglobals" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
kdeDir + ([]() -> QString { enum { Size = sizeof(u"" "/share/config/kdeglobals")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/share/config/kdeglobals" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: return kdeDir + ([]() -> QString { enum { Size = sizeof(u"" "/share/config/kdeglobals")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/share/config/kdeglobals" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
154 }-
155-
156 void refresh();-
157 static QVariant readKdeSetting(const QString &key, const QStringList &kdeDirs, int kdeVersion, QHash<QString, QSettings*> &kdeSettings);-
158 static void readKdeSystemPalette(const QStringList &kdeDirs, int kdeVersion, QHash<QString, QSettings*> &kdeSettings, QPalette *pal);-
159 static QFont *kdeFont(const QVariant &fontValue);-
160 static QStringList kdeIconThemeSearchPaths(const QStringList &kdeDirs);-
161-
162 const QStringList kdeDirs;-
163 const int kdeVersion;-
164-
165 ResourceHelper resources;-
166 QString iconThemeName;-
167 QString iconFallbackThemeName;-
168 QStringList styleNames;-
169 int toolButtonStyle;-
170 int toolBarIconSize;-
171 bool singleClick;-
172 int wheelScrollLines;-
173};-
174-
175void QKdeThemePrivate::refresh()-
176{-
177 resources.clear();-
178-
179 toolButtonStyle = Qt::ToolButtonTextBesideIcon;-
180 toolBarIconSize = 0;-
181 styleNames.clear();-
182 if (kdeVersion >= 5
kdeVersion >= 5Description
TRUEnever evaluated
FALSEnever evaluated
)
0
183 styleNames << ([]() -> QString { enum { Size = sizeof(u"" "breeze")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "breeze" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: styleNames << ([]() -> QString { enum { Size = sizeof(u"" "breeze")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "breeze" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
184 styleNames << ([]() -> QString { enum { Size = sizeof(u"" "Oxygen")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Oxygen" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()) << ([]() -> QString { enum { Size = sizeof(u"" "fusion")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fusion" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()) << ([]() -> QString { enum { Size = sizeof(u"" "windows")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "windows" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
185 if (kdeVersion >= 5
kdeVersion >= 5Description
TRUEnever evaluated
FALSEnever evaluated
)
0
186 iconFallbackThemeName = iconThemeName = ([]() -> QString { enum { Size = sizeof(u"" "breeze")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "breeze" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: iconFallbackThemeName = iconThemeName = ([]() -> QString { enum { Size = sizeof(u"" "breeze")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "breeze" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
187 else-
188 iconFallbackThemeName = iconThemeName = ([]() -> QString { enum { Size = sizeof(u"" "oxygen")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "oxygen" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
never executed: iconFallbackThemeName = iconThemeName = ([]() -> QString { enum { Size = sizeof(u"" "oxygen")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "oxygen" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());
0
189-
190 QHash<QString, QSettings*> kdeSettings;-
191-
192 QPalette systemPalette = QPalette();-
193 readKdeSystemPalette(kdeDirs, kdeVersion, kdeSettings, &systemPalette);-
194 resources.palettes[QPlatformTheme::SystemPalette] = new QPalette(systemPalette);-
195-
196-
197 const QVariant styleValue = readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "widgetStyle")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "widgetStyle" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings);
0
198 if (styleValue.isValid()
styleValue.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
199 const QString style = styleValue.toString();-
200 if (style != styleNames.front()
style != styleNames.front()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
201 styleNames.push_front(style);
never executed: styleNames.push_front(style);
0
202 }
never executed: end of block
0
203-
204 const QVariant singleClickValue = readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "KDE/SingleClick")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "KDE/SingleClick" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings);
0
205 if (singleClickValue.isValid()
singleClickValue.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
206 singleClick = singleClickValue.toBool();
never executed: singleClick = singleClickValue.toBool();
0
207-
208 const QVariant themeValue = readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Icons/Theme")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Icons/Theme" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings);
0
209 if (themeValue.isValid()
themeValue.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
210 iconThemeName = themeValue.toString();
never executed: iconThemeName = themeValue.toString();
0
211-
212 const QVariant toolBarIconSizeValue = readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "ToolbarIcons/Size")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ToolbarIcons/Size" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings);
0
213 if (toolBarIconSizeValue.isValid()
toolBarIconSizeValue.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
214 toolBarIconSize = toolBarIconSizeValue.toInt();
never executed: toolBarIconSize = toolBarIconSizeValue.toInt();
0
215-
216 const QVariant toolbarStyleValue = readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Toolbar style/ToolButtonStyle")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Toolbar style/ToolButtonStyle" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings);
0
217 if (toolbarStyleValue.isValid()
toolbarStyleValue.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
218 const QString toolBarStyle = toolbarStyleValue.toString();-
219 if (toolBarStyle == QLatin1String("TextBesideIcon")
toolBarStyle =...xtBesideIcon")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
220 toolButtonStyle = Qt::ToolButtonTextBesideIcon;
never executed: toolButtonStyle = Qt::ToolButtonTextBesideIcon;
0
221 else if (toolBarStyle == QLatin1String("TextOnly")
toolBarStyle =...ng("TextOnly")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
222 toolButtonStyle = Qt::ToolButtonTextOnly;
never executed: toolButtonStyle = Qt::ToolButtonTextOnly;
0
223 else if (toolBarStyle == QLatin1String("TextUnderIcon")
toolBarStyle =...extUnderIcon")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
224 toolButtonStyle = Qt::ToolButtonTextUnderIcon;
never executed: toolButtonStyle = Qt::ToolButtonTextUnderIcon;
0
225 }
never executed: end of block
0
226-
227 const QVariant wheelScrollLinesValue = readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "KDE/WheelScrollLines")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "KDE/WheelScrollLines" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings);
0
228 if (wheelScrollLinesValue.isValid()
wheelScrollLin...alue.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
229 wheelScrollLines = wheelScrollLinesValue.toInt();
never executed: wheelScrollLines = wheelScrollLinesValue.toInt();
0
230-
231-
232 if (QFont *systemFont = kdeFont(readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "font")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "font" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()), kdeDirs, kdeVersion, kdeSettings))
QFont *systemF... kdeSettings))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
233 resources.fonts[QPlatformTheme::SystemFont] = systemFont;
never executed: resources.fonts[QPlatformTheme::SystemFont] = systemFont;
0
234 else-
235 resources.fonts[QPlatformTheme::SystemFont] = new QFont(QLatin1String(defaultSystemFontNameC), defaultSystemFontSize);
never executed: resources.fonts[QPlatformTheme::SystemFont] = new QFont(QLatin1String(defaultSystemFontNameC), defaultSystemFontSize);
0
236-
237 if (QFont *fixedFont = kdeFont(readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "fixed")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fixed" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()), kdeDirs, kdeVersion, kdeSettings))
QFont *fixedFo... kdeSettings))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
238 resources.fonts[QPlatformTheme::FixedFont] = fixedFont;-
239 }
never executed: end of block
else {
0
240 fixedFont = new QFont(QLatin1String(defaultSystemFontNameC), defaultSystemFontSize);-
241 fixedFont->setStyleHint(QFont::TypeWriter);-
242 resources.fonts[QPlatformTheme::FixedFont] = fixedFont;-
243 }
never executed: end of block
0
244-
245 qDeleteAll(kdeSettings);-
246}
never executed: end of block
0
247-
248QVariant QKdeThemePrivate::readKdeSetting(const QString &key, const QStringList &kdeDirs, int kdeVersion, QHash<QString, QSettings*> &kdeSettings)-
249{-
250 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(kdeDirs)>::type> _container_((kdeDirs)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &kdeDir = *_container_.i; _container_.control; _container_.control = 0) {-
251 QSettings *settings = kdeSettings.value(kdeDir);-
252 if (!settings
!settingsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
253 const QString kdeGlobalsPath = kdeGlobals(kdeDir, kdeVersion);-
254 if (QFileInfo(kdeGlobalsPath).isReadable()
QFileInfo(kdeG...).isReadable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
255 settings = new QSettings(kdeGlobalsPath, QSettings::IniFormat);-
256 kdeSettings.insert(kdeDir, settings);-
257 }
never executed: end of block
0
258 }
never executed: end of block
0
259 if (settings
settingsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
260 const QVariant value = settings->value(key);-
261 if (value.isValid()
value.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
262 return
never executed: return value;
value;
never executed: return value;
0
263 }
never executed: end of block
0
264 }
never executed: end of block
0
265 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
266}-
267-
268-
269-
270static inline bool kdeColor(QPalette *pal, QPalette::ColorRole role, const QVariant &value)-
271{-
272 if (!value.isValid()
!value.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
273 return
never executed: return false;
false;
never executed: return false;
0
274 const QStringList values = value.toStringList();-
275 if (values.size() != 3
values.size() != 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
276 return
never executed: return false;
false;
never executed: return false;
0
277 pal->setBrush(role, QColor(values.at(0).toInt(), values.at(1).toInt(), values.at(2).toInt()));-
278 return
never executed: return true;
true;
never executed: return true;
0
279}-
280-
281void QKdeThemePrivate::readKdeSystemPalette(const QStringList &kdeDirs, int kdeVersion, QHash<QString, QSettings*> &kdeSettings, QPalette *pal)-
282{-
283 if (!kdeColor(pal, QPalette::Button, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:Button/BackgroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:Button/BackgroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()), kdeDirs, kdeVersion, kdeSettings))
!kdeColor(pal,... kdeSettings))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
284-
285 const QColor defaultWindowBackground(214, 210, 208);-
286 const QColor defaultButtonBackground(223, 220, 217);-
287 *pal = QPalette(defaultButtonBackground, defaultWindowBackground);-
288 return;
never executed: return;
0
289 }-
290-
291 kdeColor(pal, QPalette::Window, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:Window/BackgroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:Window/BackgroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
292 kdeColor(pal, QPalette::Text, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:View/ForegroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:View/ForegroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
293 kdeColor(pal, QPalette::WindowText, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:Window/ForegroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:Window/ForegroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
294 kdeColor(pal, QPalette::Base, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:View/BackgroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:View/BackgroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
295 kdeColor(pal, QPalette::Highlight, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:Selection/BackgroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:Selection/BackgroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
296 kdeColor(pal, QPalette::HighlightedText, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:Selection/ForegroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:Selection/ForegroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
297 kdeColor(pal, QPalette::AlternateBase, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:View/BackgroundAlternate")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:View/BackgroundAlternate" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
298 kdeColor(pal, QPalette::ButtonText, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:Button/ForegroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:Button/ForegroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
299 kdeColor(pal, QPalette::Link, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:View/ForegroundLink")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:View/ForegroundLink" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
300 kdeColor(pal, QPalette::LinkVisited, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:View/ForegroundVisited")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:View/ForegroundVisited" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
301 kdeColor(pal, QPalette::ToolTipBase, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:Tooltip/BackgroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:Tooltip/BackgroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
302 kdeColor(pal, QPalette::ToolTipText, readKdeSetting(([]() -> QString { enum { Size = sizeof(u"" "Colors:Tooltip/ForegroundNormal")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Colors:Tooltip/ForegroundNormal" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), kdeDirs, kdeVersion, kdeSettings));
0
303-
304-
305-
306-
307 const QColor button = pal->color(QPalette::Button);-
308 int h, s, v;-
309 button.getHsv(&h, &s, &v);-
310-
311 const QBrush whiteBrush = QBrush(Qt::white);-
312 const QBrush buttonBrush = QBrush(button);-
313 const QBrush buttonBrushDark = QBrush(button.darker(v > 128 ? 200 : 50));-
314 const QBrush buttonBrushDark150 = QBrush(button.darker(v > 128 ? 150 : 75));-
315 const QBrush buttonBrushLight150 = QBrush(button.lighter(v > 128 ? 150 : 75));-
316 const QBrush buttonBrushLight = QBrush(button.lighter(v > 128 ? 200 : 50));-
317-
318 pal->setBrush(QPalette::Disabled, QPalette::WindowText, buttonBrushDark);-
319 pal->setBrush(QPalette::Disabled, QPalette::ButtonText, buttonBrushDark);-
320 pal->setBrush(QPalette::Disabled, QPalette::Button, buttonBrush);-
321 pal->setBrush(QPalette::Disabled, QPalette::Text, buttonBrushDark);-
322 pal->setBrush(QPalette::Disabled, QPalette::BrightText, whiteBrush);-
323 pal->setBrush(QPalette::Disabled, QPalette::Base, buttonBrush);-
324 pal->setBrush(QPalette::Disabled, QPalette::Window, buttonBrush);-
325 pal->setBrush(QPalette::Disabled, QPalette::Highlight, buttonBrushDark150);-
326 pal->setBrush(QPalette::Disabled, QPalette::HighlightedText, buttonBrushLight150);-
327-
328-
329 pal->setBrush(QPalette::Light, buttonBrushLight);-
330 pal->setBrush(QPalette::Midlight, buttonBrushLight150);-
331 pal->setBrush(QPalette::Mid, buttonBrushDark150);-
332 pal->setBrush(QPalette::Dark, buttonBrushDark);-
333}
never executed: end of block
0
334const char *QKdeTheme::name = "kde";-
335-
336QKdeTheme::QKdeTheme(const QStringList& kdeDirs, int kdeVersion)-
337 : QPlatformTheme(new QKdeThemePrivate(kdeDirs,kdeVersion))-
338{-
339 d_func()->refresh();-
340}
never executed: end of block
0
341-
342QFont *QKdeThemePrivate::kdeFont(const QVariant &fontValue)-
343{-
344 if (fontValue.isValid()
fontValue.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
345-
346-
347-
348-
349 QString fontDescription;-
350 QString fontFamily;-
351 if (fontValue.type() == QVariant::StringList
fontValue.type...nt::StringListDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
352 const QStringList list = fontValue.toStringList();-
353 if (!list.isEmpty()
!list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
354 fontFamily = list.first();-
355 fontDescription = list.join(QLatin1Char(','));-
356 }
never executed: end of block
0
357 }
never executed: end of block
else {
0
358 fontDescription = fontFamily = fontValue.toString();-
359 }
never executed: end of block
0
360 if (!fontDescription.isEmpty()
!fontDescription.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
361 QFont font(fontFamily);-
362 if (font.fromString(fontDescription)
font.fromStrin...ntDescription)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
363 return
never executed: return new QFont(font);
new QFont(font);
never executed: return new QFont(font);
0
364 }
never executed: end of block
0
365 }
never executed: end of block
0
366 return
never executed: return 0;
0;
never executed: return 0;
0
367}-
368-
369-
370QStringList QKdeThemePrivate::kdeIconThemeSearchPaths(const QStringList &kdeDirs)-
371{-
372 QStringList paths = QGenericUnixTheme::xdgIconThemePaths();-
373 const QString iconPath = ([]() -> QString { enum { Size = sizeof(u"" "/share/icons")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/share/icons" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
374 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(kdeDirs)>::type> _container_((kdeDirs)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &candidate = *_container_.i; _container_.control; _container_.control = 0) {-
375 const QFileInfo fi(candidate + iconPath);-
376 if (fi.isDir()
fi.isDir()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
377 paths.append(fi.absoluteFilePath());
never executed: paths.append(fi.absoluteFilePath());
0
378 }
never executed: end of block
0
379 return
never executed: return paths;
paths;
never executed: return paths;
0
380}-
381-
382QVariant QKdeTheme::themeHint(QPlatformTheme::ThemeHint hint) const-
383{-
384 const QKdeThemePrivate * const d = d_func();-
385 switch (hint) {-
386 case
never executed: case QPlatformTheme::UseFullScreenForPopupMenu:
QPlatformTheme::UseFullScreenForPopupMenu:
never executed: case QPlatformTheme::UseFullScreenForPopupMenu:
0
387 return
never executed: return QVariant(true);
QVariant(true);
never executed: return QVariant(true);
0
388 case
never executed: case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
never executed: case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
0
389 return
never executed: return QVariant(true);
QVariant(true);
never executed: return QVariant(true);
0
390 case
never executed: case QPlatformTheme::DialogButtonBoxLayout:
QPlatformTheme::DialogButtonBoxLayout:
never executed: case QPlatformTheme::DialogButtonBoxLayout:
0
391 return
never executed: return QVariant(QPlatformDialogHelper::KdeLayout);
QVariant(QPlatformDialogHelper::KdeLayout);
never executed: return QVariant(QPlatformDialogHelper::KdeLayout);
0
392 case
never executed: case QPlatformTheme::ToolButtonStyle:
QPlatformTheme::ToolButtonStyle:
never executed: case QPlatformTheme::ToolButtonStyle:
0
393 return
never executed: return QVariant(d->toolButtonStyle);
QVariant(d->toolButtonStyle);
never executed: return QVariant(d->toolButtonStyle);
0
394 case
never executed: case QPlatformTheme::ToolBarIconSize:
QPlatformTheme::ToolBarIconSize:
never executed: case QPlatformTheme::ToolBarIconSize:
0
395 return
never executed: return QVariant(d->toolBarIconSize);
QVariant(d->toolBarIconSize);
never executed: return QVariant(d->toolBarIconSize);
0
396 case
never executed: case QPlatformTheme::SystemIconThemeName:
QPlatformTheme::SystemIconThemeName:
never executed: case QPlatformTheme::SystemIconThemeName:
0
397 return
never executed: return QVariant(d->iconThemeName);
QVariant(d->iconThemeName);
never executed: return QVariant(d->iconThemeName);
0
398 case
never executed: case QPlatformTheme::SystemIconFallbackThemeName:
QPlatformTheme::SystemIconFallbackThemeName:
never executed: case QPlatformTheme::SystemIconFallbackThemeName:
0
399 return
never executed: return QVariant(d->iconFallbackThemeName);
QVariant(d->iconFallbackThemeName);
never executed: return QVariant(d->iconFallbackThemeName);
0
400 case
never executed: case QPlatformTheme::IconThemeSearchPaths:
QPlatformTheme::IconThemeSearchPaths:
never executed: case QPlatformTheme::IconThemeSearchPaths:
0
401 return
never executed: return QVariant(d->kdeIconThemeSearchPaths(d->kdeDirs));
QVariant(d->kdeIconThemeSearchPaths(d->kdeDirs));
never executed: return QVariant(d->kdeIconThemeSearchPaths(d->kdeDirs));
0
402 case
never executed: case QPlatformTheme::StyleNames:
QPlatformTheme::StyleNames:
never executed: case QPlatformTheme::StyleNames:
0
403 return
never executed: return QVariant(d->styleNames);
QVariant(d->styleNames);
never executed: return QVariant(d->styleNames);
0
404 case
never executed: case QPlatformTheme::KeyboardScheme:
QPlatformTheme::KeyboardScheme:
never executed: case QPlatformTheme::KeyboardScheme:
0
405 return
never executed: return QVariant(int(KdeKeyboardScheme));
QVariant(int(KdeKeyboardScheme));
never executed: return QVariant(int(KdeKeyboardScheme));
0
406 case
never executed: case QPlatformTheme::ItemViewActivateItemOnSingleClick:
QPlatformTheme::ItemViewActivateItemOnSingleClick:
never executed: case QPlatformTheme::ItemViewActivateItemOnSingleClick:
0
407 return
never executed: return QVariant(d->singleClick);
QVariant(d->singleClick);
never executed: return QVariant(d->singleClick);
0
408 case
never executed: case QPlatformTheme::WheelScrollLines:
QPlatformTheme::WheelScrollLines:
never executed: case QPlatformTheme::WheelScrollLines:
0
409 return
never executed: return QVariant(d->wheelScrollLines);
QVariant(d->wheelScrollLines);
never executed: return QVariant(d->wheelScrollLines);
0
410 default
never executed: default:
:
never executed: default:
0
411 break;
never executed: break;
0
412 }-
413 return
never executed: return QPlatformTheme::themeHint(hint);
QPlatformTheme::themeHint(hint);
never executed: return QPlatformTheme::themeHint(hint);
0
414}-
415-
416const QPalette *QKdeTheme::palette(Palette type) const-
417{-
418 const QKdeThemePrivate * const d = d_func();-
419 return
never executed: return d->resources.palettes[type];
d->resources.palettes[type];
never executed: return d->resources.palettes[type];
0
420}-
421-
422const QFont *QKdeTheme::font(Font type) const-
423{-
424 const QKdeThemePrivate * const d = d_func();-
425 return
never executed: return d->resources.fonts[type];
d->resources.fonts[type];
never executed: return d->resources.fonts[type];
0
426}-
427-
428QPlatformTheme *QKdeTheme::createKdeTheme()-
429{-
430 const QByteArray kdeVersionBA = qgetenv("KDE_SESSION_VERSION");-
431 const int kdeVersion = kdeVersionBA.toInt();-
432 if (kdeVersion < 4
kdeVersion < 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
433 return
never executed: return 0;
0;
never executed: return 0;
0
434-
435 if (kdeVersion > 4
kdeVersion > 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
436-
437-
438 return
never executed: return new QKdeTheme(QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation), kdeVersion);
new QKdeTheme(QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation), kdeVersion);
never executed: return new QKdeTheme(QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation), kdeVersion);
0
439-
440-
441-
442-
443-
444-
445-
446 QStringList kdeDirs;-
447 const QString kdeHomePathVar = QFile::decodeName(qgetenv("KDEHOME"));-
448 if (!kdeHomePathVar.isEmpty()
!kdeHomePathVar.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
449 kdeDirs += kdeHomePathVar;
never executed: kdeDirs += kdeHomePathVar;
0
450-
451 const QString kdeDirsVar = QFile::decodeName(qgetenv("KDEDIRS"));-
452 if (!kdeDirsVar.isEmpty()
!kdeDirsVar.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
453 kdeDirs += kdeDirsVar.split(QLatin1Char(':'), QString::SkipEmptyParts);
never executed: kdeDirs += kdeDirsVar.split(QLatin1Char(':'), QString::SkipEmptyParts);
0
454-
455 const QString kdeVersionHomePath = QDir::homePath() + ([]() -> QString { enum { Size = sizeof(u"" "/.kde")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/.kde" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()) + QLatin1String(kdeVersionBA);
0
456 if (QFileInfo(kdeVersionHomePath).isDir()
QFileInfo(kdeV...ePath).isDir()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
457 kdeDirs += kdeVersionHomePath;
never executed: kdeDirs += kdeVersionHomePath;
0
458-
459 const QString kdeHomePath = QDir::homePath() + ([]() -> QString { enum { Size = sizeof(u"" "/.kde")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/.kde" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
460 if (QFileInfo(kdeHomePath).isDir()
QFileInfo(kdeHomePath).isDir()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
461 kdeDirs += kdeHomePath;
never executed: kdeDirs += kdeHomePath;
0
462-
463 const QString kdeRcPath = ([]() -> QString { enum { Size = sizeof(u"" "/etc/kde")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/etc/kde" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()) + QLatin1String(kdeVersionBA) + ([]() -> QString { enum { Size = sizeof(u"" "rc")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "rc" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
464 if (QFileInfo(kdeRcPath).isReadable()
QFileInfo(kdeR...).isReadable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
465 QSettings kdeSettings(kdeRcPath, QSettings::IniFormat);-
466 kdeSettings.beginGroup(([]() -> QString { enum { Size = sizeof(u"" "Directories-default")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Directories-default" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
0
467 kdeDirs += kdeSettings.value(([]() -> QString { enum { Size = sizeof(u"" "prefixes")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "prefixes" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}())).toStringList();
0
468 }
never executed: end of block
0
469-
470 const QString kdeVersionPrefix = ([]() -> QString { enum { Size = sizeof(u"" "/etc/kde")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/etc/kde" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()) + QLatin1String(kdeVersionBA);
0
471 if (QFileInfo(kdeVersionPrefix).isDir()
QFileInfo(kdeV...refix).isDir()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
472 kdeDirs += kdeVersionPrefix;
never executed: kdeDirs += kdeVersionPrefix;
0
473-
474 kdeDirs.removeDuplicates();-
475 if (kdeDirs.isEmpty()
kdeDirs.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
476 QMessageLogger(__FILE__, 549, __PRETTY_FUNCTION__).warning("Unable to determine KDE dirs");-
477 return
never executed: return 0;
0;
never executed: return 0;
0
478 }-
479-
480 return
never executed: return new QKdeTheme(kdeDirs, kdeVersion);
new QKdeTheme(kdeDirs, kdeVersion);
never executed: return new QKdeTheme(kdeDirs, kdeVersion);
0
481}-
482-
483-
484QPlatformSystemTrayIcon *QKdeTheme::createPlatformSystemTrayIcon() const-
485{-
486 if (isDBusTrayAvailable()
isDBusTrayAvailable()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
487 return
never executed: return new QDBusTrayIcon();
new QDBusTrayIcon();
never executed: return new QDBusTrayIcon();
0
488 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
489}-
490const char *QGnomeTheme::name = "gnome";-
491-
492class QGnomeThemePrivate : public QPlatformThemePrivate-
493{-
494public:-
495 QGnomeThemePrivate() : systemFont(nullptr), fixedFont(nullptr) {}
never executed: end of block
0
496 ~QGnomeThemePrivate() { delete systemFont; delete fixedFont; }
never executed: end of block
0
497-
498 void configureFonts(const QString &gtkFontName) const-
499 {-
500 ((!(!systemFont)) ? qt_assert("!systemFont",__FILE__,585) : qt_noop());-
501 const int split = gtkFontName.lastIndexOf(QChar::Space);-
502 float size = gtkFontName.mid(split+1).toFloat();-
503 QString fontName = gtkFontName.left(split);-
504-
505 systemFont = new QFont(fontName, size);-
506 fixedFont = new QFont(QLatin1String("monospace"), systemFont->pointSize());-
507 fixedFont->setStyleHint(QFont::TypeWriter);-
508 }
never executed: end of block
0
509-
510 mutable QFont *systemFont;-
511 mutable QFont *fixedFont;-
512};-
513-
514QGnomeTheme::QGnomeTheme()-
515 : QPlatformTheme(new QGnomeThemePrivate())-
516{-
517}
never executed: end of block
0
518-
519QVariant QGnomeTheme::themeHint(QPlatformTheme::ThemeHint hint) const-
520{-
521 switch (hint) {-
522 case
never executed: case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
never executed: case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
0
523 return
never executed: return QVariant(true);
QVariant(true);
never executed: return QVariant(true);
0
524 case
never executed: case QPlatformTheme::DialogButtonBoxLayout:
QPlatformTheme::DialogButtonBoxLayout:
never executed: case QPlatformTheme::DialogButtonBoxLayout:
0
525 return
never executed: return QVariant(QPlatformDialogHelper::GnomeLayout);
QVariant(QPlatformDialogHelper::GnomeLayout);
never executed: return QVariant(QPlatformDialogHelper::GnomeLayout);
0
526 case
never executed: case QPlatformTheme::SystemIconThemeName:
QPlatformTheme::SystemIconThemeName:
never executed: case QPlatformTheme::SystemIconThemeName:
0
527 return
never executed: return QVariant(([]() -> QString { enum { Size = sizeof(u"" "Adwaita")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Adwaita" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
QVariant(([]() -> QString { enum { Size = sizeof(u"" "Adwaita")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Adwaita" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
never executed: return QVariant(([]() -> QString { enum { Size = sizeof(u"" "Adwaita")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Adwaita" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
0
528 case
never executed: case QPlatformTheme::SystemIconFallbackThemeName:
QPlatformTheme::SystemIconFallbackThemeName:
never executed: case QPlatformTheme::SystemIconFallbackThemeName:
0
529 return
never executed: return QVariant(([]() -> QString { enum { Size = sizeof(u"" "gnome")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "gnome" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
QVariant(([]() -> QString { enum { Size = sizeof(u"" "gnome")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "gnome" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
never executed: return QVariant(([]() -> QString { enum { Size = sizeof(u"" "gnome")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "gnome" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
0
530 case
never executed: case QPlatformTheme::IconThemeSearchPaths:
QPlatformTheme::IconThemeSearchPaths:
never executed: case QPlatformTheme::IconThemeSearchPaths:
0
531 return
never executed: return QVariant(QGenericUnixTheme::xdgIconThemePaths());
QVariant(QGenericUnixTheme::xdgIconThemePaths());
never executed: return QVariant(QGenericUnixTheme::xdgIconThemePaths());
0
532 case
never executed: case QPlatformTheme::StyleNames:
QPlatformTheme::StyleNames:
never executed: case QPlatformTheme::StyleNames:
{
0
533 QStringList styleNames;-
534 styleNames << ([]() -> QString { enum { Size = sizeof(u"" "GTK+")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "GTK+" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()) << ([]() -> QString { enum { Size = sizeof(u"" "fusion")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fusion" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()) << ([]() -> QString { enum { Size = sizeof(u"" "windows")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "windows" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}());
0
535 return
never executed: return QVariant(styleNames);
QVariant(styleNames);
never executed: return QVariant(styleNames);
0
536 }-
537 case
never executed: case QPlatformTheme::KeyboardScheme:
QPlatformTheme::KeyboardScheme:
never executed: case QPlatformTheme::KeyboardScheme:
0
538 return
never executed: return QVariant(int(GnomeKeyboardScheme));
QVariant(int(GnomeKeyboardScheme));
never executed: return QVariant(int(GnomeKeyboardScheme));
0
539 case
never executed: case QPlatformTheme::PasswordMaskCharacter:
QPlatformTheme::PasswordMaskCharacter:
never executed: case QPlatformTheme::PasswordMaskCharacter:
0
540 return
never executed: return QVariant(QChar(0x2022));
QVariant(QChar(0x2022));
never executed: return QVariant(QChar(0x2022));
0
541 default
never executed: default:
:
never executed: default:
0
542 break;
never executed: break;
0
543 }-
544 return
never executed: return QPlatformTheme::themeHint(hint);
QPlatformTheme::themeHint(hint);
never executed: return QPlatformTheme::themeHint(hint);
0
545}-
546-
547const QFont *QGnomeTheme::font(Font type) const-
548{-
549 const QGnomeThemePrivate * const d = d_func();-
550 if (!d->systemFont
!d->systemFontDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
551 d->configureFonts(gtkFontName());
never executed: d->configureFonts(gtkFontName());
0
552 switch (type) {-
553 case
never executed: case QPlatformTheme::SystemFont:
QPlatformTheme::SystemFont:
never executed: case QPlatformTheme::SystemFont:
0
554 return
never executed: return d->systemFont;
d->systemFont;
never executed: return d->systemFont;
0
555 case
never executed: case QPlatformTheme::FixedFont:
QPlatformTheme::FixedFont:
never executed: case QPlatformTheme::FixedFont:
0
556 return
never executed: return d->fixedFont;
d->fixedFont;
never executed: return d->fixedFont;
0
557 default
never executed: default:
:
never executed: default:
0
558 return
never executed: return 0;
0;
never executed: return 0;
0
559 }-
560}-
561-
562QString QGnomeTheme::gtkFontName() const-
563{-
564 return
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "%1 %2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "%1 %2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()).arg(QLatin1String(defaultSystemFontNameC)).arg(defaultSystemFontSize);
([]() -> QString { enum { Size = sizeof(u"" "%1 %2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "%1 %2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()).arg(QLatin1String(defaultSystemFontNameC)).arg(defaultSystemFontSize);
never executed: return ([]() -> QString { enum { Size = sizeof(u"" "%1 %2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "%1 %2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()).arg(QLatin1String(defaultSystemFontNameC)).arg(defaultSystemFontSize);
0
565}-
566-
567-
568QPlatformSystemTrayIcon *QGnomeTheme::createPlatformSystemTrayIcon() const-
569{-
570 if (isDBusTrayAvailable()
isDBusTrayAvailable()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
571 return
never executed: return new QDBusTrayIcon();
new QDBusTrayIcon();
never executed: return new QDBusTrayIcon();
0
572 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
573}-
574-
575-
576QString QGnomeTheme::standardButtonText(int button) const-
577{-
578 switch (button) {-
579 case
never executed: case QPlatformDialogHelper::Ok:
QPlatformDialogHelper::Ok:
never executed: case QPlatformDialogHelper::Ok:
0
580 return
never executed: return QCoreApplication::translate("QGnomeTheme", "&OK");
QCoreApplication::translate("QGnomeTheme", "&OK");
never executed: return QCoreApplication::translate("QGnomeTheme", "&OK");
0
581 case
never executed: case QPlatformDialogHelper::Save:
QPlatformDialogHelper::Save:
never executed: case QPlatformDialogHelper::Save:
0
582 return
never executed: return QCoreApplication::translate("QGnomeTheme", "&Save");
QCoreApplication::translate("QGnomeTheme", "&Save");
never executed: return QCoreApplication::translate("QGnomeTheme", "&Save");
0
583 case
never executed: case QPlatformDialogHelper::Cancel:
QPlatformDialogHelper::Cancel:
never executed: case QPlatformDialogHelper::Cancel:
0
584 return
never executed: return QCoreApplication::translate("QGnomeTheme", "&Cancel");
QCoreApplication::translate("QGnomeTheme", "&Cancel");
never executed: return QCoreApplication::translate("QGnomeTheme", "&Cancel");
0
585 case
never executed: case QPlatformDialogHelper::Close:
QPlatformDialogHelper::Close:
never executed: case QPlatformDialogHelper::Close:
0
586 return
never executed: return QCoreApplication::translate("QGnomeTheme", "&Close");
QCoreApplication::translate("QGnomeTheme", "&Close");
never executed: return QCoreApplication::translate("QGnomeTheme", "&Close");
0
587 case
never executed: case QPlatformDialogHelper::Discard:
QPlatformDialogHelper::Discard:
never executed: case QPlatformDialogHelper::Discard:
0
588 return
never executed: return QCoreApplication::translate("QGnomeTheme", "Close without Saving");
QCoreApplication::translate("QGnomeTheme", "Close without Saving");
never executed: return QCoreApplication::translate("QGnomeTheme", "Close without Saving");
0
589 default
never executed: default:
:
never executed: default:
0
590 break;
never executed: break;
0
591 }-
592 return
never executed: return QPlatformTheme::standardButtonText(button);
QPlatformTheme::standardButtonText(button);
never executed: return QPlatformTheme::standardButtonText(button);
0
593}-
594-
595-
596-
597-
598-
599QPlatformTheme *QGenericUnixTheme::createUnixTheme(const QString &name)-
600{-
601 if (name == QLatin1String(QGenericUnixTheme::name)
name == QLatin...ixTheme::name)Description
TRUEevaluated 129 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-129
602 return
executed 129 times by 5 tests: return new QGenericUnixTheme;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
new QGenericUnixTheme;
executed 129 times by 5 tests: return new QGenericUnixTheme;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
603-
604 if (name == QLatin1String(QKdeTheme::name)
name == QLatin...deTheme::name)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
605 if (QPlatformTheme *kdeTheme = QKdeTheme::createKdeTheme()
QPlatformTheme...eateKdeTheme()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
606 return
never executed: return kdeTheme;
kdeTheme;
never executed: return kdeTheme;
0
607-
608 if (name == QLatin1String(QGnomeTheme::name)
name == QLatin...meTheme::name)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
609 return
never executed: return new QGnomeTheme;
new QGnomeTheme;
never executed: return new QGnomeTheme;
0
610 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
611}-
612-
613QStringList QGenericUnixTheme::themeNames()-
614{-
615 QStringList result;-
616 if (QGuiApplication::desktopSettingsAware()
QGuiApplicatio...ettingsAware()Description
TRUEevaluated 128 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qapplication - unknown status
) {
1-128
617 const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();-
618 QList<QByteArray> gtkBasedEnvironments;-
619 gtkBasedEnvironments << "GNOME"-
620 << "X-CINNAMON"-
621 << "UNITY"-
622 << "MATE"-
623 << "XFCE"-
624 << "LXDE";-
625 QList<QByteArray> desktopNames = desktopEnvironment.split(':');-
626 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(desktopNames)>::type> _container_((desktopNames)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QByteArray &desktopName = *_container_.i; _container_.control; _container_.control = 0) {-
627 if (desktopEnvironment == "KDE"
desktopEnvironment == "KDE"Description
TRUEnever evaluated
FALSEevaluated 128 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-128
628-
629 result.push_back(QLatin1String(QKdeTheme::name));-
630-
631 }
never executed: end of block
else if (gtkBasedEnvironments.contains(desktopName)
gtkBasedEnviro...s(desktopName)Description
TRUEnever evaluated
FALSEevaluated 128 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
) {
0-128
632-
633 result.push_back(([]() -> QString { enum { Size = sizeof(u"" "gtk2")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "gtk2" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
0
634-
635 result.push_back(QLatin1String(QGnomeTheme::name));-
636 }
never executed: end of block
0
637 }
executed 128 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
128
638 const QString session = QString::fromLocal8Bit(qgetenv("DESKTOP_SESSION"));-
639 if (!session.isEmpty()
!session.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 128 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
&& session != QLatin1String("default")
session != QLa...ing("default")Description
TRUEnever evaluated
FALSEnever evaluated
&& !result.contains(session)
!result.contains(session)Description
TRUEnever evaluated
FALSEnever evaluated
)
0-128
640 result.push_back(session);
never executed: result.push_back(session);
0
641 }
executed 128 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
128
642 result.append(QLatin1String(QGenericUnixTheme::name));-
643 return
executed 129 times by 5 tests: return result;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
result;
executed 129 times by 5 tests: return result;
Executed by:
  • tst_QApplication
  • tst_QGuiApplication
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
129
644}-
645-
646-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9