From: Abdelrazak Younes Date: Sun, 25 Mar 2007 23:22:25 +0000 (+0000) Subject: Fix crash in debug mode (MSVC) due to an assertion in Qt. X-Git-Tag: 1.6.10~10496 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=642adc3eb7c3f69bbb1cd726eab358256cb61c62;p=features.git Fix crash in debug mode (MSVC) due to an assertion in Qt. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17559 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/QViewSourceDialog.C b/src/frontends/qt4/QViewSourceDialog.C index d4ae0f641e..4ce778ecb5 100644 --- a/src/frontends/qt4/QViewSourceDialog.C +++ b/src/frontends/qt4/QViewSourceDialog.C @@ -32,7 +32,11 @@ QViewSourceDialog::QViewSourceDialog(QViewSource * form) connect(updatePB, SIGNAL(clicked()), this, SLOT(update())); + // setting a document at this point trigger an assertion in Qt + // so we disable the signals here: + form_->document()->blockSignals(true); viewSourceTV->setDocument(form_->document()); + form_->document()->blockSignals(false); viewSourceTV->setReadOnly(true); ///dialog_->viewSourceTV->setAcceptRichText(false); // this is personal. I think source code should be in fixed-size font