The assertion failure happens under the following sequence:
QTextCursor::insertFrame()
QTextEditor::clear()
QTextCursor::insertFrame()
The following code will demonstrate this. Replace MainWindow::newLetter() in
examples/mainwindows/docwidgets with this, build and run the example. The
example application should run fine until you click the "New Letter" icon.
It should crash the first time you click it.
Multiple iterations work fine on 4.5.0-beta1, crashes under 4.5.0-rc1.
-----------------
void MainWindow::newLetter()
{
textEdit->clear();
QTextFrame *mainFrame = textEdit->textCursor().currentFrame();
QTextFrameFormat frameFormat = mainFrame->frameFormat();
for (int i = 1; i <= 3; i++) {
textEdit->textCursor().insertFrame(frameFormat);
textEdit->insertPlainText("Hello");
textEdit->setTextCursor(mainFrame->lastCursorPosition());
}
}
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback