-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a file with missing QTextItemInt symbols
- Loading branch information
1 parent
fffdce5
commit 88a4a27
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// This file is part of Desktop App Toolkit, | ||
// a set of libraries for developing nice desktop applications. | ||
// | ||
// For license and copyright information please follow this link: | ||
// https://github.com/desktop-app/legal/blob/master/LEGAL | ||
// | ||
#ifdef DESKTOP_APP_USE_PACKAGED | ||
#include <private/qtextengine_p.h> | ||
|
||
QTextItemInt::QTextItemInt( | ||
const QGlyphLayout &g, | ||
QFont *font, | ||
const QChar *chars_, | ||
int numChars, | ||
QFontEngine *fe, | ||
const QTextCharFormat &format) | ||
: flags(0) | ||
, justified(false) | ||
, underlineStyle(QTextCharFormat::NoUnderline) | ||
, charFormat(format) | ||
, num_chars(numChars) | ||
, chars(chars_) | ||
, logClusters(0) | ||
, f(font) | ||
, glyphs(g) | ||
, fontEngine(fe) { | ||
} | ||
|
||
void QTextItemInt::initWithScriptItem(const QScriptItem &si) { | ||
// explicitly initialize flags so that initFontAttributes can be called | ||
// multiple times on the same TextItem | ||
flags = 0; | ||
if (si.analysis.bidiLevel %2) | ||
flags |= QTextItem::RightToLeft; | ||
ascent = si.ascent; | ||
descent = si.descent; | ||
|
||
if (charFormat.hasProperty(QTextFormat::TextUnderlineStyle)) { | ||
underlineStyle = charFormat.underlineStyle(); | ||
} else if (charFormat.boolProperty(QTextFormat::FontUnderline) | ||
|| f->d->underline) { | ||
underlineStyle = QTextCharFormat::SingleUnderline; | ||
} | ||
|
||
// compat | ||
if (underlineStyle == QTextCharFormat::SingleUnderline) | ||
flags |= QTextItem::Underline; | ||
|
||
if (f->d->overline || charFormat.fontOverline()) | ||
flags |= QTextItem::Overline; | ||
if (f->d->strikeOut || charFormat.fontStrikeOut()) | ||
flags |= QTextItem::StrikeOut; | ||
} | ||
#endif // !DESKTOP_APP_USE_PACKAGED |