Skip to content

Conversation

ArcEye
Copy link
Collaborator

@ArcEye ArcEye commented May 1, 2016

settings_dlg gathers paths for rs274, tooltable and temporary gcode file.
If any of these are not set, pops up at launch and sets them
in variables within the class.

File Open and File Save As added

Large file management by setting limits to initial amount of a file read into
QGCodeEditor widget, with further blocks read in if cursor position nears
the end of the current amount in the editor.

This reduces the time to load a 10,000 line file, from 30 seconds just for the editor
to +/- 5secs for both editor and GLViewer combined

This is an interim measure. Full solution will be via changes to editor itself
to do this irrespective of the input source.

Signed-off-by: Mick [email protected]

settings_dlg gathers paths for rs274, tooltable and temporary gcode file.
If any of these are not set, pops up at launch and sets them
in variables within the class.

File Open and File Save As added

Large file management by setting limits to initial amount of a file read into
QGCodeEditor widget, with further blocks read in if cursor position nears
the end of the current amount in the editor.

This reduces the time to load a 10,000 line file, from 30 seconds just for the editor
to +/- 5secs for both editor and GLViewer combined

This is an interim measure.  Full solution will be via changes to editor itself
to do this irrespective of the input source.

Signed-off-by: Mick <[email protected]>
@ArcEye
Copy link
Collaborator Author

ArcEye commented May 1, 2016

This is just so you can have a play with the large file open stuff etc.
A lot will come out when I have fixed up QGCodeEditor to do it for us

@koppi
Copy link
Member

koppi commented May 1, 2016

Quick review: I want to make GCoder work on Mac and perhaps Windows, too.

Please use QStandardPaths::HomeLocation instead of getpwuid() , see http://doc.qt.io/qt-5/qstandardpaths.html and replace code and the C headers:

struct passwd *pw = getpwuid(getuid());
const char *homedir = pw->pw_dir;

@koppi koppi merged commit dd2cc4a into QGCoder:master May 4, 2016
@ArcEye
Copy link
Collaborator Author

ArcEye commented May 4, 2016

I have not updated this, so you need to revert or wait for the updated code.

Still finishing GUI stuff and testing

@koppi
Copy link
Member

koppi commented May 4, 2016

Ok, I'll wait then.

@ArcEye
Copy link
Collaborator Author

ArcEye commented May 4, 2016

Should not be too long, those segfault errors took forever and I had to just walk away and come back fresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants