Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
c65e7dbd
Commit
c65e7dbd
authored
Jul 15, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve pb (schnapps/python) of non ascii char on Linux
parent
f831db2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
SCHNApps/Plugins/surface_import/src/surface_import.cpp
SCHNApps/Plugins/surface_import/src/surface_import.cpp
+0
-1
SCHNApps/src/schnapps.cpp
SCHNApps/src/schnapps.cpp
+11
-4
No files found.
SCHNApps/Plugins/surface_import/src/surface_import.cpp
View file @
c65e7dbd
...
...
@@ -33,7 +33,6 @@ bool Surface_Import_Plugin::enable()
MapHandlerGen
*
Surface_Import_Plugin
::
importMeshFromFile
(
const
QString
&
nameOfFile
)
{
QString
fileName
=
SCHNApps
::
noBackSlash
(
nameOfFile
);
QFileInfo
fi
(
fileName
);
...
...
SCHNApps/src/schnapps.cpp
View file @
c65e7dbd
...
...
@@ -1045,15 +1045,16 @@ bool SCHNApps::loadPythonScriptFromFile(const QString& fileName)
return
false
;
}
}
#ifdef WIN32
QFile
file
(
fullName
);
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
return
false
;
QTextStream
in
(
&
file
);
m_pythonContext
.
evalScript
(
in
.
readAll
());
#else
m_pythonContext
.
evalFile
(
fullName
);
#endif
// not using eval file because of pb with non ascii char in file name and path
// m_pythonContext.evalFile(fullName);
return
true
;
}
...
...
@@ -1162,6 +1163,9 @@ void SCHNApps::pyRecording()
QString
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
"Save python script"
,
pypath
,
" python script (*.py)"
);
if
(
fileName
.
size
()
!=
0
)
{
if
(
!
fileName
.
endsWith
(
".py"
,
Qt
::
CaseInsensitive
))
fileName
+=
".py"
;
m_pyRecFile
=
new
QFile
(
fileName
);
if
(
!
m_pyRecFile
->
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
))
return
;
...
...
@@ -1237,6 +1241,9 @@ void SCHNApps::appendPyRecording()
QString
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
"Append python script"
,
pypath
,
" python script (*.py)"
);
if
(
fileName
.
size
()
!=
0
)
{
if
(
!
fileName
.
endsWith
(
".py"
,
Qt
::
CaseInsensitive
))
fileName
+=
".py"
;
m_pyRecFile
=
new
QFile
(
fileName
);
if
(
!
m_pyRecFile
->
open
(
QIODevice
::
Append
|
QIODevice
::
Text
))
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment