Switch to unified view

a/src/qtgui/preview_w.cpp b/src/qtgui/preview_w.cpp
...
...
583
{
583
{
584
    LOGDEB(("Preview::makeDocCurrent: %s\n", fn.c_str()));
584
    LOGDEB(("Preview::makeDocCurrent: %s\n", fn.c_str()));
585
585
586
    /* Check if we already have this page */
586
    /* Check if we already have this page */
587
    for (int i = 0; i < pvTab->count(); i++) {
587
    for (int i = 0; i < pvTab->count(); i++) {
588
#if (QT_VERSION < 0x040000)
589
        QWidget *tw = pvTab->page(i);
590
#else
588
        QWidget *tw = pvTab->widget(i);
591
        QWidget *tw = pvTab->widget(i);
592
#endif
589
        if (tw) {
593
        if (tw) {
590
            PreviewTextEdit *edit = 
594
            PreviewTextEdit *edit = 
591
                dynamic_cast<PreviewTextEdit*>(tw->child("pvEdit"));
595
                dynamic_cast<PreviewTextEdit*>(tw->child("pvEdit"));
592
            if (edit && !edit->m_data.fn.compare(fn) && 
596
            if (edit && !edit->m_data.fn.compare(fn) && 
593
                !edit->m_data.ipath.compare(doc.ipath)) {
597
                !edit->m_data.ipath.compare(doc.ipath)) {