Re: master crash (tocwidget code)

2021-11-03 Thread Kornel Benko
Am Wed, 3 Nov 2021 13:41:37 +0100
schrieb Pavel Sanda :

> On Wed, Nov 03, 2021 at 08:28:59AM +0100, Jürgen Spitzmüller wrote:
> > > Maybe this code (TocWidget::updateView()) is to blame?
> > >
> > >   if (!gui_view_.documentBufferView()) {
> > >
> > >   tocTV->setModel(nullptr);
> > >
> > >   depthSL->setMaximum(0);
> > >
> > >   depthSL->setValue(0);
> > >
> > >   setEnabled(false);
> > >
> > >   return;
> > >
> > >   }
> > >
> > >  
> > Commenting this out (except for the return) at least cures the crash. Why
> > do we need to reset the model in this case?  
> 
> I can't reproduce this and do get the crash even when commenting the block
> statements except return.
> 
> Also I checked that gui_view_ is correctly different when calling for the new
> window so I would have hard time to understand what cancels toc_ content.
> 
> 
> Pavel

Not getting the crash here with latest master.

Kornel


pgpduXzpGfDoL.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Improved Qt framework configuration detection on macOS, add support for Qt6

2021-10-25 Thread Kornel Benko
Am Mon, 25 Oct 2021 16:52:32 +0200
schrieb Stephan Witt :
...
> > Does removing line src/tex2lyx/test/CMakeLists.txt:91 help?
> > DEPENDS ${_tex2lyx} ${_lyx}
> > 
> > If that is the case we have to figure out how to allow this dependency.  
> 
> Ummhh… 
> 
> $ time cmake ...
> real  6m31.442s
> user  1m24.341s
> sys   0m21.489s
> 
> This is a real fast system. But it’s horrible slow.

You are configuring with '-DLYX_ENABLE_EXPORT_TESTS:BOOL=ON' probably. The 
creating of
7000 export tests makes it slow.

> The change to cure the error above is to delete (or comment) lines 94 and 95:
> 
> updatetex2lyxtests DEPENDS Tex2lyxFilesUpdated
> 
> But the build fails with the errors in attached log.
> 
> Stephan
> 
> [xcode-cmake-build.log  application/octet-stream (42288 Bytes)] 

Could you check the difference in the clang-command line (automake vs cmake 
created
commands)?
Maybe difference in include paths. How else can be explained for instance


In file included
from /Users/lyx/Development/lyx/src/frontends/WorkAreaManager.cpp:16: 
In file
included
from /Users/lyx/Development/lyx/src/frontends/Application.h:17: 
/Users/lyx/Development/lyx/src/support/strfwd.h:56:28:
error: reference to 'char_traits' is ambiguous typedef 
basic_string, allocator > string;
^ /Users/lyx/Development/lyx/src/support/strfwd.h:49:32: note: 
candidate found by
name lookup is 'std::char_traits' template struct 
char_traits;

?

Kornel


pgpscJYimyLIw.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Improved Qt framework configuration detection on macOS, add support for Qt6

2021-10-25 Thread Kornel Benko
Am Mon, 25 Oct 2021 12:13:49 +0200
schrieb Stephan Witt :

> Am 25.10.2021 um 11:23 schrieb Kornel Benko :
> > 
> > Am Mon, 25 Oct 2021 10:34:00 +0200
> > schrieb Stephan Witt :
> >   
> >> Am 25.10.2021 um 10:30 schrieb Kornel Benko :  
> >>> 
> >>> Am Sun, 24 Oct 2021 21:19:37 +0200 (CEST)
> >>> schrieb Stephan Witt :
> >>>   
> >>>> commit aabe9e8b11b73d57d22893f5889ebee9dd97efe5
> >>>> Author: Stephan Witt 
> >>>> Date:   Sun Oct 24 21:41:11 2021 +0200
> >>>> 
> >>>>   Improved Qt framework configuration detection on macOS, add support 
> >>>> for Qt6
> >>> 
> >>> Nothing needed for cmake?
> >> 
> >> I’ll check. That’s not my priority - I don’t know how to build a package 
> >> for LyX with
> >> cmake.
> >> 
> >> BR, Stephan  
> > 
> > It should work with
> > $ cmake  -DLYX_CPACK:BOOL=ON ...
> > There should be created a new target 'package'.
> > 
> > For example under debian-linux one could use
> > $ cmake  -DLYX_CPACK:BOOL=ON -DCPACK_BINARY_DEB:BOOL=ON
> > $ make package  
> 
> Yes, that’s the theory.
> 
> In practice it never worked on Mac. I’m using cmake to generate a Xcode 
> project to
> debug the LyX code.
> 
> ATM it doesn’t work on the new Mac server I’m using. The error message is as 
> follows:
> ===
> CMake Error in src/tex2lyx/CMakeLists.txt:
>   The custom command generating
> 
> 
> /Users/lyx/Development/lyx-build/cmake/2.4.0dev/src/tex2lyx/test/Tex2lyxFilesUpdated
> 
>   is attached to multiple targets:
> 
> cleanupdatetex2lyxtests
> updatetex2lyxtests
> 
>   but none of these is a common dependency of the other(s).  This is not
>   allowed by the Xcode "new build system“.
> ===
> 
> This error message is presented for every CMakeLists.txt file in LyX’s tree.
> 
> Stephan

Does removing line src/tex2lyx/test/CMakeLists.txt:91 help?
DEPENDS ${_tex2lyx} ${_lyx}

If that is the case we have to figure out how to allow this dependency.

Kornel


pgp6z2cIpmXJd.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Improved Qt framework configuration detection on macOS, add support for Qt6

2021-10-25 Thread Kornel Benko
Am Mon, 25 Oct 2021 10:34:00 +0200
schrieb Stephan Witt :

> Am 25.10.2021 um 10:30 schrieb Kornel Benko :
> > 
> > Am Sun, 24 Oct 2021 21:19:37 +0200 (CEST)
> > schrieb Stephan Witt :
> >   
> >> commit aabe9e8b11b73d57d22893f5889ebee9dd97efe5
> >> Author: Stephan Witt 
> >> Date:   Sun Oct 24 21:41:11 2021 +0200
> >> 
> >>Improved Qt framework configuration detection on macOS, add support for 
> >> Qt6  
> > 
> > Nothing needed for cmake?  
> 
> I’ll check. That’s not my priority - I don’t know how to build a package for 
> LyX with
> cmake.
> 
> BR, Stephan

It should work with
$ cmake  -DLYX_CPACK:BOOL=ON ...
There should be created a new target 'package'.

For example under debian-linux one could use
$ cmake  -DLYX_CPACK:BOOL=ON -DCPACK_BINARY_DEB:BOOL=ON
$ make package

Kornel


pgp_g2FR2lDZV.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Improved Qt framework configuration detection on macOS, add support for Qt6

2021-10-25 Thread Kornel Benko
Am Sun, 24 Oct 2021 21:19:37 +0200 (CEST)
schrieb Stephan Witt :

> commit aabe9e8b11b73d57d22893f5889ebee9dd97efe5
> Author: Stephan Witt 
> Date:   Sun Oct 24 21:41:11 2021 +0200
> 
> Improved Qt framework configuration detection on macOS, add support for 
> Qt6

Nothing needed for cmake?

Kornel


pgpVMcqEvPRA0.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Enable QWindowsMimeMetafile with Qt6

2021-10-17 Thread Kornel Benko
Am Sun, 17 Oct 2021 19:21:52 +0200
schrieb Enrico Forestieri :

> On Sun, Oct 17, 2021 at 04:16:22PM +0200, Kornel Benko wrote:
> > Am Sun, 17 Oct 2021 15:29:09 +0200
> > schrieb Enrico Forestieri :
> >   
> > > On Sun, Oct 17, 2021 at 02:48:31PM +0200, Enrico Forestieri wrote:  
> > > > commit 771f30e9463d8d7bf7acd4dfc564f462b28eae16
> > > > Author: Enrico Forestieri 
> > > > Date:   Sun Oct 17 15:06:05 2021 +0200
> > > > 
> > > > Enable QWindowsMimeMetafile with Qt6
> > > > 
> > > > The QWinMime class has been removed in Qt6 but the functionality
> > > > is still present. However, one has to allow inclusion of private
> > > > headers and register the mime handling to the QWindowsApplication
> > > > native interface.
> > > 
> > > Kornel, according to
> > > https://www.qt.io/blog/qt-extras-modules-in-qt-6#qwinmime
> > > to enable private headers with cmake one has to add a project dependency
> > > to Qt::GuiPrivate. I honestly don't know how to do that. This only
> > > matters for Windows and after this commit compilation cannot succeed
> > > when configuring with cmake if private headers are not enabled.
> > >   
> > 
> > My only idea is to use
> > if (MINGW AND LYX_USE_QT MATCHES "QT6")
> > add_dependencies(${_lyx} Qt::CorePrivate Qt::GuiPrivate)
> > endif()
> > somewhere at src/CMakeLists.txt:125  
> 
> That did not work. However, I found a solution here:
> https://stackoverflow.com/questions/65060435/add-qt-private-headers-to-cmake-project
> and committed the corresponding patch at e8b366d4.
> 

Thanks.

Kornel


pgpCxWKvjZj3R.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Enable QWindowsMimeMetafile with Qt6

2021-10-17 Thread Kornel Benko
Am Sun, 17 Oct 2021 15:29:09 +0200
schrieb Enrico Forestieri :

> On Sun, Oct 17, 2021 at 02:48:31PM +0200, Enrico Forestieri wrote:
> > commit 771f30e9463d8d7bf7acd4dfc564f462b28eae16
> > Author: Enrico Forestieri 
> > Date:   Sun Oct 17 15:06:05 2021 +0200
> > 
> > Enable QWindowsMimeMetafile with Qt6
> > 
> > The QWinMime class has been removed in Qt6 but the functionality
> > is still present. However, one has to allow inclusion of private
> > headers and register the mime handling to the QWindowsApplication
> > native interface.  
> 
> Kornel, according to
> https://www.qt.io/blog/qt-extras-modules-in-qt-6#qwinmime
> to enable private headers with cmake one has to add a project dependency
> to Qt::GuiPrivate. I honestly don't know how to do that. This only
> matters for Windows and after this commit compilation cannot succeed
> when configuring with cmake if private headers are not enabled.
> 

My only idea is to use
if (MINGW AND LYX_USE_QT MATCHES "QT6")
add_dependencies(${_lyx} Qt::CorePrivate Qt::GuiPrivate)
endif()
somewhere at src/CMakeLists.txt:125

Sorry, I am only fishing in muddy waters ...

Kornel


pgpD7by4rq9sr.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling LyX under macOS

2021-10-16 Thread Kornel Benko
Am Sat, 16 Oct 2021 14:50:54 +0200
schrieb pdv :

> A similar modification is needed when building with CMake on MacOS.
> 
> I've included module SvgWidgets with qt6 and MacExtras with previous 
> versions (I have checked builds on MacOS with qt6 and qt5, but not with 
> qt4). (patch included)
> I have also not touched the windows code which will probably show the 
> same problem.
> 
> Patrick
> 
> [qt6svgwidgetspatch20211016.diff  text/plain (801 Bytes)] 

Looks good, please commit.

Kornel


pgpHIYNPpLppN.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/2.3.x] Autoconf: disable warning deprecated-copy when supported

2021-10-16 Thread Kornel Benko
Am Fri, 15 Oct 2021 18:16:09 +0200
schrieb Jean-Marc Lasgouttes :

> Le 15/10/2021 à 17:48, Jean-Marc Lasgouttes a écrit :
> > commit 1922ee7d4015956555f5a5d82994df027ca60415
> > Author: Jean-Marc Lasgouttes 
> > Date:   Fri Oct 15 17:05:04 2021 +0200
> > 
> >  Autoconf: disable warning deprecated-copy when supported  
> 
> Kornel, some work for you too!
> 
> JMarc

Tried at 7572771c.

Kornel


pgp4LojfzC_2W.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling LyX under macOS

2021-10-12 Thread Kornel Benko
Am Tue, 12 Oct 2021 13:15:52 +0200
schrieb Christoph Schmitz :

> QSvgWidget

You need the file 'QSvgWidget' apparently. Here, on linux and QT5, it is in 
package
libqt5svg5-dev:
/usr/include/x86_64-linux-gnu/qt5/QtSvg/QSvgWidget

On my self compiled QT6 it is also existent under
 /6.0.2/Src/qtsvg/include/QtSvgWidgets/QSvgWidget

Kornel


pgp69pnugKmgR.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Crash in 2.3.x

2021-10-11 Thread Kornel Benko
Am Mon, 11 Oct 2021 15:51:07 +0200
schrieb Pavel Sanda :

> On Mon, Oct 11, 2021 at 03:39:18PM +0200, Pavel Sanda wrote:
> > Hi,
> > 
> > can anyone reproduce the following crash recipy? :
> > 1. Preferences -> Shortcuts -> Show keybindings containing
> > 2. Press "i"
> > 3. Kaboom
> > 
> > Current 2.3.x branch on stable debian.   
> 
> (gdb) bt
> #0  0x77ca32d8 in QTreeWidgetItem::treeModel(QTreeWidget*) const ()
> from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #1  0x77ca3a0b in
> QTreeWidgetItem::setExpanded(bool) () from 
> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
> #2  0x55eef1a4 in 
> lyx::frontend::PrefShortcuts::on_searchLE_textEdited() () #3
> 0x55ef3fb1 in 
> lyx::frontend::PrefShortcuts::qt_static_metacall(QObject*,
> QMetaObject::Call, int, void**) () #4  0x55ef4026 in
> lyx::frontend::PrefShortcuts::qt_metacall(QMetaObject::Call, int, void**) ()
> 
> > Pavel  

Same here.
Thread 1 "lyx2.3" received signal SIGSEGV, Segmentation fault.
0x56c8d753 in QTreeWidgetItem::setExpanded (this=0x0, aexpand=true)
at /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtreewidget.h:407
407 { if (view) view->setItemExpanded(this, aexpand); }

this == 0 looks not good.

Kornel



pgpdJpXFAwr32.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Changing decimal separator

2021-10-07 Thread Kornel Benko
Am Wed, 06 Oct 2021 18:06:28 +0200
schrieb Jürgen Spitzmüller :

> Am Dienstag, dem 05.10.2021 um 16:21 +0200 schrieb Kornel Benko:
> > Master trunk:  
> 
> Surely also stable.
> 
> > Select a some cell then Right-Click
> >     Settings...->Horizontal alignement->At Decimal Separator
> > Exit the Settings-GUI
> > Enter the GUI again and change the separator.  
> >  ==> The buttons 'OK', 'Apply' remain disabled.  
> > 
> > One is forced to change some other setting too, to be able to use
> > 'OK' or 'Apply'.  
> 
> Fixed, if I got you right.
> 
> Jürgen
> 

Yes, thanks. Super.

Kornel


pgp5EObvI1aSg.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Changing decimal separator

2021-10-05 Thread Kornel Benko

Master trunk:

Select a some cell then Right-Click
Settings...->Horizontal alignement->At Decimal Separator
Exit the Settings-GUI
Enter the GUI again and change the separator.
 ==> The buttons 'OK', 'Apply' remain disabled.

One is forced to change some other setting too, to be able to use 'OK' or 
'Apply'.

Kornel


pgplxw9NgXWNw.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: embedded graphics

2021-10-03 Thread Kornel Benko
Am Sun, 3 Oct 2021 11:29:02 -0400
schrieb "Paul A. Rubin" :

> On 10/3/21 11:08 AM, Jürgen Spitzmüller wrote:
> > Am Sonntag, dem 03.10.2021 um 10:48 -0400 schrieb Paul A. Rubin:
> >> Personally, I'd prefer to keep LyX files small and plain text. Also,
> >> wouldn't embedding graphics introduce extra work if the source
> >> graphic was changed? For instance, if I embedded a plot, then later
> >> changed data an reran the plot, I would need to manually update the
> >> LyX file.
> > I am completely with you, but I think if we could support both (as I
> > sketched in my mail) and maybe store the user's preference for saving
> > in session, everybody could be lucky.
> >
> > Best,
> > Jürgen
> >
> >
> I would be fine with it being an option, preferably with the choice 
> configurable in each document

> and a default choice set in preferences.

The second sentence contradicts the use of
Document->Settings->Save as default

> Cheers,
> Paul


Kornel



pgpZDk9cn9B5W.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Cmake build: Fix the invalid test for '-Wno-deprecated-copy' flag

2021-09-29 Thread Kornel Benko
Am Wed, 29 Sep 2021 18:16:44 +0200
schrieb Jean-Marc Lasgouttes :

> Le 29/09/2021 à 17:32, Kornel Benko a écrit :
> > commit c26db650a1e93573e4c09d4612ad45ae1e219854
> > Author: Kornel Benko 
> > Date:   Wed Sep 29 17:53:50 2021 +0200
> > 
> >  Cmake build: Fix the invalid test for '-Wno-deprecated-copy' flag
> >  
> >  The original test was always successfull, even if the flag was invalid.
> >  But checking for '-Wdeprecated-copy' instead yields to error if the 
> > warning does
> > not exist. Existent warning for 'deprecated-copy' implies that 
> > 'no-deprecated-copy'
> > also exist.  
> 
> Excellent idea. I stole it.

:)

> JMarc

It was driving me crazy. The test looked correct, still there were warnings 
about
'unrecognized command line option'.

Kornel


pgpsV34Q6efMa.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: IconInfo iconInfo: member call on null pointer

2021-09-28 Thread Kornel Benko
Am Tue, 28 Sep 2021 11:28:10 +0200
schrieb Jean-Marc Lasgouttes :

> Le 27/09/2021 à 12:37, Kornel Benko a écrit :
> > What makes me wonder: why should created pdf depend on HighDpi of users 
> > screen?
> > (See
> > src/frontends/qt/GuiApplication.cpp:558
> > src/frontends/qt/GuiApplication.h:173)  
> 
> I suspect we should always use the HiDpi version.

Makes sense to me.

> It is however difficult to do with the current InsetInfo code which uses 
> an InsetGraphics in a InsetCollapsable instead of doing things by hand.
> 
> JMarc

Kornel


pgp4mmy7XIzR0.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: IconInfo iconInfo: member call on null pointer

2021-09-28 Thread Kornel Benko
Am Mon, 27 Sep 2021 20:34:25 -0400
schrieb Scott Kostyshak :

> On Mon, Sep 27, 2021 at 12:03:19PM +0200, Kornel Benko wrote:
> > Am Sat, 25 Sep 2021 15:45:19 -0400
> > schrieb Scott Kostyshak :
> >   
> > > > 
> > > > I will look at the differences between GUI and command line, and between
> > > > patch/no-patch and report back within a couple of days.
> > > 
> > > With the "patch" the export from the command line is wrong (it omits the 
> > > icon).
> > > Without the patch, both GUI and command-line exported PDFs are 
> > > equivalent, and
> > > include the icon.
> > > 
> > > Scott  
> > 
> > What about the attached?  
> 
> I don't understand the code but I tested and it works well and with the patch 
> the PDF
> from the command line is equivalent to the PDF from the GUI.
> 
> Before you commit maybe add space around '?' and ':'.
> 
> Thanks for the patch!
> 
> Scott

Done at 84655a07.

Kornel


pgpa5hVBXl6O5.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: IconInfo iconInfo: member call on null pointer

2021-09-27 Thread Kornel Benko
Am Mon, 27 Sep 2021 12:03:19 +0200
schrieb Kornel Benko :

> Am Sat, 25 Sep 2021 15:45:19 -0400
> schrieb Scott Kostyshak :
> 
> > > 
> > > I will look at the differences between GUI and command line, and between
> > > patch/no-patch and report back within a couple of days.
> > 
> > With the "patch" the export from the command line is wrong (it omits the 
> > icon).
> > Without the patch, both GUI and command-line exported PDFs are equivalent, 
> > and
> > include the icon.
> > 
> > Scott  
> 
> What about the attached?
> 
>   Kornel

What makes me wonder: why should created pdf depend on HighDpi of users screen?
(See
src/frontends/qt/GuiApplication.cpp:558
src/frontends/qt/GuiApplication.h:173)

Kornel


pgpWMMlj3U9Ve.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: IconInfo iconInfo: member call on null pointer

2021-09-27 Thread Kornel Benko
Am Sat, 25 Sep 2021 15:45:19 -0400
schrieb Scott Kostyshak :

> > 
> > I will look at the differences between GUI and command line, and between
> > patch/no-patch and report back within a couple of days.  
> 
> With the "patch" the export from the command line is wrong (it omits the 
> icon). Without
> the patch, both GUI and command-line exported PDFs are equivalent, and 
> include the icon.
> 
> Scott

What about the attached?

Kornel
diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index 01a646de37..8b8581960f 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -553,11 +553,11 @@ IconInfo iconInfo(FuncRequest const & f, bool unknown, bool rtl)
 
 	// and finally maybe the unknown icon
 	if (unknown)
 		names << "unknown";
 
-	search_mode const mode = theGuiApp()->imageSearchMode();
+	search_mode const mode = theGuiApp()? theGuiApp()->imageSearchMode():support::must_exist;
 	// The folders where icons are searched for
 	QStringList imagedirs;
 	imagedirs << "images/ipa/" << "images/";
 	// This is used to search for rtl version of icons which have the +rrtl suffix.
 	QStringList suffixes;


pgpOmj7ggXO8n.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: IconInfo iconInfo: member call on null pointer

2021-09-25 Thread Kornel Benko
Am Sat, 25 Sep 2021 08:03:39 -0400
schrieb Scott Kostyshak :

> On Sat, Sep 25, 2021 at 01:08:56PM +0200, Kornel Benko wrote:
> > Am Fri, 24 Sep 2021 23:20:51 -0400
> > schrieb Scott Kostyshak :
> >   
> > > After building with fsanitize=undefined -fno-omit-frame-pointer, I get the
> > > following:
> > > 
> > > $ cd lib/examples/ && lyx -e pdf Welcome.lyx
> > > /home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiApplication.cpp:558:55:
> > > runtime error: member call on null pointer of type 'struct
> > > GuiApplication' 
> > > /home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiApplication.cpp:558:55:
> > > runtime error: member access within null pointer of type 'struct 
> > > GuiApplication'
> > > 
> > > After that, LyX gives a backtrace and crashes. I attach the backtrace in 
> > > case it's
> > > useful.
> > > 
> > > Just for informational purposes (I'm not proposing this as a patch), the 
> > > following
> > > does fix the error:
> > > 
> > > diff --git a/src/frontends/qt/GuiApplication.cpp
> > > b/src/frontends/qt/GuiApplication.cpp index 01a646de37..b93c4753c7 100644
> > > --- a/src/frontends/qt/GuiApplication.cpp
> > > +++ b/src/frontends/qt/GuiApplication.cpp
> > > @@ -555,6 +555,8 @@ IconInfo iconInfo(FuncRequest const & f, bool 
> > > unknown, bool rtl)
> > > if (unknown)
> > > names << "unknown";
> > >  
> > > +   if (!theGuiApp())
> > > +   return res;
> > > search_mode const mode = theGuiApp()->imageSearchMode();
> > > // The folders where icons are searched for
> > > QStringList imagedirs;
> > > 
> > > Scott  
> > 
> > Why not? Looks perfect to me. But probably not the only place.  
> 
> Because I don't understand what the code does. Can a different PDF be 
> produced if the
> export is from the command line instead of from the GUI?
> 
> Scott

Makes sense.But if that were the case, we would be in trouble. All our tests 
(without GUI)
were invalid.

Kornel


pgpr7TDjBPcoP.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: IconInfo iconInfo: member call on null pointer

2021-09-25 Thread Kornel Benko
Am Fri, 24 Sep 2021 23:20:51 -0400
schrieb Scott Kostyshak :

> After building with fsanitize=undefined -fno-omit-frame-pointer, I get the 
> following:
> 
> $ cd lib/examples/ && lyx -e pdf Welcome.lyx
> /home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiApplication.cpp:558:55: 
> runtime
> error: member call on null pointer of type 'struct
> GuiApplication' 
> /home/scott/lyxbuilds/master/repo/src/frontends/qt/GuiApplication.cpp:558:55:
> runtime error: member access within null pointer of type 'struct 
> GuiApplication'
> 
> After that, LyX gives a backtrace and crashes. I attach the backtrace in case 
> it's
> useful.
> 
> Just for informational purposes (I'm not proposing this as a patch), the 
> following does
> fix the error:
> 
> diff --git a/src/frontends/qt/GuiApplication.cpp 
> b/src/frontends/qt/GuiApplication.cpp
> index 01a646de37..b93c4753c7 100644
> --- a/src/frontends/qt/GuiApplication.cpp
> +++ b/src/frontends/qt/GuiApplication.cpp
> @@ -555,6 +555,8 @@ IconInfo iconInfo(FuncRequest const & f, bool unknown, 
> bool rtl)
> if (unknown)
> names << "unknown";
>  
> +   if (!theGuiApp())
> +   return res;
> search_mode const mode = theGuiApp()->imageSearchMode();
> // The folders where icons are searched for
> QStringList imagedirs;
> 
> Scott

Why not? Looks perfect to me. But probably not the only place.

Kornel


pgpYYabWmVgv5.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Improve (modestly) the performance of font metrics caches

2021-09-24 Thread Kornel Benko
Am Fri, 24 Sep 2021 16:51:35 +0200 (CEST)
schrieb Jean-Marc Lasgouttes :

> commit 6bbd88accfb76248d00346f308ba1f67f186e094
> Author: Jean-Marc Lasgouttes 
> Date:   Fri Sep 24 16:57:05 2021 +0200
> 
> Improve (modestly) the performance of font metrics caches

/usr2/src/lyx/lyx-git/src/frontends/qt/GuiFontMetrics.h:42:13: warning: ‘uint
lyx::frontend::qHash(const lyx::frontend::BreakAtKey&)’ declared ‘static’ but 
never
defined [-Wunused-function] static uint qHash(BreakAtKey const &); ^

Kornel


pgpuaamzSsLzL.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Compile warnings with docbook

2021-09-24 Thread Kornel Benko
Am Fri, 24 Sep 2021 09:34:36 +0200
schrieb Thibaut Cuvelier :

> On Fri, 24 Sept 2021 at 09:23, Kornel Benko  wrote:
> 
> > Am Fri, 24 Sep 2021 01:23:50 +0200
> > schrieb Thibaut Cuvelier :
> >
> > > Hi Kornel,
> > >
> > > Thanks for pointing these out, they didn't show on my side. I could quite
> > > easily fix the one about the unused argument in the constructor (it's
> > > already pushed: dca39815), but I don't know what to do for the others.
> > > Maybe the attached patch solves the rest of the warnings?
> > >
> > > On Fri, 24 Sept 2021 at 00:55, Kornel Benko  wrote:
> > >
> > > >
> > > > See attached.
> > > >
> > > > Kornel
> > > > --
> > > > lyx-devel mailing list
> > > > lyx-devel@lists.lyx.org
> > > > http://lists.lyx.org/mailman/listinfo/lyx-devel
> > > >
> >
> > No, it does not help. Instead the number of similar warnings doubles.
> >
> > From:   lyx::Floating::docbook_tag_type_’ will be initialized after
> >
> > to: lyx::Floating::docbook_tag_type_’ will be initialized after
> > lyx::Floating::docbook_float_type_’ will be initialized after
> >
> > But with the attached there are no warnings.
> >
> 
> It shouldn't either with MSVC; do you want to push this patch? (I won't be
> able to do it before tonight.)

No problem, will do.

Kornel


pgptbh71wIGjG.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Compile warnings with docbook

2021-09-24 Thread Kornel Benko
Am Fri, 24 Sep 2021 01:23:50 +0200
schrieb Thibaut Cuvelier :

> Hi Kornel,
> 
> Thanks for pointing these out, they didn't show on my side. I could quite
> easily fix the one about the unused argument in the constructor (it's
> already pushed: dca39815), but I don't know what to do for the others.
> Maybe the attached patch solves the rest of the warnings?
> 
> On Fri, 24 Sept 2021 at 00:55, Kornel Benko  wrote:
> 
> >
> > See attached.
> >
> > Kornel
> > --
> > lyx-devel mailing list
> > lyx-devel@lists.lyx.org
> > http://lists.lyx.org/mailman/listinfo/lyx-devel
> >

No, it does not help. Instead the number of similar warnings doubles.

From:   lyx::Floating::docbook_tag_type_’ will be initialized after

to: lyx::Floating::docbook_tag_type_’ will be initialized after
lyx::Floating::docbook_float_type_’ will be initialized after

But with the attached there are no warnings.

Kornel

diff --git a/src/Floating.cpp b/src/Floating.cpp
index d396e8a2c7..6a532aa7c9 100644
--- a/src/Floating.cpp
+++ b/src/Floating.cpp
@@ -40,12 +40,12 @@ Floating::Floating(string const & type, string const & placement,
 	  style_(style), name_(name), listname_(listName), listcommand_(listCmd),
 	  refprefix_(refPrefix), allowedplacement_(allowedplacement), required_(required),
 	  usesfloatpkg_(usesfloat), ispredefined_(ispredefined),
 	  allowswide_(allowswide), allowssideways_(allowssideways),
 	  html_tag_(htmlTag), html_attrib_(htmlAttrib), html_style_(htmlStyle),
-	  docbook_tag_(docbookTag), docbook_tag_type_(docbookTagType),
-	  docbook_caption_(docbookCaption)
+	  docbook_caption_(docbookCaption), docbook_tag_(docbookTag),
+	  docbook_tag_type_(docbookTagType)
 {
 	// Implement some edge cases for DocBook. Both docbook_float_type_ and docbook_attr_ must be computed
 	// based on the given value of docbookFloatType; docbook_tag_ can still be guessed without correlation.
 
 	// Determine the value of docbook_float_type_.


pgppuwwrxy622.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Compile warnings with docbook

2021-09-23 Thread Kornel Benko

See attached.

Kornel


Warnings
Description: Binary data


pgpvNNTRcQ84O.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-22 Thread Kornel Benko
Am Wed, 22 Sep 2021 10:28:44 +0200
schrieb Jean-Marc Lasgouttes :

> Le 21/09/2021 à 16:52, Scott Kostyshak a écrit :
> >> Some debugging lead to following observation:
> >> Each inserted branch add a color to the list. The original enum defined 
> >> colors (about
> >> 102), last Color_ignore.
> >> So each branch will now get colors 103, 104, ..., and so on, so that the 
> >> original
> >> enum (probably used as 'char') cannot contain the value beyond 127).
> >>
> >> Expanding the colors in src/ColorCode.h as in attached, removes the 
> >> sanitize
> >> messages.  
> > 
> > Nice, that makes sense. 500 seems to be a reasonable ceiling. I suppose an
> > alternative would be to have the code stop assigning new colors past the 
> > max. That
> > is, I imagine they could just assign the max color value to multiple 
> > insets?  
> 
> But why the 127? Is it that the underlying type of the enum is a signed 
> char? What does sizeof(ColorCode) return?

That is not important from my POV. Sanitize is checking also for portability, 
so if
there is one compiler which would use 'char' for this enum, that would justify 
the
message. Just my 2 cents.

> If this is the case, using
>enum ColorCode : int {
> should help. But I am surprised because the underlying type should be 
> int (unless -fshort-enums is used):
> https://stackoverflow.com/questions/1122096/what-is-the-underlying-type-of-a-c-enum

'int' type may be too big (think on 64-bit (or more) intergers).

> > I didn't understand how JMarc's suggestion to change the type to int would 
> > solve the
> > (non) issue.  
> 
> I was under the impression that the code would check that the enum value 
> was one of the declared values. But this is not the case, since a number 
> of synthetic values between 100 and 127 seem to be valid.
> 
> I also wonder how you triggered it initially. Is it that you really had 
> 25+ branches, or is it that the code "leaks" color code and creates too 
> many of them?
> 
> JMarc

Kornel


pgpM_fe6UShvg.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Display of left-indented long-table in a branch

2021-09-22 Thread Kornel Benko
Am Wed, 22 Sep 2021 13:42:21 +0200
schrieb Jean-Marc Lasgouttes :

> Le 22/09/2021 à 13:26, Kornel Benko a écrit :
> >> I guess it is time to get rid of this thing. I am not sure how you got
> >> it into your document.  
> > 
> > It is long time ago, so I don't know either. The 'problem' is that I am 
> > unable to
> > change the thing with lyx-tools (neither with GUI, nor with a function)  
> 
> I guess that, beside the obvious correction with a text editor, the 
> solution is like
>M-x paragraph-params \leftindent
> but I could not get it to work.
> 
> JMarc

I tried this already also without luck.

Kornel


pgpCFMDbEoUF9.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Display of left-indented long-table in a branch

2021-09-22 Thread Kornel Benko
Am Wed, 22 Sep 2021 11:27:06 +0200
schrieb Jean-Marc Lasgouttes :

> Le 10/06/2021 à 07:59, Kornel Benko a écrit :
> > I have an old lyx-file which has a long-table in a branch. See MWE.
> > 
> > I added a second long-table, but am unable to create an equivalent to the 
> > first table.
> > 
> > The display of the first branch is wrong.
> > 
> > How can I set/reset the indentation?  
> 
> So indeed your first paragraph, and the first brancg each have a 
> leftindent value of -1cm. This leftindent has been introduce almost 20 
> years ago:
> 
> ==
> commit e4fffd74bc3f4b072929a5d3729bede295829764
> Author: Jürgen Vigna 
> Date:   Wed May 8 12:58:16 2002 +
> 
>  This is the ParagraphIndent stuff compatibility. All of it only the 
> GUI for
>  inputing/changing values is missing, but this (if) will come after 
> 1.2.0.
> ===
> 
> I have see no evidence that the GUI has ever been implemented!
> 
> The way of setting it is:
> 
> /*!
>   * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_PARAMS
>   * \li Action: Change paragraph settings.
>   * \li Notion: Modifies the current paragraph, or currently selected 
> paragraphs.
> This function only modifies, and does not override, 
> existing settings.
> Note that the "leftindent" indent setting is deprecated.
>   * \li Syntax: paragraph-params [] [] [] []
>   * \li Params: :  \noindent|\indent|\indent-toggle|\leftindent 
> LENGTH\n
> : \paragraph_spacing 
> default|single|onehalf|double|other SIZE \n
> :   \align block|left|right|center|default\n
> :  \labelwidthstring WIDTH|\start_of_appendix
>   * \li Origin: rgh, Aug 15 2007
>   * \endvar
>   */
> 
> Note that the setting is "deprecated" :)
> 
> I guess it is time to get rid of this thing. I am not sure how you got 
> it into your document.
> 
> JMarc
> 

It is long time ago, so I don't know either. The 'problem' is that I am unable 
to change
the thing with lyx-tools (neither with GUI, nor with a function)

Kornel



pgpcNZ49G9c7x.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Display of left-indented long-table in a branch

2021-09-22 Thread Kornel Benko
Am Wed, 22 Sep 2021 12:01:57 +0200
schrieb Jean-Marc Lasgouttes :

> Le 10/06/2021 à 17:11, Kornel Benko a écrit :
> > Am Thu, 10 Jun 2021 07:59:59 +0200
> > schrieb Kornel Benko :
> >   
> >> I have an old lyx-file which has a long-table in a branch. See MWE.
> >>
> >> I added a second long-table, but am unable to create an equivalent to the 
> >> first
> >> table.
> >>
> >> The display of the first branch is wrong.
> >>
> >> How can I set/reset the indentation?  
> 
> 
> > I tried to bisect ...
> > the first commit showing the behaviour is:  
> 
> In some sense, it is more precise than before, the negative left indent 
> is visible ;)
> 
> Knowing that the thing is centered, I have no idea how the horrible code 
> in LyXParagraphLeftIndent behaves in PDF output. If you want me to fix 
> it, I have to know what is supposed to happen.
> 
> JMarc

The pdf-output is still OK, only the lyx-window shows the thirst branch-inset 
without its
name.

Kornel


pgpon_jYSAGZT.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-20 Thread Kornel Benko
Am Mon, 20 Sep 2021 11:48:37 +0200
schrieb Kornel Benko :

> Am Sun, 19 Sep 2021 20:19:15 -0400
> schrieb Scott Kostyshak :
> 
> > On Sun, Sep 19, 2021 at 08:37:16PM +0200, Kornel Benko wrote:  
> > > Am Sun, 19 Sep 2021 14:15:21 -0400
> > > schrieb Scott Kostyshak :
> > > 
> > > > On Sun, Sep 19, 2021 at 02:00:33PM +0200, Kornel Benko wrote:
> > > > > Am Sun, 19 Sep 2021 07:45:19 -0400
> > > > > schrieb Scott Kostyshak :
> > > > >   
> > > > > > > > > So inserting this include cured the compilation for me.   
> > > > > > > > >
> > > > > > > > 
> > > > > > > > That's great you figured it out and it doesn't add too much 
> > > > > > > > complexity to
> > > > > > > > the code. Are you sure it ended up using the 
> > > > > > > > -fsanitize=undefined flag ?
> > > > > > > > If you do
> > > > > > > > 
> > > > > > > >   ldd build-dir/bin/lyx | grep ubsan
> > > > > > > > 
> > > > > > > > Does it show up?
> > > > > > > > 
> > > > > > > > Scott
> > > > > > > 
> > > > > > >   libubsan.so.1 => /usr/lib/x86_64-linux-gnu/libubsan.so.1
> > > > > > > (0x7f49cdfd2000)
> > > > > > 
> > > > > > Great, I will experiment next week with it.
> > > > > > 
> > > > > > Thank you,
> > > > > > 
> > > > > > Scott
> > > > > >   
> > > > > 
> > > > > BTW, how got you the output showing errors? My lyx does not print any 
> > > > > error
> > > > > messages. (I mean:
> > > > > 'ColorCode' 
> > > > > /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:174:6: runtime
> > > > > error: load of value 128, which is not a valid value for type
> > > > > ...
> > > > > )  
> > > > 
> > > > It seems that it is triggered with a lot of branches (or perhaps more 
> > > > generally
> > > > any different kind of insets?). Attached is an LFUN sequence that 
> > > > reproduces it.
> > > > Does it trigger the error for you?
> > > > 
> > > > Scott
> > > 
> > > Not on empty document.
> > 
> > For me it works on an empty document. I do use a default.lyx document (this 
> > is what
> > saves when you click on "save class defaults"), but I can reproduce if I 
> > remove that
> > template. I attach both MWEs; there's not much difference between them. For 
> > me, it is
> > sufficient to just open them and I get the messages in the terminal.
> > 
> > Not sure if it's relevant, but perhaps it could be differences with GCC 
> > version:
> > 
> >   g++ --version
> >   g++ (Ubuntu 10.3.0-1ubuntu1) 10.3.0
> > 
> > Scott  
> 
> My fail (Using LYX_DEBUG_SANITIZE too late). I get the messages now too.
> 
> BTW, I wonder, if if LYX_ASAN and LYX_DEBUG_SANITIZE are eventually exclusive?
> 
>   Kornel

Some debugging lead to following observation:
Each inserted branch add a color to the list. The original enum defined colors 
(about
102), last Color_ignore.
So each branch will now get colors 103, 104, ..., and so on, so that the 
original enum
(probably used as 'char') cannot contain the value beyond 127).

Expanding the colors in src/ColorCode.h as in attached, removes the sanitize 
messages.

Kornel
diff --git a/src/ColorCode.h b/src/ColorCode.h
index c7253ff641..d41316d605 100644
--- a/src/ColorCode.h
+++ b/src/ColorCode.h
@@ -236,11 +236,12 @@ enum ColorCode {
 	/// Color is inherited
 	Color_inherit,
 	/// Color for regexp frame
 	Color_regexpframe,
 	/// For ignoring updates of a color
-	Color_ignore
+	Color_ignore,
+	Colr_max = 500
 };
 
 
 struct RGBColor {
 	unsigned int r;


pgpP7A_eQf2uY.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-20 Thread Kornel Benko
Am Sun, 19 Sep 2021 20:19:15 -0400
schrieb Scott Kostyshak :

> On Sun, Sep 19, 2021 at 08:37:16PM +0200, Kornel Benko wrote:
> > Am Sun, 19 Sep 2021 14:15:21 -0400
> > schrieb Scott Kostyshak :
> >   
> > > On Sun, Sep 19, 2021 at 02:00:33PM +0200, Kornel Benko wrote:  
> > > > Am Sun, 19 Sep 2021 07:45:19 -0400
> > > > schrieb Scott Kostyshak :
> > > > 
> > > > > > > > So inserting this include cured the compilation for me.
> > > > > > > 
> > > > > > > That's great you figured it out and it doesn't add too much 
> > > > > > > complexity to
> > > > > > > the code. Are you sure it ended up using the -fsanitize=undefined 
> > > > > > > flag ? If
> > > > > > > you do
> > > > > > > 
> > > > > > >   ldd build-dir/bin/lyx | grep ubsan
> > > > > > > 
> > > > > > > Does it show up?
> > > > > > > 
> > > > > > > Scott  
> > > > > > 
> > > > > > libubsan.so.1 => /usr/lib/x86_64-linux-gnu/libubsan.so.1
> > > > > > (0x7f49cdfd2000)  
> > > > > 
> > > > > Great, I will experiment next week with it.
> > > > > 
> > > > > Thank you,
> > > > > 
> > > > > Scott
> > > > > 
> > > > 
> > > > BTW, how got you the output showing errors? My lyx does not print any 
> > > > error
> > > > messages. (I mean:
> > > > 'ColorCode' 
> > > > /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:174:6: runtime
> > > > error: load of value 128, which is not a valid value for type
> > > > ...
> > > > )
> > > 
> > > It seems that it is triggered with a lot of branches (or perhaps more 
> > > generally any
> > > different kind of insets?). Attached is an LFUN sequence that reproduces 
> > > it. Does it
> > > trigger the error for you?
> > > 
> > > Scott  
> > 
> > Not on empty document.  
> 
> For me it works on an empty document. I do use a default.lyx document (this 
> is what
> saves when you click on "save class defaults"), but I can reproduce if I 
> remove that
> template. I attach both MWEs; there's not much difference between them. For 
> me, it is
> sufficient to just open them and I get the messages in the terminal.
> 
> Not sure if it's relevant, but perhaps it could be differences with GCC 
> version:
> 
>   g++ --version
>   g++ (Ubuntu 10.3.0-1ubuntu1) 10.3.0
> 
> Scott

My fail (Using LYX_DEBUG_SANITIZE too late). I get the messages now too.

BTW, I wonder, if if LYX_ASAN and LYX_DEBUG_SANITIZE are eventually exclusive?

Kornel


pgp8FuX_GXi_q.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-19 Thread Kornel Benko
Am Sun, 19 Sep 2021 14:15:21 -0400
schrieb Scott Kostyshak :

> On Sun, Sep 19, 2021 at 02:00:33PM +0200, Kornel Benko wrote:
> > Am Sun, 19 Sep 2021 07:45:19 -0400
> > schrieb Scott Kostyshak :
> >   
> > > > > > So inserting this include cured the compilation for me.  
> > > > > 
> > > > > That's great you figured it out and it doesn't add too much 
> > > > > complexity to the
> > > > > code. Are you sure it ended up using the -fsanitize=undefined flag ? 
> > > > > If you do
> > > > > 
> > > > >   ldd build-dir/bin/lyx | grep ubsan
> > > > > 
> > > > > Does it show up?
> > > > > 
> > > > > Scott
> > > > 
> > > > libubsan.so.1 => /usr/lib/x86_64-linux-gnu/libubsan.so.1
> > > > (0x7f49cdfd2000)
> > > 
> > > Great, I will experiment next week with it.
> > > 
> > > Thank you,
> > > 
> > > Scott
> > >   
> > 
> > BTW, how got you the output showing errors? My lyx does not print any error 
> > messages.
> > (I mean:
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:174:6: 
> > runtime
> > error: load of value 128, which is not a valid value for type
> > ...
> > )  
> 
> It seems that it is triggered with a lot of branches (or perhaps more 
> generally any
> different kind of insets?). Attached is an LFUN sequence that reproduces it. 
> Does it
> trigger the error for you?
> 
> Scott

Not on empty document.

Kornel


pgpQpsawOzIFC.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-19 Thread Kornel Benko
Am Sun, 19 Sep 2021 07:45:19 -0400
schrieb Scott Kostyshak :

> > > > So inserting this include cured the compilation for me.
> > > 
> > > That's great you figured it out and it doesn't add too much complexity to 
> > > the code.
> > > Are you sure it ended up using the -fsanitize=undefined flag ? If you do
> > > 
> > >   ldd build-dir/bin/lyx | grep ubsan
> > > 
> > > Does it show up?
> > > 
> > > Scott  
> > 
> > libubsan.so.1 => /usr/lib/x86_64-linux-gnu/libubsan.so.1
> > (0x7f49cdfd2000)  
> 
> Great, I will experiment next week with it.
> 
> Thank you,
> 
> Scott
> 

BTW, how got you the output showing errors? My lyx does not print any error 
messages.
(I mean:
'ColorCode' /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:174:6: runtime
error: load of value 128, which is not a valid value for type
...
)

Kornel


pgpswA4doGhP4.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-19 Thread Kornel Benko
Am Sat, 18 Sep 2021 20:52:43 -0400
schrieb Scott Kostyshak :

> On Sat, Sep 18, 2021 at 06:46:47PM +0200, Kornel Benko wrote:
> > Am Sat, 18 Sep 2021 10:34:49 -0400
> > schrieb Scott Kostyshak :
> >   
> > > > I tried but failed. The problem is that tex2lyx uses
> > > > libzlibstatic.a, ../../lib/libsupport.a to link with, but these are 
> > > > compiled with
> > > > -fsanitize. So the only way is to define dummy versions as Jean-Marc 
> > > > pointed
> > > > out.
> > > 
> > > Thank you for trying, Kornel!
> > > 
> > > Scott
> > >   
> > 
> > Actually it was pretty easy. According to the error message,
> > undefined reference to `typeinfo for lyx::xml::FontTag'
> > looked wrong, since it is defined in xml.h. But  src/tex2lyx/dummy_impl.cpp 
> > used
> > FontTag _and_ did not include it xml.h.
> > 
> > So inserting this include cured the compilation for me.  
> 
> That's great you figured it out and it doesn't add too much complexity to the 
> code. Are
> you sure it ended up using the -fsanitize=undefined flag ? If you do
> 
>   ldd build-dir/bin/lyx | grep ubsan
> 
> Does it show up?
> 
> Scott

libubsan.so.1 => /usr/lib/x86_64-linux-gnu/libubsan.so.1 
(0x7f49cdfd2000)

So, yes.

Kornel 


pgpxLbjKFKvhI.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-18 Thread Kornel Benko
Am Sat, 18 Sep 2021 10:34:49 -0400
schrieb Scott Kostyshak :

> > I tried but failed. The problem is that tex2lyx uses
> > libzlibstatic.a, ../../lib/libsupport.a to link with, but these are 
> > compiled with
> > -fsanitize. So the only way is to define dummy versions as Jean-Marc 
> > pointed out.  
> 
> Thank you for trying, Kornel!
> 
> Scott
> 

Actually it was pretty easy. According to the error message,
undefined reference to `typeinfo for lyx::xml::FontTag'
looked wrong, since it is defined in xml.h. But  src/tex2lyx/dummy_impl.cpp used
FontTag _and_ did not include it xml.h.

So inserting this include cured the compilation for me.

Kornel
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f36784a858..21ba80083c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,10 +234,11 @@ LYX_OPTION(PROFILE  "Build with options for gprof" ${DefaultLyxProfi
 LYX_OPTION(EXTERNAL_BOOST   "Use external boost" ${DefaultExternalLibs} GCC)
 LYX_OPTION(PROGRAM_SUFFIX   "Append version suffix to binaries" ON GCC)
 LYX_OPTION(DEBUG_GLIBC  "Enable libstdc++ debug mode" OFF GCC)
 LYX_OPTION(DEBUG_GLIBC_PEDANTIC "Enable libstdc++ pedantic debug mode" OFF GCC)
 LYX_OPTION(STDLIB_DEBUG "Use debug stdlib" ${DefaultLyxStdlibDebug} GCC)
+LYX_OPTION(DEBUG_SANITIZE	"Enable sanitize check" OFF GCC)
 
 # MSVC specific
 LYX_OPTION(CONSOLE   "Show console on Windows" ON MSVC)
 LYX_OPTION(VLD   "Use VLD with MSVC" OFF MSVC)
 LYX_OPTION(WALL  "Enable all warnings" OFF MSVC)
@@ -724,10 +725,15 @@ else()
 	else()
 		set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Set release flags" FORCE)
 	endif()
 endif()
 
+if (LYX_DEBUG_SANITIZE)
+set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -fsanitize=undefined")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined")
+endif()
+
 if(LYX_ASAN)
 set(CMAKE_CXX_FLAGS "-fsanitize=address -fno-omit-frame-pointer -g ${CMAKE_CXX_FLAGS}")
 message(STATUS)
 message(STATUS "Address sanitizer enabled. Usage:")
 message(STATUS "wget https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py;)
diff --git a/src/tex2lyx/dummy_impl.cpp b/src/tex2lyx/dummy_impl.cpp
index 961eb9ae0d..9a5fee6355 100644
--- a/src/tex2lyx/dummy_impl.cpp
+++ b/src/tex2lyx/dummy_impl.cpp
@@ -20,10 +20,11 @@
 
 #include "Format.h"
 #include "LaTeXFeatures.h"
 #include "LyXRC.h"
 #include "output_xhtml.h"
+#include "xml.h"
 
 #include "support/Messages.h"
 
 #include 
 


pgpbOzxEQqfmo.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-18 Thread Kornel Benko
Am Fri, 17 Sep 2021 16:41:09 -0400
schrieb Scott Kostyshak :

> On Fri, Sep 17, 2021 at 10:22:28PM +0200, Kornel Benko wrote:
> > Am Fri, 17 Sep 2021 20:24:17 +0200
> > schrieb Jean-Marc Lasgouttes :
> >   
> > > Le 17/09/2021 à 20:21, Scott Kostyshak a écrit :  
> > > > /usr/include/c++/10/bits/stl_function.h:386:20: runtime error: load of 
> > > > value 128,
> > > > which is not a valid value for type 'ColorCode' 
> > > > /usr/include/c++/10/tuple:1693:70:
> > > > runtime error: load of value 128, which is not a valid value for type
> > > > 'ColorCode' /usr/include/c++/10/bits/stl_function.h:386:20: runtime 
> > > > error: load of
> > > > value 128, which is not a valid value for type
> > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:366:35: 
> > > > runtime error:
> > > > load of value 128, which is not a valid value for type
> > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:367:39: 
> > > > runtime error:
> > > > load of value 128, which is not a valid value for type
> > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:457:17: 
> > > > runtime error:
> > > > load of value 128, which is not a valid value for type
> > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:10: 
> > > > runtime error:
> > > > load of value 128, which is not a valid value for type
> > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:31: 
> > > > runtime error:
> > > > load of value 128, which is not a valid value for type
> > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:55: 
> > > > runtime error:
> > > > load of value 128, which is not a valid value for type
> > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:536:13: 
> > > > runtime error:
> > > > load of value 128, which is not a valid value for type
> > > > 'ColorCode' 
> > > > /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:174:6: runtime
> > > > error: load of value 128, which is not a valid value for type
> > > > 'ColorCode' 
> > > > /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:179:9: runtime
> > > > error: load of value 128, which is not a valid value for type
> > > > 'ColorCode' 
> > > > /home/scott/lyxbuilds/master/repo/src/support/Changer.h:41:59: runtime
> > > > error: load of value 128, which is not a valid value for type
> > > > 'ColorCode' 
> > > > /home/scott/lyxbuilds/master/repo/src/support/Changer.h:45:56: runtime
> > > > error: load of value 128, which is not a valid value for type
> > > > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:191:9: 
> > > > runtime error:
> > > > load of value 128, which is not a valid value for type 'ColorCode'
> > > > 
> > > > I don't have time to study how to fix it, but at least I can note it 
> > > > here in case
> > > > anyone does.
> > > 
> > > This seems more interesting indeed. Looks like the same value 
> > > everywhere. I suspect we create synthetic color values in some 
> > > circumstances.
> > > 
> > > JMarc  
> > 
> > Seems, like an option for sanitize in cmake would be handy.
> > LYX_OPTION(DEBUG_SANITIZE "Enable sanitize check" OFF GCC)
> > 
> > ...
> > if (LYX_DEBUG_SANITIZE)
> > # some magic statements
> > endif()
> > 
> > Kornel  
> 
> That would be nice but might be some work and I don't know if others are 
> interested. I
> think it's nice because the run-time hit on performance isn't bad. For 
> example, with
> -fsanitize=undefined, I don't even notice it is slower. With ASAN it is 
> noticeably
> slower (although still usable as opposed to using LyX with Valgrind).
> 
> Scott

I tried but failed. The problem is that tex2lyx uses
libzlibstatic.a, ../../lib/libsupport.a to link with, but these are compiled 
with
-fsanitize. So the only way is to define dummy versions as Jean-Marc pointed 
out.

Kornel


pgp2fv0o0PUVg.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-17 Thread Kornel Benko
Am Fri, 17 Sep 2021 20:24:17 +0200
schrieb Jean-Marc Lasgouttes :

> Le 17/09/2021 à 20:21, Scott Kostyshak a écrit :
> > /usr/include/c++/10/bits/stl_function.h:386:20: runtime error: load of 
> > value 128,
> > which is not a valid value for type 'ColorCode' 
> > /usr/include/c++/10/tuple:1693:70:
> > runtime error: load of value 128, which is not a valid value for type
> > 'ColorCode' /usr/include/c++/10/bits/stl_function.h:386:20: runtime error: 
> > load of
> > value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:366:35: runtime 
> > error:
> > load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:367:39: runtime 
> > error:
> > load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:457:17: runtime 
> > error:
> > load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:10: runtime 
> > error:
> > load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:31: runtime 
> > error:
> > load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:435:55: runtime 
> > error:
> > load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:536:13: runtime 
> > error:
> > load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:174:6: 
> > runtime
> > error: load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/MetricsInfo.cpp:179:9: 
> > runtime
> > error: load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/support/Changer.h:41:59: 
> > runtime
> > error: load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/support/Changer.h:45:56: 
> > runtime
> > error: load of value 128, which is not a valid value for type
> > 'ColorCode' /home/scott/lyxbuilds/master/repo/src/Color.cpp:191:9: runtime 
> > error:
> > load of value 128, which is not a valid value for type 'ColorCode'
> > 
> > I don't have time to study how to fix it, but at least I can note it here 
> > in case
> > anyone does.  
> 
> This seems more interesting indeed. Looks like the same value 
> everywhere. I suspect we create synthetic color values in some 
> circumstances.
> 
> JMarc

Seems, like an option for sanitize in cmake would be handy.
LYX_OPTION(DEBUG_SANITIZE "Enable sanitize check" OFF GCC)

...
if (LYX_DEBUG_SANITIZE)
# some magic statements
endif()

Kornel


pgpfpFgR9Osbt.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-17 Thread Kornel Benko
Am Thu, 16 Sep 2021 21:12:38 -0400
schrieb Scott Kostyshak :

> On Thu, Sep 16, 2021 at 10:13:15PM +0200, Kornel Benko wrote:
> > Am Thu, 16 Sep 2021 15:12:34 -0400
> > schrieb Scott Kostyshak :
> >   
> > > I was curious about compiling with -fsanitize=undefined.
> > > 
> > > When building (with CMake), I get the following:
> > > 
> > > [ 93%] Linking CXX executable ../../bin/tex2lyx
> > > cd /home/scott/lyxbuilds/master/CMakeBuild/src/tex2lyx && /usr/bin/cmake 
> > > -E
> > > cmake_link_script CMakeFiles/tex2lyx.dir/link.txt --verbose=1 
> > > /usr/lib/ccache/c++
> > > -Wall -Wextra -Wno-deprecated-copy --std=c++20 -DENABLE_ASSERTIONS=1
> > > -fsanitize=undefined -fno-strict-aliasing  -O0 -g3 -D_DEBUG  
> > > -fsanitize=undefined
> > > -rdynamic CMakeFiles/tex2lyx.dir/Context.cpp.o 
> > > CMakeFiles/tex2lyx.dir/Parser.cpp.o
> > > CMakeFiles/tex2lyx.dir/Preamble.cpp.o CMakeFiles/tex2lyx.dir/boost.cpp.o
> > > CMakeFiles/tex2lyx.dir/dummy_impl.cpp.o CMakeFiles/tex2lyx.dir/math.cpp.o
> > > CMakeFiles/tex2lyx.dir/table.cpp.o CMakeFiles/tex2lyx.dir/tex2lyx.cpp.o
> > > CMakeFiles/tex2lyx.dir/text.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/graphics/GraphicsParams.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/insets/ExternalTemplate.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/insets/ExternalTransforms.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/insets/InsetLayout.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/Author.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/CiteEnginesList.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/Color.cpp.o 
> > > CMakeFiles/tex2lyx.dir/__/Counters.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/Encoding.cpp.o 
> > > CMakeFiles/tex2lyx.dir/__/FloatList.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/Floating.cpp.o 
> > > CMakeFiles/tex2lyx.dir/__/FontInfo.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/LaTeXPackages.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/Layout.cpp.o 
> > > CMakeFiles/tex2lyx.dir/__/LayoutFile.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/LayoutModuleList.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/Lexer.cpp.o 
> > > CMakeFiles/tex2lyx.dir/__/ModuleList.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/TextClass.cpp.o 
> > > CMakeFiles/tex2lyx.dir/__/Spacing.cpp.o
> > > CMakeFiles/tex2lyx.dir/__/version.cpp.o
> > > -o ../../bin/tex2lyx  ../../lib/libsupport.a
> > > -lmagic /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.15.2 
> > > /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.2
> > > -lz /usr/bin/ld: 
> > > CMakeFiles/tex2lyx.dir/dummy_impl.cpp.o:(.data.rel+0x118):
> > > undefined reference to `typeinfo for lyx::xml::FontTag' collect2: error: 
> > > ld
> > > returned 1 exit status
> > > 
> > > Any tip on how to solve this?
> > > 
> > > Scott  
> > 
> > We may need to include src/xml.cpp to the list of files for tex2lyx.
> > (line src/tex2lyx/CMakeLists.txt:13)  
> 
> Thanks! Your suggestion worked for this linker error, but then I got new 
> linker errors.
> I kept adding to the list, but I keep getting new linker errors. Currently I 
> have the
> following:
> 
> --- a/src/tex2lyx/CMakeLists.txt
> +++ b/src/tex2lyx/CMakeLists.txt
> @@ -14,7 +14,7 @@ foreach(_src graphics/GraphicsParams insets/ExternalTemplate
> insets/ExternalTransforms insets/InsetLayout Author CiteEnginesList 
> Color
> Counters Encoding FloatList Floating FontInfo LaTeXPackages Layout
> LayoutFile LayoutModuleList Lexer ModuleList TextClass
> -   Spacing version)
> +   Spacing version xml Layout Paragraph BufferParams)
> list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp)
> list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h)
>  endforeach(_src)
> 
> But I still get linker errors. I can keep proceeding to add them individually 
> if that
> is what we need to do. But I wanted to check to make sure that's what we 
> should do.
> 
> I should add that being able to compile with -fsanitize=undefined is not so 
> important.
> If this seems like a tricky issue, I am fine to give up for now :)
> 
> Scott

We could omit the flag for tex2lyx compilation. I suppose, we need this flag 
only for the
lyx-executable.
So adding the flags in src/CMakeLists.txt as
add_compile_options("-fsanitize=undefined")
...
target_link_options(${_lyx} "-fsanitize=undefined")

Hope this is correct.

Kornel


pgpkvk1CBJEos.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Link error when compiling with -fsanitize=undefined

2021-09-16 Thread Kornel Benko
Am Thu, 16 Sep 2021 15:12:34 -0400
schrieb Scott Kostyshak :

> I was curious about compiling with -fsanitize=undefined.
> 
> When building (with CMake), I get the following:
> 
> [ 93%] Linking CXX executable ../../bin/tex2lyx
> cd /home/scott/lyxbuilds/master/CMakeBuild/src/tex2lyx && /usr/bin/cmake -E
> cmake_link_script CMakeFiles/tex2lyx.dir/link.txt --verbose=1 
> /usr/lib/ccache/c++ -Wall
> -Wextra -Wno-deprecated-copy --std=c++20 -DENABLE_ASSERTIONS=1 
> -fsanitize=undefined
> -fno-strict-aliasing  -O0 -g3 -D_DEBUG  -fsanitize=undefined -rdynamic
> CMakeFiles/tex2lyx.dir/Context.cpp.o CMakeFiles/tex2lyx.dir/Parser.cpp.o
> CMakeFiles/tex2lyx.dir/Preamble.cpp.o CMakeFiles/tex2lyx.dir/boost.cpp.o
> CMakeFiles/tex2lyx.dir/dummy_impl.cpp.o CMakeFiles/tex2lyx.dir/math.cpp.o
> CMakeFiles/tex2lyx.dir/table.cpp.o CMakeFiles/tex2lyx.dir/tex2lyx.cpp.o
> CMakeFiles/tex2lyx.dir/text.cpp.o
> CMakeFiles/tex2lyx.dir/__/graphics/GraphicsParams.cpp.o
> CMakeFiles/tex2lyx.dir/__/insets/ExternalTemplate.cpp.o
> CMakeFiles/tex2lyx.dir/__/insets/ExternalTransforms.cpp.o
> CMakeFiles/tex2lyx.dir/__/insets/InsetLayout.cpp.o
> CMakeFiles/tex2lyx.dir/__/Author.cpp.o 
> CMakeFiles/tex2lyx.dir/__/CiteEnginesList.cpp.o
> CMakeFiles/tex2lyx.dir/__/Color.cpp.o CMakeFiles/tex2lyx.dir/__/Counters.cpp.o
> CMakeFiles/tex2lyx.dir/__/Encoding.cpp.o 
> CMakeFiles/tex2lyx.dir/__/FloatList.cpp.o
> CMakeFiles/tex2lyx.dir/__/Floating.cpp.o 
> CMakeFiles/tex2lyx.dir/__/FontInfo.cpp.o
> CMakeFiles/tex2lyx.dir/__/LaTeXPackages.cpp.o 
> CMakeFiles/tex2lyx.dir/__/Layout.cpp.o
> CMakeFiles/tex2lyx.dir/__/LayoutFile.cpp.o
> CMakeFiles/tex2lyx.dir/__/LayoutModuleList.cpp.o 
> CMakeFiles/tex2lyx.dir/__/Lexer.cpp.o
> CMakeFiles/tex2lyx.dir/__/ModuleList.cpp.o 
> CMakeFiles/tex2lyx.dir/__/TextClass.cpp.o
> CMakeFiles/tex2lyx.dir/__/Spacing.cpp.o 
> CMakeFiles/tex2lyx.dir/__/version.cpp.o
> -o ../../bin/tex2lyx  ../../lib/libsupport.a
> -lmagic /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.15.2 
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.2
> -lz /usr/bin/ld: CMakeFiles/tex2lyx.dir/dummy_impl.cpp.o:(.data.rel+0x118): 
> undefined
> reference to `typeinfo for lyx::xml::FontTag' collect2: error: ld returned 1 
> exit status
> 
> Any tip on how to solve this?
> 
> Scott

We may need to include src/xml.cpp to the list of files for tex2lyx.
(line src/tex2lyx/CMakeLists.txt:13)

Kornel


pgpvfWh3CFoMw.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX features/breakrows] Workaround for Qt 4

2021-09-01 Thread Kornel Benko
Am Wed, 1 Sep 2021 12:46:00 +0200
schrieb Jean-Marc Lasgouttes :

> Le 01/09/2021 à 12:34, Kornel Benko a écrit :
> > I forgot ... what are we/I supposed to test?
> > (Sorry, memory fading too fast)  
> 
> For now, see if you can find bugs in document display and editing.
> All the ones I know about are fixed.
> 
> My next step is to make Qt break long strings in several lines at once, 
> which should improve speed (no idea how much).
> 
> JMarc

OK here a test-example looking weird.

Kornel


Box.lyx
Description: application/lyx


pgpsiQa0dqipW.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX features/breakrows] Workaround for Qt 4

2021-09-01 Thread Kornel Benko
Am Tue, 31 Aug 2021 13:33:50 +0200
schrieb Jean-Marc Lasgouttes :

> Le 31/08/2021 à 10:56, Kornel Benko a écrit :
> > Compiles without warnings (ubuntu 19.3)  
> 
> Thanks. Does not work well though. I have a list of things to fix (and 
> improve) and will communicate again when the branch is useful. But you 
> testing is appreciated :)
> 
> JMarc

I forgot ... what are we/I supposed to test?
(Sorry, memory fading too fast)

Kornel


pgpd134iuLEgn.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX features/breakrows] Workaround for Qt 4

2021-08-31 Thread Kornel Benko
Am Tue, 31 Aug 2021 10:18:38 +0200 (CEST)
schrieb Jean-Marc Lasgouttes :

> From: Jean-Marc Lasgouttes 
> To: lyx-...@lists.lyx.org
> Subject: [LyX features/breakrows] Workaround for Qt 4
> Date: Tue, 31 Aug 2021 10:18:38 +0200 (CEST)
> Reply-To: lyx-devel@lists.lyx.org
> Sender: "lyx-cvs" 
> 
> The branch, breakrows, has been updated.
>   discards  421adf6f4d46854eab042f1a06cf0fd48a70af5a (commit)
>   discards  5553b62f2ee8c769ca00439393686bebcd5f01d3 (commit)
>   discards  d6b6533b971afc6918f1685d8d44c73b6ed1c009 (commit)
>   discards  13617d062146289273f3ef6f6d7b5c029a1cfe66 (commit)
>   discards  129956fcdb3cda44b035044aa6eb3102f912fa02 (commit)
>   discards  4c5aec9189e7365140906a2f81f4226af7707609 (commit)
>   discards  5715ac1515cef1504da11082e90696c82655eacf (commit)
>   discards  a282faad29bb8de11b69b95e3479110cca3784bf (commit)
>   discards  fdfbbde36271bced06d148c7dd1e3af290049f40 (commit)
>   discards  cc2dabc540e620ef1b2e9a6c7ca74f8743239048 (commit)
> 
> This update added new revisions after undoing existing revisions.  That is
> to say, the old revision is not a strict subset of the new revision.  This
> situation occurs when you --force push a change and generate a repository
> containing something like this:
> 
>  * -- * -- B -- O -- O -- O (421adf6f4d46854eab042f1a06cf0fd48a70af5a)
> \
>  N -- N -- N (5e0358f3d3ad6001f471a7144db7c46cd1b06ee6)
> 
> When this happens we assume that you've already had alert emails for all
> of the O revisions, and so we here report only the revisions in the N
> branch from the common base, B.
> 

Compiles without warnings (ubuntu 19.3)

Kornel


pgpE15puPW8ld.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Make "wrap" the default in find for 2.4.0?

2021-07-17 Thread Kornel Benko
Am Fri, 16 Jul 2021 20:34:47 -0400
schrieb Scott Kostyshak :

> > > Do you
> > > think the checkbox should go in the "Search" tab or in the "Settings"
> > > tab? My first thought is that it should got in "Settings" since from
> > > what I understand most users do not often toggle "wrap", as opposed to
> > > the other three check boxes; that is, I think that users either prefer
> > > to always wrap or to always not wrap.  
> > 
> > Some people don't even look into the settings tab, so to make it more 
> > prominent
> > I'd prefer the button in the search tab.
> > Of course, it is OK in the settings tab too, that is I would not oppose.  
> 
> Search tab is fine with me. Thanks for the feedback.
> 
> Scott

What about a tri-state variable?
Wrap / Nowrap / Ask

Kornel


pgpsZfcG3ruzN.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Make "wrap" the default in find for 2.4.0?

2021-07-16 Thread Kornel Benko
Am Fri, 16 Jul 2021 16:02:59 -0400
schrieb Scott Kostyshak :

> On Fri, Jul 16, 2021 at 04:30:07PM +0200, Kornel Benko wrote:
> > Am Fri, 16 Jul 2021 15:37:12 +0200
> > schrieb Kornel Benko :
> >   
> > > Am Thu, 15 Jul 2021 23:03:14 +0100
> > > schrieb José Abílio Matos :
> > >   
> > > > On Thursday, 15 July 2021 16.37.19 WEST Scott Kostyshak wrote:
> > > > > Bump. I know most people are lacking time, and I also have not been 
> > > > > giving
> > > > > feedback on others' patches (sorry, racoon!). But I prefer not to 
> > > > > push this
> > > > > change without at least a few more opinions. That said, I'm happy to 
> > > > > wait
> > > > > until more people are around.
> > > > > 
> > > > > Thanks,
> > > > > Scott
> > > > 
> > > > I am used to emacs that also wraps by default. I have just tested other 
> > > > editors that have open at the moment like the octave editor, spyder or 
> > > > R 
> > > > Studio and all of them wrap.
> > > > 
> > > > I can see why you do not want to wrap but I think that it should be on 
> > > > by 
> > > > default.
> > > > 
> > > > Regards,
> > > 
> > > No problems with a new default.
> > > 
> > >   Kornel  
> > 
> > OTOH, in advanced find there is no button to select wrap/nopwrap.
> > (And your patch does not touch this part)  
> 
> Indeed. I can work on this, although it might take me a bit.

Thanks Scott.

> Do you
> think the checkbox should go in the "Search" tab or in the "Settings"
> tab? My first thought is that it should got in "Settings" since from
> what I understand most users do not often toggle "wrap", as opposed to
> the other three check boxes; that is, I think that users either prefer
> to always wrap or to always not wrap.

Some people don't even look into the settings tab, so to make it more prominent
I'd prefer the button in the search tab.
Of course, it is OK in the settings tab too, that is I would not oppose.

> That said, if others prefer for the checkbox to go in "Search", that's
> also fine with me.
> 
> Scott

Kornel


pgp2skBv9_wfP.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Make "wrap" the default in find for 2.4.0?

2021-07-16 Thread Kornel Benko
Am Fri, 16 Jul 2021 15:37:12 +0200
schrieb Kornel Benko :

> Am Thu, 15 Jul 2021 23:03:14 +0100
> schrieb José Abílio Matos :
> 
> > On Thursday, 15 July 2021 16.37.19 WEST Scott Kostyshak wrote:  
> > > Bump. I know most people are lacking time, and I also have not been giving
> > > feedback on others' patches (sorry, racoon!). But I prefer not to push 
> > > this
> > > change without at least a few more opinions. That said, I'm happy to wait
> > > until more people are around.
> > > 
> > > Thanks,
> > > Scott  
> > 
> > I am used to emacs that also wraps by default. I have just tested other 
> > editors that have open at the moment like the octave editor, spyder or R 
> > Studio and all of them wrap.
> > 
> > I can see why you do not want to wrap but I think that it should be on by 
> > default.
> > 
> > Regards,  
> 
> No problems with a new default.
> 
>   Kornel

OTOH, in advanced find there is no button to select wrap/nopwrap.
(And your patch does not touch this part)

Kornel


pgpL60Ru9TMmS.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Make "wrap" the default in find for 2.4.0?

2021-07-16 Thread Kornel Benko
Am Thu, 15 Jul 2021 23:03:14 +0100
schrieb José Abílio Matos :

> On Thursday, 15 July 2021 16.37.19 WEST Scott Kostyshak wrote:
> > Bump. I know most people are lacking time, and I also have not been giving
> > feedback on others' patches (sorry, racoon!). But I prefer not to push this
> > change without at least a few more opinions. That said, I'm happy to wait
> > until more people are around.
> > 
> > Thanks,
> > Scott
> 
> I am used to emacs that also wraps by default. I have just tested other 
> editors that have open at the moment like the octave editor, spyder or R 
> Studio and all of them wrap.
> 
> I can see why you do not want to wrap but I think that it should be on by 
> default.
> 
> Regards,

No problems with a new default.

Kornel


pgp_nn7EGjsAj.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] ctests: log a fixed LaTeX package issue (noweb)

2021-06-21 Thread Kornel Benko
Am Sun, 20 Jun 2021 14:04:50 -0400
schrieb Scott Kostyshak :

> On Sun, Jun 20, 2021 at 09:38:27AM +0200, Kornel Benko wrote:
> > Am Sun, 20 Jun 2021 05:54:24 +0200 (CEST)
> > schrieb Scott Kostyshak :
> >   
> > > commit 37bce91a8be2273dd43d73088f97f87a4052af9b
> > > Author: Scott Kostyshak 
> > > Date:   Sun Jun 20 00:05:42 2021 -0400
> > > 
> > > ctests: log a fixed LaTeX package issue (noweb)
> > > ---
> > >  development/autotests/ctests-costs-benefits.txt |6 ++
> > >  1 files changed, 6 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/development/autotests/ctests-costs-benefits.txt
> > > b/development/autotests/ctests-costs-benefits.txt index 4f5be6f..c7b2e3c 
> > > 100644
> > > --- a/development/autotests/ctests-costs-benefits.txt
> > > +++ b/development/autotests/ctests-costs-benefits.txt
> > > @@ -48,3 +48,9 @@ Fix: 39a9e370
> > >  
> > >  Report :
> > > https://www.mail-archive.com/search?l=mid=20210528001413.56phju7dvfn4dexs%40tallinn
> > > Fix: ffa6a724 +
> > > +
> > > +Examples where upstream (e.g., LaTeX packages) bugs were fixed (more 
> > > quickly)
> > > +because of ctests:
> > > +
> > > +Fix: https://github.com/nrnrnr/noweb/pull/12#event-4892099481  
> > 
> > What about the "-dALLOWPSTRANSPARENCY" flag for ps2pdf?
> > This is first detected by ctest too, if I recall correctly.  
> 
> Good idea, I agree. We should also add that the issue was subsequently
> reported here:
> https://www.lyx.org/trac/ticket/12303
> Knowing the time between when the ctests help detect something and when
> we would have discovered the issue from a different source (i.e., if
> there were no ctest coverage) is one way to evaluate how helpful the
> ctests are in an objective way. In this case, we only discovered the
> issue a couple of weeks before it was reported.
> 
> Feel free to add that information to the file or I can add it tomorrow.

Yes please. (You are way better to formulate)

> Scott

Kornel


pgp9uM1OVk_cf.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] ctests: log a fixed LaTeX package issue (noweb)

2021-06-20 Thread Kornel Benko
Am Sun, 20 Jun 2021 05:54:24 +0200 (CEST)
schrieb Scott Kostyshak :

> commit 37bce91a8be2273dd43d73088f97f87a4052af9b
> Author: Scott Kostyshak 
> Date:   Sun Jun 20 00:05:42 2021 -0400
> 
> ctests: log a fixed LaTeX package issue (noweb)
> ---
>  development/autotests/ctests-costs-benefits.txt |6 ++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/development/autotests/ctests-costs-benefits.txt
> b/development/autotests/ctests-costs-benefits.txt index 4f5be6f..c7b2e3c 
> 100644
> --- a/development/autotests/ctests-costs-benefits.txt
> +++ b/development/autotests/ctests-costs-benefits.txt
> @@ -48,3 +48,9 @@ Fix: 39a9e370
>  
>  Report :
> https://www.mail-archive.com/search?l=mid=20210528001413.56phju7dvfn4dexs%40tallinn
> Fix: ffa6a724 +
> +
> +Examples where upstream (e.g., LaTeX packages) bugs were fixed (more quickly)
> +because of ctests:
> +
> +Fix: https://github.com/nrnrnr/noweb/pull/12#event-4892099481

What about the "-dALLOWPSTRANSPARENCY" flag for ps2pdf?
This is first detected by ctest too, if I recall correctly.

Kornel


pgpBtsR9nlrTp.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-06-14 Thread Kornel Benko
Am Mon, 14 Jun 2021 11:40:13 +0200
schrieb Pavel Sanda :

> On Sun, Jun 13, 2021 at 11:09:12AM -0400, Scott Kostyshak wrote:
> > On Mon, May 31, 2021 at 02:19:26PM -0400, Scott Kostyshak wrote:
> > > On Mon, May 31, 2021 at 04:57:49PM +0200, Pavel Sanda wrote:
> > > > On Sat, May 29, 2021 at 01:45:24PM -0400, Scott Kostyshak wrote:
> > > > > I think there is a related issue: Some exports that use ps2pdf now 
> > > > > seem
> > > > > to need the flag "-dALLOWPSTRANSPARENCY" on TL21. Adding the following
> > > > > line to my preferences file fixes some tests:
> > > > > 
> > > > > \converter "ps" "pdf" "ps2pdf -dALLOWPSTRANSPARENCY $$i $$o"
> > > > > "hyperref-driver=dvips
> > > > 
> > > > Huh, this would be painful if true in general.
> > > 
> > > Indeed it does seem annoying, but is only relevant for a few of our 
> > > documents.
> > > 
> > > > What exact version of ghostscript do you have?
> > > 
> > > $ gs --version
> > > 9.53.3
> > 
> > If interested, see also: https://www.lyx.org/trac/ticket/12303
> 
> According to
> https://tex.stackexchange.com/questions/597980/ghostscript-requires-dallowpstransparency-when-compiling-pstricks-figures
> "An up-to-date TeX installation, such as TeXLive-2021, should already have 
> the GS call
> configured with -dALLOWPSTRANSPARENCY" Is this actually true?
> 
> Pavel

Since gs is not part of texlive21, this seems unlikely.
On ubuntu:
 $ dpkg -S /usr/bin/gs
ghostscript: /usr/bin/gs

Kornel



pgpCYpjPWn4Xq.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Revert "Fix bug #10263"

2021-06-13 Thread Kornel Benko
Am Sun, 13 Jun 2021 11:42:59 -0400
schrieb Scott Kostyshak :

> On Sat, May 29, 2021 at 01:47:41PM -0400, Scott Kostyshak wrote:
> > On Fri, May 28, 2021 at 10:48:51AM -0400, Scott Kostyshak wrote:  
> > > On Tue, Apr 13, 2021 at 10:13:16AM +0200, Jean-Marc Lasgouttes wrote:  
> > > > commit 441c6a93590698c3c57982c8b80179d6809fb106
> > > > Author: Jean-Marc Lasgouttes 
> > > > Date:   Mon Apr 12 20:44:58 2021 +0200
> > > > 
> > > > Revert "Fix bug #10263"
> > > > 
> > > > A series of commits, culminating at 812ff7de, pushed a few days 
> > > > later,
> > > > fixes the bug at its root. This one is not needed anymore to fix
> > > > 
> > > > This reverts commit 001f5a47861f04c985323677dfd17ef15b8c33a7
> > > > ---
> > > >  src/insets/InsetFoot.h |4 
> > > >  1 files changed, 0 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/src/insets/InsetFoot.h b/src/insets/InsetFoot.h
> > > > index 1e4b0d2..0c3f65a 100644
> > > > --- a/src/insets/InsetFoot.h
> > > > +++ b/src/insets/InsetFoot.h
> > > > @@ -45,10 +45,6 @@ private:
> > > > ///
> > > > Inset * clone() const override { return new InsetFoot(*this); }
> > > > ///
> > > > -   bool inheritFont() const override { return true; }
> > > > -   ///
> > > > -   bool allowMultiPar() const override { return true; }
> > > > -   ///
> > > > docstring custom_label_;
> > > > ///
> > > > bool intitle_;
> > > > --   
> > > 
> > > The following ctest started failing with this commit:
> > > 
> > >   export/doc/ja/Tutorial_pdf5_systemF
> > > 
> > > The diff between the "bad" (current master) and "good" (current master
> > > with this commit reverted) is as follows:
> > > 
> > > $ diff good.tex bad.tex 
> > > 61c61
> > > < \author{\LyX
> > > プロジェクトチーム\thanks{なにかコメントや間違いの修正がある場合には,\protect\LyX
> > > 文書化メーリングリスト(\protect\href{mailto:lyx-d...@lists.lyx.org}{lyx-d...@lists.lyx.org})までお知らせ下さい.この文書の翻訳は,当初人見光太郎氏が行った貢献に基づいています.}}
> > > ---  
> > > > \author{\LyX プロジェクトチーム\thanks{{\normalsize
> > > > なにかコメントや間違いの修正がある場合には,\protect\LyX
> > > > 文書化メーリングリスト(\protect\href{mailto:lyx-d...@lists.lyx.org}{lyx-d...@lists.lyx.org})までお知らせ下さい.この文書の翻訳は,当初人見光太郎氏が行った貢献に基づいています.}}}
> > > >   
> > > $ 
> > > 
> > > I have no idea why the {\normalsize ...} would cause the failure. Does
> > > anyone know the problem?
> > > 
> > > Note that we are already aware of several other Japanese documents that
> > > do not compile with non-TeX fonts:
> > > 
> > >   export/doc/ja/(Additional|LaTeXConfig|Math|UserGuide).*_systemF
> > > 
> > > so it would not be surprising if we need to add Tutorial.lyx to the list.
> > > 
> > > By the way, if this report does not lead to a fix in LyX or a bug
> > > report, we should log this wasted time in
> > > development/autotests/ctests-costs-benefits.txt.  
> > 
> > I think the French Powerdot example might also have a footnote where
> > this commit changes behavior. If I remove the footnote, compilation
> > succeeds. I did not do a bisect on that document but it feels like a
> > similar issue.  
> 
> Does anyone know what the core issue is? Here is the LaTeX code causing
> the problem after this commit:
> 
> \thanks{{\normalsize Traduction française Jean-Pierre
> Chrétien, }{\normalsize\texttt{}}}{\normalsize}, 
> novembre
> 2009.}}}
> 
> Do we need to adapt lyx2lyx perhaps? Or is this a LyX LaTeX export
> issue?
> 
> Scott

This compiles also if changing the font inside the footnote (Teletype->default)

Kornel


pgp6EgfWHUMRv.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Display of left-indented long-table in a branch

2021-06-10 Thread Kornel Benko
Am Thu, 10 Jun 2021 07:59:59 +0200
schrieb Kornel Benko :

> I have an old lyx-file which has a long-table in a branch. See MWE.
> 
> I added a second long-table, but am unable to create an equivalent to the 
> first table.
> 
> The display of the first branch is wrong.
> 
> How can I set/reset the indentation?
> 
>   Kornel

I tried to bisect ...
the first commit showing the behaviour is:

8e7d0c2002bdc69c95f3a43f7c78d13fe47ce5f3 is the first bad commit
commit 8e7d0c2002bdc69c95f3a43f7c78d13fe47ce5f3
Author: Jean-Marc Lasgouttes 
Date:   Fri Jan 27 16:09:03 2017 +0100

Fix flushing of row that was cut after an hyphen

When using Qt stuff in breakAt, it may happen that the row is broken
after an hyphen (whereas the old code would only consider spaces).

The fact that we abuse the Row::right_boundary() property to detect when
a row should be flushed broke justification when a row is cut at an
hyphen.

Fix this by introducing a new Row::flushed() property and set it as needed.

:04 04 8b92984f25ebe7b687292bd2d610931e06ca2738
ca6b189e5c150515d8d0243f32f0665aa3053405 M  src

Kornel


pgp0V3dJzDKbB.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Display of left-indented long-table in a branch

2021-06-10 Thread Kornel Benko
I have an old lyx-file which has a long-table in a branch. See MWE.

I added a second long-table, but am unable to create an equivalent to the first 
table.

The display of the first branch is wrong.

How can I set/reset the indentation?

Kornel


Branch.lyx
Description: application/lyx


pgpSbZcKXvy_j.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Qt6 sets UNICODE on Windows

2021-06-07 Thread Kornel Benko
Am Mon, 7 Jun 2021 20:03:47 +0200
schrieb Yu Jin :

> Am Mo., 31. Mai 2021 um 16:42 Uhr schrieb Pavel Sanda :
> 
> > On Sat, May 29, 2021 at 06:47:05PM +0200, Yu Jin wrote:
> > > > But I also think that the "universal" function calls (CreateNamedPipe()
> > > > and WaitNamedPipe()) should be made specific (CreateNamedPipeA() and
> > > > WaitNamedPipeA()), because the arguments are also specific (c_str()
> > always
> > > > returns const char*). I have attached the patch showing it, the patch
> > alone
> > > > fixes the compilation with unicode definition (can I commit it?). Once
> > Qt
> > > > 6.1.1 releases though, I will create a patch to disable unicode in
> > CMake
> > > > again.
> > > >
> > > Forgot the patch.
> >
> > It's inside _WIN32 section, thus safe for other archs. So I'd say go on
> > and commit. :)
> >
> 
> Thanks, Qt 6.1.1 released today, as mentioned I have prepared the patch for
> CMake, please review. I have tested successfully with both Qt6 and Qt5. On
> Qt5 it does nothing, because the property did not exist back then I guess.
> Note: With this version Qt6 sets UNICODE for basically everything now, so
> also libraries and console applications, so the patch deactivates it for
> all main targets.

Compiles fine on Linux with Qt5. Cannot test Qt6.

Kornel


pgpFQ6OS32Hf6.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Typo in lib/examples/Modules/Noweb.lyx

2021-06-02 Thread Kornel Benko
The section 3 Data Structures uses the ERT which ends with
"int err_line;@"
The '@' should be on own line at start, otherwise it is not recognized
as end of inset (in output).

Kornel


pgpuhwiggYqJD.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-30 Thread Kornel Benko
Am Sun, 30 May 2021 13:21:18 -0400
schrieb Scott Kostyshak :

> On Sun, May 30, 2021 at 09:12:35AM +0200, Kornel Benko wrote:
> > Am Sun, 30 May 2021 08:56:17 +0200
> > schrieb Kornel Benko :
> >   
> > > > I took a look at sub getConverter($$) but I'm not sure my Perl skills
> > > > are good enough to create a non-hackish patch. Kornel, are you
> > > > interested?
> > > > 
> > > > Scott
> > > 
> > > I will have a look.
> > >   
> > 
> > and here the patch.  
> 
> Tested and works great. Thank you! Please commit.
> 
> Scott

Committed at bc01f509.

Kornel


pgpWsOxLxPkim.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-30 Thread Kornel Benko
Am Sun, 30 May 2021 08:56:17 +0200
schrieb Kornel Benko :

> > I took a look at sub getConverter($$) but I'm not sure my Perl skills
> > are good enough to create a non-hackish patch. Kornel, are you
> > interested?
> > 
> > Scott  
> 
> I will have a look.
> 

and here the patch.

Kornel

