ktextwidgets on FreeBSD
David Faure
faure at kde.org
Sat Aug 4 12:06:42 BST 2018
Anyone running FreeBSD, who could to try and debug this hanging unittest from the ktextwidgets framework?
https://build.kde.org/view/Frameworks/job/Frameworks%20ktextwidgets%20kf5-qt5%20FreeBSDQt5.10/9/testReport/junit/(root)/TestSuite/ktextwidgets_krichtextedittest/
There's no waiting of any kind in the code, it's straight QTextDocument usage, this shouldn't deadlock or anything.
Yet it times out (after 30 seconds!!) quite often in CI.
Just a backtrace would be very useful already.....
void KRichTextEditTest::testUpdateLinkAdd()
{
KRichTextEdit edit;
edit.enableRichTextMode();
// Add text, apply initial formatting, and add a link
QTextCursor cursor = edit.textCursor();
cursor.insertText(QStringLiteral("Test"));
QTextCharFormat charFormat = cursor.charFormat();
// Note that QTextEdit doesn't use the palette. Black is black.
QCOMPARE(charFormat.foreground().color().name(), QColor(Qt::black).name());
cursor.select(QTextCursor::BlockUnderCursor);
edit.setTextCursor(cursor);
edit.setTextBold(true);
edit.setTextItalic(true);
edit.updateLink(QStringLiteral("http://www.kde.org"), QStringLiteral("KDE"));
// Validate text and formatting
cursor.movePosition(QTextCursor::Start);
cursor.select(QTextCursor::WordUnderCursor);
edit.setTextCursor(cursor);
QCOMPARE(edit.toPlainText(), QStringLiteral("KDE "));
QCOMPARE(edit.fontItalic(), true);
QCOMPARE(edit.fontWeight(), static_cast<int>(QFont::Bold));
QCOMPARE(edit.fontUnderline(), true);
charFormat = cursor.charFormat();
QCOMPARE(charFormat.foreground(), QBrush(KColorScheme(QPalette::Active, KColorScheme::View).foreground(KColorScheme::LinkText).color()));
QCOMPARE(charFormat.underlineColor(), KColorScheme(QPalette::Active, KColorScheme::View).foreground(KColorScheme::LinkText).color());
QCOMPARE(charFormat.underlineStyle(), QTextCharFormat::SingleUnderline);
}
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
More information about the kde-freebsd
mailing list