typo?) bug in Figure.cc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

typo?) bug in Figure.cc

Dmitri A. Sergatskov
With a recent change

 g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtPrintSupport -Ilibgui/graphics -I../libgui/graphics -Isrc -I../libgui/src -I../liboctave/array -Iliboctave/numeric -I../liboctave/numeric -Iliboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -Ilibinterp -I../libinterp -Ilibinterp/parse-tree -I../libinterp/parse-tree -Ilibinterp/corefcn -I../libinterp/corefcn -I../libinterp/octave-value -fPIC -pthread -fopenmp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -MT libgui/graphics/libgui_graphics_libgui_graphics_la-Figure.lo -MD -MP -MF libgui/graphics/.deps/libgui_graphics_libgui_graphics_la-Figure.Tpo -c ../libgui/graphics/Figure.cc  -fPIC -DPIC -o libgui/graphics/.libs/libgui_graphics_libgui_graphics_la-Figure.o
../libgui/graphics/Figure.cc: In member function ‘void QtHandles::Figure::fileSaveFigure(bool)’:
../libgui/graphics/Figure.cc:882:79: error: expected ‘)’ before ‘;’ token
                                              QFileDialog::DontUseNativeDialog);
See also e.g.:

Reply | Threaded
Open this post in threaded view
|

Re: typo?) bug in Figure.cc

John W. Eaton
Administrator
On 11/07/2017 07:12 PM, Dmitri A. Sergatskov wrote:

> With a recent change
>
>   g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/freetype2
> -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16
> -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtGui
> -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtOpenGL
> -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtPrintSupport
> -Ilibgui/graphics -I../libgui/graphics -Isrc -I../libgui/src
> -I../liboctave/array -Iliboctave/numeric -I../liboctave/numeric
> -Iliboctave/operators -I../liboctave/operators -I../liboctave/system
> -I../liboctave/util -Ilibinterp -I../libinterp -Ilibinterp/parse-tree
> -I../libinterp/parse-tree -Ilibinterp/corefcn -I../libinterp/corefcn
> -I../libinterp/octave-value -fPIC -pthread -fopenmp -Wall -W -Wshadow
> -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align
> -Wcast-qual -g -O2 -MT
> libgui/graphics/libgui_graphics_libgui_graphics_la-Figure.lo -MD -MP -MF
> libgui/graphics/.deps/libgui_graphics_libgui_graphics_la-Figure.Tpo -c
> ../libgui/graphics/Figure.cc  -fPIC -DPIC -o
> libgui/graphics/.libs/libgui_graphics_libgui_graphics_la-Figure.o
> ../libgui/graphics/Figure.cc: In member function ‘void
> QtHandles::Figure::fileSaveFigure(bool)’:
> ../libgui/graphics/Figure.cc:882:79: error: expected ‘)’ before ‘;’ token
>                                                
> QFileDialog::DontUseNativeDialog);
> See also e.g.:
>
> http://buildbot.octave.org:8010/builders/gcc-7-debian/builds/9/steps/compile/logs/stdio

Oops, should be fixed now.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: typo?) bug in Figure.cc

Pantxo
John W. Eaton wrote

> On 11/07/2017 07:12 PM, Dmitri A. Sergatskov wrote:
>> With a recent change
>>
>>   g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/freetype2
>> -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16
>> -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtGui
>> -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtOpenGL
>> -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtPrintSupport
>> -Ilibgui/graphics -I../libgui/graphics -Isrc -I../libgui/src
>> -I../liboctave/array -Iliboctave/numeric -I../liboctave/numeric
>> -Iliboctave/operators -I../liboctave/operators -I../liboctave/system
>> -I../liboctave/util -Ilibinterp -I../libinterp -Ilibinterp/parse-tree
>> -I../libinterp/parse-tree -Ilibinterp/corefcn -I../libinterp/corefcn
>> -I../libinterp/octave-value -fPIC -pthread -fopenmp -Wall -W -Wshadow
>> -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align
>> -Wcast-qual -g -O2 -MT
>> libgui/graphics/libgui_graphics_libgui_graphics_la-Figure.lo -MD -MP -MF
>> libgui/graphics/.deps/libgui_graphics_libgui_graphics_la-Figure.Tpo -c
>> ../libgui/graphics/Figure.cc  -fPIC -DPIC -o
>> libgui/graphics/.libs/libgui_graphics_libgui_graphics_la-Figure.o
>> ../libgui/graphics/Figure.cc: In member function ‘void
>> QtHandles::Figure::fileSaveFigure(bool)’:
>> ../libgui/graphics/Figure.cc:882:79: error: expected ‘)’ before ‘;’ token
>>                                                
>> QFileDialog::DontUseNativeDialog);
>> See also e.g.:
>>
>> http://buildbot.octave.org:8010/builders/gcc-7-debian/builds/9/steps/compile/logs/stdio
>
> Oops, should be fixed now.
>
> jwe

I have a couple of requests/remarks about this change:
* Could we change this ".fig" default extension to "ofig" (the default for
hgsave when no extension is provided) to make it clear that (i) this is not
a matlab compatible figure format, (ii) this is not xfig format either?
* If we provide a way to save figures (as opposed to print) from the GUI
then we must provide a way to reopen them. Currently, double clicking on a
".ofig" file in the file dock widget will only load the underlying structure
data which is not what we want. There is a patch that must probably be
updated to apply cleanly (see https://savannah.gnu.org/bugs/?50543)
* The hgsave/hgload mechanism is currently very fragile because we are
unable to save listeners so reopen figures don't behave as the original
figures (see https://savannah.gnu.org/bugs/?48067).

Pantxo



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

Re: typo?) bug in Figure.cc

John W. Eaton
Administrator
On 11/08/2017 04:26 AM, Pantxo wrote:

> I have a couple of requests/remarks about this change:
> * Could we change this ".fig" default extension to "ofig" (the default for
> hgsave when no extension is provided) to make it clear that (i) this is not
> a matlab compatible figure format, (ii) this is not xfig format either?

I suppose .ofig is fine for the files we generate.  I checked in this
change:

   http://hg.savannah.gnu.org/hgweb/octave/rev/92acdcf72c46

If we ever generate files that could be opened with Matlab, then maybe
we could switch to .fig (possibly with a configuration option to choose
the default suffix?).

> * If we provide a way to save figures (as opposed to print) from the GUI
> then we must provide a way to reopen them. Currently, double clicking on a
> ".ofig" file in the file dock widget will only load the underlying structure
> data which is not what we want. There is a patch that must probably be
> updated to apply cleanly (see https://savannah.gnu.org/bugs/?50543)

I'll take a look at it.

> * The hgsave/hgload mechanism is currently very fragile because we are
> unable to save listeners so reopen figures don't behave as the original
> figures (see https://savannah.gnu.org/bugs/?48067).

OK, it seemed to work for me.  But maybe I was saving figures that did
not have listeners, or that were not important for the simple thing I
was doing (just loading and viewing a figure).

jwe