qxcbmime.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/xcb/qxcbmime.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12QXcbMime::QXcbMime()-
13 : QInternalMimeData()-
14{ }
executed 140 times by 9 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QClipboard
  • tst_QGuiApplication
  • tst_QPlainTextEdit
  • tst_QStyleSheetStyle
  • tst_QTextEdit
  • tst_qapplication - unknown status
  • tst_qprocess - unknown status
  • tst_selftests - unknown status
140
15-
16QXcbMime::~QXcbMime()-
17{}-
18-
19-
20-
21QString QXcbMime::mimeAtomToString(QXcbConnection *connection, xcb_atom_t a)-
22{-
23 if (a == 0L
a == 0LDescription
TRUEnever evaluated
FALSEevaluated 59 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
0-59
24 return
never executed: return QString();
QString();
never executed: return QString();
0
25-
26-
27 if (a == XCB_ATOM_STRING
a == XCB_ATOM_STRINGDescription
TRUEevaluated 7 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 52 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
7-52
28 || a == connection->atom(QXcbAtom::UTF8_STRING)
a == connectio...::UTF8_STRING)Description
TRUEevaluated 9 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 43 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
9-43
29 || a == connection->atom(QXcbAtom::TEXT)
a == connectio...XcbAtom::TEXT)Description
TRUEevaluated 7 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 36 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
7-36
30 return
executed 23 times by 6 tests: return QLatin1String("text/plain");
Executed by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
QLatin1String("text/plain");
executed 23 times by 6 tests: return QLatin1String("text/plain");
Executed by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
23
31-
32-
33 if (a == XCB_ATOM_PIXMAP
a == XCB_ATOM_PIXMAPDescription
TRUEnever evaluated
FALSEevaluated 36 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
0-36
34 return
never executed: return QLatin1String("image/ppm");
QLatin1String("image/ppm");
never executed: return QLatin1String("image/ppm");
0
35-
36 QByteArray atomName = connection->atomName(a);-
37-
38-
39 if (atomName == "text/x-moz-url"
atomName == "text/x-moz-url"Description
TRUEnever evaluated
FALSEevaluated 36 times by 6 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
0-36
40 atomName = "text/uri-list";
never executed: atomName = "text/uri-list";
0
41-
42 return
executed 36 times by 6 tests: return QString::fromLatin1(atomName.constData());
Executed by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
QString::fromLatin1(atomName.constData());
executed 36 times by 6 tests: return QString::fromLatin1(atomName.constData());
Executed by:
  • tst_QApplication
  • tst_QStyleSheetStyle
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
36
43}-
44-
45bool QXcbMime::mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeData *mimeData, QByteArray *data,-
46 xcb_atom_t *atomFormat, int *dataFormat)-
47{-
48 if (!data
!dataDescription
TRUEnever evaluated
FALSEevaluated 29 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
0-29
49 return
never executed: return false;
false;
never executed: return false;
0
50-
51 bool ret = false;-
52 *atomFormat = a;-
53 *dataFormat = 8;-
54-
55 if ((a == connection->atom(QXcbAtom::UTF8_STRING)
a == connectio...::UTF8_STRING)Description
TRUEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 24 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
5-24
56 || a == XCB_ATOM_STRING
a == XCB_ATOM_STRINGDescription
TRUEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 19 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
5-19
57 || a == connection->atom(QXcbAtom::TEXT)
a == connectio...XcbAtom::TEXT)Description
TRUEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 14 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
5-14
58 && QInternalMimeData::hasFormatHelper(QLatin1String("text/plain"), mimeData)
QInternalMimeD...n"), mimeData)Description
TRUEevaluated 15 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEnever evaluated
) {
0-15
59 if (a == connection->atom(QXcbAtom::UTF8_STRING)
a == connectio...::UTF8_STRING)Description
TRUEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 10 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
) {
5-10
60 *data = QInternalMimeData::renderDataHelper(QLatin1String("text/plain"), mimeData);-
61 ret = true;-
62 }
executed 5 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
else if (a == XCB_ATOM_STRING
a == XCB_ATOM_STRINGDescription
TRUEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
||
5
63 a == connection->atom(QXcbAtom::TEXT)
a == connectio...XcbAtom::TEXT)Description
TRUEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEnever evaluated
) {
0-5
64-
65 *data = QString::fromUtf8(QInternalMimeData::renderDataHelper(-
66 QLatin1String("text/plain"), mimeData)).toLatin1();-
67 ret = true;-
68 }
executed 10 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
10
69 return
executed 15 times by 5 tests: return ret;
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
ret;
executed 15 times by 5 tests: return ret;
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
15
70 }-
71-
72 QString atomName = mimeAtomToString(connection, a);-
73 if (QInternalMimeData::hasFormatHelper(atomName, mimeData)
QInternalMimeD...ame, mimeData)Description
TRUEevaluated 9 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
) {
5-9
74 *data = QInternalMimeData::renderDataHelper(atomName, mimeData);-
75-
76-
77 if (atomName == QLatin1String("text/uri-list")
atomName == QL...ext/uri-list")Description
TRUEnever evaluated
FALSEevaluated 9 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
0-9
78 && connection->atomName(a) == "text/x-moz-url"
connection->at...ext/x-moz-url"Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
79 const QByteArray uri = data->split('\n').first();-
80 QString mozUri = QString::fromLatin1(uri, uri.size());-
81 mozUri += QLatin1Char('\n');-
82 *data = QByteArray(reinterpret_cast<const char *>(mozUri.utf16()),-
83 mozUri.length() * 2);-
84 }
never executed: end of block
else if (atomName == QLatin1String("application/x-color")
atomName == QL...tion/x-color")Description
TRUEnever evaluated
FALSEevaluated 9 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
0-9
85 *
never executed: *dataFormat = 16;
dataFormat = 16;
never executed: *dataFormat = 16;
0
86 ret = true;-
87 }
executed 9 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
else if ((a == XCB_ATOM_PIXMAP
a == XCB_ATOM_PIXMAPDescription
TRUEnever evaluated
FALSEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
|| a == XCB_ATOM_BITMAP
a == XCB_ATOM_BITMAPDescription
TRUEnever evaluated
FALSEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
) && mimeData->hasImage()
mimeData->hasImage()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-9
88 ret = true;-
89 }
never executed: end of block
else if (atomName == QLatin1String("text/plain")
atomName == QL...("text/plain")Description
TRUEnever evaluated
FALSEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
0-5
90 && mimeData->hasFormat(QLatin1String("text/uri-list"))
mimeData->hasF...xt/uri-list"))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
91-
92 *data = QInternalMimeData::renderDataHelper(atomName, mimeData);-
93 ret = true;-
94 }
never executed: end of block
0
95 return
executed 14 times by 5 tests: return ret;
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
ret;
executed 14 times by 5 tests: return ret;
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
14
96}-
97-
98QVector<xcb_atom_t> QXcbMime::mimeAtomsForFormat(QXcbConnection *connection, const QString &format)-
99{-
100 QVector<xcb_atom_t> atoms;-
101 atoms.reserve(7);-
102 atoms.append(connection->internAtom(format.toLatin1()));-
103-
104-
105 if (format == QLatin1String("text/plain")
format == QLat...("text/plain")Description
TRUEevaluated 5 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
) {
4-5
106 atoms.append(connection->atom(QXcbAtom::UTF8_STRING));-
107 atoms.append(XCB_ATOM_STRING);-
108 atoms.append(connection->atom(QXcbAtom::TEXT));-
109 }
executed 5 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
5
110-
111-
112 if (format == QLatin1String("text/uri-list")
format == QLat...ext/uri-list")Description
TRUEnever evaluated
FALSEevaluated 9 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
) {
0-9
113 atoms.append(connection->internAtom("text/x-moz-url"));-
114 atoms.append(connection->internAtom("text/plain"));-
115 }
never executed: end of block
0
116-
117-
118 if (format == QLatin1String("image/ppm")
format == QLat...g("image/ppm")Description
TRUEnever evaluated
FALSEevaluated 9 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
0-9
119 atoms.append(XCB_ATOM_PIXMAP);
never executed: atoms.append(XCB_ATOM_PIXMAP);
0
120 if (format == QLatin1String("image/pbm")
format == QLat...g("image/pbm")Description
TRUEnever evaluated
FALSEevaluated 9 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
)
0-9
121 atoms.append(XCB_ATOM_BITMAP);
never executed: atoms.append(XCB_ATOM_BITMAP);
0
122-
123 return
executed 9 times by 5 tests: return atoms;
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
atoms;
executed 9 times by 5 tests: return atoms;
Executed by:
  • tst_QApplication
  • tst_qclipboard - unknown status
  • tst_qlineedit - unknown status
  • tst_qplaintextedit - unknown status
  • tst_qtextedit - unknown status
9
124}-
125-
126QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a, const QByteArray &data, const QString &format,-
127 QVariant::Type requestedType, const QByteArray &encoding)-
128{-
129 QString atomName = mimeAtomToString(connection, a);-
130-
131-
132 if (!encoding.isEmpty()
!encoding.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
0-2
133 && atomName == format + QLatin1String(";charset=") + QString::fromLatin1(encoding)
atomName == fo...tin1(encoding)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
134-
135-
136 if (requestedType == QVariant::String
requestedType ...ariant::StringDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
137 QTextCodec *codec = QTextCodec::codecForName(encoding);-
138 if (codec
codecDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
139 return
never executed: return codec->toUnicode(data);
codec->toUnicode(data);
never executed: return codec->toUnicode(data);
0
140 }
never executed: end of block
0
141-
142-
143 return
never executed: return data;
data;
never executed: return data;
0
144 }-
145-
146-
147 if (format == QLatin1String("text/plain")
format == QLat...("text/plain")Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
FALSEnever evaluated
) {
0-2
148 if (a == connection->atom(QXcbAtom::UTF8_STRING)
a == connectio...::UTF8_STRING)Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
FALSEnever evaluated
)
0-2
149 return
executed 2 times by 2 tests: return QString::fromUtf8(data);
Executed by:
  • tst_QApplication
  • tst_QStyleSheetStyle
QString::fromUtf8(data);
executed 2 times by 2 tests: return QString::fromUtf8(data);
Executed by:
  • tst_QApplication
  • tst_QStyleSheetStyle
2
150 if (a == XCB_ATOM_STRING
a == XCB_ATOM_STRINGDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
151 a == connection->atom(QXcbAtom::TEXT)
a == connectio...XcbAtom::TEXT)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
152 return
never executed: return QString::fromLatin1(data);
QString::fromLatin1(data);
never executed: return QString::fromLatin1(data);
0
153 }
never executed: end of block
0
154-
155-
156-
157-
158 if ((format == QLatin1String("text/html")
format == QLat...g("text/html")Description
TRUEnever evaluated
FALSEnever evaluated
|| format == QLatin1String("text/uri-list")
format == QLat...ext/uri-list")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
159 && data.size() > 1
data.size() > 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
160 const quint8 byte0 = data.at(0);-
161 const quint8 byte1 = data.at(1);-
162 if ((byte0 == 0xff
byte0 == 0xffDescription
TRUEnever evaluated
FALSEnever evaluated
&& byte1 == 0xfe
byte1 == 0xfeDescription
TRUEnever evaluated
FALSEnever evaluated
) || (byte0 == 0xfe
byte0 == 0xfeDescription
TRUEnever evaluated
FALSEnever evaluated
&& byte1 == 0xff
byte1 == 0xffDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
163 || (byte0 != 0
byte0 != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& byte1 == 0
byte1 == 0Description
TRUEnever evaluated
FALSEnever evaluated
) || (byte0 == 0
byte0 == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& byte1 != 0
byte1 != 0Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
164 const QString str = QString::fromUtf16(-
165 reinterpret_cast<const ushort *>(data.constData()), data.size() / 2);-
166 if (!str.isNull()
!str.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
167 if (format == QLatin1String("text/uri-list")
format == QLat...ext/uri-list")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
168 const QStringList urls = str.split(QLatin1Char('\n'));-
169 QList<QVariant> list;-
170 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(urls)>::type> _container_((urls)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QString &s = *_container_.i; _container_.control; _container_.control = 0) {-
171 const QUrl url(s.trimmed());-
172 if (url.isValid()
url.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
173 list.append(url);
never executed: list.append(url);
0
174 }
never executed: end of block
0
175-
176-
177-
178 if (!list.isEmpty()
!list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
&& connection->atomName(a) == "text/x-moz-url"
connection->at...ext/x-moz-url"Description
TRUEnever evaluated
FALSEnever evaluated
)
0
179 return
never executed: return list.first();
list.first();
never executed: return list.first();
0
180 return
never executed: return list;
list;
never executed: return list;
0
181 } else {-
182 return
never executed: return str;
str;
never executed: return str;
0
183 }-
184 }-
185 }
never executed: end of block
0
186 }
never executed: end of block
0
187-
188 if (atomName == format
atomName == formatDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
189 return
never executed: return data;
data;
never executed: return data;
0
190 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
191}-
192-
193xcb_atom_t QXcbMime::mimeAtomForFormat(QXcbConnection *connection, const QString &format, QVariant::Type requestedType,-
194 const QVector<xcb_atom_t> &atoms, QByteArray *requestedEncoding)-
195{-
196 requestedEncoding->clear();-
197-
198-
199 if (format == QLatin1String("text/plain")
format == QLat...("text/plain")Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
FALSEnever evaluated
) {
0-2
200 if (atoms.contains(connection->atom(QXcbAtom::UTF8_STRING))
atoms.contains...:UTF8_STRING))Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QApplication
  • tst_QStyleSheetStyle
FALSEnever evaluated
)
0-2
201 return
executed 2 times by 2 tests: return connection->atom(QXcbAtom::UTF8_STRING);
Executed by:
  • tst_QApplication
  • tst_QStyleSheetStyle
connection->atom(QXcbAtom::UTF8_STRING);
executed 2 times by 2 tests: return connection->atom(QXcbAtom::UTF8_STRING);
Executed by:
  • tst_QApplication
  • tst_QStyleSheetStyle
2
202 if (atoms.contains(XCB_ATOM_STRING)
atoms.contains...B_ATOM_STRING)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
203 return
never executed: return XCB_ATOM_STRING;
XCB_ATOM_STRING;
never executed: return XCB_ATOM_STRING;
0
204 if (atoms.contains(connection->atom(QXcbAtom::TEXT))
atoms.contains...cbAtom::TEXT))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
205 return
never executed: return connection->atom(QXcbAtom::TEXT);
connection->atom(QXcbAtom::TEXT);
never executed: return connection->atom(QXcbAtom::TEXT);
0
206 }
never executed: end of block
0
207-
208-
209 if (format == QLatin1String("text/uri-list")
format == QLat...ext/uri-list")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
210 xcb_atom_t a = connection->internAtom(format.toLatin1());-
211 if (a
aDescription
TRUEnever evaluated
FALSEnever evaluated
&& atoms.contains(a)
atoms.contains(a)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
212 return
never executed: return a;
a;
never executed: return a;
0
213 a = connection->internAtom("text/x-moz-url");-
214 if (a
aDescription
TRUEnever evaluated
FALSEnever evaluated
&& atoms.contains(a)
atoms.contains(a)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
215 return
never executed: return a;
a;
never executed: return a;
0
216 }
never executed: end of block
0
217-
218-
219 if (format == QLatin1String("image/ppm")
format == QLat...g("image/ppm")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
220 if (atoms.contains(XCB_ATOM_PIXMAP)
atoms.contains...B_ATOM_PIXMAP)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
221 return
never executed: return XCB_ATOM_PIXMAP;
XCB_ATOM_PIXMAP;
never executed: return XCB_ATOM_PIXMAP;
0
222 }
never executed: end of block
0
223-
224-
225-
226 if (requestedType == QVariant::String
requestedType ...ariant::StringDescription
TRUEnever evaluated
FALSEnever evaluated
0
227 && format.startsWith(QLatin1String("text/"))
format.startsW...ring("text/"))Description
TRUEnever evaluated
FALSEnever evaluated
0
228 && !format.contains(QLatin1String("charset="))
!format.contai...g("charset="))Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
229-
230 QString formatWithCharset = format;-
231 formatWithCharset.append(QLatin1String(";charset=utf-8"));-
232-
233 xcb_atom_t a = connection->internAtom(formatWithCharset.toLatin1());-
234 if (a
aDescription
TRUEnever evaluated
FALSEnever evaluated
&& atoms.contains(a)
atoms.contains(a)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
235 *requestedEncoding = "utf-8";-
236 return
never executed: return a;
a;
never executed: return a;
0
237 }-
238 }
never executed: end of block
0
239-
240 xcb_atom_t a = connection->internAtom(format.toLatin1());-
241 if (a
aDescription
TRUEnever evaluated
FALSEnever evaluated
&& atoms.contains(a)
atoms.contains(a)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
242 return
never executed: return a;
a;
never executed: return a;
0
243-
244 return
never executed: return 0;
0;
never executed: return 0;
0
245}-
246-
247-
248-
249-
Switch to Source codePreprocessed file

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