Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two-page mode #1247

Open
NailGit opened this issue Dec 1, 2024 · 35 comments
Open

Two-page mode #1247

NailGit opened this issue Dec 1, 2024 · 35 comments

Comments

@NailGit
Copy link

NailGit commented Dec 1, 2024

This topic already discussed, and I see that this regime was implemented in experimental branch. I compiled this branch but there is no two page mode. This feature is really useful. When we can expect implementation it to stable release?

@ahrm
Copy link
Owner

ahrm commented Dec 1, 2024

There is a toggle_two_page_mode command in the development branch.

@NailGit
Copy link
Author

NailGit commented Dec 1, 2024

Sorry, I just compiled Sioyek by your reference here, but there is no this option. Maybe I have to compile something another? But what is development brunch?

@NailGit
Copy link
Author

NailGit commented Dec 1, 2024

There is a toggle_two_page_mode command in the development branch.

I just compiled development branch. There is no this option.

@ahrm
Copy link
Owner

ahrm commented Dec 1, 2024

You did not compile the development branch if there is no toggle_two_page_mode command. Are you sure you are not compiling the main branch?

@NailGit
Copy link
Author

NailGit commented Dec 1, 2024

You did not compile the development branch if there is no toggle_two_page_mode command. Are you sure you are not compiling the main branch?

I choose development, then git clone and compile. But I see the same url as for main.

@NailGit
Copy link
Author

NailGit commented Dec 1, 2024

You did not compile the development branch if there is no toggle_two_page_mode command. Are you sure you are not compiling the main branch?

Sorry, could you explain how to compile the development branch?

@ahrm
Copy link
Owner

ahrm commented Dec 1, 2024

You need to checkout the development branch (git checkout development before compiling).

@NailGit
Copy link
Author

NailGit commented Dec 1, 2024

You need to checkout the development branch (git checkout development before compiling).

You mean that I have to start git checkout development clone https://github.com/ahrm/sioyek.git ?

@ahrm
Copy link
Owner

ahrm commented Dec 1, 2024

No, you need to clone the repo normally and then run git checkout development.

@NailGit
Copy link
Author

NailGit commented Dec 1, 2024

No, you need to clone the repo normally and then run git checkout development.

I made as you wrote, but after compilation binary did not appear.

@NailGit
Copy link
Author

NailGit commented Dec 1, 2024

No, you need to clone the repo normally and then run git checkout development.

Three QT modules were absent, I installed but the following error appears make: *** [Makefile:1361: TouchConfigMenu.o] Erro 1 My system is Linux Mint 22 (Ubuntu 24.04).

@ahrm
Copy link
Owner

ahrm commented Dec 2, 2024

I can't help you with the level of information provided. Please include the full error message.

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

I can't help you with the level of information provided. Please include the full error message.

It is the full output

./build_linux.sh 
make: The goal of «default» does not require commands. 
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_3DINPUT_LIB -DQT_3DCORE_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/Qt3DInput -I/usr/include/x86_64-linux-gnu/qt5/Qt3DCore -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 TouchConfigMenu.o pdf_viewer/touchui/TouchConfigMenu.cpp
In file included from pdf_viewer/config.h:16,
                 from pdf_viewer/touchui/TouchConfigMenu.h:11,
                 from pdf_viewer/touchui/TouchConfigMenu.cpp:1:
pdf_viewer/coordinates.h: In member function ‘float Vec<T, dim>::norm()’:
pdf_viewer/coordinates.h:297:16: error: there are no arguments to ‘sqrt’ that depend on a template parameter, so a declaration of ‘sqrt’ must be available [-fpermissive]
  297 |         return sqrt(norm_squared);
      |                ^~~~
pdf_viewer/coordinates.h:297:16: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from pdf_viewer/utf8.h:31,
                 from pdf_viewer/utils.h:26,
                 from pdf_viewer/ui.h:68,
                 from pdf_viewer/touchui/TouchConfigMenu.cpp:3:
pdf_viewer/utf8/checked.h: At global scope:
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/TouchConfigMenu.h:3:
/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/TouchConfigMenu.h: In constructor ‘TouchConfigMenu::TouchConfigMenu(bool, MainWidget*)’:
pdf_viewer/touchui/TouchConfigMenu.h:47:17: warning: ‘TouchConfigMenu::config_model’ will be initialized after [-Wreorder]
   47 |     ConfigModel config_model;
      |                 ^~~~~~~~~~~~
