App: harmonize API of App::Application
* make getHomePath() static and return a std::string * make getExecutableName() static and return a std::string
This commit is contained in:
@@ -368,7 +368,7 @@ private:
|
||||
//makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str()));
|
||||
makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str()));
|
||||
makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str()));
|
||||
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::GetApplication().getExecutableName()));
|
||||
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::Application::getExecutableName().c_str()));
|
||||
makeHeader.SetDescriptionValue(1, new TCollection_HAsciiString("FreeCAD Model"));
|
||||
IFSelect_ReturnStatus ret = writer.Write(name8bit.c_str());
|
||||
if (ret == IFSelect_RetError || ret == IFSelect_RetFail || ret == IFSelect_RetStop) {
|
||||
|
||||
@@ -668,7 +668,7 @@ private:
|
||||
//makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str()));
|
||||
makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str()));
|
||||
makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str()));
|
||||
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::GetApplication().getExecutableName()));
|
||||
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::Application::getExecutableName().c_str()));
|
||||
makeHeader.SetDescriptionValue(1, new TCollection_HAsciiString("FreeCAD Model"));
|
||||
IFSelect_ReturnStatus ret = writer.Write(name8bit.c_str());
|
||||
if (ret == IFSelect_RetError || ret == IFSelect_RetFail || ret == IFSelect_RetStop) {
|
||||
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
wc.restoreCursor();
|
||||
|
||||
try {
|
||||
std::string path = App::GetApplication().getHomePath();
|
||||
std::string path = App::Application::getHomePath();
|
||||
path += "Mod/Path/PathScripts/post/";
|
||||
QDir dir1(QString::fromUtf8(path.c_str()), QString::fromLatin1("*_pre.py"));
|
||||
std::string cMacroPath = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Macro")
|
||||
@@ -149,7 +149,7 @@ private:
|
||||
wc.restoreCursor();
|
||||
|
||||
try {
|
||||
std::string path = App::GetApplication().getHomePath();
|
||||
std::string path = App::Application::getHomePath();
|
||||
path += "Mod/Path/PathScripts/post/";
|
||||
QDir dir1(QString::fromUtf8(path.c_str()), QString::fromLatin1("*_pre.py"));
|
||||
std::string cMacroPath = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Macro")
|
||||
@@ -225,7 +225,7 @@ private:
|
||||
if (objlist.size() == 0)
|
||||
throw Py::RuntimeError("No object to export");
|
||||
|
||||
std::string path = App::GetApplication().getHomePath();
|
||||
std::string path = App::Application::getHomePath();
|
||||
path += "Mod/Path/PathScripts/post/";
|
||||
QDir dir1(QString::fromUtf8(path.c_str()), QString::fromLatin1("*_post.py"));
|
||||
std::string cMacroPath = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Macro")
|
||||
|
||||
@@ -222,7 +222,7 @@ private:
|
||||
if (! PyArg_ParseTuple(args.ptr(), "ss",&FileName,&DestDir))
|
||||
throw Py::Exception();
|
||||
|
||||
std::string resName = App::GetApplication().getHomePath();
|
||||
std::string resName = App::Application::getHomePath();
|
||||
resName += "Mod";
|
||||
resName += PATHSEP ;
|
||||
resName += "Raytracing";
|
||||
|
||||
Reference in New Issue
Block a user