[PATCH] Trivial patch to fix warning
The attached removes a few pointless calls from QInclude.cpp that do nothing but cause a warning to be written to the console. OK to commit? rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto Index: src/frontends/qt4/QInclude.cpp === --- src/frontends/qt4/QInclude.cpp (revision 18481) +++ src/frontends/qt4/QInclude.cpp (working copy) @@ -276,10 +276,8 @@ int const item = dialog_-typeCO-currentIndex(); if (item == 0) { params.setCmdName(include); - params.setOptions(string()); } else if (item == 1) { params.setCmdName(input); - params.setOptions(string()); } else if (item == 3) { params.setCmdName(lstinputlisting); // the parameter string should have passed validation @@ -296,7 +294,6 @@ params.setCmdName(verbatiminput*); else params.setCmdName(verbatiminput); - params.setOptions(string()); } controller().setParams(params); }
Re: [PATCH] Trivial patch to fix warning
On Thursday 24 May 2007 07:28:40 Richard Heck wrote: The attached removes a few pointless calls from QInclude.cpp that do nothing but cause a warning to be written to the console. OK to commit? The purpose of the code seems to be resetting the options, if you are sure that it works without it then go ahead. rh -- José Abílio
Re: [PATCH] Trivial patch to fix warning
José Matos wrote: On Thursday 24 May 2007 07:28:40 Richard Heck wrote: The attached removes a few pointless calls from QInclude.cpp that do nothing but cause a warning to be written to the console. OK to commit? The purpose of the code seems to be resetting the options, if you are sure that it works without it then go ahead. Hmm, I see. Let's ask Bo about this, as I think he must have added these calls. I haven't been able to cause a problem after deleting these lines. The reason is that the InsetInclude::latex() routine just ignores the options, anyway, if we're not dealing with a listings include. The advantage to deleting them turns out to be that if you switch from listings to verbatim and then go back, your options re-appear. Richard -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto Index: src/frontends/qt4/QInclude.cpp === --- src/frontends/qt4/QInclude.cpp (revision 18481) +++ src/frontends/qt4/QInclude.cpp (working copy) @@ -276,10 +276,8 @@ int const item = dialog_-typeCO-currentIndex(); if (item == 0) { params.setCmdName(include); - params.setOptions(string()); } else if (item == 1) { params.setCmdName(input); - params.setOptions(string()); } else if (item == 3) { params.setCmdName(lstinputlisting); // the parameter string should have passed validation @@ -296,7 +294,6 @@ params.setCmdName(verbatiminput*); else params.setCmdName(verbatiminput); - params.setOptions(string()); } controller().setParams(params); }
Re: [PATCH] Trivial patch to fix warning
Hmm, I see. Let's ask Bo about this, as I think he must have added these calls. I haven't been able to cause a problem after deleting these lines. The reason is that the InsetInclude::latex() routine just ignores the options, anyway, if we're not dealing with a listings include. The advantage to deleting them turns out to be that if you switch from listings to verbatim and then go back, your options re-appear. I have not checked in details but the original idea is that when option is set for listings, it remains there if we switch to another type. This may or may not confuse users. Also, setOption may (not sure) be called to set options for other types, although they will not be used eventually. Because the 're-appearing' option seems to be a good thing to have, you can remove them if you can not see any bad side-effect. Cheers, Bo
Re: [PATCH] Trivial patch to fix warning
Bo Peng wrote: I haven't been able to cause a problem after deleting these lines. The reason is that the InsetInclude::latex() routine just ignores the options, anyway, if we're not dealing with a listings include. The advantage to deleting them turns out to be that if you switch from listings to verbatim and then go back, your options re-appear. I have not checked in details but the original idea is that when option is set for listings, it remains there if we switch to another type. This may or may not confuse users. Also, setOption may (not sure) be called to set options for other types, although they will not be used eventually. None of them have any options---at least, none that are handled that way. Because the 're-appearing' option seems to be a good thing to have, you can remove them if you can not see any bad side-effect. OK. Richard -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
[PATCH] Trivial patch to fix warning
The attached removes a few pointless calls from QInclude.cpp that do nothing but cause a warning to be written to the console. OK to commit? rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto Index: src/frontends/qt4/QInclude.cpp === --- src/frontends/qt4/QInclude.cpp (revision 18481) +++ src/frontends/qt4/QInclude.cpp (working copy) @@ -276,10 +276,8 @@ int const item = dialog_->typeCO->currentIndex(); if (item == 0) { params.setCmdName("include"); - params.setOptions(string()); } else if (item == 1) { params.setCmdName("input"); - params.setOptions(string()); } else if (item == 3) { params.setCmdName("lstinputlisting"); // the parameter string should have passed validation @@ -296,7 +294,6 @@ params.setCmdName("verbatiminput*"); else params.setCmdName("verbatiminput"); - params.setOptions(string()); } controller().setParams(params); }
Re: [PATCH] Trivial patch to fix warning
On Thursday 24 May 2007 07:28:40 Richard Heck wrote: > The attached removes a few pointless calls from QInclude.cpp that do > nothing but cause a warning to be written to the console. OK to commit? The purpose of the code seems to be resetting the options, if you are sure that it works without it then go ahead. > rh -- José Abílio
Re: [PATCH] Trivial patch to fix warning
José Matos wrote: > On Thursday 24 May 2007 07:28:40 Richard Heck wrote: > >> The attached removes a few pointless calls from QInclude.cpp that do >> nothing but cause a warning to be written to the console. OK to commit? >> > The purpose of the code seems to be resetting the options, if you are sure > that it works without it then go ahead. > Hmm, I see. Let's ask Bo about this, as I think he must have added these calls. I haven't been able to cause a problem after deleting these lines. The reason is that the InsetInclude::latex() routine just ignores the options, anyway, if we're not dealing with a listings include. The advantage to deleting them turns out to be that if you switch from "listings" to "verbatim" and then go back, your options re-appear. Richard -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto Index: src/frontends/qt4/QInclude.cpp === --- src/frontends/qt4/QInclude.cpp (revision 18481) +++ src/frontends/qt4/QInclude.cpp (working copy) @@ -276,10 +276,8 @@ int const item = dialog_->typeCO->currentIndex(); if (item == 0) { params.setCmdName("include"); - params.setOptions(string()); } else if (item == 1) { params.setCmdName("input"); - params.setOptions(string()); } else if (item == 3) { params.setCmdName("lstinputlisting"); // the parameter string should have passed validation @@ -296,7 +294,6 @@ params.setCmdName("verbatiminput*"); else params.setCmdName("verbatiminput"); - params.setOptions(string()); } controller().setParams(params); }
Re: [PATCH] Trivial patch to fix warning
Hmm, I see. Let's ask Bo about this, as I think he must have added these calls. I haven't been able to cause a problem after deleting these lines. The reason is that the InsetInclude::latex() routine just ignores the options, anyway, if we're not dealing with a listings include. The advantage to deleting them turns out to be that if you switch from "listings" to "verbatim" and then go back, your options re-appear. I have not checked in details but the original idea is that when option is set for listings, it remains there if we switch to another type. This may or may not confuse users. Also, setOption may (not sure) be called to set options for other types, although they will not be used eventually. Because the 're-appearing' option seems to be a good thing to have, you can remove them if you can not see any bad side-effect. Cheers, Bo
Re: [PATCH] Trivial patch to fix warning
Bo Peng wrote: >> I haven't been able to cause a problem after deleting these lines. The >> reason is that the InsetInclude::latex() routine just ignores the >> options, anyway, if we're not dealing with a listings include. The >> advantage to deleting them turns out to be that if you switch from >> "listings" to "verbatim" and then go back, your options re-appear. > I have not checked in details but the original idea is that when > option is set for listings, it remains there if we switch to another > type. This may or may not confuse users. Also, setOption may (not > sure) be called to set options for other types, although they will not > be used eventually. None of them have any options---at least, none that are handled that way. > > Because the 're-appearing' option seems to be a good thing to have, > you can remove them if you can not see any bad side-effect. OK. Richard -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto