This looks not only natural but the right thing to do. I vote YES :-)
Thank you very much! I thought of this as well but did not gather enough time to think about it. I vote yes to put it in except that the trunk is broken now so I can not test your patch. Cheers, Bo g++ -o debug/common/frontends/qt4/QDocument.o -c -g -O -DHAVE_CONFIG_H -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_STL -DQT_NO_KEYWORDS -DQT_GUI_LIB -DQT_SHARED -Idebug/common -Isrc -Isrc -Iboost -I/home/bpeng/lyx-devel/qt422/include -I/home/bpeng/lyx-devel/qt422/include -I/home/bpeng/lyx-devel/qt422/include/QtCore -I/home/bpeng/lyx-devel/qt422/include/QtGui -Idebug/common -Isrc -Idebug/common/images -Isrc/images -Idebug/common/frontends -Isrc/frontends -Idebug/common/frontends/qt4 -Isrc/frontends/qt4 -Idebug/common/frontends/controllers -Isrc/frontends/controllers src/frontends/qt4/QDocument.cpp src/frontends/qt4/QDocument.cpp: In member function `void lyx::frontend::PreambleModule::update(const lyx::BufferParams&, int)': src/frontends/qt4/QDocument.cpp:125: error: invalid use of undefined type `struct QScrollBar' /home/bpeng/lyx-devel/qt422/include/QtGui/qabstractscrollarea.h:35: error: forward declaration of `struct QScrollBar' src/frontends/qt4/QDocument.cpp:139: error: invalid use of undefined type `struct QScrollBar' /home/bpeng/lyx-devel/qt422/include/QtGui/qabstractscrollarea.h:35: error: forward declaration of `struct QScrollBar' src/frontends/qt4/QDocument.cpp: In member function `virtual void lyx::frontend::PreambleModule::closeEvent(QCloseEvent*)': src/frontends/qt4/QDocument.cpp:155: error: invalid use of undefined type `struct QScrollBar' /home/bpeng/lyx-devel/qt422/include/QtGui/qabstractscrollarea.h:35: error: forward declaration of `struct QScrollBar' scons: *** [debug/common/frontends/qt4/QDocument.o] Error 1 scons: building terminated because of errors.