pdf_viewer/touchui/TouchConfigMenu.h:43:20: warning:   ‘ConfigManager* TouchConfigMenu::config_manager’ [-Wreorder]
   43 |     ConfigManager* config_manager;
      |                    ^~~~~~~~~~~~~~
pdf_viewer/touchui/TouchConfigMenu.cpp:7:1: warning:   when initialized here [-Wreorder]
    7 | TouchConfigMenu::TouchConfigMenu(bool fuzzy, MainWidget* main_widget) :
      | ^~~~~~~~~~~~~~~
In file included from pdf_viewer/ui.h:64:
pdf_viewer/fts_fuzzy_match.h: At global scope:
pdf_viewer/fts_fuzzy_match.h:59:17: warning: ‘bool fts::fuzzy_match_simple(const char*, const char*)’ defined but not used [-Wunused-function]
   59 |     static bool fuzzy_match_simple(char const * pattern, char const * str) {
      |                 ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:1361: TouchConfigMenu.o] Error 1

@ahrm
Copy link
Owner

ahrm commented Dec 2, 2024

This error should be fixed in 050fd38.

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

This error should be fixed in 050fd38.

I compiled, but I have the error again but with TouchListView

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_3DINPUT_LIB -DQT_3DCORE_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/Qt3DInput -I/usr/include/x86_64-linux-gnu/qt5/Qt3DCore -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 TouchListView.o pdf_viewer/touchui/TouchListView.cpp
In file included from pdf_viewer/book.h:14,
                 from pdf_viewer/utils.h:25,
                 from pdf_viewer/ui.h:68,
                 from pdf_viewer/touchui/TouchListView.cpp:3:
pdf_viewer/coordinates.h: In member function ‘float Vec<T, dim>::norm()’:
pdf_viewer/coordinates.h:298:32: error: no matching function for call to ‘sqrt<float>(float&)’
  298 |         return std::sqrt<float>(norm_squared);
      |                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from pdf_viewer/rapidfuzz_amalgamated.hpp:13,
                 from pdf_viewer/ui.h:61:
/usr/include/c++/13/cmath:450:5: note: candidate: ‘template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::sqrt(_Tp)’
  450 |     sqrt(_Tp __x)
      |     ^~~~
/usr/include/c++/13/cmath:450:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/cmath: In substitution of ‘template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::sqrt(_Tp) [with _Tp = float]’:
pdf_viewer/coordinates.h:298:32:   required from here
/usr/include/c++/13/cmath:450:5: error: no type named ‘__type’ in ‘struct __gnu_cxx::__enable_if<false, double>’
In file included from pdf_viewer/utf8.h:31,
                 from pdf_viewer/utils.h:26:
pdf_viewer/utf8/checked.h: At global scope:
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/TouchListView.h:3,
                 from pdf_viewer/touchui/TouchListView.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
      |                                  ^~~~~~~~
In file included from pdf_viewer/ui.h:64:
pdf_viewer/fts_fuzzy_match.h:59:17: warning: ‘bool fts::fuzzy_match_simple(const char*, const char*)’ defined but not used [-Wunused-function]
   59 |     static bool fuzzy_match_simple(char const * pattern, char const * str) {
      |                 ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:1267: TouchListView.o] Error 1

@ahrm
Copy link
Owner

ahrm commented Dec 2, 2024

I made some changes now, did they fix the issue?

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

I made some changes now, did they fix the issue?

Yes, I see 298 return std::sqrt<float>(norm_squared); in coordinates.h

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

I made some changes now, did they fix the issue?

I cloned once more and verified this change.

@ahrm
Copy link
Owner

ahrm commented Dec 2, 2024

Yes, I see 298 return std::sqrt(norm_squared); in coordinates.h

No I mean I have made changes since that commit.

What do you mean by "certificated"?

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

Yes, I see 298 return std::sqrt(norm_squared); in coordinates.h

No I mean I have made changes since that commit.

What do you mean by "certificated"?

Sorry, it was typo, verified. One hour ago I made clone again and compiled.

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

Yes, I see 298 return std::sqrt(norm_squared); in coordinates.h

No I mean I have made changes since that commit.