diff --git a/lib/scripts/prefTest.pm b/lib/scripts/prefTest.pm
index e98ac4ad2f..8e25b7986b 100644
--- a/lib/scripts/prefTest.pm
+++ b/lib/scripts/prefTest.pm
@@ -85,21 +85,28 @@ sub getConverter($$)
 {
   my ($l, $add) = @_;
   chomp($l);
   my ($from, $to, $cmd, $par);
   ($l, $from) = getNext($l);
-  return undef if ($from !~ /(tex|dvi)$/);
+  return undef if ($from !~ /(ps|tex|dvi)$/);
   ($l, $to) = getNext($l);
   return undef if ($to !~ /^((dvi3?|pdf[23456]?)(log)?)$/);
-  my ($checkfor, $substitute);
+  my ($checkfor, $substitute, $extrapar);
   if ($from =~ /tex/) {
 $checkfor = qr/\s+\-shell\-(escape|restricted)/;
 $substitute = "-shell-escape";
+$extrapar = qr/^latex/;
+  }
+  elsif ($from =~ /ps$/) {
+$checkfor = qr/\s+\-dALLOWPSTRANSPARENCY/;
+$substitute = "-dALLOWPSTRANSPARENCY";
+$extrapar = qr/hyperref-driver=dvips/;
   }
   else {
 $checkfor = qr/\s+-i\s+dvipdfmx-unsafe.cfg/;
 $substitute = "-i dvipdfmx-unsafe.cfg";
+$extrapar = qr/^hyperref-driver=dvipdfm/;
   }
   ($l, $cmd) = getNext($l);
   if ($add) {
 if ($cmd !~ $checkfor) {
   if ($cmd =~ /^(\S+)\s*(.*)$/) {
@@ -110,11 +117,11 @@ sub getConverter($$)
   }
   else {
 $cmd =~ s/$checkfor//;
   }
   ($l, $par) = getNext($l);
-  return undef if ($par !~ /^(latex|hyperref-driver=dvipdfm)/);
+  return undef if ($par !~ $extrapar);
   my $key = "\"$from\" \"$to\"";
   if ($add) {
 return([$key, [$cmd, $par]]);
   }
   else {


pgpkybCsF_b0n.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-30 Thread Kornel Benko
Am Sat, 29 May 2021 13:45:24 -0400
schrieb Scott Kostyshak :

> On Sun, May 23, 2021 at 10:24:15AM +0200, Kornel Benko wrote:
> > Am Sat, 22 May 2021 21:43:18 -0400
> > schrieb Scott Kostyshak :
> >   
> > > On Sat, May 22, 2021 at 05:26:10PM +0200, Kornel Benko wrote:  
> > > > Am Sat, 22 May 2021 16:51:43 +0200
> > > > schrieb Jürgen Spitzmüller :
> > > > 
> > > > > Am Samstag, dem 22.05.2021 um 16:33 +0200 schrieb Kornel Benko:
> > > > > > Fine. But how to explain that running with 2020-dvipdfmx compiles on
> > > > > > TL20, but the same dvipdfmx (copied from TL20) fails if using TL20 
> > > > > > env.  
> > > > > 
> > > > > Stricter security measures have been introduced with TL 21 [1].
> > > > > 
> > > > > The produced DVI is fine, but dvipdfmx does not produce a PDF due to
> > > > > access restrictions (when attempting to access fonts).
> > > > > 
> > > > > When processing the DVI with
> > > > > 
> > > > > dvipdfmx -i dvipdfmx-unsafe.cfg
> > > > > 
> > > > > it works, i.e., after changing the converter DVI > PDF (dvipdfm) to
> > > > > dvipdfmx -i dvipdfmx-unsafe.cfg -o $$o $$i
> > > > > 
> > > > > dvipdfmx-unsafe.cfg makes dvipdfmx call gs (rungs) with -dNOSAFER
> > > > > rather than with -DSAFER (as in the default dvipdfmx.cfg of TL21).
> > > > 
> > > > Thanks.
> > > > 
> > > > > However, this change should definitely only be applied to trustworthy
> > > > > files, so changing the converter generally is certainly not such a 
> > > > > good
> > > > > idea.
> > > > > 
> > > > > Jürgen
> > > > > 
> > > > > [1] The explicit call of -DSAFER has been introduced for TL 21:
> > > > > https://tug.org/pipermail/tex-live-commits/2021-March/017216.html
> > > > > 
> > > > 
> > > > That means that we could use this setting for our tests.
> > > 
> > > Thanks for following up on this, Kornel. I think I stopped looking into
> > > this issue because I thought it was due to a known bug with a fix in
> > > progress.
> > > 
> > > Scott  
> > 
> > Committed change to prefTest.pm to add "-i dvipdfmx-unsafe.cfg" as
> > parameter for dvipdfmx in our test environment.
> > 
> > To use:
> > $ cd 
> > $ ./prefTest.pl test  
> 
> I think there is a related issue: Some exports that use ps2pdf now seem
> to need the flag "-dALLOWPSTRANSPARENCY" on TL21. Adding the following
> line to my preferences file fixes some tests:
> 
> \converter "ps" "pdf" "ps2pdf -dALLOWPSTRANSPARENCY $$i $$o" 
> "hyperref-driver=dvips
> 
> I believe that this fixes the failures in the following tests:
> 
> export/examples/Presentations/Powerdot_lyx22 (Failed)
> export/examples/Presentations/Powerdot_lyx23 (Failed)
> DEFAULTOUTPUT_export/examples/Presentations/Powerdot_pdf (Failed)
> export/examples/Articles/Chess/Game_2_lyx22 (Failed)
> export/examples/Articles/Chess/Game_2_lyx23 (Failed)
> DEFAULTOUTPUT_export/examples/Articles/Chess/Game_2_pdf (Failed)
> export/examples/Graphics_and_Insets/Instant_Preview_lyx22 (Failed)
> export/examples/Graphics_and_Insets/Instant_Preview_lyx23 (Failed)
> DEFAULTOUTPUT_export/examples/Graphics_and_Insets/Instant_Preview_pdf (Failed)
> 
> Interestingly, the flag fixes the English Powerdot tests but not the
> French ones. I think the failures in the French document might be
> additionally related to 441c6a93. I've started some discussion on that
> commit.
> 
> I took a look at sub getConverter($$) but I'm not sure my Perl skills
> are good enough to create a non-hackish patch. Kornel, are you
> interested?
> 
> Scott

I will have a look.

Kornel


pgpi48CtLL0f2.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Qt6 sets UNICODE on Windows

2021-05-29 Thread Kornel Benko
Am Sat, 29 May 2021 09:56:06 +0200
schrieb Yu Jin :

> this is connected to the Beta 1 tarballs, trying to build LyX I stumbled
> across this:
> [image: grafik.png]
> Apparently Qt6 sets UNICODE and _UNICODE on LyX (and only on LyX) when
> configuring without LYX_CONSOLE. It does that by setting the character set
> to Unicode (as shown in the screenshot above) and it also sets the
> "UNICODE" and "_UNICODE" preprocessor definitions manually. Qt5 does not do
> that. I have just tried to manually change the character set and remove
> those definitions in Visual Studio and it worked just fine. Any Idea if
> this is intended by us or how we can prevent it? Maybe in CMake?

The only setting for UNICODE i see is in
development/Win32/vld/cmake/CMakeLists.txt
This is used, if LYX_VLD is set. But this should be OFF on default.

Kornel


pgp6MRTxFLgjj.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Qt 6 errors on Windows

2021-05-24 Thread Kornel Benko
Am Mon, 24 May 2021 18:19:47 +0200
schrieb Yu Jin :

> Am Mo., 24. Mai 2021 um 15:19 Uhr schrieb Kornel Benko :
> 
> > Am Mon, 24 May 2021 09:50:27 +0200
> > schrieb Yu Jin :
> > > I found what causes this, it is the /Zc compile option. With Qt5 it is
> > set
> > > to wchar_t and with Qt6 to wchar_t- in all targets, which causes
> > troubles.
> > > I have changed it in Visual Studio on a test basis and successfully
> > > compiled LyX, but I guess it would need to be changed in CMake code.
> > > Kornel, can you help me out here?
> >
> > This is set at ./CMakeLists.txt:1112
> > Try to change
> > if (NOT Qt5Core_FOUND)
> > to
> > if (NOT (Qt5Core_FOUND OR Qt6Core_FOUND))
> >
> 
> Yes, that worked, should I commit?

Yes please.

Kornel


pgphJY50PxiJN.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Qt 6 errors on Windows

2021-05-24 Thread Kornel Benko
Am Mon, 24 May 2021 09:50:27 +0200
schrieb Yu Jin :

> Am So., 23. Mai 2021 um 09:52 Uhr schrieb Yu Jin :
> 
> > I still can't compile with Qt 6, I just tried again with the recently
> > released Qt 6.1 but I get a lot of these errors:
> >
> > Severity Code Description Project File Line Suppression State
> > Error C2535 'QChar::QChar(ushort) noexcept': member function already
> > defined or declared support (applications\LyX\support)
> > C:\Qt\6.1.0\msvc2019_64\include\QtCore\qchar.h 120
> >
> > Severity Code Description Project File Line Suppression State
> > Error C2572 'qHash': redefinition of default argument: parameter 1 support
> > (applications\LyX\support)
> > C:\Qt\6.1.0\msvc2019_64\include\QtCore\qhashfunctions.h 143
> >
> > Severity Code Description Project File Line Suppression State
> > Error C3615 constexpr function 'qHash' cannot result in a constant
> > expression support (applications\LyX\support)
> > C:\Qt\6.1.0\msvc2019_64\include\QtCore\qhashfunctions.h 143
> >
> > Severity Code Description Project File Line Suppression State
> > Error C2084 function 'size_t qHash(ushort,size_t) noexcept' already has a
> > body support (applications\LyX\support)
> > C:\Qt\6.1.0\msvc2019_64\include\QtCore\qhashfunctions.h 143
> >
> > It looks like these are Qt bugs, but I wanted to ask first before going to
> > Qt and making bug reports... maybe I am missing something. What do you
> > think?
> >
> 
> I found what causes this, it is the /Zc compile option. With Qt5 it is set
> to wchar_t and with Qt6 to wchar_t- in all targets, which causes troubles.
> I have changed it in Visual Studio on a test basis and successfully
> compiled LyX, but I guess it would need to be changed in CMake code.
> Kornel, can you help me out here?

This is set at ./CMakeLists.txt:1112
Try to change
if (NOT Qt5Core_FOUND)
to
if (NOT (Qt5Core_FOUND OR Qt6Core_FOUND))

Kornel


pgpG4GVSvFm2h.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-23 Thread Kornel Benko
Am Sat, 22 May 2021 21:43:18 -0400
schrieb Scott Kostyshak :

> On Sat, May 22, 2021 at 05:26:10PM +0200, Kornel Benko wrote:
> > Am Sat, 22 May 2021 16:51:43 +0200
> > schrieb Jürgen Spitzmüller :
> >   
> > > Am Samstag, dem 22.05.2021 um 16:33 +0200 schrieb Kornel Benko:  
> > > > Fine. But how to explain that running with 2020-dvipdfmx compiles on
> > > > TL20, but the same dvipdfmx (copied from TL20) fails if using TL20 env. 
> > > >
> > > 
> > > Stricter security measures have been introduced with TL 21 [1].
> > > 
> > > The produced DVI is fine, but dvipdfmx does not produce a PDF due to
> > > access restrictions (when attempting to access fonts).
> > > 
> > > When processing the DVI with
> > > 
> > > dvipdfmx -i dvipdfmx-unsafe.cfg
> > > 
> > > it works, i.e., after changing the converter DVI > PDF (dvipdfm) to
> > > dvipdfmx -i dvipdfmx-unsafe.cfg -o $$o $$i
> > > 
> > > dvipdfmx-unsafe.cfg makes dvipdfmx call gs (rungs) with -dNOSAFER
> > > rather than with -DSAFER (as in the default dvipdfmx.cfg of TL21).  
> > 
> > Thanks.
> >   
> > > However, this change should definitely only be applied to trustworthy
> > > files, so changing the converter generally is certainly not such a good
> > > idea.
> > > 
> > > Jürgen
> > > 
> > > [1] The explicit call of -DSAFER has been introduced for TL 21:
> > > https://tug.org/pipermail/tex-live-commits/2021-March/017216.html
> > >   
> > 
> > That means that we could use this setting for our tests.  
> 
> Thanks for following up on this, Kornel. I think I stopped looking into
> this issue because I thought it was due to a known bug with a fix in
> progress.
> 
> Scott

Committed change to prefTest.pm to add "-i dvipdfmx-unsafe.cfg" as
parameter for dvipdfmx in our test environment.

To use:
$ cd 
$ ./prefTest.pl test


Kornel

Kornel


pgpPABJCKipk6.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-22 Thread Kornel Benko
Am Sat, 22 May 2021 16:51:43 +0200
schrieb Jürgen Spitzmüller :

> Am Samstag, dem 22.05.2021 um 16:33 +0200 schrieb Kornel Benko:
> > Fine. But how to explain that running with 2020-dvipdfmx compiles on
> > TL20, but the same dvipdfmx (copied from TL20) fails if using TL20 env.  
> 
> Stricter security measures have been introduced with TL 21 [1].
> 
> The produced DVI is fine, but dvipdfmx does not produce a PDF due to
> access restrictions (when attempting to access fonts).
> 
> When processing the DVI with
> 
> dvipdfmx -i dvipdfmx-unsafe.cfg
> 
> it works, i.e., after changing the converter DVI > PDF (dvipdfm) to
> dvipdfmx -i dvipdfmx-unsafe.cfg -o $$o $$i
> 
> dvipdfmx-unsafe.cfg makes dvipdfmx call gs (rungs) with -dNOSAFER
> rather than with -DSAFER (as in the default dvipdfmx.cfg of TL21).

Thanks.

> However, this change should definitely only be applied to trustworthy
> files, so changing the converter generally is certainly not such a good
> idea.
> 
> Jürgen
> 
> [1] The explicit call of -DSAFER has been introduced for TL 21:
> https://tug.org/pipermail/tex-live-commits/2021-March/017216.html
> 

That means that we could use this setting for our tests.

Kornel


pgpLdyvHWpIat.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-22 Thread Kornel Benko
Am Sat, 22 May 2021 16:07:17 +0200
schrieb Jürgen Spitzmüller :

> Am Samstag, dem 22.05.2021 um 15:13 +0200 schrieb Kornel Benko:
> > > what is the behavior on the released TexLive 2021?  
> > 
> > Still same. Does not compile due to error from dvipdfmx.  
> 
> The issue I have linked to has been fixed, so this must be something
> else and should be reported to the dvipdfmx list.
> 
> Jürgen
> 

Fine. But how to explain that running with 2020-dvipdfmx compiles on TL20,
but the same dvipdfmx (copied from TL20) fails if using TL20 env.

From the POV of dvipdfmx devels, the input-data changed somehow.
That makes it not unlikely that also platex creates wrong output.

Kornel


pgpsU2DnLMOQX.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-22 Thread Kornel Benko
Am Sat, 22 May 2021 16:06:26 +0200
schrieb Jürgen Spitzmüller :

> Am Samstag, dem 22.05.2021 um 14:37 +0200 schrieb Kornel Benko:
> > Is there any reason why we have to compile with platex?  
> 
> Who is "we"?

Peoples running the tests?

> > Selecting non-text fonts, the compilation succeeds (with lualatex and
> > also with xetex).  
> 
> Fine, but I suppose some people still prefer to use platex. So even if
> we change the example file, the bug is there.
> 
> Jürgen

Kornel



pgpdvZ4ilzMkn.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-22 Thread Kornel Benko
Am Sat, 22 May 2021 14:56:58 +0200
schrieb Dr Eberhard W Lisse :

> And,
> 
> what is the behavior on the released TexLive 2021?

Still same. Does not compile due to error from dvipdfmx.

> el
> 
> On 2021-05-22 14:37 , Kornel Benko wrote:
> > Am Tue, 23 Mar 2021 10:50:16 -0400
> > schrieb Scott Kostyshak :
> >   
> >> On Mon, Mar 22, 2021 at 11:52:49AM +0100, Jürgen Spitzmüller wrote:  
> >>> Am Montag, dem 22.03.2021 um 10:51 +0100 schrieb Kornel Benko:  
> >>>> Same here. Error in running
> >>>>  dvipdfmx -o ...  
> >>>
> >>> Maybe https://tug.org/pipermail/tex-live/2021-March/046609.html  
> >>
> >> Thanks for confirming Kornel, and for the relevant link Jürgen.
> >>
> >> Scott  
> > 
> > Is there any reason why we have to compile with platex?
> > Selecting non-text fonts, the compilation succeeds (with lualatex and also 
> > with
> > xetex).
> > 

Kornel


pgpU8BW0L3yT_.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-05-22 Thread Kornel Benko
Am Tue, 23 Mar 2021 10:50:16 -0400
schrieb Scott Kostyshak :

> On Mon, Mar 22, 2021 at 11:52:49AM +0100, Jürgen Spitzmüller wrote:
> > Am Montag, dem 22.03.2021 um 10:51 +0100 schrieb Kornel Benko:  
> > > Same here. Error in running
> > >   dvipdfmx -o ...  
> > 
> > Maybe https://tug.org/pipermail/tex-live/2021-March/046609.html  
> 
> Thanks for confirming Kornel, and for the relevant link Jürgen.
> 
> Scott

Is there any reason why we have to compile with platex?
Selecting non-text fonts, the compilation succeeds (with lualatex and also with 
xetex).

Kornel


pgpDqOc72C4gF.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: German Translation of LyX User Guide

2021-05-18 Thread Kornel Benko
Am Tue, 18 May 2021 17:04:26 +0200
schrieb Jürgen Spitzmüller :

> Am Dienstag, dem 18.05.2021 um 16:46 +0200 schrieb Kornel Benko:
> > I have problem to identify where the relevant translatable strings
> > are to be found.
> > (For instance I am unable to see "Umschalt+F3" in the de.po-file)  
> 
> This translation comes from Qt (via KeySequence::ForGui). Note though
> that it's only the Shift key, not the whole sequence, that is
> translated.
> 
> Jürgen
> 

OK, so adding "Shift", "Ctrl", "Alt" somewhere in *.cpp should cure it?
I remember, we had some strings not covered by Qt added in source, but don't 
remember
where.

Kornel


pgpu5mXiMiI3y.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: German Translation of LyX User Guide

2021-05-18 Thread Kornel Benko
Am Tue, 18 May 2021 13:59:29 +0200
schrieb Jürgen Spitzmüller :

> Am Dienstag, dem 18.05.2021 um 13:51 +0200 schrieb Jürgen Spitzmüller:
> > Yes, I've seen that. Only for some though. "Umschalt+F3" for instance
> > is in German.
> > 
> > There could be some rationale behind it. Need to investigate that, no
> > time ATM though.  
> 
> Here's the answer (InsetInfo::info):
> 
> docstring const res = translateIfPossible(err, lang->code());
> bool const translated = res != err;
> // If the string is not translated, we use default lang (English)
> Font const f = translated ? Font(inherit_font, lang) :
> Font(inherit_font);

I have problem to identify where the relevant translatable strings are to be 
found.
(For instance I am unable to see "Umschalt+F3" in the de.po-file)

> We could be a bit more precise here, but the decision itself makes
> sense (think of different scripts).

What would be the difference if the string would not be marked as 'English'?

> Jürgen

Kornel





pgpm_88_oRk66.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: German Translation of LyX User Guide

2021-05-18 Thread Kornel Benko
Am Tue, 18 May 2021 08:52:03 +0200
schrieb Jürgen Spitzmüller :

> Am Freitag, dem 14.05.2021 um 19:00 +0200 schrieb Christoph Schmitz:
> > Attached is an updated German translation of the LyX User Guide.  
> 
> Thanks. Looks good in general. I have corrected some things and
> committed:
> 
> * Paths to images need to be relative, not absolute
> * Some German text was still marked English
> * Very few wording changes

Explicit search for English text shows also

'Letzte Einstellungen anwenden'
and
'displaymath mathlines'   (here only the space is English)

Interestingly the info-inserts for shortcuts are also marked English even with
non-English UI.
For instance
'Die Verwendung von [Alt+M N]'

> > I have not yet understood how to make my update public for review.
> > Can somebody tell me what to do or where I find more information. The
> > LyX translation website does not answer this question.  
> 
> I think positing it here is the best way.
> 
> Best
> Jürgen
> 

Kornel



pgpHjuJ18V6zU.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Clipboard

2021-05-04 Thread Kornel Benko
Am Tue, 4 May 2021 14:14:47 +0200
schrieb Jean-Pierre Chrétien :

> Le 14/04/2021 à 18:49, Scott Kostyshak a écrit :
> 
> > 
> > In that case, it could be that the fix referenced above actually made
> > things worse for you. You could try to revert the commit 7a158055 on the
> > 2.3.x branch and see if that makes the terminal message go away for you.
> > If you do that, please let me know if it helps things because that means
> > we should fix something.  
> 
> Hello SCott
> 
> In fact, I get the message also with master while working on the French docs:
> .
> frontends/qt/GuiClipboard.cpp (92): No timely response from clipboard, 
> perhaps 
> process holding clipboard is frozen?
> 
> What is the commit to revert on master ?
> 

commit 7a158055fe6c05763f88ddb61a9c02b42614091d
Author: Scott Kostyshak 
Date:   Fri Mar 27 21:23:08 2020 -0400
...
(cherry picked from commit af4ee1a487c4d899b71df02ba57c2f024fea6786)
(cherry picked from commit 23abb5aaa36af07aadfa5e565869104778ba0d6d)

Got this by 'git show 7a158055'.

Kornel


pgp0mqT73nmt3.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Slow responding to mouse clicks in included child document

2021-04-09 Thread Kornel Benko
Am Fri, 9 Apr 2021 18:20:36 +0200
schrieb Jean-Marc Lasgouttes :

> Le 09/04/2021 à 16:24, Kornel Benko a écrit :
> > I meant the same. Waiting more than 3 seconds.  
> 
> Should be fixed now. A very stupid thinko.
> 
> JMarc
> 

Confirmed. Perfect!

Kornel


pgpHT_29Y67HW.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Slow responding to mouse clicks in included child document

2021-04-09 Thread Kornel Benko
Am Fri, 9 Apr 2021 14:52:07 +0200
schrieb Jean-Marc Lasgouttes :

> Le 09/04/2021 à 13:02, Kornel Benko a écrit :
> > Am Fri, 9 Apr 2021 12:03:18 +0200
> > schrieb Jean-Marc Lasgouttes :  
> >> Thanks Kornel for doing the bisect. I did not anticipate this at all. I
> >> will take a look and hope this is easily fixable.
> >>
> >> JMarc
> >>  
> > 
> > Yes, sometimes the effects are hard to foresee ...  
> 
> I am trying to reproduce and all I see (which is already a bug) is 
> slugish selection with mouse.
> 
> What do you mean by "wait, wait, wait"?
> 
> JMarc

I meant the same. Waiting more than 3 seconds.

Kornel


pgpTOwM_7Embz.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Slow responding to mouse clicks in included child document

2021-04-09 Thread Kornel Benko
Am Fri, 9 Apr 2021 12:03:18 +0200
schrieb Jean-Marc Lasgouttes :

> Le 09/04/2021 à 11:28, Kornel Benko a écrit :
> > Am Thu, 8 Apr 2021 18:33:47 +0200
> > schrieb Kornel Benko :
> >   
> >> Master:
> >>
> >> 1.) Open 'MergedManuals'
> >> 2.) Goto Intro.lyx
> >>   2a.) Edit included document
> >> 3.) Mouse click anywhere inside this documen
> >>3a.) wait, wait, ...
> >>
> >>
> >> No such problems with lyx2.3.
> >>
> >>Kornel  
> > 
> > Bisect lead to
> > 
> > f3a0e8ff9a9b914d40eb520bb31674d1ad4eb0d0 is the first bad commit
> > commit f3a0e8ff9a9b914d40eb520bb31674d1ad4eb0d0
> > Author: Jean-Marc Lasgouttes 
> > Date:   Thu Jan 28 10:10:18 2021 +0100
> > 
> >  Run updateBuffer when adding/merging changes  
> 
> Thanks Kornel for doing the bisect. I did not anticipate this at all. I 
> will take a look and hope this is easily fixable.
> 
> JMarc
> 

Yes, sometimes the effects are hard to foresee ...
:)

Kornel


pgp_d6j8kzZtM.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Slow responding to mouse clicks in included child document

2021-04-09 Thread Kornel Benko
Am Thu, 8 Apr 2021 18:33:47 +0200
schrieb Kornel Benko :

> Master:
> 
> 1.) Open 'MergedManuals'
> 2.) Goto Intro.lyx
>  2a.) Edit included document
> 3.) Mouse click anywhere inside this documen
>   3a.) wait, wait, ...
> 
> 
> No such problems with lyx2.3.
> 
>   Kornel

Bisect lead to

f3a0e8ff9a9b914d40eb520bb31674d1ad4eb0d0 is the first bad commit
commit f3a0e8ff9a9b914d40eb520bb31674d1ad4eb0d0
Author: Jean-Marc Lasgouttes 
Date:   Thu Jan 28 10:10:18 2021 +0100

Run updateBuffer when adding/merging changes

Following 4a4ded22, the enabling of some change-related functions is
handled in updateBuffer. However, this method is not ran at every
document change for performance reasons.

