OpenCoverage

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

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