What do you mean by "certificated"?

Ok, let me try clone again.

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

Yes, I see 298 return std::sqrt(norm_squared); in coordinates.h

No I mean I have made changes since that commit.

What do you mean by "certificated"?

BTW how to update a project without clone it again?

@ahrm
Copy link
Owner

ahrm commented Dec 2, 2024

You can pull the new changes (google git pull or git fetch).

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

I made compilation with another error

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_3DINPUT_LIB -DQT_3DCORE_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/Qt3DInput -I/usr/include/x86_64-linux-gnu/qt5/Qt3DCore -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 TouchSettings.o pdf_viewer/touchui/TouchSettings.cpp
In file included from pdf_viewer/utf8.h:31,
                 from pdf_viewer/utils.h:26,
                 from pdf_viewer/input.h:13,
                 from pdf_viewer/main_widget.h:19,
                 from pdf_viewer/touchui/TouchSettings.cpp:3:
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/TouchSettings.h:3,
                 from pdf_viewer/touchui/TouchSettings.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/TouchSettings.cpp: In member function ‘void TouchSettings::handleRulerNext()’:
pdf_viewer/touchui/TouchSettings.cpp:226:17: error: invalid use of incomplete type ‘class QScreen’
  226 |     if (screen()->orientation() == Qt::PortraitOrientation) {
      |                 ^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:55:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qcursor.h:51:7: note: forward declaration of ‘class QScreen’
   51 | class QScreen;
      |       ^~~~~~~
pdf_viewer/touchui/TouchSettings.cpp: In member function ‘void TouchSettings::handleRulerPrev()’:
pdf_viewer/touchui/TouchSettings.cpp:235:17: error: invalid use of incomplete type ‘class QScreen’
  235 |     if (screen()->orientation() == Qt::PortraitOrientation) {
      |                 ^~
/usr/include/x86_64-linux-gnu/qt5/QtGui/qcursor.h:51:7: note: forward declaration of ‘class QScreen’
   51 | class QScreen;
      |       ^~~~~~~
pdf_viewer/touchui/TouchSettings.cpp: In member function ‘void TouchSettings::handleBack()’:
pdf_viewer/touchui/TouchSettings.cpp:244:17: error: invalid use of incomplete type ‘class QScreen’
  244 |     if (screen()->orientation() == Qt::PortraitOrientation) {
      |                 ^~
/usr/include/x86_64-linux-gnu/qt5/QtGui/qcursor.h:51:7: note: forward declaration of ‘class QScreen’
   51 | class QScreen;
      |       ^~~~~~~
pdf_viewer/touchui/TouchSettings.cpp: In member function ‘void TouchSettings::handlePortal()’:
pdf_viewer/touchui/TouchSettings.cpp:253:17: error: invalid use of incomplete type ‘class QScreen’
  253 |     if (screen()->orientation() == Qt::PortraitOrientation) {
      |                 ^~
/usr/include/x86_64-linux-gnu/qt5/QtGui/qcursor.h:51:7: note: forward declaration of ‘class QScreen’
   51 | class QScreen;
      |       ^~~~~~~
pdf_viewer/touchui/TouchSettings.cpp: In member function ‘void TouchSettings::handleForward()’:
pdf_viewer/touchui/TouchSettings.cpp:262:17: error: invalid use of incomplete type ‘class QScreen’
  262 |     if (screen()->orientation() == Qt::PortraitOrientation) {
      |                 ^~
/usr/include/x86_64-linux-gnu/qt5/QtGui/qcursor.h:51:7: note: forward declaration of ‘class QScreen’
   51 | class QScreen;
      |       ^~~~~~~
In file included from pdf_viewer/ui.h:64,
                 from pdf_viewer/touchui/TouchSettings.cpp:7:
pdf_viewer/fts_fuzzy_match.h: At global scope:
pdf_viewer/fts_fuzzy_match.h:59:17: warning: ‘bool fts::fuzzy_match_simple(const char*, const char*)’ defined but not used [-Wunused-function]
   59 |     static bool fuzzy_match_simple(char const * pattern, char const * str) {
      |                 ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:1576: TouchSettings.o] Error 1

@ahrm
Copy link
Owner

ahrm commented Dec 2, 2024

I have updated the code again.

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

Another error

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_3DINPUT_LIB -DQT_3DCORE_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/Qt3DInput -I/usr/include/x86_64-linux-gnu/qt5/Qt3DCore -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

@ahrm
Copy link
Owner

ahrm commented Dec 2, 2024

Wait you are using qt5? The development branch requires qt 6.5+.

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

Wait you are using qt5? The development branch requires qt 6.5+.

Sorry, I do not know. OS is Ubuntu 24.04. How to verify the qt version?

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

Wait you are using qt5? The development branch requires qt 6.5+.
I found qmake -- version gives Using Qt version 5.15.13 . How can I install qt 6.5+?

@ahrm
Copy link
Owner

ahrm commented Dec 2, 2024

You are using qt5 because your paths are like this: /usr/include/x86_64-linux-gnu/qt5. You need to install qt6 and build sioyek with it.

@NailGit
Copy link
Author

NailGit commented Dec 2, 2024

You are using qt5 because your paths are like this: /usr/include/x86_64-linux-gnu/qt5. You need to install qt6 and build sioyek with it.

I installed qt6.5 by using this guide. But the compilation is made by qt5. I have qmake6 but I do not understand how to use it instead gmake for qt5.

@ahrm
Copy link
Owner

ahrm commented Dec 3, 2024

The build_linux.sh script uses the qmake command by default if it exists. You can modify the build_linux.sh script and comment out the QMAKE parts (lines 10 to 18) and manually define QMAKE="/path/to/your/qt6's/qmake.

@NailGit
Copy link
Author

NailGit commented Dec 3, 2024

The build_linux.sh script uses the qmake command by default if it exists. You can modify the build_linux.sh script and comment out the QMAKE parts (lines 10 to 18) and manually define QMAKE="/path/to/your/qt6's/qmake.

I made changes as you wrote to qmake6, but I have error below. I think I can not compile this version and have to wait for oficial releas :(

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_3DINPUT_LIB -DQT_3DCORE_LIB -DQT_SVG_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_QMLINTEGRATION_LIB -DQT_TEXTTOSPEECH_LIB -DQT_CORE_LIB -I. -Ipdf_viewer -Imupdf/include -Izlib -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtQuickWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtQuick -I/usr/include/x86_64-linux-gnu/qt6/QtOpenGLWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt6/QtWidgets -I/usr/include/x86_64-linux-gnu/qt6/Qt3DInput -I/usr/include/x86_64-linux-gnu/qt6/Qt3DCore -I/usr/include/x86_64-linux-gnu/qt6/QtSvg -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt6/QtQml -I/usr/include/x86_64-linux-gnu/qt6/QtNetwork -I/usr/include/x86_64-linux-gnu/qt6/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt6/QtQmlIntegration -I/usr/include/x86_64-linux-gnu/qt6/QtTextToSpeech -I/usr/include/x86_64-linux-gnu/qt6/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt6/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_iterator_base_funcs.h:66,
                 from /usr/include/c++/13/variant:43,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qtypeinfo.h:7,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qglobal.h:1397,
                 from /usr/include/x86_64-linux-gnu/qt6/QtGui/qtguiglobal.h:7,
                 from /usr/include/x86_64-linux-gnu/qt6/QtWidgets/qtwidgetsglobal.h:7,
                 from /usr/include/x86_64-linux-gnu/qt6/QtWidgets/qwidget.h:7,
                 from /usr/include/x86_64-linux-gnu/qt6/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], std::enable_if_t<true, QVariant>)’
  149 |     QMetaObject::invokeMethod(quick_widget->rootObject(), "on_scratchpad_mode_change", QVariant::fromValue(mode));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt6/QtGui/qwindowdefs.h:8,
                 from /usr/include/x86_64-linux-gnu/qt6/QtWidgets/qwidget.h:8:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:270: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*)’
  270 |     invokeMethod(typename QtPrivate::FunctionPointer<Func>::Object *object,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:270:5: note:   template argument deduction/substitution failed:
pdf_viewer/touchui/TouchDrawControls.cpp:149:107: note:   cannot convert ‘QVariant::fromValue(const T&) [with T = bool; std::enable_if_t<is_copy_constructible_v<T>, QVariant> = QVariant]()’ (type ‘std::enable_if_t<true, QVariant>’ {aka ‘QVariant’}) to type ‘Qt::ConnectionType’
  149 | >rootObject(), "on_scratchpad_mode_change", QVariant::fromValue(mode));
      |                                             ~~~~~~~~~~~~~~~~~~~^~~~~~

/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:282: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*)’
  282 |     invokeMethod(typename QtPrivate::FunctionPointer<Func>::Object *object,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:282:5: note:   template argument deduction/substitution failed:
/usr/include/x86_64-linux-gnu/qt6/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/qt6/QtCore/qobjectdefs.h:282:5: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:294: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*)’
  294 |     invokeMethod(QObject *context, Func function,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:294:5: note:   template argument deduction/substitution failed:
pdf_viewer/touchui/TouchDrawControls.cpp:149:107: note:   cannot convert ‘QVariant::fromValue(const T&) [with T = bool; std::enable_if_t<is_copy_constructible_v<T>, QVariant> = QVariant]()’ (type ‘std::enable_if_t<true, QVariant>’ {aka ‘QVariant’}) to type ‘Qt::ConnectionType’
  149 | >rootObject(), "on_scratchpad_mode_change", QVariant::fromValue(mode));
      |                                             ~~~~~~~~~~~~~~~~~~~^~~~~~

/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:305: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*)’
  305 |     invokeMethod(QObject *context, Func function,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:305:5: note:   template argument deduction/substitution failed:
/usr/include/x86_64-linux-gnu/qt6/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/qt6/QtCore/qobjectdefs.h:305:5: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:316: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())*)’
  316 |     invokeMethod(QObject *context, Func function,
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:316:5: note:   template argument deduction/substitution failed:
pdf_viewer/touchui/TouchDrawControls.cpp:149:107: note:   cannot convert ‘QVariant::fromValue(const T&) [with T = bool; std::enable_if_t<is_copy_constructible_v<T>, QVariant> = QVariant]()’ (type ‘std::enable_if_t<true, QVariant>’ {aka ‘QVariant’}) to type ‘Qt::ConnectionType’
  149 | >rootObject(), "on_scratchpad_mode_change", QVariant::fromValue(mode));
      |                                             ~~~~~~~~~~~~~~~~~~~^~~~~~

