Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/image/qicon.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||
5 | static QBasicAtomicInt serialNumCounter = { 1 }; | - | ||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||
7 | static void qt_cleanup_icon_cache(); | - | ||||||||||||||||||||||||
8 | namespace { | - | ||||||||||||||||||||||||
9 | struct IconCache : public QCache<QString, QIcon> | - | ||||||||||||||||||||||||
10 | { | - | ||||||||||||||||||||||||
11 | IconCache() | - | ||||||||||||||||||||||||
12 | { | - | ||||||||||||||||||||||||
13 | - | |||||||||||||||||||||||||
14 | qAddPostRoutine(qt_cleanup_icon_cache); | - | ||||||||||||||||||||||||
15 | } never executed: end of block | 0 | ||||||||||||||||||||||||
16 | }; | - | ||||||||||||||||||||||||
17 | } | - | ||||||||||||||||||||||||
18 | - | |||||||||||||||||||||||||
19 | namespace { namespace Q_QGS_qtIconCache { typedef IconCache Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
never executed: }guard.store(QtGlobalStatic::Destroyed); never executed: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of block never executed: &holder.value;return &holder.value; never executed: } } } static QGlobalStatic<IconCache, Q_QGS_qtIconCache::innerFunction, Q_QGS_qtIconCache::guard> qtIconCache;return &holder.value; | 0 | ||||||||||||||||||||||||
20 | - | |||||||||||||||||||||||||
21 | static void qt_cleanup_icon_cache() | - | ||||||||||||||||||||||||
22 | { | - | ||||||||||||||||||||||||
23 | qtIconCache()->clear(); | - | ||||||||||||||||||||||||
24 | } never executed: end of block | 0 | ||||||||||||||||||||||||
25 | static qreal qt_effective_device_pixel_ratio(QWindow *window = 0) | - | ||||||||||||||||||||||||
26 | { | - | ||||||||||||||||||||||||
27 | if (!(static_cast<QGuiApplication *>(QCoreApplication::instance()))->testAttribute(Qt::AA_UseHighDpiPixmaps)
| 0 | ||||||||||||||||||||||||
28 | return never executed: qreal(1.0);return qreal(1.0); never executed: return qreal(1.0); | 0 | ||||||||||||||||||||||||
29 | - | |||||||||||||||||||||||||
30 | if (window
| 0 | ||||||||||||||||||||||||
31 | return never executed: window->devicePixelRatio();return window->devicePixelRatio(); never executed: return window->devicePixelRatio(); | 0 | ||||||||||||||||||||||||
32 | - | |||||||||||||||||||||||||
33 | return never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->devicePixelRatio();return (static_cast<QGuiApplication *>(QCoreApplication::instance()))->devicePixelRatio(); never executed: return (static_cast<QGuiApplication *>(QCoreApplication::instance()))->devicePixelRatio(); | 0 | ||||||||||||||||||||||||
34 | } | - | ||||||||||||||||||||||||
35 | - | |||||||||||||||||||||||||
36 | QIconPrivate::QIconPrivate() | - | ||||||||||||||||||||||||
37 | : engine(0), ref(1), | - | ||||||||||||||||||||||||
38 | serialNum(serialNumCounter.fetchAndAddRelaxed(1)), | - | ||||||||||||||||||||||||
39 | detach_no(0), | - | ||||||||||||||||||||||||
40 | is_mask(false) | - | ||||||||||||||||||||||||
41 | { | - | ||||||||||||||||||||||||
42 | } never executed: end of block | 0 | ||||||||||||||||||||||||
43 | qreal QIconPrivate::pixmapDevicePixelRatio(qreal displayDevicePixelRatio, const QSize &requestedSize, const QSize &actualSize) | - | ||||||||||||||||||||||||
44 | { | - | ||||||||||||||||||||||||
45 | QSize targetSize = requestedSize * displayDevicePixelRatio; | - | ||||||||||||||||||||||||
46 | qreal scale = 0.5 * (qreal(actualSize.width()) / qreal(targetSize.width()) + | - | ||||||||||||||||||||||||
47 | qreal(actualSize.height() / qreal(targetSize.height()))); | - | ||||||||||||||||||||||||
48 | return never executed: qMax(qreal(1.0), displayDevicePixelRatio *scale);return qMax(qreal(1.0), displayDevicePixelRatio *scale); never executed: return qMax(qreal(1.0), displayDevicePixelRatio *scale); | 0 | ||||||||||||||||||||||||
49 | } | - | ||||||||||||||||||||||||
50 | - | |||||||||||||||||||||||||
51 | QPixmapIconEngine::QPixmapIconEngine() | - | ||||||||||||||||||||||||
52 | { | - | ||||||||||||||||||||||||
53 | } | - | ||||||||||||||||||||||||
54 | - | |||||||||||||||||||||||||
55 | QPixmapIconEngine::QPixmapIconEngine(const QPixmapIconEngine &other) | - | ||||||||||||||||||||||||
56 | : QIconEngine(other), pixmaps(other.pixmaps) | - | ||||||||||||||||||||||||
57 | { | - | ||||||||||||||||||||||||
58 | } never executed: end of block | 0 | ||||||||||||||||||||||||
59 | - | |||||||||||||||||||||||||
60 | QPixmapIconEngine::~QPixmapIconEngine() | - | ||||||||||||||||||||||||
61 | { | - | ||||||||||||||||||||||||
62 | } | - | ||||||||||||||||||||||||
63 | - | |||||||||||||||||||||||||
64 | void QPixmapIconEngine::paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) | - | ||||||||||||||||||||||||
65 | { | - | ||||||||||||||||||||||||
66 | QSize pixmapSize = rect.size() * qt_effective_device_pixel_ratio(0); | - | ||||||||||||||||||||||||
67 | QPixmap px = pixmap(pixmapSize, mode, state); | - | ||||||||||||||||||||||||
68 | painter->drawPixmap(rect, px); | - | ||||||||||||||||||||||||
69 | } never executed: end of block | 0 | ||||||||||||||||||||||||
70 | - | |||||||||||||||||||||||||
71 | static inline int area(const QSize &s) { return never executed: s.width() * s.height();return s.width() * s.height(); never executed: }return s.width() * s.height(); | 0 | ||||||||||||||||||||||||
72 | - | |||||||||||||||||||||||||
73 | - | |||||||||||||||||||||||||
74 | static QPixmapIconEngineEntry *bestSizeMatch( const QSize &size, QPixmapIconEngineEntry *pa, QPixmapIconEngineEntry *pb) | - | ||||||||||||||||||||||||
75 | { | - | ||||||||||||||||||||||||
76 | int s = area(size); | - | ||||||||||||||||||||||||
77 | if (pa->size == QSize()
| 0 | ||||||||||||||||||||||||
78 | pa->pixmap = QPixmap(pa->fileName); | - | ||||||||||||||||||||||||
79 | pa->size = pa->pixmap.size(); | - | ||||||||||||||||||||||||
80 | } never executed: end of block | 0 | ||||||||||||||||||||||||
81 | int a = area(pa->size); | - | ||||||||||||||||||||||||
82 | if (pb->size == QSize()
| 0 | ||||||||||||||||||||||||
83 | pb->pixmap = QPixmap(pb->fileName); | - | ||||||||||||||||||||||||
84 | pb->size = pb->pixmap.size(); | - | ||||||||||||||||||||||||
85 | } never executed: end of block | 0 | ||||||||||||||||||||||||
86 | int b = area(pb->size); | - | ||||||||||||||||||||||||
87 | int res = a; | - | ||||||||||||||||||||||||
88 | if (qMin(a,b) >= s
| 0 | ||||||||||||||||||||||||
89 | res = qMin(a,b); never executed: res = qMin(a,b); | 0 | ||||||||||||||||||||||||
90 | else | - | ||||||||||||||||||||||||
91 | res = qMax(a,b); never executed: res = qMax(a,b); | 0 | ||||||||||||||||||||||||
92 | if (res == a
| 0 | ||||||||||||||||||||||||
93 | return never executed: pa;return pa; never executed: return pa; | 0 | ||||||||||||||||||||||||
94 | return never executed: pb;return pb; never executed: return pb; | 0 | ||||||||||||||||||||||||
95 | } | - | ||||||||||||||||||||||||
96 | - | |||||||||||||||||||||||||
97 | QPixmapIconEngineEntry *QPixmapIconEngine::tryMatch(const QSize &size, QIcon::Mode mode, QIcon::State state) | - | ||||||||||||||||||||||||
98 | { | - | ||||||||||||||||||||||||
99 | QPixmapIconEngineEntry *pe = 0; | - | ||||||||||||||||||||||||
100 | for (int i = 0; i < pixmaps.count()
| 0 | ||||||||||||||||||||||||
101 | if (pixmaps.at(i).mode == mode
| 0 | ||||||||||||||||||||||||
102 | if (pe
| 0 | ||||||||||||||||||||||||
103 | pe = bestSizeMatch(size, &pixmaps[i], pe); never executed: pe = bestSizeMatch(size, &pixmaps[i], pe); | 0 | ||||||||||||||||||||||||
104 | else | - | ||||||||||||||||||||||||
105 | pe = &pixmaps[i]; never executed: pe = &pixmaps[i]; | 0 | ||||||||||||||||||||||||
106 | } | - | ||||||||||||||||||||||||
107 | return never executed: pe;return pe; never executed: return pe; | 0 | ||||||||||||||||||||||||
108 | } | - | ||||||||||||||||||||||||
109 | - | |||||||||||||||||||||||||
110 | - | |||||||||||||||||||||||||
111 | QPixmapIconEngineEntry *QPixmapIconEngine::bestMatch(const QSize &size, QIcon::Mode mode, QIcon::State state, bool sizeOnly) | - | ||||||||||||||||||||||||
112 | { | - | ||||||||||||||||||||||||
113 | QPixmapIconEngineEntry *pe = tryMatch(size, mode, state); | - | ||||||||||||||||||||||||
114 | while (!pe
| 0 | ||||||||||||||||||||||||
115 | QIcon::State oppositeState = (
| 0 | ||||||||||||||||||||||||
116 | if (mode == QIcon::Disabled
| 0 | ||||||||||||||||||||||||
117 | QIcon::Mode oppositeMode = (
| 0 | ||||||||||||||||||||||||
118 | if ((
| 0 | ||||||||||||||||||||||||
119 | break; never executed: break; | 0 | ||||||||||||||||||||||||
120 | if ((
| 0 | ||||||||||||||||||||||||
121 | break; never executed: break; | 0 | ||||||||||||||||||||||||
122 | if ((
| 0 | ||||||||||||||||||||||||
123 | break; never executed: break; | 0 | ||||||||||||||||||||||||
124 | if ((
| 0 | ||||||||||||||||||||||||
125 | break; never executed: break; | 0 | ||||||||||||||||||||||||
126 | if ((
| 0 | ||||||||||||||||||||||||
127 | break; never executed: break; | 0 | ||||||||||||||||||||||||
128 | if ((
| 0 | ||||||||||||||||||||||||
129 | break; never executed: break; | 0 | ||||||||||||||||||||||||
130 | if ((
| 0 | ||||||||||||||||||||||||
131 | break; never executed: break; | 0 | ||||||||||||||||||||||||
132 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
133 | QIcon::Mode oppositeMode = (
| 0 | ||||||||||||||||||||||||
134 | if ((
| 0 | ||||||||||||||||||||||||
135 | break; never executed: break; | 0 | ||||||||||||||||||||||||
136 | if ((
| 0 | ||||||||||||||||||||||||
137 | break; never executed: break; | 0 | ||||||||||||||||||||||||
138 | if ((
| 0 | ||||||||||||||||||||||||
139 | break; never executed: break; | 0 | ||||||||||||||||||||||||
140 | if ((
| 0 | ||||||||||||||||||||||||
141 | break; never executed: break; | 0 | ||||||||||||||||||||||||
142 | if ((
| 0 | ||||||||||||||||||||||||
143 | break; never executed: break; | 0 | ||||||||||||||||||||||||
144 | if ((
| 0 | ||||||||||||||||||||||||
145 | break; never executed: break; | 0 | ||||||||||||||||||||||||
146 | if ((
| 0 | ||||||||||||||||||||||||
147 | break; never executed: break; | 0 | ||||||||||||||||||||||||
148 | } never executed: end of block | 0 | ||||||||||||||||||||||||
149 | - | |||||||||||||||||||||||||
150 | if (!pe
| 0 | ||||||||||||||||||||||||
151 | return never executed: pe;return pe; never executed: return pe; | 0 | ||||||||||||||||||||||||
152 | } never executed: end of block | 0 | ||||||||||||||||||||||||
153 | - | |||||||||||||||||||||||||
154 | if (sizeOnly
| 0 | ||||||||||||||||||||||||
155 | pe->pixmap = QPixmap(pe->fileName); | - | ||||||||||||||||||||||||
156 | if (!pe->pixmap.isNull()
| 0 | ||||||||||||||||||||||||
157 | pe->size = pe->pixmap.size(); never executed: pe->size = pe->pixmap.size(); | 0 | ||||||||||||||||||||||||
158 | } never executed: end of block | 0 | ||||||||||||||||||||||||
159 | - | |||||||||||||||||||||||||
160 | return never executed: pe;return pe; never executed: return pe; | 0 | ||||||||||||||||||||||||
161 | } | - | ||||||||||||||||||||||||
162 | - | |||||||||||||||||||||||||
163 | QPixmap QPixmapIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) | - | ||||||||||||||||||||||||
164 | { | - | ||||||||||||||||||||||||
165 | QPixmap pm; | - | ||||||||||||||||||||||||
166 | QPixmapIconEngineEntry *pe = bestMatch(size, mode, state, false); | - | ||||||||||||||||||||||||
167 | if (pe
| 0 | ||||||||||||||||||||||||
168 | pm = pe->pixmap; never executed: pm = pe->pixmap; | 0 | ||||||||||||||||||||||||
169 | - | |||||||||||||||||||||||||
170 | if (pm.isNull()
| 0 | ||||||||||||||||||||||||
171 | int idx = pixmaps.count(); | - | ||||||||||||||||||||||||
172 | while (--
| 0 | ||||||||||||||||||||||||
173 | if (pe == &pixmaps[idx]
| 0 | ||||||||||||||||||||||||
174 | pixmaps.remove(idx); | - | ||||||||||||||||||||||||
175 | break; never executed: break; | 0 | ||||||||||||||||||||||||
176 | } | - | ||||||||||||||||||||||||
177 | } never executed: end of block | 0 | ||||||||||||||||||||||||
178 | if (pixmaps.isEmpty()
| 0 | ||||||||||||||||||||||||
179 | return never executed: pm;return pm; never executed: return pm; | 0 | ||||||||||||||||||||||||
180 | else | - | ||||||||||||||||||||||||
181 | return never executed: pixmap(size, mode, state);return pixmap(size, mode, state); never executed: return pixmap(size, mode, state); | 0 | ||||||||||||||||||||||||
182 | } | - | ||||||||||||||||||||||||
183 | - | |||||||||||||||||||||||||
184 | QSize actualSize = pm.size(); | - | ||||||||||||||||||||||||
185 | if (!actualSize.isNull()
| 0 | ||||||||||||||||||||||||
186 | actualSize.scale(size, Qt::KeepAspectRatio); never executed: actualSize.scale(size, Qt::KeepAspectRatio); | 0 | ||||||||||||||||||||||||
187 | - | |||||||||||||||||||||||||
188 | QString key = QLatin1String("qt_") | - | ||||||||||||||||||||||||
189 | % HexString<quint64>(pm.cacheKey()) | - | ||||||||||||||||||||||||
190 | % HexString<uint>(pe ? pe->mode : QIcon::Normal) | - | ||||||||||||||||||||||||
191 | % HexString<quint64>(QGuiApplication::palette().cacheKey()) | - | ||||||||||||||||||||||||
192 | % HexString<uint>(actualSize.width()) | - | ||||||||||||||||||||||||
193 | % HexString<uint>(actualSize.height()); | - | ||||||||||||||||||||||||
194 | - | |||||||||||||||||||||||||
195 | if (mode == QIcon::Active
| 0 | ||||||||||||||||||||||||
196 | if (QPixmapCache::find(key % HexString<uint>(mode), pm)
| 0 | ||||||||||||||||||||||||
197 | return never executed: pm;return pm; never executed: return pm; | 0 | ||||||||||||||||||||||||
198 | if (QPixmapCache::find(key % HexString<uint>(QIcon::Normal), pm)
| 0 | ||||||||||||||||||||||||
199 | QPixmap active = pm; | - | ||||||||||||||||||||||||
200 | if (QGuiApplication *guiApp = qobject_cast<QGuiApplication *>((static_cast<QGuiApplication *>(QCoreApplication::instance())))
| 0 | ||||||||||||||||||||||||
201 | active = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(QIcon::Active, pm); never executed: active = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(QIcon::Active, pm); | 0 | ||||||||||||||||||||||||
202 | if (pm.cacheKey() == active.cacheKey()
| 0 | ||||||||||||||||||||||||
203 | return never executed: pm;return pm; never executed: return pm; | 0 | ||||||||||||||||||||||||
204 | } never executed: end of block | 0 | ||||||||||||||||||||||||
205 | } never executed: end of block | 0 | ||||||||||||||||||||||||
206 | - | |||||||||||||||||||||||||
207 | if (!QPixmapCache::find(key % HexString<uint>(mode), pm)
| 0 | ||||||||||||||||||||||||
208 | if (pm.size() != actualSize
| 0 | ||||||||||||||||||||||||
209 | pm = pm.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); never executed: pm = pm.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); | 0 | ||||||||||||||||||||||||
210 | if (pe->mode != mode
| 0 | ||||||||||||||||||||||||
211 | QPixmap generated = pm; | - | ||||||||||||||||||||||||
212 | if (QGuiApplication *guiApp = qobject_cast<QGuiApplication *>((static_cast<QGuiApplication *>(QCoreApplication::instance())))
| 0 | ||||||||||||||||||||||||
213 | generated = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, pm); never executed: generated = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, pm); | 0 | ||||||||||||||||||||||||
214 | if (!generated.isNull()
| 0 | ||||||||||||||||||||||||
215 | pm = generated; never executed: pm = generated; | 0 | ||||||||||||||||||||||||
216 | } never executed: end of block | 0 | ||||||||||||||||||||||||
217 | QPixmapCache::insert(key % HexString<uint>(mode), pm); | - | ||||||||||||||||||||||||
218 | } never executed: end of block | 0 | ||||||||||||||||||||||||
219 | return never executed: pm;return pm; never executed: return pm; | 0 | ||||||||||||||||||||||||
220 | } | - | ||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||
222 | QSize QPixmapIconEngine::actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state) | - | ||||||||||||||||||||||||
223 | { | - | ||||||||||||||||||||||||
224 | QSize actualSize; | - | ||||||||||||||||||||||||
225 | if (QPixmapIconEngineEntry *pe = bestMatch(size, mode, state, true)
| 0 | ||||||||||||||||||||||||
226 | actualSize = pe->size; never executed: actualSize = pe->size; | 0 | ||||||||||||||||||||||||
227 | - | |||||||||||||||||||||||||
228 | if (actualSize.isNull()
| 0 | ||||||||||||||||||||||||
229 | return never executed: actualSize;return actualSize; never executed: return actualSize; | 0 | ||||||||||||||||||||||||
230 | - | |||||||||||||||||||||||||
231 | if (!actualSize.isNull()
| 0 | ||||||||||||||||||||||||
232 | actualSize.scale(size, Qt::KeepAspectRatio); never executed: actualSize.scale(size, Qt::KeepAspectRatio); | 0 | ||||||||||||||||||||||||
233 | return never executed: actualSize;return actualSize; never executed: return actualSize; | 0 | ||||||||||||||||||||||||
234 | } | - | ||||||||||||||||||||||||
235 | - | |||||||||||||||||||||||||
236 | void QPixmapIconEngine::addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) | - | ||||||||||||||||||||||||
237 | { | - | ||||||||||||||||||||||||
238 | if (!pixmap.isNull()
| 0 | ||||||||||||||||||||||||
239 | QPixmapIconEngineEntry *pe = tryMatch(pixmap.size(), mode, state); | - | ||||||||||||||||||||||||
240 | if(pe
| 0 | ||||||||||||||||||||||||
241 | pe->pixmap = pixmap; | - | ||||||||||||||||||||||||
242 | pe->fileName.clear(); | - | ||||||||||||||||||||||||
243 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
244 | pixmaps += QPixmapIconEngineEntry(pixmap, mode, state); | - | ||||||||||||||||||||||||
245 | } never executed: end of block | 0 | ||||||||||||||||||||||||
246 | } | - | ||||||||||||||||||||||||
247 | } never executed: end of block | 0 | ||||||||||||||||||||||||
248 | - | |||||||||||||||||||||||||
249 | - | |||||||||||||||||||||||||
250 | static inline int origIcoDepth(const QImage &image) | - | ||||||||||||||||||||||||
251 | { | - | ||||||||||||||||||||||||
252 | const QString s = image.text(([]() -> QString { enum { Size = sizeof(u"" "_q_icoOrigDepth")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "_q_icoOrigDepth" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed: qstring_literal_temp;return qstring_literal_temp; never executed: }()));return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
253 | return never executed: s.isEmpty()return s.isEmpty() ? 32 : s.toInt();
never executed: return s.isEmpty() ? 32 : s.toInt(); | 0 | ||||||||||||||||||||||||
254 | } | - | ||||||||||||||||||||||||
255 | - | |||||||||||||||||||||||||
256 | static inline int findBySize(const QVector<QImage> &images, const QSize &size) | - | ||||||||||||||||||||||||
257 | { | - | ||||||||||||||||||||||||
258 | for (int i = 0; i < images.size()
| 0 | ||||||||||||||||||||||||
259 | if (images.at(i).size() == size
| 0 | ||||||||||||||||||||||||
260 | return never executed: i;return i; never executed: return i; | 0 | ||||||||||||||||||||||||
261 | } never executed: end of block | 0 | ||||||||||||||||||||||||
262 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
263 | } | - | ||||||||||||||||||||||||
264 | - | |||||||||||||||||||||||||
265 | - | |||||||||||||||||||||||||
266 | namespace { | - | ||||||||||||||||||||||||
267 | class ImageReader | - | ||||||||||||||||||||||||
268 | { | - | ||||||||||||||||||||||||
269 | public: | - | ||||||||||||||||||||||||
270 | ImageReader(const QString &fileName) : m_reader(fileName), m_atEnd(false) {} never executed: end of block | 0 | ||||||||||||||||||||||||
271 | - | |||||||||||||||||||||||||
272 | QByteArray format() const { return never executed: m_reader.format();return m_reader.format(); never executed: }return m_reader.format(); | 0 | ||||||||||||||||||||||||
273 | - | |||||||||||||||||||||||||
274 | bool read(QImage *image) | - | ||||||||||||||||||||||||
275 | { | - | ||||||||||||||||||||||||
276 | if (m_atEnd
| 0 | ||||||||||||||||||||||||
277 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||
278 | *image = m_reader.read(); | - | ||||||||||||||||||||||||
279 | if (!image->size().isValid()
| 0 | ||||||||||||||||||||||||
280 | m_atEnd = true; | - | ||||||||||||||||||||||||
281 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||
282 | } | - | ||||||||||||||||||||||||
283 | m_atEnd = !m_reader.jumpToNextImage(); | - | ||||||||||||||||||||||||
284 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||
285 | } | - | ||||||||||||||||||||||||
286 | - | |||||||||||||||||||||||||
287 | private: | - | ||||||||||||||||||||||||
288 | QImageReader m_reader; | - | ||||||||||||||||||||||||
289 | bool m_atEnd; | - | ||||||||||||||||||||||||
290 | }; | - | ||||||||||||||||||||||||
291 | } | - | ||||||||||||||||||||||||
292 | - | |||||||||||||||||||||||||
293 | void QPixmapIconEngine::addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) | - | ||||||||||||||||||||||||
294 | { | - | ||||||||||||||||||||||||
295 | if (fileName.isEmpty()
| 0 | ||||||||||||||||||||||||
296 | return; never executed: return; | 0 | ||||||||||||||||||||||||
297 | const QString abs = fileName.startsWith(QLatin1Char(':'))
| 0 | ||||||||||||||||||||||||
298 | const bool ignoreSize = !size.isValid(); | - | ||||||||||||||||||||||||
299 | ImageReader imageReader(abs); | - | ||||||||||||||||||||||||
300 | const QByteArray format = imageReader.format(); | - | ||||||||||||||||||||||||
301 | if (format.isEmpty()
| 0 | ||||||||||||||||||||||||
302 | return; never executed: return; | 0 | ||||||||||||||||||||||||
303 | QImage image; | - | ||||||||||||||||||||||||
304 | if (format != "ico"
| 0 | ||||||||||||||||||||||||
305 | if (ignoreSize
| 0 | ||||||||||||||||||||||||
306 | while (imageReader.read(&image)
| 0 | ||||||||||||||||||||||||
307 | pixmaps += QPixmapIconEngineEntry(abs, image, mode, state); never executed: pixmaps += QPixmapIconEngineEntry(abs, image, mode, state); | 0 | ||||||||||||||||||||||||
308 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
309 | - | |||||||||||||||||||||||||
310 | while (imageReader.read(&image)
never executed: end of block | 0 | ||||||||||||||||||||||||
311 | pixmaps += image.size() == size
| 0 | ||||||||||||||||||||||||
312 | QPixmapIconEngineEntry(abs, image, mode, state) : QPixmapIconEngineEntry(abs, size, mode, state); | - | ||||||||||||||||||||||||
313 | } never executed: end of block | 0 | ||||||||||||||||||||||||
314 | return; never executed: return; | 0 | ||||||||||||||||||||||||
315 | } | - | ||||||||||||||||||||||||
316 | - | |||||||||||||||||||||||||
317 | - | |||||||||||||||||||||||||
318 | - | |||||||||||||||||||||||||
319 | - | |||||||||||||||||||||||||
320 | QVector<QImage> icoImages; | - | ||||||||||||||||||||||||
321 | while (imageReader.read(&image)
| 0 | ||||||||||||||||||||||||
322 | if (ignoreSize
| 0 | ||||||||||||||||||||||||
323 | const int position = findBySize(icoImages, image.size()); | - | ||||||||||||||||||||||||
324 | if (position >= 0
| 0 | ||||||||||||||||||||||||
325 | if (origIcoDepth(image) > origIcoDepth(icoImages.at(position))
| 0 | ||||||||||||||||||||||||
326 | icoImages[position] = image; never executed: icoImages[position] = image; | 0 | ||||||||||||||||||||||||
327 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
328 | icoImages.append(image); | - | ||||||||||||||||||||||||
329 | } never executed: end of block | 0 | ||||||||||||||||||||||||
330 | } | - | ||||||||||||||||||||||||
331 | } never executed: end of block | 0 | ||||||||||||||||||||||||
332 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(icoImages)>::type> _container_((icoImages)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QImage &i = *_container_.i; _container_.control; _container_.control = 0) | - | ||||||||||||||||||||||||
333 | pixmaps += QPixmapIconEngineEntry(abs, i, mode, state); never executed: pixmaps += QPixmapIconEngineEntry(abs, i, mode, state); | 0 | ||||||||||||||||||||||||
334 | if (icoImages.isEmpty()
| 0 | ||||||||||||||||||||||||
335 | pixmaps += QPixmapIconEngineEntry(abs, size, mode, state); never executed: pixmaps += QPixmapIconEngineEntry(abs, size, mode, state); | 0 | ||||||||||||||||||||||||
336 | } never executed: end of block | 0 | ||||||||||||||||||||||||
337 | - | |||||||||||||||||||||||||
338 | QString QPixmapIconEngine::key() const | - | ||||||||||||||||||||||||
339 | { | - | ||||||||||||||||||||||||
340 | return never executed: QLatin1String("QPixmapIconEngine");return QLatin1String("QPixmapIconEngine"); never executed: return QLatin1String("QPixmapIconEngine"); | 0 | ||||||||||||||||||||||||
341 | } | - | ||||||||||||||||||||||||
342 | - | |||||||||||||||||||||||||
343 | QIconEngine *QPixmapIconEngine::clone() const | - | ||||||||||||||||||||||||
344 | { | - | ||||||||||||||||||||||||
345 | return never executed: new QPixmapIconEngine(*this);return new QPixmapIconEngine(*this); never executed: return new QPixmapIconEngine(*this); | 0 | ||||||||||||||||||||||||
346 | } | - | ||||||||||||||||||||||||
347 | - | |||||||||||||||||||||||||
348 | bool QPixmapIconEngine::read(QDataStream &in) | - | ||||||||||||||||||||||||
349 | { | - | ||||||||||||||||||||||||
350 | int num_entries; | - | ||||||||||||||||||||||||
351 | QPixmap pm; | - | ||||||||||||||||||||||||
352 | QString fileName; | - | ||||||||||||||||||||||||
353 | QSize sz; | - | ||||||||||||||||||||||||
354 | uint mode; | - | ||||||||||||||||||||||||
355 | uint state; | - | ||||||||||||||||||||||||
356 | - | |||||||||||||||||||||||||
357 | in >> num_entries; | - | ||||||||||||||||||||||||
358 | for (int i=0; i < num_entries
| 0 | ||||||||||||||||||||||||
359 | if (in.atEnd()
| 0 | ||||||||||||||||||||||||
360 | pixmaps.clear(); | - | ||||||||||||||||||||||||
361 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||
362 | } | - | ||||||||||||||||||||||||
363 | in >> pm; | - | ||||||||||||||||||||||||
364 | in >> fileName; | - | ||||||||||||||||||||||||
365 | in >> sz; | - | ||||||||||||||||||||||||
366 | in >> mode; | - | ||||||||||||||||||||||||
367 | in >> state; | - | ||||||||||||||||||||||||
368 | if (pm.isNull()
| 0 | ||||||||||||||||||||||||
369 | addFile(fileName, sz, QIcon::Mode(mode), QIcon::State(state)); | - | ||||||||||||||||||||||||
370 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
371 | QPixmapIconEngineEntry pe(fileName, sz, QIcon::Mode(mode), QIcon::State(state)); | - | ||||||||||||||||||||||||
372 | pe.pixmap = pm; | - | ||||||||||||||||||||||||
373 | pixmaps += pe; | - | ||||||||||||||||||||||||
374 | } never executed: end of block | 0 | ||||||||||||||||||||||||
375 | } | - | ||||||||||||||||||||||||
376 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||
377 | } | - | ||||||||||||||||||||||||
378 | - | |||||||||||||||||||||||||
379 | bool QPixmapIconEngine::write(QDataStream &out) const | - | ||||||||||||||||||||||||
380 | { | - | ||||||||||||||||||||||||
381 | int num_entries = pixmaps.size(); | - | ||||||||||||||||||||||||
382 | out << num_entries; | - | ||||||||||||||||||||||||
383 | for (int i=0; i < num_entries
| 0 | ||||||||||||||||||||||||
384 | if (pixmaps.at(i).pixmap.isNull()
| 0 | ||||||||||||||||||||||||
385 | out << QPixmap(pixmaps.at(i).fileName); never executed: out << QPixmap(pixmaps.at(i).fileName); | 0 | ||||||||||||||||||||||||
386 | else | - | ||||||||||||||||||||||||
387 | out << pixmaps.at(i).pixmap; never executed: out << pixmaps.at(i).pixmap; | 0 | ||||||||||||||||||||||||
388 | out << pixmaps.at(i).fileName; | - | ||||||||||||||||||||||||
389 | out << pixmaps.at(i).size; | - | ||||||||||||||||||||||||
390 | out << (uint) pixmaps.at(i).mode; | - | ||||||||||||||||||||||||
391 | out << (uint) pixmaps.at(i).state; | - | ||||||||||||||||||||||||
392 | } never executed: end of block | 0 | ||||||||||||||||||||||||
393 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||||||||
394 | } | - | ||||||||||||||||||||||||
395 | - | |||||||||||||||||||||||||
396 | void QPixmapIconEngine::virtual_hook(int id, void *data) | - | ||||||||||||||||||||||||
397 | { | - | ||||||||||||||||||||||||
398 | switch (id) { | - | ||||||||||||||||||||||||
399 | case never executed: QIconEngine::AvailableSizesHook:case QIconEngine::AvailableSizesHook: never executed: {case QIconEngine::AvailableSizesHook: | 0 | ||||||||||||||||||||||||
400 | QIconEngine::AvailableSizesArgument &arg = | - | ||||||||||||||||||||||||
401 | *reinterpret_cast<QIconEngine::AvailableSizesArgument*>(data); | - | ||||||||||||||||||||||||
402 | arg.sizes.clear(); | - | ||||||||||||||||||||||||
403 | for (int i = 0; i < pixmaps.size()
| 0 | ||||||||||||||||||||||||
404 | QPixmapIconEngineEntry &pe = pixmaps[i]; | - | ||||||||||||||||||||||||
405 | if (pe.size == QSize()
| 0 | ||||||||||||||||||||||||
406 | pe.pixmap = QPixmap(pe.fileName); | - | ||||||||||||||||||||||||
407 | pe.size = pe.pixmap.size(); | - | ||||||||||||||||||||||||
408 | } never executed: end of block | 0 | ||||||||||||||||||||||||
409 | if (pe.mode == arg.mode
| 0 | ||||||||||||||||||||||||
410 | arg.sizes.push_back(pe.size); never executed: arg.sizes.push_back(pe.size); | 0 | ||||||||||||||||||||||||
411 | } never executed: end of block | 0 | ||||||||||||||||||||||||
412 | break; never executed: break; | 0 | ||||||||||||||||||||||||
413 | } | - | ||||||||||||||||||||||||
414 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||
415 | QIconEngine::virtual_hook(id, data); | - | ||||||||||||||||||||||||
416 | } never executed: end of block | 0 | ||||||||||||||||||||||||
417 | } | - | ||||||||||||||||||||||||
418 | - | |||||||||||||||||||||||||
419 | - | |||||||||||||||||||||||||
420 | namespace { namespace Q_QGS_loader { typedef QFactoryLoader Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
never executed: }guard.store(QtGlobalStatic::Destroyed); never executed: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.Qt.QIconEngineFactoryInterface", QLatin1String("/iconengines"), Qt::CaseInsensitive))) : value ("org.qt-project.Qt.QIconEngineFactoryInterface", QLatin1String("/iconengines"), Qt::CaseInsensitive) { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of block never executed: &holder.value;return &holder.value; never executed: } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;return &holder.value; | 0 | ||||||||||||||||||||||||
421 | - | |||||||||||||||||||||||||
422 | - | |||||||||||||||||||||||||
423 | QFactoryLoader *qt_iconEngineFactoryLoader() | - | ||||||||||||||||||||||||
424 | { | - | ||||||||||||||||||||||||
425 | return never executed: loader();return loader(); never executed: return loader(); | 0 | ||||||||||||||||||||||||
426 | } | - | ||||||||||||||||||||||||
427 | QIcon::QIcon() noexcept | - | ||||||||||||||||||||||||
428 | : d(0) | - | ||||||||||||||||||||||||
429 | { | - | ||||||||||||||||||||||||
430 | } never executed: end of block | 0 | ||||||||||||||||||||||||
431 | - | |||||||||||||||||||||||||
432 | - | |||||||||||||||||||||||||
433 | - | |||||||||||||||||||||||||
434 | - | |||||||||||||||||||||||||
435 | QIcon::QIcon(const QPixmap &pixmap) | - | ||||||||||||||||||||||||
436 | :d(0) | - | ||||||||||||||||||||||||
437 | { | - | ||||||||||||||||||||||||
438 | addPixmap(pixmap); | - | ||||||||||||||||||||||||
439 | } never executed: end of block | 0 | ||||||||||||||||||||||||
440 | - | |||||||||||||||||||||||||
441 | - | |||||||||||||||||||||||||
442 | - | |||||||||||||||||||||||||
443 | - | |||||||||||||||||||||||||
444 | QIcon::QIcon(const QIcon &other) | - | ||||||||||||||||||||||||
445 | :d(other.d) | - | ||||||||||||||||||||||||
446 | { | - | ||||||||||||||||||||||||
447 | if (d
| 0 | ||||||||||||||||||||||||
448 | d->ref.ref(); never executed: d->ref.ref(); | 0 | ||||||||||||||||||||||||
449 | } never executed: end of block | 0 | ||||||||||||||||||||||||
450 | QIcon::QIcon(const QString &fileName) | - | ||||||||||||||||||||||||
451 | : d(0) | - | ||||||||||||||||||||||||
452 | { | - | ||||||||||||||||||||||||
453 | addFile(fileName); | - | ||||||||||||||||||||||||
454 | } never executed: end of block | 0 | ||||||||||||||||||||||||
455 | - | |||||||||||||||||||||||||
456 | - | |||||||||||||||||||||||||
457 | - | |||||||||||||||||||||||||
458 | - | |||||||||||||||||||||||||
459 | - | |||||||||||||||||||||||||
460 | - | |||||||||||||||||||||||||
461 | QIcon::QIcon(QIconEngine *engine) | - | ||||||||||||||||||||||||
462 | :d(new QIconPrivate) | - | ||||||||||||||||||||||||
463 | { | - | ||||||||||||||||||||||||
464 | d->engine = engine; | - | ||||||||||||||||||||||||
465 | } never executed: end of block | 0 | ||||||||||||||||||||||||
466 | - | |||||||||||||||||||||||||
467 | - | |||||||||||||||||||||||||
468 | - | |||||||||||||||||||||||||
469 | - | |||||||||||||||||||||||||
470 | QIcon::~QIcon() | - | ||||||||||||||||||||||||
471 | { | - | ||||||||||||||||||||||||
472 | if (d
| 0 | ||||||||||||||||||||||||
473 | delete d; never executed: delete d; | 0 | ||||||||||||||||||||||||
474 | } never executed: end of block | 0 | ||||||||||||||||||||||||
475 | - | |||||||||||||||||||||||||
476 | - | |||||||||||||||||||||||||
477 | - | |||||||||||||||||||||||||
478 | - | |||||||||||||||||||||||||
479 | - | |||||||||||||||||||||||||
480 | QIcon &QIcon::operator=(const QIcon &other) | - | ||||||||||||||||||||||||
481 | { | - | ||||||||||||||||||||||||
482 | if (other.d
| 0 | ||||||||||||||||||||||||
483 | other.d->ref.ref(); never executed: other.d->ref.ref(); | 0 | ||||||||||||||||||||||||
484 | if (d
| 0 | ||||||||||||||||||||||||
485 | delete d; never executed: delete d; | 0 | ||||||||||||||||||||||||
486 | d = other.d; | - | ||||||||||||||||||||||||
487 | return never executed: *this;return *this; never executed: return *this; | 0 | ||||||||||||||||||||||||
488 | } | - | ||||||||||||||||||||||||
489 | QIcon::operator QVariant() const | - | ||||||||||||||||||||||||
490 | { | - | ||||||||||||||||||||||||
491 | return never executed: QVariant(QVariant::Icon, this);return QVariant(QVariant::Icon, this); never executed: return QVariant(QVariant::Icon, this); | 0 | ||||||||||||||||||||||||
492 | } | - | ||||||||||||||||||||||||
493 | qint64 QIcon::cacheKey() const | - | ||||||||||||||||||||||||
494 | { | - | ||||||||||||||||||||||||
495 | if (!d
| 0 | ||||||||||||||||||||||||
496 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
497 | return never executed: (((qint64) d->serialNum) << 32) | ((qint64) (d->detach_no));return (((qint64) d->serialNum) << 32) | ((qint64) (d->detach_no)); never executed: return (((qint64) d->serialNum) << 32) | ((qint64) (d->detach_no)); | 0 | ||||||||||||||||||||||||
498 | } | - | ||||||||||||||||||||||||
499 | QPixmap QIcon::pixmap(const QSize &size, Mode mode, State state) const | - | ||||||||||||||||||||||||
500 | { | - | ||||||||||||||||||||||||
501 | if (!d
| 0 | ||||||||||||||||||||||||
502 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||
503 | return never executed: pixmap(0, size, mode, state);return pixmap(0, size, mode, state); never executed: return pixmap(0, size, mode, state); | 0 | ||||||||||||||||||||||||
504 | } | - | ||||||||||||||||||||||||
505 | QSize QIcon::actualSize(const QSize &size, Mode mode, State state) const | - | ||||||||||||||||||||||||
506 | { | - | ||||||||||||||||||||||||
507 | if (!d
| 0 | ||||||||||||||||||||||||
508 | return never executed: QSize();return QSize(); never executed: return QSize(); | 0 | ||||||||||||||||||||||||
509 | return never executed: actualSize(0, size, mode, state);return actualSize(0, size, mode, state); never executed: return actualSize(0, size, mode, state); | 0 | ||||||||||||||||||||||||
510 | } | - | ||||||||||||||||||||||||
511 | QPixmap QIcon::pixmap(QWindow *window, const QSize &size, Mode mode, State state) const | - | ||||||||||||||||||||||||
512 | { | - | ||||||||||||||||||||||||
513 | if (!d
| 0 | ||||||||||||||||||||||||
514 | return never executed: QPixmap();return QPixmap(); never executed: return QPixmap(); | 0 | ||||||||||||||||||||||||
515 | - | |||||||||||||||||||||||||
516 | qreal devicePixelRatio = qt_effective_device_pixel_ratio(window); | - | ||||||||||||||||||||||||
517 | - | |||||||||||||||||||||||||
518 | - | |||||||||||||||||||||||||
519 | if (!(devicePixelRatio > 1.0)
| 0 | ||||||||||||||||||||||||
520 | QPixmap pixmap = d->engine->pixmap(size, mode, state); | - | ||||||||||||||||||||||||
521 | pixmap.setDevicePixelRatio(1.0); | - | ||||||||||||||||||||||||
522 | return never executed: pixmap;return pixmap; never executed: return pixmap; | 0 | ||||||||||||||||||||||||
523 | } | - | ||||||||||||||||||||||||
524 | - | |||||||||||||||||||||||||
525 | - | |||||||||||||||||||||||||
526 | QPixmap pixmap = d->engine->pixmap(size * devicePixelRatio, mode, state); | - | ||||||||||||||||||||||||
527 | pixmap.setDevicePixelRatio(d->pixmapDevicePixelRatio(devicePixelRatio, size, pixmap.size())); | - | ||||||||||||||||||||||||
528 | return never executed: pixmap;return pixmap; never executed: return pixmap; | 0 | ||||||||||||||||||||||||
529 | } | - | ||||||||||||||||||||||||
530 | QSize QIcon::actualSize(QWindow *window, const QSize &size, Mode mode, State state) const | - | ||||||||||||||||||||||||
531 | { | - | ||||||||||||||||||||||||
532 | if (!d
| 0 | ||||||||||||||||||||||||
533 | return never executed: QSize();return QSize(); never executed: return QSize(); | 0 | ||||||||||||||||||||||||
534 | - | |||||||||||||||||||||||||
535 | qreal devicePixelRatio = qt_effective_device_pixel_ratio(window); | - | ||||||||||||||||||||||||
536 | - | |||||||||||||||||||||||||
537 | - | |||||||||||||||||||||||||
538 | if (!(devicePixelRatio > 1.0)
| 0 | ||||||||||||||||||||||||
539 | return never executed: d->engine->actualSize(size, mode, state);return d->engine->actualSize(size, mode, state); never executed: return d->engine->actualSize(size, mode, state); | 0 | ||||||||||||||||||||||||
540 | - | |||||||||||||||||||||||||
541 | QSize actualSize = d->engine->actualSize(size * devicePixelRatio, mode, state); | - | ||||||||||||||||||||||||
542 | return never executed: actualSize / d->pixmapDevicePixelRatio(devicePixelRatio, size, actualSize);return actualSize / d->pixmapDevicePixelRatio(devicePixelRatio, size, actualSize); never executed: return actualSize / d->pixmapDevicePixelRatio(devicePixelRatio, size, actualSize); | 0 | ||||||||||||||||||||||||
543 | } | - | ||||||||||||||||||||||||
544 | - | |||||||||||||||||||||||||
545 | - | |||||||||||||||||||||||||
546 | - | |||||||||||||||||||||||||
547 | - | |||||||||||||||||||||||||
548 | - | |||||||||||||||||||||||||
549 | - | |||||||||||||||||||||||||
550 | - | |||||||||||||||||||||||||
551 | void QIcon::paint(QPainter *painter, const QRect &rect, Qt::Alignment alignment, Mode mode, State state) const | - | ||||||||||||||||||||||||
552 | { | - | ||||||||||||||||||||||||
553 | if (!d
| 0 | ||||||||||||||||||||||||
554 | return; never executed: return; | 0 | ||||||||||||||||||||||||
555 | - | |||||||||||||||||||||||||
556 | - | |||||||||||||||||||||||||
557 | const QSize size = d->engine->actualSize(rect.size(), mode, state); | - | ||||||||||||||||||||||||
558 | alignment = QGuiApplicationPrivate::visualAlignment(painter->layoutDirection(), alignment); | - | ||||||||||||||||||||||||
559 | int x = rect.x(); | - | ||||||||||||||||||||||||
560 | int y = rect.y(); | - | ||||||||||||||||||||||||
561 | int w = size.width(); | - | ||||||||||||||||||||||||
562 | int h = size.height(); | - | ||||||||||||||||||||||||
563 | if ((
| 0 | ||||||||||||||||||||||||
564 | y += rect.size().height()/2 - h/2; never executed: y += rect.size().height()/2 - h/2; | 0 | ||||||||||||||||||||||||
565 | else if ((
| 0 | ||||||||||||||||||||||||
566 | y += rect.size().height() - h; never executed: y += rect.size().height() - h; | 0 | ||||||||||||||||||||||||
567 | if ((
| 0 | ||||||||||||||||||||||||
568 | x += rect.size().width() - w; never executed: x += rect.size().width() - w; | 0 | ||||||||||||||||||||||||
569 | else if ((
| 0 | ||||||||||||||||||||||||
570 | x += rect.size().width()/2 - w/2; never executed: x += rect.size().width()/2 - w/2; | 0 | ||||||||||||||||||||||||
571 | QRect alignedRect(x, y, w, h); | - | ||||||||||||||||||||||||
572 | - | |||||||||||||||||||||||||
573 | d->engine->paint(painter, alignedRect, mode, state); | - | ||||||||||||||||||||||||
574 | } never executed: end of block | 0 | ||||||||||||||||||||||||
575 | bool QIcon::isNull() const | - | ||||||||||||||||||||||||
576 | { | - | ||||||||||||||||||||||||
577 | return never executed: !d;return !d; never executed: return !d; | 0 | ||||||||||||||||||||||||
578 | } | - | ||||||||||||||||||||||||
579 | - | |||||||||||||||||||||||||
580 | - | |||||||||||||||||||||||||
581 | - | |||||||||||||||||||||||||
582 | bool QIcon::isDetached() const | - | ||||||||||||||||||||||||
583 | { | - | ||||||||||||||||||||||||
584 | return never executed: !dreturn !d || d->ref.load() == 1;
never executed: return !d || d->ref.load() == 1; | 0 | ||||||||||||||||||||||||
585 | } | - | ||||||||||||||||||||||||
586 | - | |||||||||||||||||||||||||
587 | - | |||||||||||||||||||||||||
588 | - | |||||||||||||||||||||||||
589 | void QIcon::detach() | - | ||||||||||||||||||||||||
590 | { | - | ||||||||||||||||||||||||
591 | if (d
| 0 | ||||||||||||||||||||||||
592 | if (d->ref.load() != 1
| 0 | ||||||||||||||||||||||||
593 | QIconPrivate *x = new QIconPrivate; | - | ||||||||||||||||||||||||
594 | x->engine = d->engine->clone(); | - | ||||||||||||||||||||||||
595 | if (!d->ref.deref()
| 0 | ||||||||||||||||||||||||
596 | delete d; never executed: delete d; | 0 | ||||||||||||||||||||||||
597 | d = x; | - | ||||||||||||||||||||||||
598 | } never executed: end of block | 0 | ||||||||||||||||||||||||
599 | ++d->detach_no; | - | ||||||||||||||||||||||||
600 | } never executed: end of block | 0 | ||||||||||||||||||||||||
601 | } never executed: end of block | 0 | ||||||||||||||||||||||||
602 | void QIcon::addPixmap(const QPixmap &pixmap, Mode mode, State state) | - | ||||||||||||||||||||||||
603 | { | - | ||||||||||||||||||||||||
604 | if (pixmap.isNull()
| 0 | ||||||||||||||||||||||||
605 | return; never executed: return; | 0 | ||||||||||||||||||||||||
606 | if (!d
| 0 | ||||||||||||||||||||||||
607 | d = new QIconPrivate; | - | ||||||||||||||||||||||||
608 | d->engine = new QPixmapIconEngine; | - | ||||||||||||||||||||||||
609 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
610 | detach(); | - | ||||||||||||||||||||||||
611 | } never executed: end of block | 0 | ||||||||||||||||||||||||
612 | d->engine->addPixmap(pixmap, mode, state); | - | ||||||||||||||||||||||||
613 | } never executed: end of block | 0 | ||||||||||||||||||||||||
614 | void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State state) | - | ||||||||||||||||||||||||
615 | { | - | ||||||||||||||||||||||||
616 | if (fileName.isEmpty()
| 0 | ||||||||||||||||||||||||
617 | return; never executed: return; | 0 | ||||||||||||||||||||||||
618 | if (!d
| 0 | ||||||||||||||||||||||||
619 | - | |||||||||||||||||||||||||
620 | QFileInfo info(fileName); | - | ||||||||||||||||||||||||
621 | QString suffix = info.suffix(); | - | ||||||||||||||||||||||||
622 | if (!suffix.isEmpty()
| 0 | ||||||||||||||||||||||||
623 | - | |||||||||||||||||||||||||
624 | const int index = loader()->indexOf(suffix); | - | ||||||||||||||||||||||||
625 | if (index != -1
| 0 | ||||||||||||||||||||||||
626 | if (QIconEnginePlugin *factory = qobject_cast<QIconEnginePlugin*>(loader()->instance(index))
| 0 | ||||||||||||||||||||||||
627 | if (QIconEngine *engine = factory->create(fileName)
| 0 | ||||||||||||||||||||||||
628 | d = new QIconPrivate; | - | ||||||||||||||||||||||||
629 | d->engine = engine; | - | ||||||||||||||||||||||||
630 | } never executed: end of block | 0 | ||||||||||||||||||||||||
631 | } never executed: end of block | 0 | ||||||||||||||||||||||||
632 | } never executed: end of block | 0 | ||||||||||||||||||||||||
633 | } never executed: end of block | 0 | ||||||||||||||||||||||||
634 | - | |||||||||||||||||||||||||
635 | - | |||||||||||||||||||||||||
636 | if (!d
| 0 | ||||||||||||||||||||||||
637 | d = new QIconPrivate; | - | ||||||||||||||||||||||||
638 | d->engine = new QPixmapIconEngine; | - | ||||||||||||||||||||||||
639 | } never executed: end of block | 0 | ||||||||||||||||||||||||
640 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
641 | detach(); | - | ||||||||||||||||||||||||
642 | } never executed: end of block | 0 | ||||||||||||||||||||||||
643 | - | |||||||||||||||||||||||||
644 | d->engine->addFile(fileName, size, mode, state); | - | ||||||||||||||||||||||||
645 | - | |||||||||||||||||||||||||
646 | - | |||||||||||||||||||||||||
647 | QString atNxFileName = qt_findAtNxFile(fileName, (static_cast<QGuiApplication *>(QCoreApplication::instance()))->devicePixelRatio()); | - | ||||||||||||||||||||||||
648 | if (atNxFileName != fileName
| 0 | ||||||||||||||||||||||||
649 | d->engine->addFile(atNxFileName, size, mode, state); never executed: d->engine->addFile(atNxFileName, size, mode, state); | 0 | ||||||||||||||||||||||||
650 | } never executed: end of block | 0 | ||||||||||||||||||||||||
651 | - | |||||||||||||||||||||||||
652 | - | |||||||||||||||||||||||||
653 | - | |||||||||||||||||||||||||
654 | - | |||||||||||||||||||||||||
655 | - | |||||||||||||||||||||||||
656 | - | |||||||||||||||||||||||||
657 | - | |||||||||||||||||||||||||
658 | QList<QSize> QIcon::availableSizes(Mode mode, State state) const | - | ||||||||||||||||||||||||
659 | { | - | ||||||||||||||||||||||||
660 | if (!d
| 0 | ||||||||||||||||||||||||
661 | return never executed: QList<QSize>();return QList<QSize>(); never executed: return QList<QSize>(); | 0 | ||||||||||||||||||||||||
662 | return never executed: d->engine->availableSizes(mode, state);return d->engine->availableSizes(mode, state); never executed: return d->engine->availableSizes(mode, state); | 0 | ||||||||||||||||||||||||
663 | } | - | ||||||||||||||||||||||||
664 | QString QIcon::name() const | - | ||||||||||||||||||||||||
665 | { | - | ||||||||||||||||||||||||
666 | if (!d
| 0 | ||||||||||||||||||||||||
667 | return never executed: QString();return QString(); never executed: return QString(); | 0 | ||||||||||||||||||||||||
668 | return never executed: d->engine->iconName();return d->engine->iconName(); never executed: return d->engine->iconName(); | 0 | ||||||||||||||||||||||||
669 | } | - | ||||||||||||||||||||||||
670 | - | |||||||||||||||||||||||||
671 | - | |||||||||||||||||||||||||
672 | - | |||||||||||||||||||||||||
673 | - | |||||||||||||||||||||||||
674 | - | |||||||||||||||||||||||||
675 | - | |||||||||||||||||||||||||
676 | - | |||||||||||||||||||||||||
677 | void QIcon::setThemeSearchPaths(const QStringList &paths) | - | ||||||||||||||||||||||||
678 | { | - | ||||||||||||||||||||||||
679 | QIconLoader::instance()->setThemeSearchPath(paths); | - | ||||||||||||||||||||||||
680 | } never executed: end of block | 0 | ||||||||||||||||||||||||
681 | QStringList QIcon::themeSearchPaths() | - | ||||||||||||||||||||||||
682 | { | - | ||||||||||||||||||||||||
683 | return never executed: QIconLoader::instance()->themeSearchPaths();return QIconLoader::instance()->themeSearchPaths(); never executed: return QIconLoader::instance()->themeSearchPaths(); | 0 | ||||||||||||||||||||||||
684 | } | - | ||||||||||||||||||||||||
685 | void QIcon::setThemeName(const QString &name) | - | ||||||||||||||||||||||||
686 | { | - | ||||||||||||||||||||||||
687 | QIconLoader::instance()->setThemeName(name); | - | ||||||||||||||||||||||||
688 | } never executed: end of block | 0 | ||||||||||||||||||||||||
689 | QString QIcon::themeName() | - | ||||||||||||||||||||||||
690 | { | - | ||||||||||||||||||||||||
691 | return never executed: QIconLoader::instance()->themeName();return QIconLoader::instance()->themeName(); never executed: return QIconLoader::instance()->themeName(); | 0 | ||||||||||||||||||||||||
692 | } | - | ||||||||||||||||||||||||
693 | QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback) | - | ||||||||||||||||||||||||
694 | { | - | ||||||||||||||||||||||||
695 | QIcon icon; | - | ||||||||||||||||||||||||
696 | - | |||||||||||||||||||||||||
697 | if (qtIconCache()->contains(name)
| 0 | ||||||||||||||||||||||||
698 | icon = *qtIconCache()->object(name); | - | ||||||||||||||||||||||||
699 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
700 | QPlatformTheme * const platformTheme = QGuiApplicationPrivate::platformTheme(); | - | ||||||||||||||||||||||||
701 | bool hasUserTheme = QIconLoader::instance()->hasUserTheme(); | - | ||||||||||||||||||||||||
702 | QIconEngine * const engine = (platformTheme
| 0 | ||||||||||||||||||||||||
703 | : new QIconLoaderEngine(name); | - | ||||||||||||||||||||||||
704 | QIcon *cachedIcon = new QIcon(engine); | - | ||||||||||||||||||||||||
705 | icon = *cachedIcon; | - | ||||||||||||||||||||||||
706 | qtIconCache()->insert(name, cachedIcon); | - | ||||||||||||||||||||||||
707 | } never executed: end of block | 0 | ||||||||||||||||||||||||
708 | - | |||||||||||||||||||||||||
709 | if ((static_cast<
| 0 | ||||||||||||||||||||||||
710 | return never executed: fallback;return fallback; never executed: return fallback; | 0 | ||||||||||||||||||||||||
711 | - | |||||||||||||||||||||||||
712 | return never executed: icon;return icon; never executed: return icon; | 0 | ||||||||||||||||||||||||
713 | } | - | ||||||||||||||||||||||||
714 | bool QIcon::hasThemeIcon(const QString &name) | - | ||||||||||||||||||||||||
715 | { | - | ||||||||||||||||||||||||
716 | QIcon icon = fromTheme(name); | - | ||||||||||||||||||||||||
717 | - | |||||||||||||||||||||||||
718 | return never executed: icon.name() == name;return icon.name() == name; never executed: return icon.name() == name; | 0 | ||||||||||||||||||||||||
719 | } | - | ||||||||||||||||||||||||
720 | void QIcon::setIsMask(bool isMask) | - | ||||||||||||||||||||||||
721 | { | - | ||||||||||||||||||||||||
722 | if (!d
| 0 | ||||||||||||||||||||||||
723 | d = new QIconPrivate; | - | ||||||||||||||||||||||||
724 | d->engine = new QPixmapIconEngine; | - | ||||||||||||||||||||||||
725 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
726 | detach(); | - | ||||||||||||||||||||||||
727 | } never executed: end of block | 0 | ||||||||||||||||||||||||
728 | d->is_mask = isMask; | - | ||||||||||||||||||||||||
729 | } never executed: end of block | 0 | ||||||||||||||||||||||||
730 | bool QIcon::isMask() const | - | ||||||||||||||||||||||||
731 | { | - | ||||||||||||||||||||||||
732 | if (!d
| 0 | ||||||||||||||||||||||||
733 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||||||||
734 | return never executed: d->is_mask;return d->is_mask; never executed: return d->is_mask; | 0 | ||||||||||||||||||||||||
735 | } | - | ||||||||||||||||||||||||
736 | QDataStream &operator<<(QDataStream &s, const QIcon &icon) | - | ||||||||||||||||||||||||
737 | { | - | ||||||||||||||||||||||||
738 | if (s.version() >= QDataStream::Qt_4_3
| 0 | ||||||||||||||||||||||||
739 | if (icon.isNull()
| 0 | ||||||||||||||||||||||||
740 | s << QString(); | - | ||||||||||||||||||||||||
741 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
742 | s << icon.d->engine->key(); | - | ||||||||||||||||||||||||
743 | icon.d->engine->write(s); | - | ||||||||||||||||||||||||
744 | } never executed: end of block | 0 | ||||||||||||||||||||||||
745 | } else if (s.version() == QDataStream::Qt_4_2
| 0 | ||||||||||||||||||||||||
746 | if (icon.isNull()
| 0 | ||||||||||||||||||||||||
747 | s << 0; | - | ||||||||||||||||||||||||
748 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
749 | QPixmapIconEngine *engine = static_cast<QPixmapIconEngine *>(icon.d->engine); | - | ||||||||||||||||||||||||
750 | int num_entries = engine->pixmaps.size(); | - | ||||||||||||||||||||||||
751 | s << num_entries; | - | ||||||||||||||||||||||||
752 | for (int i=0; i < num_entries
| 0 | ||||||||||||||||||||||||
753 | s << engine->pixmaps.at(i).pixmap; | - | ||||||||||||||||||||||||
754 | s << engine->pixmaps.at(i).fileName; | - | ||||||||||||||||||||||||
755 | s << engine->pixmaps.at(i).size; | - | ||||||||||||||||||||||||
756 | s << (uint) engine->pixmaps.at(i).mode; | - | ||||||||||||||||||||||||
757 | s << (uint) engine->pixmaps.at(i).state; | - | ||||||||||||||||||||||||
758 | } never executed: end of block | 0 | ||||||||||||||||||||||||
759 | } never executed: end of block | 0 | ||||||||||||||||||||||||
760 | } else { | - | ||||||||||||||||||||||||
761 | s << QPixmap(icon.pixmap(22,22)); | - | ||||||||||||||||||||||||
762 | } never executed: end of block | 0 | ||||||||||||||||||||||||
763 | return never executed: s;return s; never executed: return s; | 0 | ||||||||||||||||||||||||
764 | } | - | ||||||||||||||||||||||||
765 | QDataStream &operator>>(QDataStream &s, QIcon &icon) | - | ||||||||||||||||||||||||
766 | { | - | ||||||||||||||||||||||||
767 | if (s.version() >= QDataStream::Qt_4_3
| 0 | ||||||||||||||||||||||||
768 | icon = QIcon(); | - | ||||||||||||||||||||||||
769 | QString key; | - | ||||||||||||||||||||||||
770 | s >> key; | - | ||||||||||||||||||||||||
771 | if (key == QLatin1String("QPixmapIconEngine")
| 0 | ||||||||||||||||||||||||
772 | icon.d = new QIconPrivate; | - | ||||||||||||||||||||||||
773 | QIconEngine *engine = new QPixmapIconEngine; | - | ||||||||||||||||||||||||
774 | icon.d->engine = engine; | - | ||||||||||||||||||||||||
775 | engine->read(s); | - | ||||||||||||||||||||||||
776 | } never executed: else if (key == QLatin1String("QIconLoaderEngine")end of block
| 0 | ||||||||||||||||||||||||
777 | icon.d = new QIconPrivate; | - | ||||||||||||||||||||||||
778 | QIconEngine *engine = new QIconLoaderEngine(); | - | ||||||||||||||||||||||||
779 | icon.d->engine = engine; | - | ||||||||||||||||||||||||
780 | engine->read(s); | - | ||||||||||||||||||||||||
781 | - | |||||||||||||||||||||||||
782 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
783 | const int index = loader()->indexOf(key); | - | ||||||||||||||||||||||||
784 | if (index != -1
| 0 | ||||||||||||||||||||||||
785 | if (QIconEnginePlugin *factory = qobject_cast<QIconEnginePlugin*>(loader()->instance(index))
| 0 | ||||||||||||||||||||||||
786 | if (QIconEngine *engine= factory->create()
| 0 | ||||||||||||||||||||||||
787 | icon.d = new QIconPrivate; | - | ||||||||||||||||||||||||
788 | icon.d->engine = engine; | - | ||||||||||||||||||||||||
789 | engine->read(s); | - | ||||||||||||||||||||||||
790 | } never executed: end of block | 0 | ||||||||||||||||||||||||
791 | } never executed: end of block | 0 | ||||||||||||||||||||||||
792 | } never executed: end of block | 0 | ||||||||||||||||||||||||
793 | - | |||||||||||||||||||||||||
794 | } never executed: end of block | 0 | ||||||||||||||||||||||||
795 | } else if (s.version() == QDataStream::Qt_4_2
| 0 | ||||||||||||||||||||||||
796 | icon = QIcon(); | - | ||||||||||||||||||||||||
797 | int num_entries; | - | ||||||||||||||||||||||||
798 | QPixmap pm; | - | ||||||||||||||||||||||||
799 | QString fileName; | - | ||||||||||||||||||||||||
800 | QSize sz; | - | ||||||||||||||||||||||||
801 | uint mode; | - | ||||||||||||||||||||||||
802 | uint state; | - | ||||||||||||||||||||||||
803 | - | |||||||||||||||||||||||||
804 | s >> num_entries; | - | ||||||||||||||||||||||||
805 | for (int i=0; i < num_entries
| 0 | ||||||||||||||||||||||||
806 | s >> pm; | - | ||||||||||||||||||||||||
807 | s >> fileName; | - | ||||||||||||||||||||||||
808 | s >> sz; | - | ||||||||||||||||||||||||
809 | s >> mode; | - | ||||||||||||||||||||||||
810 | s >> state; | - | ||||||||||||||||||||||||
811 | if (pm.isNull()
| 0 | ||||||||||||||||||||||||
812 | icon.addFile(fileName, sz, QIcon::Mode(mode), QIcon::State(state)); never executed: icon.addFile(fileName, sz, QIcon::Mode(mode), QIcon::State(state)); | 0 | ||||||||||||||||||||||||
813 | else | - | ||||||||||||||||||||||||
814 | icon.addPixmap(pm, QIcon::Mode(mode), QIcon::State(state)); never executed: icon.addPixmap(pm, QIcon::Mode(mode), QIcon::State(state)); | 0 | ||||||||||||||||||||||||
815 | } | - | ||||||||||||||||||||||||
816 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
817 | QPixmap pm; | - | ||||||||||||||||||||||||
818 | s >> pm; | - | ||||||||||||||||||||||||
819 | icon.addPixmap(pm); | - | ||||||||||||||||||||||||
820 | } never executed: end of block | 0 | ||||||||||||||||||||||||
821 | return never executed: s;return s; never executed: return s; | 0 | ||||||||||||||||||||||||
822 | } | - | ||||||||||||||||||||||||
823 | - | |||||||||||||||||||||||||
824 | - | |||||||||||||||||||||||||
825 | - | |||||||||||||||||||||||||
826 | - | |||||||||||||||||||||||||
827 | QDebug operator<<(QDebug dbg, const QIcon &i) | - | ||||||||||||||||||||||||
828 | { | - | ||||||||||||||||||||||||
829 | QDebugStateSaver saver(dbg); | - | ||||||||||||||||||||||||
830 | dbg.resetFormat(); | - | ||||||||||||||||||||||||
831 | dbg.nospace(); | - | ||||||||||||||||||||||||
832 | dbg << "QIcon("; | - | ||||||||||||||||||||||||
833 | if (i.isNull()
| 0 | ||||||||||||||||||||||||
834 | dbg << "null"; | - | ||||||||||||||||||||||||
835 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
836 | if (!i.name().isEmpty()
| 0 | ||||||||||||||||||||||||
837 | dbg << i.name() << ','; never executed: dbg << i.name() << ','; | 0 | ||||||||||||||||||||||||
838 | dbg << "availableSizes[normal,Off]=" << i.availableSizes() | - | ||||||||||||||||||||||||
839 | << ",cacheKey=" << showbase << hex << i.cacheKey() << dec << noshowbase; | - | ||||||||||||||||||||||||
840 | } never executed: end of block | 0 | ||||||||||||||||||||||||
841 | dbg << ')'; | - | ||||||||||||||||||||||||
842 | return never executed: dbg;return dbg; never executed: return dbg; | 0 | ||||||||||||||||||||||||
843 | } | - | ||||||||||||||||||||||||
844 | QString qt_findAtNxFile(const QString &baseFileName, qreal targetDevicePixelRatio, | - | ||||||||||||||||||||||||
845 | qreal *sourceDevicePixelRatio) | - | ||||||||||||||||||||||||
846 | { | - | ||||||||||||||||||||||||
847 | if (targetDevicePixelRatio <= 1.0
| 0 | ||||||||||||||||||||||||
848 | return never executed: baseFileName;return baseFileName; never executed: return baseFileName; | 0 | ||||||||||||||||||||||||
849 | - | |||||||||||||||||||||||||
850 | static bool disableNxImageLoading = !qEnvironmentVariableIsEmpty("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING"); | - | ||||||||||||||||||||||||
851 | if (disableNxImageLoading
| 0 | ||||||||||||||||||||||||
852 | return never executed: baseFileName;return baseFileName; never executed: return baseFileName; | 0 | ||||||||||||||||||||||||
853 | - | |||||||||||||||||||||||||
854 | int dotIndex = baseFileName.lastIndexOf(QLatin1Char('.')); | - | ||||||||||||||||||||||||
855 | if (dotIndex == -1
| 0 | ||||||||||||||||||||||||
856 | dotIndex = baseFileName.size(); never executed: dotIndex = baseFileName.size(); | 0 | ||||||||||||||||||||||||
857 | - | |||||||||||||||||||||||||
858 | QString atNxfileName = baseFileName; | - | ||||||||||||||||||||||||
859 | atNxfileName.insert(dotIndex, QLatin1String("@2x")); | - | ||||||||||||||||||||||||
860 | - | |||||||||||||||||||||||||
861 | for (int n = qMin(qCeil(targetDevicePixelRatio), 9); n > 1
| 0 | ||||||||||||||||||||||||
862 | atNxfileName[dotIndex + 1] = QLatin1Char('0' + n); | - | ||||||||||||||||||||||||
863 | if (QFile::exists(atNxfileName)
| 0 | ||||||||||||||||||||||||
864 | if (sourceDevicePixelRatio
| 0 | ||||||||||||||||||||||||
865 | * never executed: sourceDevicePixelRatio = n;*sourceDevicePixelRatio = n; never executed: *sourceDevicePixelRatio = n; | 0 | ||||||||||||||||||||||||
866 | return never executed: atNxfileName;return atNxfileName; never executed: return atNxfileName; | 0 | ||||||||||||||||||||||||
867 | } | - | ||||||||||||||||||||||||
868 | } never executed: end of block | 0 | ||||||||||||||||||||||||
869 | - | |||||||||||||||||||||||||
870 | return never executed: baseFileName;return baseFileName; never executed: return baseFileName; | 0 | ||||||||||||||||||||||||
871 | } | - | ||||||||||||||||||||||||
872 | - | |||||||||||||||||||||||||
873 | - | |||||||||||||||||||||||||
Switch to Source code | Preprocessed file |