Index: kdeui/widgets/krichtextedit.cpp =================================================================== --- kdeui/widgets/krichtextedit.cpp (revision 857817) +++ kdeui/widgets/krichtextedit.cpp (revision 857818) @@ -492,7 +492,7 @@ static QString evilline = "

"; - + QString result; QStringList lines = toHtml().split("\n"); foreach(QString tempLine, lines ) { @@ -507,6 +507,33 @@ result += tempLine; } } + + // ### HACK to fix bug 86925: A completely empty line is ignored in HTML-mode + int offset = 0; + QRegExp paragraphFinder("(.*)

"); + QRegExp paragraphEnd("

"); + paragraphFinder.setMinimal(true); + + while (offset != -1) { + + // Find the next paragraph + offset = paragraphFinder.indexIn(result, offset); + + if (offset != -1) { + + // If the text in the paragraph is empty, add a   there. + if (paragraphFinder.capturedTexts().size() == 2 && + paragraphFinder.capturedTexts()[1].isEmpty()) { + int end = paragraphEnd.indexIn(result, offset); + Q_ASSERT(end != -1 && end > offset); + result.replace(end, paragraphEnd.pattern().length(), "

"); + } + + // Avoid finding the same match again + offset++; + } + } + return result; } Index: kdeui/fonts/kfontchooser.cpp =================================================================== --- kdeui/fonts/kfontchooser.cpp (revision 858147) +++ kdeui/fonts/kfontchooser.cpp (revision 858148) @@ -444,6 +444,10 @@ QPalette pal = d->sampleEdit->palette(); pal.setColor( QPalette::Active, QPalette::Text, col ); d->sampleEdit->setPalette( pal ); + QTextCursor cursor = d->sampleEdit->textCursor(); + d->sampleEdit->selectAll(); + d->sampleEdit->setTextColor( col ); + d->sampleEdit->setTextCursor( cursor ); } QColor KFontChooser::color() const Index: kdeui/widgets/khelpmenu.cpp =================================================================== --- kdeui/widgets/khelpmenu.cpp (revision 858312) +++ kdeui/widgets/khelpmenu.cpp (revision 858313) @@ -162,6 +162,7 @@ d->mWhatsThisAction = new KAction(KIcon("help-contextual"), i18n( "What's &This" ), d->mMenu); d->mWhatsThisAction->setShortcut(Qt::SHIFT + Qt::Key_F1); connect(d->mWhatsThisAction, SIGNAL(triggered(bool)), this, SLOT(contextHelpActivated())); + d->mMenu->addAction(d->mWhatsThisAction); need_separator = true; } Index: kdeui/widgets/ktabwidget.cpp =================================================================== --- kdeui/widgets/ktabwidget.cpp (Revision 858490) +++ kdeui/widgets/ktabwidget.cpp (Revision 858491) @@ -281,14 +281,22 @@ QString KTabWidget::tabText( int index ) const { - if ( d->m_automaticResizeTabs ) { - if ( index >= 0 && index < count() ) - return d->m_tabNames[ index ]; + if ( d->m_automaticResizeTabs ) { + if (index >= 0 && index < count()) { + if (index >= d->m_tabNames.count()) { + // Ooops, the tab exists, but tabInserted wasn't called yet. + // This can happen when inserting the first tab, + // and calling tabText from slotCurrentChanged, + // see KTabWidget_UnitTest. + const_cast(this)->tabInserted(index); + } + return d->m_tabNames[ index ]; + } + else + return QString(); + } else - return QString(); - } - else - return QTabWidget::tabText( index ); + return QTabWidget::tabText( index ); } void KTabWidget::setTabText( int index, const QString &text ) Index: kdeui/widgets/ktabwidget.h =================================================================== --- kdeui/widgets/ktabwidget.h (Revision 858490) +++ kdeui/widgets/ktabwidget.h (Revision 858491) @@ -187,7 +187,7 @@ * Removes the widget, reimplemented for * internal reasons (keeping labels in sync). */ - virtual void removeTab(int index); + virtual void removeTab(int index); // but it's not virtual in QTabWidget... /** * If \a enable is true, tab reordering with middle button will be enabled.