Подробности
[В начало]
Проблема в реализации № S0727
Краткое описание
Интерфейс QTextObject::format() const библиотеки Qt4 падает на любых параметрах
Подробное описание
Интерфейс QTextObject::format() const библиотеки Qt4 падает на любых параметрах.
Раздел стандарта
http://doc.trolltech.com/4.2/qtextobject.html#format
Пример
#include <QApplication>
#include <QtCore/qtimer.h>
#include <QtGui/qtextobject.h>
#include <QtGui/qtextdocument.h>
class QTextDocumentChild: public QTextDocument
{
public:
QTextDocumentChild
(
const QString & Par_1,
QObject * Par_2
);
QTextObject * createObject_Adv(const QTextFormat & Par_1);
};
QTextObject* create_QTextObject()
{
QTextDocumentChild * Par_0_0 = new QTextDocumentChild("XXX", NULL);
QTextFormat Par_0_1(QTextFormat::ListFormat);
return Par_0_0->createObject_Adv(Par_0_1);
}
QTextDocumentChild::QTextDocumentChild
(
const QString & Par_1,
QObject * Par_2
):QTextDocument(Par_1, Par_2){}
QTextObject * QTextDocumentChild::createObject_Adv(const QTextFormat & Par_1)
{
return this->createObject(Par_1);
}
int main()
{
//PREAMBLE
#ifdef Q_WS_X11
bool useGUI = getenv( "DISPLAY" ) != 0;
#else
bool useGUI = TRUE;
#endif
int app_argc = 1;
char* app_argv[2]={"", NULL};
QApplication::setColorSpec(QApplication::ManyColor);
QApplication* app = new QApplication(app_argc, app_argv, useGUI);
//PARAMETER INITIALIZATION
QTextObject * Obj = create_QTextObject();
//TARGET INTERFACE
Obj->format();
QTimer::singleShot(100, app, SLOT(quit()));
return app->exec();
}
Компонент
qt4 4.2 or later
Принято
Qt Software Task Tracker 246138
Статус
Исправлено в qt4 4.5.1
[В начало]
»