MCPcopy Create free account
hub / github.com/KDE/labplot / idKey

Method idKey

src/3rdparty/QXlsx/source/xlsxrichstring.cpp:213–236  ·  view source on GitHub ↗

! * \internal */

Source from the content-addressed store, hash-verified

211 * \internal
212 */
213QByteArray RichStringPrivate::idKey() const
214{
215 if (_dirty) {
216 RichStringPrivate *rs = const_cast<RichStringPrivate *>(this);
217 QByteArray bytes;
218 if (fragmentTexts.size() == 1) {
219 bytes = fragmentTexts[0].toUtf8();
220 } else {
221 //Generate a hash value base on QByteArray ?
222 bytes.append("@@QtXlsxRichString=");
223 for (int i=0; i<fragmentTexts.size(); ++i) {
224 bytes.append("@Text");
225 bytes.append(fragmentTexts[i].toUtf8());
226 bytes.append("@Format");
227 if (fragmentFormats[i].hasFontData())
228 bytes.append(fragmentFormats[i].fontKey());
229 }
230 }
231 rs->_idKey = bytes;
232 rs->_dirty = false;
233 }
234
235 return _idKey;
236}
237
238/*!
239 Returns true if this string \a rs1 is equal to string \a rs2;

Callers 5

RichStringPrivateMethod · 0.80
operator==Function · 0.80
operator!=Function · 0.80
operator<Function · 0.80
qHashFunction · 0.80

Calls 4

appendMethod · 0.80
hasFontDataMethod · 0.80
fontKeyMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected