Hello,
the crashcode is really simple, here it is:
/////// file.cpp ///////////
{
// load file
QFile file(getAbsoluteFilename
());
throw common::error ("Cannot open file: " + getAbsoluteFilename());
// read file and return contents
return in.readAll();
}
//////////
// @param contents is the value returned by readFile()
{
QString log = "fileActionsImpl::createNewDocument: uid = " + uid;
LOG_DEBUG (log.toStdWString());
}
/////// file.cpp ///////////
QString readFile ()
{
// load file
QFile file(getAbsoluteFilename());
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
throw common::error ("Cannot open file: " + getAbsoluteFilename());
// read file and return contents
QTextStream in(&file);
return in.readAll();
}
//////////
// @param contents is the value returned by readFile()
void setTextToQTextEdit (QString uid, QString label, QString contents)
{
QString log = "fileActionsImpl::createNewDocument: uid = " + uid;
LOG_DEBUG (log.toStdWString());
QTextEdit* tabpage = new QTextEdit; tabpage->setPlainText(contents);
}
To copy to clipboard, switch view to plain text mode
I suppose this is a Qt bug, can anybody confirm this?
Bookmarks