/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:329: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())*)’
  329 |     invokeMethod(QObject *context, Func function, decltype(function()) *ret)
      |     ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:329:5: note:   template argument deduction/substitution failed:
/usr/include/x86_64-linux-gnu/qt6/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/qt6/QtCore/qobjectdefs.h:329:5: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:194:17: note: candidate: ‘static bool QMetaObject::invokeMethod(QObject*, const char*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)’
  194 |     static bool invokeMethod(QObject *obj, const char *member,
      |                 ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:194:17: note:   candidate expects 14 arguments, 3 provided
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:208:24: note: candidate: ‘static bool QMetaObject::invokeMethod(QObject*, const char*, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)’
  208 |     static inline bool invokeMethod(QObject *obj, const char *member,
      |                        ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:209:53: note:   no known conversion for argument 3 from ‘std::enable_if_t<true, QVariant>’ {aka ‘QVariant’} to ‘QGenericReturnArgument’
  209 |                              QGenericReturnArgument ret,
      |                              ~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:225:24: note: candidate: ‘static bool QMetaObject::invokeMethod(QObject*, const char*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)’
  225 |     static inline bool invokeMethod(QObject *obj, const char *member,
      |                        ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:226:49: note:   no known conversion for argument 3 from ‘std::enable_if_t<true, QVariant>’ {aka ‘QVariant’} to ‘Qt::ConnectionType’
  226 |                              Qt::ConnectionType type,
      |                              ~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:242:24: note: candidate: ‘static bool QMetaObject::invokeMethod(QObject*, const char*, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)’
  242 |     static inline bool invokeMethod(QObject *obj, const char *member,
      |                        ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:243:47: note:   no known conversion for argument 3 from ‘std::enable_if_t<true, QVariant>’ {aka ‘QVariant’} to ‘QGenericArgument’
  243 |                              QGenericArgument val0 = QGenericArgument(nullptr),
      |                              ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:1715: TouchDrawControls.o] Error 1

@KorigamiK
Copy link

on linux you can use CMake to compile, simply run:

mkdir build
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/sioyek

@KorigamiK
Copy link

make sure to use the latest development branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants