sioyek icon indicating copy to clipboard operation
sioyek copied to clipboard

Scroll bar does not work in the new release

Open NailGit opened this issue 3 months ago • 27 comments

Hi, I just downloaded the new release with the two-page layout: https://github.com/ahrm/sioyek/releases/tag/sioyek3-alpha0. The two-page layout works fine, but the scroll bar does not work, and a black block half the size of the page appears at the beginning of the document. Could you correct these issues? I use Linux release. I just downloaded the version for windows and started it under wine. The scroll bar does not work too.

I noted that version 2.0 uses my config gt5 for scroll bar (blue handle), but latest two page version uses its own config for scroll bar (white-grey handle).

NailGit avatar Sep 16 '25 00:09 NailGit

Try building the latest commits, I think some of these issues might already be fixed.

ahrm avatar Sep 18 '25 07:09 ahrm

Try building the latest commits, I think some of these issues might already be fixed. Will try in VB. This way?

sudo apt install libharfbuzz-dev
git clone --recursive https://github.com/ahrm/sioyek
git checkout development
./build_linux.sh 

NailGit avatar Sep 18 '25 18:09 NailGit

Try building the latest commits, I think some of these issues might already be fixed.

I think I need QT version 6? But I have 5.13.13 only.

NailGit avatar Sep 18 '25 18:09 NailGit

Try building the latest commits, I think some of these issues might already be fixed.

I installed QT6 by using oficial OnLine Installer but /build_linux.sh gives error make: *** [Makefile:1642: TouchDrawControls.o].

NailGit avatar Sep 18 '25 19:09 NailGit

Is this the entire error? I can't do much with this information, please include the full error message.

ahrm avatar Sep 19 '25 04:09 ahrm

Is this the entire error? I can't do much with this information, please include the full error message.

No, it is much greater:

./build_linux.sh 
make: Цель «default» не требует выполнения команд.
g++ -c -pipe -std=c++17 -O2 -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_3DINPUT_LIB -DQT_OPENGL_LIB -DQT_OPENGLEXTENSIONS_LIB -DQT_WIDGETS_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QUICKWIDGETS_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_OPENGLEXTENSIONS_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_TEXTTOSPEECH_LIB -DQT_CORE_LIB -I. -Ipdf_viewer -Imupdf/include -Izlib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt5/QtQuickWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtSvg -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGLExtensions -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtTextToSpeech -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o TouchDrawControls.o pdf_viewer/touchui/TouchDrawControls.cpp
In file included from pdf_viewer/utf8.h:31,
                 from pdf_viewer/utils.h:26,
                 from pdf_viewer/touchui/TouchDrawControls.cpp:2:
pdf_viewer/utf8/checked.h:268:34: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
  268 |     class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
      |                                  ^~~~~~~~
In file included from /usr/include/c++/13/bits/stl_algobase.h:65,
                 from /usr/include/c++/13/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:142,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1,
                 from pdf_viewer/touchui/TouchDrawControls.h:3,
                 from pdf_viewer/touchui/TouchDrawControls.cpp:1:
/usr/include/c++/13/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from pdf_viewer/utf8.h:32:
pdf_viewer/utf8/unchecked.h:179:40: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
  179 |           class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
      |                                        ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
pdf_viewer/touchui/TouchDrawControls.cpp: In member function ‘void TouchDrawControls::set_scratchpad_mode(bool)’:
pdf_viewer/touchui/TouchDrawControls.cpp:149:30: error: no matching function for call to ‘QMetaObject::invokeMethod(QQuickItem*, const char [26], QVariant)’
  149 |     QMetaObject::invokeMethod(quick_widget->rootObject(), "on_scratchpad_mode_change", QVariant::fromValue(mode));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qwindowdefs.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:44:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:476:5: note: candidate: ‘template<class Func> static typename std::enable_if<((QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction && (! std::is_convertible<Func, const char*>::value)) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == 0)), bool>::type QMetaObject::invokeMethod(typename QtPrivate::FunctionPointer<Func>::Object*, Func, Qt::ConnectionType, typename QtPrivate::FunctionPointer<Func>::ReturnType*)’
  476 |     invokeMethod(typename QtPrivate::FunctionPointer<Func>::Object *object,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:476:5: note:   template argument deduction/substitution failed:
pdf_viewer/touchui/TouchDrawControls.cpp:149:107: note:   cannot convert ‘QVariant::fromValue(const T&) [with T = bool]()’ (type ‘QVariant’) to type ‘Qt::ConnectionType’
  149 | >rootObject(), "on_scratchpad_mode_change", QVariant::fromValue(mode));
      |                                             ~~~~~~~~~~~~~~~~~~~^~~~~~

/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:488:5: note: candidate: ‘template<class Func> static typename std::enable_if<((QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction && (! std::is_convertible<Func, const char*>::value)) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == 0)), bool>::type QMetaObject::invokeMethod(typename QtPrivate::FunctionPointer<Func>::Object*, Func, typename QtPrivate::FunctionPointer<Func>::ReturnType*)’
  488 |     invokeMethod(typename QtPrivate::FunctionPointer<Func>::Object *object,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:488:5: note:   template argument deduction/substitution failed:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h: In substitution of ‘template<class Func> static typename std::enable_if<((QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction && (! std::is_convertible<Func, const char*>::value)) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == 0)), bool>::type QMetaObject::invokeMethod(typename QtPrivate::FunctionPointer<Func>::Object*, Func, typename QtPrivate::FunctionPointer<Func>::ReturnType*) [with Func = const char*]’:
pdf_viewer/touchui/TouchDrawControls.cpp:149:30:   required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:488:5: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:500:5: note: candidate: ‘template<class Func> static typename std::enable_if<(((! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction) && (! std::is_convertible<Func, const char*>::value)) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == 0)), bool>::type QMetaObject::invokeMethod(QObject*, Func, Qt::ConnectionType, typename QtPrivate::FunctionPointer<Func>::ReturnType*)’
  500 |     invokeMethod(QObject *context, Func function,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:500:5: note:   template argument deduction/substitution failed:
pdf_viewer/touchui/TouchDrawControls.cpp:149:107: note:   cannot convert ‘QVariant::fromValue(const T&) [with T = bool]()’ (type ‘QVariant’) to type ‘Qt::ConnectionType’
  149 | >rootObject(), "on_scratchpad_mode_change", QVariant::fromValue(mode));
      |                                             ~~~~~~~~~~~~~~~~~~~^~~~~~

/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:511:5: note: candidate: ‘template<class Func> static typename std::enable_if<(((! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction) && (! std::is_convertible<Func, const char*>::value)) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == 0)), bool>::type QMetaObject::invokeMethod(QObject*, Func, typename QtPrivate::FunctionPointer<Func>::ReturnType*)’
  511 |     invokeMethod(QObject *context, Func function,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:511:5: note:   template argument deduction/substitution failed:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h: In substitution of ‘template<class Func> static typename std::enable_if<(((! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction) && (! std::is_convertible<Func, const char*>::value)) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == 0)), bool>::type QMetaObject::invokeMethod(QObject*, Func, typename QtPrivate::FunctionPointer<Func>::ReturnType*) [with Func = const char*]’:
pdf_viewer/touchui/TouchDrawControls.cpp:149:30:   required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:511:5: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:522:5: note: candidate: ‘template<class Func> static typename std::enable_if<(((! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == -1)) && (! std::is_convertible<Func, const char*>::value)), bool>::type QMetaObject::invokeMethod(QObject*, Func, Qt::ConnectionType, decltype (function())*)’
  522 |     invokeMethod(QObject *context, Func function,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:522:5: note:   template argument deduction/substitution failed:
pdf_viewer/touchui/TouchDrawControls.cpp:149:107: note:   cannot convert ‘QVariant::fromValue(const T&) [with T = bool]()’ (type ‘QVariant’) to type ‘Qt::ConnectionType’
  149 | >rootObject(), "on_scratchpad_mode_change", QVariant::fromValue(mode));
      |                                             ~~~~~~~~~~~~~~~~~~~^~~~~~

/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:535:5: note: candidate: ‘template<class Func> static typename std::enable_if<(((! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == -1)) && (! std::is_convertible<Func, const char*>::value)), bool>::type QMetaObject::invokeMethod(QObject*, Func, decltype (function())*)’
  535 |     invokeMethod(QObject *context, Func function, decltype(function()) *ret)
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:535:5: note:   template argument deduction/substitution failed:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h: In substitution of ‘template<class Func> static typename std::enable_if<(((! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction) && (QtPrivate::FunctionPointer<Func>::ArgumentCount == -1)) && (! std::is_convertible<Func, const char*>::value)), bool>::type QMetaObject::invokeMethod(QObject*, Func, decltype (function())*) [with Func = const char*]’:
pdf_viewer/touchui/TouchDrawControls.cpp:149:30:   required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:535:5: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:400:17: note: candidate: ‘static bool QMetaObject::invokeMethod(QObject*, const char*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)’
  400 |     static bool invokeMethod(QObject *obj, const char *member,
      |                 ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:400:17: note:   candidate expects 14 arguments, 3 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:414:24: note: candidate: ‘static bool QMetaObject::invokeMethod(QObject*, const char*, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)’
  414 |     static inline bool invokeMethod(QObject *obj, const char *member,
      |                        ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:415:53: note:   no known conversion for argument 3 from ‘QVariant’ to ‘QGenericReturnArgument’
  415 |                              QGenericReturnArgument ret,
      |                              ~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:431:24: note: candidate: ‘static bool QMetaObject::invokeMethod(QObject*, const char*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)’
  431 |     static inline bool invokeMethod(QObject *obj, const char *member,
      |                        ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:432:49: note:   no known conversion for argument 3 from ‘QVariant’ to ‘Qt::ConnectionType’
  432 |                              Qt::ConnectionType type,
      |                              ~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:448:24: note: candidate: ‘static bool QMetaObject::invokeMethod(QObject*, const char*, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)’
  448 |     static inline bool invokeMethod(QObject *obj, const char *member,
      |                        ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:449:47: note:   no known conversion for argument 3 from ‘QVariant’ to ‘QGenericArgument’
  449 |                              QGenericArgument val0 = QGenericArgument(nullptr),
      |                              ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:1642: TouchDrawControls.o] Error 1

NailGit avatar Sep 19 '25 15:09 NailGit

Is this the entire error? I can't do much with this information, please include the full error message.

In the source directory appeared many Touch.... , but there is no TouchDrawControls.

NailGit avatar Sep 19 '25 15:09 NailGit

You are using qt5, the development branch requires qt 6.8+.

ahrm avatar Sep 19 '25 15:09 ahrm

You are using qt5, the development branch requires qt 6.8+.

No, I installed QT 6.9. I installed by using official online installer. Maybe after installation I have to make something more?

NailGit avatar Sep 19 '25 15:09 NailGit

You are using qt5, the development branch requires qt 6.8+.

qmake --version
QMake version 3.1
Using Qt version 6.9.2 in /home/nail/Qt/6.9.2/gcc_64/lib

NailGit avatar Sep 19 '25 15:09 NailGit

If you look at the error messages, it clearly is using qt5. e.g.:

/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h

Maybe try running the commands in build_linux manually one by one and see if there is any issues.

ahrm avatar Sep 19 '25 15:09 ahrm

If you look at the error messages, it clearly is using qt5. e.g.:

/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h

Maybe try running the commands in build_linux manually one by one and see if there is any issues.

Well. I cloned Sioyek once more and started compilation in terminal line by line. Compiling mupdf was fine, without an error. I installed QT6.9 by using official OnLineInstaller. It was installed in folder ~/QT. There are qmake6 and qmake in ~/Qt/6.9.2/gcc_64/bin. Then, in this folder

./qmake --version
QMake version 3.1
Using Qt version 6.9.2 in /home/nail/Qt/6.9.2/gcc_64/lib

and

./qmake6 --version
QMake version 3.1
Using Qt version 6.9.2 in /home/nail/Qt/6.9.2/gcc_64/lib

The same appears for binaries /usr/bin/qmake6 and /usr/bin/qmake. Then, I use the next line

~/Qt/6.9.2/gcc_64/bin/qmake6  "CONFIG+=linux_app_image" pdf_viewer_build_config.pro
Info: creating stash file /home/nail/Progi/Sioeyk/sioyek/.qmake.stash
Project ERROR: Unknown module(s) in QT: texttospeech

The same error

~/Qt/6.9.2/gcc_64/bin/qmake6  "CONFIG+=linux_app_image" pdf_viewer_build_config.pro
Info: creating stash file /home/nail/Progi/Sioeyk/sioyek/.qmake.stash
Project ERROR: Unknown module(s) in QT: texttospeech

What is the root of the problem? It looks like the module texttospeech is absent. But I installed by official installer. I do not know how to install module QT separately. Any suggestion?

NailGit avatar Sep 20 '25 11:09 NailGit

I understood what was the reason. I reinstalled QT6 with all libraries. But now another error:

make: *** [Makefile:14952: document.o] Error 1

What is this error now?

NailGit avatar Sep 20 '25 14:09 NailGit

Below is all output

make -j$(nproc)
g++ -c -pipe -std=c++17 -O2 -std=gnu++1z -Wall -Wextra -fPIC -D_REENTRANT -DSIOYEK_QT6 -DQT_3DINPUT_LIB -DQT_OPENGL_LIB -DQT_OPENGLEXTENSIONS_LIB -DQT_WIDGETS_LIB -DQT_NO_DEBUG -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_SVG_LIB -DQT_TEXTTOSPEECH_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_QMLMETA_LIB -DQT_QMLMODELS_LIB -DQT_QMLWORKERSCRIPT_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_QMLINTEGRATION_LIB -DQT_CORE_LIB -I. -Ipdf_viewer -Imupdf/include -Izlib -I../../../Qt/6.9.2/gcc_64/include -I../../../Qt/6.9.2/gcc_64/include/QtQuickWidgets -I../../../Qt/6.9.2/gcc_64/include/QtQuick -I../../../Qt/6.9.2/gcc_64/include/QtOpenGLWidgets -I../../../Qt/6.9.2/gcc_64/include/QtOpenGL -I../../../Qt/6.9.2/gcc_64/include/QtWidgets -I../../../Qt/6.9.2/gcc_64/include/QtSvg -I../../../Qt/6.9.2/gcc_64/include/QtTextToSpeech -I../../../Qt/6.9.2/gcc_64/include/QtMultimedia -I../../../Qt/6.9.2/gcc_64/include/QtGui -I../../../Qt/6.9.2/gcc_64/include/QtQmlMeta -I../../../Qt/6.9.2/gcc_64/include/QtQmlModels -I../../../Qt/6.9.2/gcc_64/include/QtQmlWorkerScript -I../../../Qt/6.9.2/gcc_64/include/QtQml -I../../../Qt/6.9.2/gcc_64/include/QtNetwork -I../../../Qt/6.9.2/gcc_64/include/QtQmlIntegration -I../../../Qt/6.9.2/gcc_64/include/QtCore -I. -I../../../Qt/6.9.2/gcc_64/mkspecs/linux-g++ -o document.o pdf_viewer/document.cpp
In file included from pdf_viewer/utf8.h:31,
                 from pdf_viewer/document.cpp:6:
pdf_viewer/utf8/checked.h:268:34: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
  268 |     class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
      |                                  ^~~~~~~~
In file included from /usr/include/c++/13/bits/stl_algobase.h:65,
                 from /usr/include/c++/13/vector:62,
                 from pdf_viewer/document.h:2,
                 from pdf_viewer/document.cpp:1:
/usr/include/c++/13/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from pdf_viewer/utf8.h:32:
pdf_viewer/utf8/unchecked.h:179:40: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
  179 |           class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
      |                                        ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::undo_pending_bookmark(int)’:
pdf_viewer/document.cpp:243:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  243 |     if (index >= 0 && index < bookmarks.size()) {
      |                       ~~~~~~^~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::fill_index_highlight_rects(int, fz_context*, fz_document*)’:
pdf_viewer/document.cpp:276:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  276 |     if (highlight_index >= highlights.size()) {
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘int Document::add_portal(Portal, bool)’:
pdf_viewer/document.cpp:385:18: warning: unused variable ‘res’ [-Wunused-variable]
  385 |             bool res = db_manager->insert_visible_portal(
      |                  ^~~
pdf_viewer/document.cpp: In member function ‘void Document::delete_bookmark(int)’:
pdf_viewer/document.cpp:464:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  464 |     if ((index != -1) && (index < bookmarks.size())) {
      |                           ~~~~~~^~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::delete_highlight(Highlight)’:
pdf_viewer/document.cpp:489:48: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
  489 |     for (size_t i = (highlights.size() - 1); i >= 0; i--) {
      |                                              ~~^~~~
pdf_viewer/document.cpp: In member function ‘int Document::get_portal_index_with_uuid(const std::string&)’:
pdf_viewer/document.cpp:529:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Portal>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  529 |     for (int i = 0; i < portals.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘float Document::get_page_height(int)’:
pdf_viewer/document.cpp:689:42: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  689 |     if ((page_index >= 0) && (page_index < page_heights.size())) {
      |                               ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘float Document::get_page_width(int)’:
pdf_viewer/document.cpp:698:42: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  698 |     if ((page_index >= 0) && (page_index < page_widths.size())) {
      |                               ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘float Document::get_accum_page_height(int)’:
pdf_viewer/document.cpp:788:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  788 |     if (page_index < 0 || (page_index >= accum_page_heights.size())) {
      |                            ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::convert_toc_tree(fz_outline*, std::vector<TocNode*>&)’:
pdf_viewer/document.cpp:841:53: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  841 |                 if (loc.chapter >= 0 && loc.chapter < accum_chapter_pages.size()) {
      |                                         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘PdfLink Document::merge_links(const std::vector<PdfLink>&)’:
pdf_viewer/document.cpp:866:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<PdfLink>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  866 |     for (int i = 1; i < links_to_merge.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In lambda function:
pdf_viewer/document.cpp:1120:17: error: ‘fz_page_label’ was not declared in this scope; did you mean ‘get_page_label’?
 1120 |                 fz_page_label(context_, page, label_buffer, N);
      |                 ^~~~~~~~~~~~~
      |                 get_page_label
pdf_viewer/document.cpp: In member function ‘AbsoluteRect Document::get_page_absolute_rect(int)’:
pdf_viewer/document.cpp:1183:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 1183 |     if (page >= page_widths.size()) {
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘DocumentPos Document::absolute_to_page_pos(AbsoluteDocumentPos)’:
pdf_viewer/document.cpp:1329:11: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 1329 |     if (i < accum_page_heights.size()) {
      |         ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::vector<IndexedData> Document::find_reference_with_string(std::wstring, int)’:
pdf_viewer/document.cpp:1471:96: warning: unused parameter ‘page_number’ [-Wunused-parameter]
 1471 | find_reference_with_string(std::wstring reference_name, int page_number) {
      |                                                         ~~~~^~~~~~~~~~~

pdf_viewer/document.cpp: In member function ‘std::vector<IndexedData> Document::find_generic_with_string(std::wstring, int)’:
pdf_viewer/document.cpp:1509:93: warning: unused parameter ‘page_number’ [-Wunused-parameter]
 1509 | t::find_generic_with_string(std::wstring equation_name, int page_number) {
      |                                                         ~~~~^~~~~~~~~~~

pdf_viewer/document.cpp: In function ‘std::wstring clean_bib_string_quotations(std::wstring)’:
pdf_viewer/document.cpp:1760:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<wchar_t>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 1760 |         if ((end_index - start_index) > bib_string.size() / 2){
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::wstring Document::get_pdf_link_text(PdfLink)’:
pdf_viewer/document.cpp:2665:41: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<EnhancedRect<fz_rect, PagelessDocumentPos> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 2665 |     for (int rect_index = 0; rect_index < link.rects.size(); rect_index++) {
      |                              ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:2674:19: warning: unused variable ‘width’ [-Wunused-variable]
 2674 |             float width = charrect.x1 - charrect.x0;
      |                   ^~~~~
pdf_viewer/document.cpp: In member function ‘float Document::document_to_absolute_y(int, float)’:
pdf_viewer/document.cpp:2795:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 2795 |     if ((page < accum_page_heights.size()) && (page >= 0)) {
      |          ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘AbsoluteDocumentPos Document::document_to_absolute_pos(DocumentPos)’:
pdf_viewer/document.cpp:2804:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 2804 |     if (doc_pos.page < page_widths.size()) {
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::wstring Document::get_page_label(int)’:
pdf_viewer/document.cpp:3004:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3004 |     if (page_index >= 0 && page_index < page_labels.size()) {
      |                            ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘int Document::get_page_number_with_label(std::wstring)’:
pdf_viewer/document.cpp:3014:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3014 |         for (int i = 0; i < page_labels.size(); i++) {
      |                         ~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::vector<std::__cxx11::basic_string<wchar_t> > Document::get_page_bib_candidates(int, std::vector<EnhancedRect<fz_rect, PagelessDocumentPos> >*)’:
pdf_viewer/document.cpp:3156:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<DocumentCharacter>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3156 |     for (int i = 0; i < flat_chars.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3160:46: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<DocumentCharacter>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3160 |         else if (flat_chars[i].is_final && i < (flat_chars.size() - 1) && (flat_chars[i + 1].c == '[')) {
      |                                            ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3172:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<DocumentCharacter>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3172 |             if (dot_index + 1 < flat_chars.size() && (flat_chars[dot_index + 1].c == '[')) {
      |                 ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3176:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<DocumentCharacter>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3176 |             if (dot_index + 1 < flat_chars.size()){
      |                 ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3182:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<DocumentCharacter>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3182 |                 if (next_index == flat_chars.size()) {
      |                     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3211:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3211 |     for (int i = 0; i < end_indices.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3221:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3221 |     for (int i = 1; i < end_indices.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3257:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3257 |         for (int i = 0; i < end_indices.size(); i++) {
      |                         ~~^~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3146:11: warning: unused variable ‘page_width’ [-Wunused-variable]
 3146 |     float page_width = page_widths[page_number];
      |           ^~~~~~~~~~
pdf_viewer/document.cpp:3147:11: warning: unused variable ‘page_height’ [-Wunused-variable]
 3147 |     float page_height = page_heights[page_number];
      |           ^~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::optional<std::pair<std::__cxx11::basic_string<wchar_t>, EnhancedRect<fz_rect, PagelessDocumentPos> > > Document::get_page_bib_with_reference(int, std::wstring)’:
pdf_viewer/document.cpp:3281:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3281 |     for (int i = 0; i < bib_text_prefixes.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3291:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3291 |     for (int i = 0; i < bib_text_prefixes.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::vector<SelectedObjectIndex> Document::get_page_intersecting_drawing_indices(int, AbsoluteRect, bool*)’:
pdf_viewer/document.cpp:3354:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<FreehandDrawing>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3354 |     for (int i = 0; i < page_drawings.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::delete_page_intersecting_drawings(int, AbsoluteRect, bool*)’:
pdf_viewer/document.cpp:3381:35: warning: unused variable ‘page_drawings’ [-Wunused-variable]
 3381 |     std::vector<FreehandDrawing>& page_drawings = page_freehand_drawings[page];
      |                                   ^~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::load_annotations(bool)’:
pdf_viewer/document.cpp:3530:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Annotation*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3530 |         for (int i = 0; i < updated_annotations.size(); i++) {
      |                         ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3553:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Annotation*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3553 |         for (int i = 0; i < new_annotations.size(); i++) {
      |                         ~~^~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3577:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Annotation*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3577 |             for (int i = 0; i < deleted_annotations.size(); i++) {
      |                             ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp:3578:22: warning: unused variable ‘success’ [-Wunused-variable]
 3578 |                 bool success = db_manager->delete_annotation(deleted_annotations[i]);
      |                      ^~~~~~~
pdf_viewer/document.cpp:3585:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3585 |             for (int i = 0; i < highlights.size(); i++) {
      |                             ~~^~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘int Document::find_highlight_index_with_uuid(const std::string&)’:
pdf_viewer/document.cpp:3742:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3742 |     for (int i = 0; i < highlights.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘int Document::get_portal_index_at_pos(AbsoluteDocumentPos)’:
pdf_viewer/document.cpp:3771:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Portal>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3771 |     for (int i = 0; i < portals.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘int Document::get_bookmark_index_at_pos(AbsoluteDocumentPos)’:
pdf_viewer/document.cpp:3783:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3783 |     for (int i = 0; i < bookmarks.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::update_bookmark_text(int, const std::wstring&, float)’:
pdf_viewer/document.cpp:3809:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3809 |     if ((index >= 0) && (index < bookmarks.size())) {
      |                          ~~~~~~^~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::update_bookmark_position(int, AbsoluteDocumentPos, AbsoluteDocumentPos)’:
pdf_viewer/document.cpp:3819:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3819 |     if ((index >= 0) && (index < bookmarks.size())) {
      |                          ~~~~~~^~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::update_portal_src_position(int, AbsoluteDocumentPos)’:
pdf_viewer/document.cpp:3833:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Portal>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3833 |     if ((index >= 0) && (index < portals.size())) {
      |                          ~~~~~~^~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘void Document::get_page_freehand_drawings_with_indices(int, const std::vector<SelectedObjectIndex>&, std::vector<FreehandDrawing>&, std::vector<PixmapDrawing>&)’:
pdf_viewer/document.cpp:3933:190: warning: unused parameter ‘pixmap_drawings’ [-Wunused-parameter]
 3933 | ehandDrawing>&freehand_drawings, std::vector<PixmapDrawing>&pixmap_drawings){
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~

pdf_viewer/document.cpp: In member function ‘int Document::get_highlight_index_with_uuid(std::string)’:
pdf_viewer/document.cpp:3943:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3943 |     for (int i = 0; i < highlights.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘int Document::get_bookmark_index_with_uuid(std::string)’:
pdf_viewer/document.cpp:3952:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3952 |     for (int i = 0; i < bookmarks.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::string Document::get_highlight_index_uuid(int)’:
pdf_viewer/document.cpp:3961:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3961 |     if ((index >= 0) && (index < highlights.size())) {
      |                          ~~~~~~^~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::string Document::get_bookmark_index_uuid(int)’:
pdf_viewer/document.cpp:3968:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3968 |     if ((index >= 0) && (index < bookmarks.size())) {
      |                          ~~~~~~^~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘std::optional<DocumentPos> Document::find_abbreviation(std::wstring, std::vector<DocumentRect>&)’:
pdf_viewer/document.cpp:4085:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<wchar_t>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 4085 |         for (int i = 0; i < abbr.size(); i++) {
      |                         ~~^~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘int Document::find_reference_page_with_reference_text(std::wstring)’:
pdf_viewer/document.cpp:4200:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 4200 |         while ((res_page < super_fast_page_begin_indices.size() - 1) && super_fast_page_begin_indices[res_page + 1] < filtered_indices.back()) {
      |                 ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘QString Document::get_rest_of_document_pages_text(int)’:
pdf_viewer/document.cpp:4459:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 4459 |     if ((from >= 0) && from < super_fast_page_begin_indices.size()) {
      |                        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/document.cpp: In member function ‘int Document::get_page_from_character_offset(int)’:
pdf_viewer/document.cpp:4467:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 4467 |     while ((res < super_fast_page_begin_indices.size() - 1) && (super_fast_page_begin_indices[res + 1] < offset)){
      |             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from pdf_viewer/document.cpp:27:
pdf_viewer/utils.h: In instantiation of ‘std::map<std::__cxx11::basic_string<char>, int> annotation_prism(std::vector<_Ch_type>&, std::vector<_Ch_type>&, std::vector<Annotation*>&, std::vector<Annotation*>&, std::vector<Annotation*>&) [with T = BookMark]’:
pdf_viewer/document.cpp:3524:73:   required from here
pdf_viewer/utils.h:305:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  305 |     for (int i = 0; i < existing_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:309:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  309 |     for (int i = 0; i < file_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:314:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  314 |     for (int i = 0; i < file_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:327:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<BookMark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  327 |     for (int i = 0; i < existing_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h: In instantiation of ‘std::map<std::__cxx11::basic_string<char>, int> annotation_prism(std::vector<_Ch_type>&, std::vector<_Ch_type>&, std::vector<Annotation*>&, std::vector<Annotation*>&, std::vector<Annotation*>&) [with T = Highlight]’:
pdf_viewer/document.cpp:3525:74:   required from here
pdf_viewer/utils.h:305:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  305 |     for (int i = 0; i < existing_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:309:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  309 |     for (int i = 0; i < file_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:314:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  314 |     for (int i = 0; i < file_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:327:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Highlight>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  327 |     for (int i = 0; i < existing_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h: In instantiation of ‘std::map<std::__cxx11::basic_string<char>, int> annotation_prism(std::vector<_Ch_type>&, std::vector<_Ch_type>&, std::vector<Annotation*>&, std::vector<Annotation*>&, std::vector<Annotation*>&) [with T = Mark]’:
pdf_viewer/document.cpp:3526:69:   required from here
pdf_viewer/utils.h:305:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Mark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  305 |     for (int i = 0; i < existing_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:309:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Mark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  309 |     for (int i = 0; i < file_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:314:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Mark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  314 |     for (int i = 0; i < file_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:327:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Mark>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  327 |     for (int i = 0; i < existing_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h: In instantiation of ‘std::map<std::__cxx11::basic_string<char>, int> annotation_prism(std::vector<_Ch_type>&, std::vector<_Ch_type>&, std::vector<Annotation*>&, std::vector<Annotation*>&, std::vector<Annotation*>&) [with T = Portal]’:
pdf_viewer/document.cpp:3527:71:   required from here
pdf_viewer/utils.h:305:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Portal>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  305 |     for (int i = 0; i < existing_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:309:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Portal>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  309 |     for (int i = 0; i < file_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:314:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Portal>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  314 |     for (int i = 0; i < file_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_viewer/utils.h:327:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Portal>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  327 |     for (int i = 0; i < existing_annotations.size(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:14949: document.o] Error 1

NailGit avatar Sep 20 '25 15:09 NailGit

The error indicates that it can not find fz_page_label which is a mupdf function. I don't know why this is happening though because this should be included in the mupdf.

ahrm avatar Sep 20 '25 15:09 ahrm

The error indicates that it can not find fz_page_label which is a mupdf function. I don't know why this is happening though because this should be included in the mupdf.

mupdf compiled without an error. How can I solve this problem?

NailGit avatar Sep 20 '25 16:09 NailGit

The error indicates that it can not find fz_page_label which is a mupdf function. I don't know why this is happening though because this should be included in the mupdf.

I repeated compilation in my computer (not in VB). The make -j$(nproc) stopped without an error and without a binary file. During the making the following error appears

pdf_viewer/document.cpp: In lambda function:
pdf_viewer/document.cpp:1120:17: error: ‘fz_page_label’ was not declared in this scope; did you mean ‘get_page_label’?
 1120 |                 fz_page_label(context_, page, label_buffer, N);
      |                 ^~~~~~~~~~~~~
      |                 get_page_label

The last line of compilation is

pdf_viewer/main_widget.cpp:9495:17: note: ‘selected_rect_page’ was declared here
 9495 |             int selected_rect_page;
      |                 ^~~~~~~~~~~~~~~~~~

NailGit avatar Sep 21 '25 19:09 NailGit

The error indicates that it can not find fz_page_label which is a mupdf function. I don't know why this is happening though because this should be included in the mupdf.

I downloaded mupdf 1.26.8 from official site and changed mupdf in new version. Compilation was completed but binary sioyek does not start and gives error cannot create context: incompatible header (1.20.0) and library (1.26.8) versions. I downloaded 1.20.0 but compilation with this version gives the same error as above.

NailGit avatar Sep 21 '25 20:09 NailGit

The development branch requires mupdf 1.25 . Where did the 1.20 mupdf come from? Are you using your system's mupdf? (or maybe you cloned the main branch first and downloaded the mupdf for the main branch and are now trying to compile the development branch?)

ahrm avatar Sep 22 '25 03:09 ahrm

The development branch requires mupdf 1.25 . Where did the 1.20 mupdf come from? Are you using your system's mupdf? (or maybe you cloned the main branch first and downloaded the mupdf for the main branch and are now trying to compile the development branch?)

I did not install mupdf separately:

pkg-config --modversion mupdf
Package mupdf was not found in the pkg-config search path.
Perhaps you should add the directory containing `mupdf.pc'
to the PKG_CONFIG_PATH environment variable
Package 'mupdf', required by 'virtual:world', not found

Just now I repeated compilation and below are all steps

1)  git clone --recursive https://github.com/ahrm/sioyek
cd sioyek
2) git checkout development
M	mupdf
branch 'development' set up to track 'origin/development'.
Switched to the new branch "Development"
3) cd mupdf
make USE_SYSTEM_HARFBUZZ=yes -j$(nproc)
cd ..
4) /home/nail/Qt/6.9.2/gcc_64/bin/qmake6 "CONFIG+=linux_app_image" pdf_viewer_build_config.pro
Info: creating stash file /home/nail/Progi/Sioyek/sioyek/.qmake.stash
5) make -j$(nproc) gives the same error
  1. I verified the version of mupdf.
cd /mupdf/build/release
./mupdf-gl --version
./mupdf-gl: unknown option --
mupdf-gl version 1.20.0

You see. it is the version 1.20.

Something wrong in above steps?

NailGit avatar Sep 22 '25 14:09 NailGit

Yes, when you checkout recursively, it downloads the main branch, so we have version 1.20 of mupdf (main branch) checked out and you never update it after checking out the development branch, you need to update the submodule after checking out the development branch.

ahrm avatar Sep 22 '25 15:09 ahrm

Yes, when you checkout recursively, it downloads the main branch, so we have version 1.20 of mupdf (main branch) checked out and you never update it after checking out the development branch, you need to update the submodule after checking out the development branch.

Could you please write codes step by step? Does the first two steps right? And what is the next?

  1. git clone --recursive https://github.com/ahrm/sioyek cd sioyek
  2. git checkout development

NailGit avatar Sep 22 '25 15:09 NailGit

I made after 1 and 2 git submodule update --remote. The compilation of mupdf gives error

source/fitz/output-docx.c:28:10: fatal error: extract/extract.h: There is no such file or folder
   28 | #include "extract/extract.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:141: build/release/source/fitz/output-docx.o] Error 1

NailGit avatar Sep 22 '25 15:09 NailGit

Yes, when you checkout recursively, it downloads the main branch, so we have version 1.20 of mupdf (main branch) checked out and you never update it after checking out the development branch, you need to update the submodule after checking out the development branch.

I copied mupdf 1.25.0 official version instead of that in package sioyek and compiled finally without errors above. I do not understand why I can not compile with mupdf inside of sioyek. The scroll works well, but I see it uses own form of scroll bar instead of my described by css file. Then, at the beginning of file there is black great enough field.

NailGit avatar Sep 22 '25 20:09 NailGit

I solved problem with using my css config for qt6. But how to solve this problem

Image

NailGit avatar Sep 23 '25 00:09 NailGit

You mean being able to scroll above the first page? You can set scroll_past_document_ends 0 in your prefs_user.config. However, there was a bug where this config was not working with the scrollbar movement in two page mode, but it is fixed now (you need to pull the latest commit).

ahrm avatar Sep 23 '25 03:09 ahrm

After making many changes to QT6 and Sioyek, my program TexStudio, which I use every day, stopped working due to a segmentation fault. I completely deleted QT6 and Sioyek, and TexStudio came back. It is very important to me that TexStudio works. Thank you for your help, but I would like to wait for the official version with the two-page layout.

NailGit avatar Sep 23 '25 13:09 NailGit