Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 696112
Collapse All | Expand All

(-)qpdfview-0.4.16.orig/application.pro (+2 lines)
Lines 221-226 Link Here
221
    !without_pkgconfig:system(pkg-config --exists synctex) {
221
    !without_pkgconfig:system(pkg-config --exists synctex) {
222
        CONFIG += link_pkgconfig
222
        CONFIG += link_pkgconfig
223
        PKGCONFIG += synctex
223
        PKGCONFIG += synctex
224
225
        system(pkg-config --atleast-version=1.19 synctex):DEFINES += HAS_SYNCTEX_2
224
    } else {
226
    } else {
225
        HEADERS += synctex/synctex_parser.h synctex/synctex_parser_utils.h synctex/synctex_parser_local.h
227
        HEADERS += synctex/synctex_parser.h synctex/synctex_parser_utils.h synctex/synctex_parser_local.h
226
        SOURCES += synctex/synctex_parser.c synctex/synctex_parser_utils.c
228
        SOURCES += synctex/synctex_parser.c synctex/synctex_parser_utils.c
(-)qpdfview-0.4.16.orig/sources/documentview.cpp (-2 / +11 lines)
Lines 54-59 Link Here
54
54
55
#include <synctex_parser.h>
55
#include <synctex_parser.h>
56
56
57
#ifndef HAS_SYNCTEX_2
58
59
typedef synctex_scanner_t synctex_scanner_p;
60
typedef synctex_node_t synctex_node_p;
61
62
#define synctex_scanner_next_result(scanner) synctex_next_result(scanner)
63
64
#endif // HAS_SYNCTEX_2
65
57
#endif // WITH_SYNCTEX
66
#endif // WITH_SYNCTEX
58
67
59
#include "settings.h"
68
#include "settings.h"
Lines 950-963 Link Here
950
959
951
    if(const PageItem* page = dynamic_cast< PageItem* >(itemAt(pos)))
960
    if(const PageItem* page = dynamic_cast< PageItem* >(itemAt(pos)))
952
    {
961
    {
953
        if(synctex_scanner_t scanner = synctex_scanner_new_with_output_file(m_fileInfo.absoluteFilePath().toLocal8Bit(), 0, 1))
962
        if(synctex_scanner_p scanner = synctex_scanner_new_with_output_file(m_fileInfo.absoluteFilePath().toLocal8Bit(), 0, 1))
954
        {
963
        {
955
            const int sourcePage = page->index() + 1;
964
            const int sourcePage = page->index() + 1;
956
            const QPointF sourcePos = page->sourcePos(page->mapFromScene(mapToScene(pos)));
965
            const QPointF sourcePos = page->sourcePos(page->mapFromScene(mapToScene(pos)));
957
966
958
            if(synctex_edit_query(scanner, sourcePage, sourcePos.x(), sourcePos.y()) > 0)
967
            if(synctex_edit_query(scanner, sourcePage, sourcePos.x(), sourcePos.y()) > 0)
959
            {
968
            {
960
                for(synctex_node_t node = synctex_next_result(scanner); node != 0; node = synctex_next_result(scanner))
969
                for(synctex_node_p node = synctex_scanner_next_result(scanner); node != 0; node = synctex_scanner_next_result(scanner))
961
                {
970
                {
962
                    sourceLink.name = QString::fromLocal8Bit(synctex_scanner_get_name(scanner, synctex_node_tag(node)));
971
                    sourceLink.name = QString::fromLocal8Bit(synctex_scanner_get_name(scanner, synctex_node_tag(node)));
963
                    sourceLink.line = qMax(synctex_node_line(node), 0);
972
                    sourceLink.line = qMax(synctex_node_line(node), 0);
(-)qpdfview-0.4.16.orig/sources/main.cpp (-5 / +13 lines)
Lines 44-49 Link Here
44
44
45
#include <synctex_parser.h>
45
#include <synctex_parser.h>
46
46
47
#ifndef HAS_SYNCTEX_2
48
49
typedef synctex_scanner_t synctex_scanner_p;
50
typedef synctex_node_t synctex_node_p;
51
52
#define synctex_scanner_next_result(scanner) synctex_next_result(scanner)
53
#define synctex_display_query(scanner, file, line, column, page) synctex_display_query(scanner, file, line, column)
54
55
#endif // HAS_SYNCTEX_2
56
47
#endif // WITH_SYNCTEX
57
#endif // WITH_SYNCTEX
48
58
49
#include "renderparam.h"
59
#include "renderparam.h"
Lines 317-329 Link Here
317
327
318
        if(!file.sourceName.isNull())
328
        if(!file.sourceName.isNull())
319
        {
329
        {
320
            synctex_scanner_t scanner = synctex_scanner_new_with_output_file(file.filePath.toLocal8Bit(), 0, 1);
330
            if(synctex_scanner_p scanner = synctex_scanner_new_with_output_file(file.filePath.toLocal8Bit(), 0, 1))
321
322
            if(scanner != 0)
323
            {
331
            {
324
                if(synctex_display_query(scanner, file.sourceName.toLocal8Bit(), file.sourceLine, file.sourceColumn) > 0)
332
                if(synctex_display_query(scanner, file.sourceName.toLocal8Bit(), file.sourceLine, file.sourceColumn, -1) > 0)
325
                {
333
                {
326
                    for(synctex_node_t node = synctex_next_result(scanner); node != 0; node = synctex_next_result(scanner))
334
                    for(synctex_node_p node = synctex_scanner_next_result(scanner); node != 0; node = synctex_scanner_next_result(scanner))
327
                    {
335
                    {
328
                        int page = synctex_node_page(node);
336
                        int page = synctex_node_page(node);
329
                        QRectF enclosingBox(synctex_node_box_visible_h(node), synctex_node_box_visible_v(node), synctex_node_box_visible_width(node), synctex_node_box_visible_height(node));
337
                        QRectF enclosingBox(synctex_node_box_visible_h(node), synctex_node_box_visible_v(node), synctex_node_box_visible_width(node), synctex_node_box_visible_height(node));

Return to bug 696112