This patch adds code to every place that modifies
Paragraph::Private::changes_ that checks whether the `changedness' of
the paragraph, err... changes.

To this end, a new helper struct is introduced that remembers
paragraph state at contruction time, and compares it to new state in
the destructor.

New forceUpdate/needUpdate methods are added to Buffer class, since
the cursor is in general not available in the places where these
changes are made.

Fixes bug #12074.

:04 04 51604870808f821addf92eeed8ac5bfbd1843c84
72930f724d365abc33c2563aad847730dc0d03bf M  src

Kornel


pgpA2Wmgp00bL.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Slow responding to mouse clicks in included child document

2021-04-08 Thread Kornel Benko

Master:

1.) Open 'MergedManuals'
2.) Goto Intro.lyx
 2a.) Edit included document
3.) Mouse click anywhere inside this documen
  3a.) wait, wait, ...


No such problems with lyx2.3.

Kornel


pgpbpSIw0T4n9.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: How to not convert layout when pasting?

2021-04-08 Thread Kornel Benko
Am Thu, 8 Apr 2021 12:01:29 -0400
schrieb Scott Kostyshak :

> Sometimes I want to copy something from an itemize environment and paste it 
> into a new
> enumerate item. If I start a new enumerate item and just paste, LyX converts 
> the layout
> to itemize. My workaround is to type "a" and then paste. This way, the 
> enumerate is
> preserved. Then I delete the "a". I forget why I developed this habit rather 
> than just
> pasting, let LyX convert to itemize, then simply convert back to enumerate. 
> Perhaps the
> nesting was not fixed when I do this instead? In any case, that's not ideal 
> either.
> 
> Do others often run into a similar situation? Is there a ticket with ideas 
> for how to
> improve this? I think I remember racoon opened a ticket but I can't find it.
> 
> What is the ideal functionality for you? Perhaps we can collect a few 
> specific use
> cases?
> 
> Use case A:
> I copy itemize and paste it into a new enumerate item. I want the enumerate 
> to be
> preserved.
> 
> Use case B:
> I copy itemize and paste it into a new enumerate item. I want itemize.
> 
> Ideally, we would allow for the user to achieve both use case A and B without 
> needing
> to explicitly convert the layout. What if "Paste Special > Plain Text" (Ctrl 
> + Shift +
> V) pasted the text without converting the layout? I don't understand why 
> that's
> currently not the case. If I remember correctly, when the clipboard item is a 
> LyX item,
> Ctrl + Shift + V currently functions the same as Ctrl + V, but I'm not sure 
> about that.
> 
> If for some reason Ctrl + Shift + V is not the way to go, I suppose an 
> alternative is
> for the user to signal their intent (between use case A and use case B) when 
> *copying*.
> i.e., if the user does "Ctrl + Shift + C", this could mean "copy without 
> layout". Then,
> the host layout dominates. I don't think I like this as much as an alternate 
> paste but
> perhaps I could get used to this.
> 
> Scott

Maybe 2 different paste buttons?
one with 'preserve source layout'
the second with 'preserve destination layout'

Or 'middle mouse click' vs. 'Shift middle mouse click '

Kornel


pgpfsr2UXmY3D.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Check for the -Wno-deprecacted-copy compiler option in cmake build

2021-04-05 Thread Kornel Benko
Am Sun, 4 Apr 2021 20:18:27 +0200
schrieb pdv :

> On 03/04/2021 19:50, Kornel Benko wrote:
> > Am Sat, 3 Apr 2021 18:13:17 +0200
> > schrieb pdv :
> >   
> >> The Apple Clang compiler does not recognize the -Wno-deprecated-copy
> >> compiler option. See thread "Re: warning: unknown warning option
> >> '-Wno-deprecated-copy'" (8/10/2020) in this list.
> >>
> >> This was solved for the autotools build with commit 4aee447af1 
> >> (13/10/2020).
> >>
> >> I've implemented a similar check for the cmake build.
> >>
> >> As is stands the patch unsets the test-variable from the cache and the
> >> test is performed for each cmake-run.
> >> I don't know what's the preferred policy and one should remove that line
> >> to use the cached result instead.
> >>
> >> P. De Visschere  
> > 
> > Why was
> > +   unset(CHECK_WNODEPRECATEDCOPY_FLAG CACHE)
> > necessary?
> > 
> > Kornel
> > 
> >   
> I inserted it just to be able to check that it worked; the test is logged:
> 
>   Performing Test CHECK_WNODEPRECATEDCOPY_FLAG
>   Performing Test CHECK_WNODEPRECATEDCOPY_FLAG - Failed
> 
> Otherwise after running cmake once the check is never run again, until 
> one throws away the cmakecache.txt, which I try to avoid.
> 
> I suppose that after time this check will be forgotten and if the issue 
> is solved (by an upgrade of the Apple clang compiler) this will pass 
> unnoticed.
> 
> Probably the check takes little time and I thought it might be safer to 
> do it each time again.
> 
> 
> P. De Visschere
> 

OK, Patrick. Committed at fa704d50.

Kornel


pgpd88KDk01Ie.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Check for the -Wno-deprecacted-copy compiler option in cmake build

2021-04-03 Thread Kornel Benko
Am Sat, 3 Apr 2021 18:13:17 +0200
schrieb pdv :

> The Apple Clang compiler does not recognize the -Wno-deprecated-copy 
> compiler option. See thread "Re: warning: unknown warning option 
> '-Wno-deprecated-copy'" (8/10/2020) in this list.
> 
> This was solved for the autotools build with commit 4aee447af1 (13/10/2020).
> 
> I've implemented a similar check for the cmake build.
> 
> As is stands the patch unsets the test-variable from the cache and the 
> test is performed for each cmake-run.
> I don't know what's the preferred policy and one should remove that line 
> to use the cached result instead.
> 
> P. De Visschere

Why was
+   unset(CHECK_WNODEPRECATEDCOPY_FLAG CACHE)
necessary?

Kornel


pgpzBQy09p8tR.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-26 Thread Kornel Benko
Am Fri, 26 Mar 2021 12:00:32 +0100
schrieb pdv :

> > OK, I will ignore Qt6MacExtras for Qt6. (commit 9b03680a)
> >   
> >> Configuring incomplete, errors occurred!
> >> See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeOutput.log".
> >> See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeError.log".
> >>
> >> Chris
> >>
> >>  
> > Kornel
> > 
> >   
> 
> I also must exclude the QMacPasteboardMimeGraphics class in 
> GuiApplication.cpp since QMacPasteboard is not available anymore with qt6.
> 
> and add an #include  in support/Package.cpp (I suppose 
> this will pose no problem for qt5 but have not checked it, it's only 
> needed with USE_MACOSX_PACKAGING)
> 
> (patch included)
> 
> P. De Visschere

OK, committed at a9b0f5fa.

Kornel



pgpmdxwn4F52Y.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread Kornel Benko
Am Thu, 25 Mar 2021 14:50:20 +0100
schrieb Christoph Schmitz :

> One library is obviously not installed by Homebrew: Qt6MacExtrasConfig. I 
> searched for
> the two files manually, but without success.
> 
> -- CMake error message:
> 
> TOP_SRC_DIR = /Users/chris/Git/LyX
> 
> Building out-of-source
> Selecting build type defaults from configure.ac
> 
> CXX11_FLAG_DETECTED = "--std=c++17 -Wno-deprecated-register"
> Compiler supports std_regex
> Using clang
> CMake Error at CMakeLists.txt:793 (find_package):
> Could not find a package configuration file provided by "Qt6MacExtras" with
> any of the following names:
> 
> Qt6MacExtrasConfig.cmake
> qt6macextras-config.cmake
> 
> Add the installation prefix of "Qt6MacExtras" to CMAKE_PREFIX_PATH or set
> "Qt6MacExtras_DIR" to a directory containing one of the above files. If
> "Qt6MacExtras" provides a separate development package or SDK, be sure it
> has been installed.

OK, I will ignore Qt6MacExtras for Qt6. (commit 9b03680a)

> Configuring incomplete, errors occurred!
> See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeOutput.log".
> See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeError.log".
> 
> Chris
> 
> 
Kornel


pgp7UxM6Gagbs.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread Kornel Benko
Am Thu, 25 Mar 2021 12:38:22 +0100
schrieb Christoph Schmitz :

> Yes, I tried a clean build several times. And I tried it now again:
> 
> - I deleted the local repository.
> - I cloned the repository.
> - I removed Qt5 (brew remove Qt5 && brew cleanup).
> 
> Attached is the complete build log.
> 
> Unfortunately I have no idea what to do with cmake. I started the cmake GUI 
> and clicked
> on "Configure". There are a few surprising parameters (see attached 
> screenshot):
> 
> LYX_USE_QT=QT4
> QT_MKSPECS_DIR=**Unknown**
> Qt5Core_DIR is present while Qt6Core_DIR is present as well.
> 
> Chris
> 

Try calling cmake with '-DLYX_USE_QT=QT6'
(or, in the GUI, select LYX_USE_QT to QT6)

Configure should fail if QT6 is not complete.

Kornel


pgp_GdyEN6iJL.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread Kornel Benko
Am Thu, 25 Mar 2021 11:27:02 +0100
schrieb Christoph Schmitz :

> I have tried to compile LyX with Qt6 on macOS. The compiler stops quickly 
> after a
> series of error messages. I attach a complete log file of my configure and 
> make run.
> 
> Compiling LyX with Qt5 works with charm (thanks to the help of Marcus 
> Mikulcak).
> 
> Chris
> 

1.) Have you tried a clean build? (Looks like you do not use moc6 but moc5)
2.) Are you able to use cmake to compile?

Kornel


pgp6KlrX6VxTy.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Anyone on TeX Live 2021 pretest ? (to confirm a regression for ja LilyPond)

2021-03-22 Thread Kornel Benko
Am Wed, 17 Mar 2021 22:44:24 -0400
schrieb Scott Kostyshak :

> The ctests for the Japanese LilyPond example file are failing on TeX
> Live 2021 pretest. Attached is a minimal example. It compiles for me on
> TeX Live 2020 but not TeX LIve 2021 pretest. Is anyone using the pretest
> and can confirm it fails for you?
> 
> Scott

Same here. Error in running
dvipdfmx -o ...

Kornel


pgpds096ZMoF1.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Compiling Qt6 with cmake

2021-03-22 Thread Kornel Benko

With the help from Scott, we have now cmake files for this task.
Since nothing changes for non-qt6 I am going to commit.
The most disturbing thing was the need for Core5Compat.

Attached the complete patch.

Kornel
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8ca0c10fd..12dd3947be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -217,11 +217,11 @@ else()
 unset(LYX_ENABLE_VALGRIND_TESTS CACHE)
   endif()
 endif()
 LYX_OPTION(ASAN "Use address sanitizer" OFF ALL)
 #LYX_COMBO(USE_FILEDIALOG"Use native or QT file dialog" QT NATIVE)
-LYX_COMBO(USE_QT"Use Qt version as frontend" AUTO QT4 QT5)
+LYX_COMBO(USE_QT"Use Qt version as frontend" AUTO QT4 QT5 QT6)
 LYX_COMBO(USE_IPO   "Interprocedural optimization" OFF AUTO ON)
 #LYX_OPTION(3RDPARTY_BUILD   "Build 3rdparty libs" OFF ALL)
 LYX_OPTION(DISABLE_CALLSTACK_PRINTING "do not print a callstack when crashing" OFF ALL)
 LYX_OPTION(EXTERNAL_Z   "OFF := Build 3rdparty lib zlib" ${DefaultExternalLibs} ALL)
 LYX_OPTION(EXTERNAL_DTL "OFF := Build 3rdparty commands dt2dv and dv2dt" ${DefaultExternalLibs} ALL)
@@ -741,36 +741,62 @@ if(LYX_XMINGW)
 	list(APPEND CMAKE_FIND_ROOT_PATH ${GNUWIN32_DIR})
 endif()
 
 set(min_qt5_version "5.6")
 if(LYX_USE_QT MATCHES "AUTO")
-	# try qt5 first
-	find_package(Qt5Core CONFIG QUIET)
-	if(Qt5Core_FOUND)
-		set(LYX_USE_QT "QT5" CACHE STRING "Valid qt version" FORCE)
+	# try qt6 first
+	find_package(Qt6Core CONFIG QUIET)
+	if (Qt6Core_Found)
+		set(LYX_USE_QT "QT6" CACHE STRING "Valid qt version" FORCE)
 		message(STATUS "Qt5Core_VERSION = ${Qt5Core_VERSION}")
-		if(Qt5Core_VERSION VERSION_LESS ${min_qt5_version})
-			find_package(Qt4 "4.5.0" QUIET)
-			if(QT4_FOUND)
-set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
-			endif()
-		endif()
 	else()
-		set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
+		find_package(Qt5Core CONFIG QUIET)
+		if(Qt5Core_FOUND)
+			set(LYX_USE_QT "QT5" CACHE STRING "Valid qt version" FORCE)
+			message(STATUS "Qt5Core_VERSION = ${Qt5Core_VERSION}")
+			if(Qt5Core_VERSION VERSION_LESS ${min_qt5_version})
+find_package(Qt4 "4.5.0" QUIET)
+if(QT4_FOUND)
+	set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
+endif()
+			endif()
+		else()
+			set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
+		endif()
 	endif()
 endif()
-if(LYX_USE_QT MATCHES "QT5")
+
+set(QtCore5CompatLibrary)
+set(QtCore5CompatModule)
+if(LYX_USE_QT MATCHES "QT6|QT5")
+	if (LYX_USE_QT MATCHES "QT6")
+		set(QtVal "Qt6")
+		macro (qt_add_resources)
+			Qt6_add_resources(${ARGN})
+		endmacro()
+		macro (qt_wrap_uifiles)
+			Qt6_wrap_ui(${ARGN})
+		endmacro()
+	else()
+		set(QtVal "Qt5")
+		macro (qt_add_resources)
+			Qt5_add_resources(${ARGN})
+		endmacro()
+		macro (qt_wrap_uifiles)
+			Qt5_wrap_ui(${ARGN})
+		endmacro()
+	endif()
 	# set QPA_XCB if QT uses X11
-	find_package(Qt5Core CONFIG REQUIRED)
-	if (Qt5Core_FOUND)
-		find_package(Qt5Widgets CONFIG REQUIRED)
+	find_package(${QtVal}Core CONFIG REQUIRED)
+	if (${QtVal}Core_FOUND)
+		find_package(${QtVal}Widgets CONFIG REQUIRED)
 		if(APPLE)
-			find_package(Qt5MacExtras CONFIG REQUIRED)
+			find_package(${QtVal}MacExtras CONFIG REQUIRED)
 		endif()
-		find_package(Qt5X11Extras CONFIG QUIET)
-		find_package(Qt5WinExtras CONFIG QUIET)
-		set(QTVERSION ${Qt5Core_VERSION})
+		find_package(${QtVal}X11Extras CONFIG QUIET)
+		find_package(${QtVal}WinExtras CONFIG QUIET)
+		set(QTVERSION ${${QtVal}Core_VERSION})
 		if (QTVERSION VERSION_LESS ${min_qt5_version})
 			message(STATUS "QTVERSION = \"${QTVERSION}\"")
 			message(STATUS "This version is not recommended, try either option -DLYX_USE_QT=QT4 or")
 			message(STATUS "install QT-Version >= \"${min_qt5_version}\"")
 			# see thread in lyx-devel list
@@ -779,23 +805,24 @@ if(LYX_USE_QT MATCHES "QT5")
 			# Subject: cmake compilation error
 			#message(FATAL_ERROR "Wrong Qt-Version")
 		endif()
 		macro (qt_use_modules lyxtarget)
 			foreach (_tg ${ARGN})
-find_package(Qt5${_tg} CONFIG REQUIRED)
-target_link_libraries(${lyxtarget} Qt5::${_tg})
+find_package(${QtVal}${_tg} CONFIG REQUIRED)
+target_link_libraries(${lyxtarget} ${QtVal}::${_tg})
 			endforeach()
 		endmacro()
-		macro (qt_add_resources)
-			qt5_add_resources(${ARGN})
-		endmacro()
-		macro (qt_wrap_uifiles)
-			qt5_wrap_ui(${ARGN})
-		endmacro()
 		message(STATUS "Found Qt-Version ${QTVERSION}")
 		if(WIN32)
-			set(LYX_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})
+			set(LYX_QTMAIN_LIBRARY ${${QtVal}Core_QTMAIN_LIBRARIES})
+		endif()
+		if (LYX_USE_QT MATCHES "QT6")
+			get_target_property(QT_MOC_EXECUTABLE Qt6::moc LOCATION)
+			find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
+			include_directories(${Qt6Core5Compat_INCLUDE_DIRS})
+			set(QtCore5CompatLibrary Qt6::Core5Compat)
+			set(QtCore5CompatModule Core5Compat)
 		endif()
 	endif()
 elseif(LYX_USE_QT MATCHES "QT4")
 	if(LYX_XMINGW)
 		set(QT_MINGW_DIR ${LYX_QT4} CACHE PATH 

Re: [LyX/master] Allow compiling with Qt6

2021-03-18 Thread Kornel Benko
Am Tue, 16 Mar 2021 22:51:12 +0100
schrieb Yu Jin :

> >> Oh wait, that was my fault, chosen wrong folder  now it configures ok, 
> >> will try
> >> to compile..
> >  
> Visual Studio gave a lot of errors, I attached a csv file containing those.
> --
>     Eugene
> 

These are many errors from many sources. Sorry, I cannot help, no windows os 
here.

Kornel


pgpqtOcLYy_PF.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Allow compiling with Qt6

2021-03-16 Thread Kornel Benko
Am Tue, 16 Mar 2021 18:21:19 +0100
schrieb Yu Jin :

> Am Di., 16. März 2021 um 16:36 Uhr schrieb Kornel Benko :
> 
> > Am Tue, 16 Mar 2021 16:32:49 +0100
> > schrieb Yu Jin :
> >
> > > Just seen this one and wanted to try it out obviously :)
> > > But it doesn't work for me on Windows. Using CMake GUI I notice that the
> > > dropdown menu LYX_USE_QT does not contain QT6, just QT5, QT4 and AUTO as
> > > before. When I choose AUTO it fails with:
> > >
> > > CMake Error at development/cmake/modules/FindQt4.cmake:568 (message):
> > >   Could NOT find QtCore.  Check
> > >   C:/lyx/masterbuild64Qt6/CMakeFiles/CMakeError.log for more details.
> > > Call Stack (most recent call first):
> > >   CMakeLists.txt:804 (find_package)
> > >
> > > It does find some QT6 stuff correctly though, like QT_PLUGINS_DIR, but
> > not
> > > everything, like QtCore.
> >
> > I have a patch ready, but cannot test.
> >
> 
> Care to share it? I can test.

Attached.

Kornel
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8ca0c10fd..b1ee3ab5b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -217,11 +217,11 @@ else()
 unset(LYX_ENABLE_VALGRIND_TESTS CACHE)
   endif()
 endif()
 LYX_OPTION(ASAN "Use address sanitizer" OFF ALL)
 #LYX_COMBO(USE_FILEDIALOG"Use native or QT file dialog" QT NATIVE)
-LYX_COMBO(USE_QT"Use Qt version as frontend" AUTO QT4 QT5)
+LYX_COMBO(USE_QT"Use Qt version as frontend" AUTO QT4 QT5 QT6)
 LYX_COMBO(USE_IPO   "Interprocedural optimization" OFF AUTO ON)
 #LYX_OPTION(3RDPARTY_BUILD   "Build 3rdparty libs" OFF ALL)
 LYX_OPTION(DISABLE_CALLSTACK_PRINTING "do not print a callstack when crashing" OFF ALL)
 LYX_OPTION(EXTERNAL_Z   "OFF := Build 3rdparty lib zlib" ${DefaultExternalLibs} ALL)
 LYX_OPTION(EXTERNAL_DTL "OFF := Build 3rdparty commands dt2dv and dv2dt" ${DefaultExternalLibs} ALL)
@@ -741,36 +741,59 @@ if(LYX_XMINGW)
 	list(APPEND CMAKE_FIND_ROOT_PATH ${GNUWIN32_DIR})
 endif()
 
 set(min_qt5_version "5.6")
 if(LYX_USE_QT MATCHES "AUTO")
-	# try qt5 first
-	find_package(Qt5Core CONFIG QUIET)
-	if(Qt5Core_FOUND)
-		set(LYX_USE_QT "QT5" CACHE STRING "Valid qt version" FORCE)
+	# try qt6 first
+	find_package(Qt6Core CONFIG QUIET)
+	if (Qt6Core_Found)
+		set(LYX_USE_QT "QT6" CACHE STRING "Valid qt version" FORCE)
 		message(STATUS "Qt5Core_VERSION = ${Qt5Core_VERSION}")
-		if(Qt5Core_VERSION VERSION_LESS ${min_qt5_version})
-			find_package(Qt4 "4.5.0" QUIET)
-			if(QT4_FOUND)
-set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
-			endif()
-		endif()
 	else()
-		set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
+		find_package(Qt5Core CONFIG QUIET)
+		if(Qt5Core_FOUND)
+			set(LYX_USE_QT "QT5" CACHE STRING "Valid qt version" FORCE)
+			message(STATUS "Qt5Core_VERSION = ${Qt5Core_VERSION}")
+			if(Qt5Core_VERSION VERSION_LESS ${min_qt5_version})
+find_package(Qt4 "4.5.0" QUIET)
+if(QT4_FOUND)
+	set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
+endif()
+			endif()
+		else()
+			set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
+		endif()
 	endif()
 endif()
-if(LYX_USE_QT MATCHES "QT5")
+if(LYX_USE_QT MATCHES "QT6|QT5")
+	if (LYX_USE_QT MATCHES "QT6")
+		set(QtVal "Qt6")
+		macro (qt_add_resources)
+			Qt6_add_resources(${ARGN})
+		endmacro()
+		macro (qt_wrap_uifiles)
+			Qt6_wrap_ui(${ARGN})
+		endmacro()
+	else()
+		set(QtVal "Qt5")
+		macro (qt_add_resources)
+			Qt5_add_resources(${ARGN})
+		endmacro()
+		macro (qt_wrap_uifiles)
+			Qt5_wrap_ui(${ARGN})
+		endmacro()
+	endif()
 	# set QPA_XCB if QT uses X11
-	find_package(Qt5Core CONFIG REQUIRED)
-	if (Qt5Core_FOUND)
-		find_package(Qt5Widgets CONFIG REQUIRED)
+	find_package(${QtVal}Core CONFIG REQUIRED)
+	if (${QtVal}Core_FOUND)
+		find_package(${QtVal}Widgets CONFIG REQUIRED)
 		if(APPLE)
-			find_package(Qt5MacExtras CONFIG REQUIRED)
+			find_package(${QtVal}MacExtras CONFIG REQUIRED)
 		endif()
-		find_package(Qt5X11Extras CONFIG QUIET)
-		find_package(Qt5WinExtras CONFIG QUIET)
-		set(QTVERSION ${Qt5Core_VERSION})
+		find_package(${QtVal}X11Extras CONFIG QUIET)
+		find_package(${QtVal}WinExtras CONFIG QUIET)
+		set(QTVERSION ${${QtVal}Core_VERSION})
 		if (QTVERSION VERSION_LESS ${min_qt5_version})
 			message(STATUS "QTVERSION = \"${QTVERSION}\"")
 			message(STATUS "This version is not recommended, try either option -DLYX_USE_QT=QT4 or")
 			message(STATUS "install QT-Version >= \&quo

Re: [LyX/master] Allow compiling with Qt6

2021-03-16 Thread Kornel Benko
Am Tue, 16 Mar 2021 16:32:49 +0100
schrieb Yu Jin :

> Just seen this one and wanted to try it out obviously :)
> But it doesn't work for me on Windows. Using CMake GUI I notice that the
> dropdown menu LYX_USE_QT does not contain QT6, just QT5, QT4 and AUTO as
> before. When I choose AUTO it fails with:
> 
> CMake Error at development/cmake/modules/FindQt4.cmake:568 (message):
>   Could NOT find QtCore.  Check
>   C:/lyx/masterbuild64Qt6/CMakeFiles/CMakeError.log for more details.
> Call Stack (most recent call first):
>   CMakeLists.txt:804 (find_package)
> 
> It does find some QT6 stuff correctly though, like QT_PLUGINS_DIR, but not
> everything, like QtCore.

I have a patch ready, but cannot test.

Kornel


pgpnsqQ6fIuZS.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Allow compiling with Qt6

2021-03-16 Thread Kornel Benko
Am Tue, 16 Mar 2021 15:43:59 +0100
schrieb Enrico Forestieri :

> On Tue, Mar 16, 2021 at 11:08:03AM +0100, Kornel Benko wrote:
> > 
> > Why not use QRegularExpression as in src/lyxfind.cpp?  
> 
> What do you mean? Unconditionally replacing QRegExp? I don't think it
> can be done without dropping support for Qt4.
> 

I meant instead of Compatibility directly use QRegExp or QRegularExpression

if (QT_VERSION >= 0x05) {
// define some macros for QRegularExpression
}
else {
// define some macros for QRegExp
}

But that is maybe too much work.

Kornel


pgpiwXlG9nzBG.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Allow compiling with Qt6

2021-03-16 Thread Kornel Benko
Am Tue, 16 Mar 2021 10:44:13 +0100
schrieb Enrico Forestieri :

> On Mon, Mar 15, 2021 at 10:52:19PM -0400, Scott Kostyshak wrote:
> > 
> > Are there still QRegExp that need to be changed? I got an error from
> > src/support/qstring_helpers.cpp.  
> 
> I actually don't know. Let me explain. There should be a compatibility
> layer for using Qt5 constructs, so I didn't search for all occurrences
> of QRegExp's but only changed the places where I was getting compiling
> errors.

Why not use QRegularExpression as in src/lyxfind.cpp?

> The code in qstring_helpers.cpp compiled without issues for me
> on both Linux and Windows, and thus I did not touch it.
> What kind of error are you getting?
> 
> > Also, why use
> > 
> >   #include 
> > 
> > in CategorizedCombo.cpp, but not other places?  
> 
> Because it was the only place where I had to explicitly include it.
> 


Kornel


pgpyls7NZpIsj.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Allow compiling with Qt6

2021-03-15 Thread Kornel Benko
Am Mon, 15 Mar 2021 17:33:49 +0100 (CET)
schrieb Enrico Forestieri :

> commit 635a7d77ddc94c63d52494dc4d68a930faccf45f
> Author: Enrico Forestieri 
> Date:   Mon Mar 15 17:09:09 2021 +0100
> 
> Allow compiling with Qt6

I had the impression we wanted to postpone compilation with Qt6 to after 2.4?

Kornel


pgpiQe0BfrUu_.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: lyx master crashed when converting text to note

2021-03-15 Thread Kornel Benko
Am Mon, 15 Mar 2021 12:14:05 +0100
schrieb Jean-Marc Lasgouttes :

> Le 15/03/2021 à 11:56, Pavel Sanda a écrit :
> > On Sun, Mar 14, 2021 at 09:41:48PM +0100, Jean-Marc Lasgouttes wrote:  
> >> Le 14/03/2021 ?? 21:14, Pavel Sanda a écrit :  
>  Thanks for tracking this. I'll have look next week.  
> >>> Should I create ticket in trac?  
> >>
> >> Yes please. I have tried to reproduced using you recipe, but it seems that 
> >> I
> >> do not understand it. I cannot yet get the crash.  
> > 
> > I see, created ticket #12204.
> > Note, that one unwritten part of recipy seems to be that the lyx window 
> > needs
> > to be small enough, that once you select from  to the end of document 
> > (via
> > ctrl+shift+end) the the intial part === is not visible anymore in the 
> > window.  
> 
> Thanks. Indeed, I may have been missing the missing part :)
> 
> JMarc
> 

I was not able to reproduce. Even with the new recipe.

Kornel


pgpYg6P7I4gra.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Compile Problems After Updating to Qt6

2021-03-12 Thread Kornel Benko
Am Fri, 12 Mar 2021 11:14:24 +0100
schrieb Kornel Benko :

> Am Fri, 12 Mar 2021 10:33:57 +0100
> schrieb Jürgen Spitzmüller :
> 
> > Am Donnerstag, dem 11.03.2021 um 18:56 +0100 schrieb Kornel Benko:  
> > > The guide is lengthy and I did not find QDateTime mentioned there.
> > 
> > https://doc.qt.io/qt-5/qdatetime-obsolete.html
> >   
> > > Yes, we should postpone.
> > 
> > This one was straightforward and should be fixed.
> > 
> > Jürgen
> >   
> 
> Thanks. I now have problems with "moc", but that should be my part to find 
> out.
> 
>   Kornel

The problem is that I do not have the correct libc library. The call to qt6-moc 
gives:

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found 
(required
by ./6.0.2/gcc_64/bin/moc)

Kornel


pgpnhaIr8ZDzb.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Compile Problems After Updating to Qt6

2021-03-12 Thread Kornel Benko
Am Fri, 12 Mar 2021 10:33:57 +0100
schrieb Jürgen Spitzmüller :

> Am Donnerstag, dem 11.03.2021 um 18:56 +0100 schrieb Kornel Benko:
> > The guide is lengthy and I did not find QDateTime mentioned there.  
> 
> https://doc.qt.io/qt-5/qdatetime-obsolete.html
> 
> > Yes, we should postpone.  
> 
> This one was straightforward and should be fixed.
> 
> Jürgen
> 

Thanks. I now have problems with "moc", but that should be my part to find out.

Kornel


pgpzkfWEJ7xNM.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Compile Problems After Updating to Qt6

2021-03-11 Thread Kornel Benko
Am Thu, 11 Mar 2021 12:27:50 -0500
schrieb Richard Kimberly Heck :

> > Trying to adapt cmake to qt6, I get compile errors
> >
> > usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp: In member function
> > ‘std::__debug::vector,
> > std::__cxx11::basic_string > > 
> > lyx::InsetInfoParams::getArguments(const
> > lyx::Buffer*, const string&)
> > const’: /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp:300:22: error: 
> > ‘fromTime_t’ is
> > not a member of ‘QDateTime’ date =
> > QDateTime::fromTime_t(buf->fileName().lastModified()).date();
> > ^~ /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp:326:22: error: 
> > ‘fromTime_t’
> > is not a member of ‘QDateTime’ time =
> > QDateTime::fromTime_t(buf->fileName().lastModified()).time();
> > ^~ /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp: In member 
> > function ‘virtual
> > void lyx::InsetInfo::updateBuffer(const lyx::ParIterator&, lyx::UpdateType,
> > bool)’: /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp:1152:22: error: 
> > ‘fromTime_t’ is
> > not a member of ‘QDateTime’ date =
> > QDateTime::fromTime_t(buffer().fileName().lastModified()).date();
> > ^~ /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp:1169:22: error:
> > ‘fromTime_t’ is not a member of ‘QDateTime’ time =
> > QDateTime::fromTime_t(buffer().fileName().lastModified()).time();  
> 
> This will take some work. There's some info here:
> 
> https://doc.qt.io/qt-6/portingguide.html
> 
> Maybe we should make this a post 2.4 priority, though of course work on 
> it could start now in a branch.
> 
> Riki

The guide is lengthy and I did not find QDateTime mentioned there.
Yes, we should postpone.

Kornel


pgpmCwrXD8kTg.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Compile Problems After Updating to Qt6

2021-03-11 Thread Kornel Benko
Am Thu, 11 Mar 2021 16:05:24 +0100
schrieb Christoph Schmitz :

> This is a duplicate of a question already asked in the user forum. Riki 
> recommended to
> post it in the developer forum.
> 
> --
> 
> Operating system: macOS 11.3 Beta (20E5196f)
> 
> I have been struggling with this problem for a few days now. Last week my 
> homebrew
> installation quietly updated Qt to v6 (brew upgrade). Since then I can't 
> compile LyX
> anymore. Unfortunately I learned about the "brew pin" command too late.
> 
> When running .\configure I get the error message: "configure: error: cannot 
> compile a
> simple Qt executable. Check you have the right $QTDIR."
> 
> I tried to set $QTDIR to the following directories:
> 
> /usr/local/Cellar/qt
> /usr/local/Cellar/qt/6.0.2
> /usr/local/Cellar/qt/6.0.2/bin
> /usr/local/Cellar/qt/6.0.2/lib
> /usr/local/opt/qt
> /usr/local/opt/qt6
> /usr/local/opt/qt@6
> 
> I also tried to downgrade to Qt5, but this also did not solve the problem. I 
> have
> noticed that Qt5 is not installed in the folder "qt" anymore (this is now the 
> place,
> where Qt6 is installed), but in a folder with the name "qt@5".
> 
> I also deleted my local repository and started from scratch. Also no success.
> 
> I appreciate any recommendation what to do.
> 
> Chris

Trying to adapt cmake to qt6, I get compile errors

usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp: In member function
‘std::__debug::vector,
std::__cxx11::basic_string > > lyx::InsetInfoParams::getArguments(const
lyx::Buffer*, const string&)
const’: /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp:300:22: error: 
‘fromTime_t’ is not
a member of ‘QDateTime’ date =
QDateTime::fromTime_t(buf->fileName().lastModified()).date();
^~ /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp:326:22: error: 
‘fromTime_t’ is
not a member of ‘QDateTime’ time =
QDateTime::fromTime_t(buf->fileName().lastModified()).time();
^~ /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp: In member function 
‘virtual
void lyx::InsetInfo::updateBuffer(const lyx::ParIterator&, lyx::UpdateType,
bool)’: /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp:1152:22: error: 
‘fromTime_t’ is
not a member of ‘QDateTime’ date =
QDateTime::fromTime_t(buffer().fileName().lastModified()).date();
^~ /usr2/src/lyx/lyx-git/src/insets/InsetInfo.cpp:1169:22: error: 
‘fromTime_t’ is
not a member of ‘QDateTime’ time =
QDateTime::fromTime_t(buffer().fileName().lastModified()).time();

Kornel


pgpc16Dsd5omD.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Crash removing Format

2021-03-09 Thread Kornel Benko
Am Tue, 9 Mar 2021 00:32:26 -0500
schrieb Scott Kostyshak :

> > >
> > >  $ egrep -i epub preferences
> > > \format "" "epub" "Epub" "" "" "" "" ""
> > > \converter "docbook5" "" "dbtoepub  -o $$o $$i" ""
> > >
> > > Restart lyx
> > > remove converter docbook5 -> epub
> > > Apply!
> > > remove format epub
> > > Apply! --> crash
> > >
> > >  $ egrep -i epub preferences
> > > \format "" "epub" "Epub" "" "" "" "" ""
> > >
> > > The converter is gone, but the format still exists  
> > 
> > I still cannot reproduce this reliably. Probably best to file a bug.  
> 
> Did we file a bug report for this? I used to be able to reproduce. I
> tried to reproduce on current master and could not, but I'm not sure if
> I'm still following the recipe correctly.
> 
> Scott

Same here, cannot reproduce any more.
To be sure, I even created new format (not contained in lyxrc.default), but no 
crash.

Kornel


pgpTZeONsDAau.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Show zoom value in statusbar

2021-03-07 Thread Kornel Benko
Am Sun, 07 Mar 2021 18:37:10 +0100
schrieb Jürgen Spitzmüller :

> Am Sonntag, dem 07.03.2021 um 17:48 +0100 schrieb Kornel Benko:
> > Status bar shows it OK, but the slider is not updating if changing
> > zoom with the mouse.  
> 
> Fixed.
> 
> Jürgen
> 

Works nice. Thanks.

Kornel


pgppKDswJXpNi.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Show zoom value in statusbar

2021-03-07 Thread Kornel Benko
Am Sun,  7 Mar 2021 17:16:58 +0100 (CET)
schrieb Juergen Spitzmueller :

> commit be6dc7dd5dc10f79ef2525b2ba77d0b02c46
> Author: Juergen Spitzmueller 
> Date:   Sun Mar 7 17:21:52 2021 +0100
> 
> Show zoom value in statusbar
> ---
>  src/frontends/qt/GuiView.cpp |7 +--
>  src/frontends/qt/GuiView.h   |2 ++
>  2 files changed, 7 insertions(+), 2 deletions(-)

Status bar shows it OK, but the slider is not updating if changing zoom with 
the mouse.

Kornel


pgp8rAa6M4o_F.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Zoom slider

2021-03-07 Thread Kornel Benko
Am Sun, 07 Mar 2021 14:33:50 +0100
schrieb Jürgen Spitzmüller :

> Am Sonntag, dem 07.03.2021 um 14:18 +0100 schrieb Kornel Benko:
> > I get
> >   
> > > ---/usr2/src/lyx/lyx-git/src/frontends/qt/GuiView.cpp:633:31:
> > > error:  
> > ‘const class  
> > > QFontMetrics’ has no member named ‘horizontalAdvance’  
> >   zoomslider->setFixedWidth(fm.horizontalAdvance('x') * 15);  
> 
> Fixed.
> 
> Jürgen
> 

Yes, thanks.

Kornel


pgpVROgdq0_C2.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Zoom slider

2021-03-07 Thread Kornel Benko
Am Sun,  7 Mar 2021 13:24:29 +0100 (CET)
schrieb Juergen Spitzmueller :

> commit bdb006543b43f71a06fc5b9915d0df19aae0ef68
> Author: Juergen Spitzmueller 
> Date:   Sun Mar 7 13:29:23 2021 +0100
> 
> Zoom slider

I get

> ---/usr2/src/lyx/lyx-git/src/frontends/qt/GuiView.cpp:633:31: error: ‘const 
> class
> QFontMetrics’ has no member named ‘horizontalAdvance’
  zoomslider->setFixedWidth(fm.horizontalAdvance('x') * 15);

This is with Qt5.9

Korneel


pgp6NB_9wCefb.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


<    1   2   3   4   5   6   7   8   9   10   >