+ harmonize API
This commit is contained in:
parent
21eae7f900
commit
f233a50a00
|
@ -487,7 +487,7 @@ void Application::setActiveDocument(const char *Name)
|
|||
}
|
||||
}
|
||||
|
||||
const char* Application::GetHomePath(void) const
|
||||
const char* Application::getHomePath(void) const
|
||||
{
|
||||
return _mConfig["AppHomePath"].c_str();
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ public:
|
|||
static char** GetARGV(void){return _argv;}
|
||||
//@}
|
||||
|
||||
const char* GetHomePath(void) const;
|
||||
const char* getHomePath(void) const;
|
||||
const char* getExecutableName(void) const;
|
||||
static std::string getUserAppDataDir();
|
||||
static std::string getResourceDir();
|
||||
|
|
|
@ -531,7 +531,7 @@ PyObject* Application::sGetHomePath(PyObject * /*self*/, PyObject *args,PyObject
|
|||
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
|
||||
return NULL; // NULL triggers exception
|
||||
|
||||
Py::String homedir(GetApplication().GetHomePath());
|
||||
Py::String homedir(GetApplication().getHomePath());
|
||||
return Py::new_reference_to(homedir);
|
||||
}
|
||||
|
||||
|
|
|
@ -1617,7 +1617,7 @@ void Application::runApplication(void)
|
|||
}
|
||||
mainApp.setWindowIcon(Gui::BitmapFactory().pixmap(App::Application::Config()["AppIcon"].c_str()));
|
||||
QString plugin;
|
||||
plugin = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
plugin = QString::fromUtf8(App::GetApplication().getHomePath());
|
||||
plugin += QLatin1String("/plugins");
|
||||
QCoreApplication::addLibraryPath(plugin);
|
||||
|
||||
|
@ -1673,7 +1673,7 @@ void Application::runApplication(void)
|
|||
SIM::Coin3D::Quarter::Quarter::init();
|
||||
SoFCDB::init();
|
||||
|
||||
QString home = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
QString home = QString::fromUtf8(App::GetApplication().getHomePath());
|
||||
|
||||
it = cfg.find("WindowTitle");
|
||||
if (it != cfg.end()) {
|
||||
|
|
|
@ -699,7 +699,7 @@ PyObject* Application::sAddResPath(PyObject * /*self*/, PyObject *args,PyObject
|
|||
PyMem_Free(filePath);
|
||||
if (QDir::isRelativePath(path)) {
|
||||
// Home path ends with '/'
|
||||
QString home = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
QString home = QString::fromUtf8(App::GetApplication().getHomePath());
|
||||
path = home + path;
|
||||
}
|
||||
|
||||
|
@ -718,7 +718,7 @@ PyObject* Application::sAddLangPath(PyObject * /*self*/, PyObject *args,PyObject
|
|||
PyMem_Free(filePath);
|
||||
if (QDir::isRelativePath(path)) {
|
||||
// Home path ends with '/'
|
||||
QString home = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
QString home = QString::fromUtf8(App::GetApplication().getHomePath());
|
||||
path = home + path;
|
||||
}
|
||||
|
||||
|
@ -736,7 +736,7 @@ PyObject* Application::sAddIconPath(PyObject * /*self*/, PyObject *args,PyObject
|
|||
PyMem_Free(filePath);
|
||||
if (QDir::isRelativePath(path)) {
|
||||
// Home path ends with '/'
|
||||
QString home = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
QString home = QString::fromUtf8(App::GetApplication().getHomePath());
|
||||
path = home + path;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ bool Assistant::startAssistant()
|
|||
#ifdef Q_OS_WIN
|
||||
QString app;
|
||||
app = QDir::toNativeSeparators(QString::fromUtf8
|
||||
(App::GetApplication().GetHomePath()) + QLatin1String("bin/"));
|
||||
(App::GetApplication().getHomePath()) + QLatin1String("bin/"));
|
||||
#else
|
||||
QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
|
||||
#endif
|
||||
|
|
|
@ -78,14 +78,14 @@ BitmapFactoryInst& BitmapFactoryInst::instance(void)
|
|||
std::map<std::string,std::string>::const_iterator it;
|
||||
it = App::GetApplication().Config().find("ProgramIcons");
|
||||
if (it != App::GetApplication().Config().end()) {
|
||||
QString home = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
QString home = QString::fromUtf8(App::GetApplication().getHomePath());
|
||||
QString path = QString::fromUtf8(it->second.c_str());
|
||||
if (QDir(path).isRelative()) {
|
||||
path = QFileInfo(QDir(home), path).absoluteFilePath();
|
||||
}
|
||||
_pcSingleton->addPath(path);
|
||||
}
|
||||
_pcSingleton->addPath(QString::fromAscii("%1/icons").arg(QString::fromUtf8(App::GetApplication().GetHomePath())));
|
||||
_pcSingleton->addPath(QString::fromAscii("%1/icons").arg(QString::fromUtf8(App::GetApplication().getHomePath())));
|
||||
_pcSingleton->addPath(QString::fromAscii("%1/icons").arg(QString::fromUtf8(App::GetApplication().Config()["UserAppData"].c_str())));
|
||||
_pcSingleton->addPath(QLatin1String(":/icons/"));
|
||||
_pcSingleton->addPath(QLatin1String(":/Icons/"));
|
||||
|
|
|
@ -486,7 +486,7 @@ void StdCmdDownloadOnlineHelp::activated(int iMsg)
|
|||
bool canStart = false;
|
||||
|
||||
// set output directory
|
||||
QString path = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
QString path = QString::fromUtf8(App::GetApplication().getHomePath());
|
||||
path += QString::fromAscii("/doc/");
|
||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/OnlineHelp");
|
||||
path = QString::fromUtf8(hURLGrp->GetASCII( "DownloadLocation", path.toAscii() ).c_str());
|
||||
|
|
|
@ -72,7 +72,7 @@ static const unsigned char navicon_data[] = {
|
|||
OnlineDocumentation::OnlineDocumentation()
|
||||
{
|
||||
// store the listed files in a stringlist
|
||||
std::string path = App::GetApplication().GetHomePath();
|
||||
std::string path = App::GetApplication().getHomePath();
|
||||
path += "/doc/docs.zip";
|
||||
zipios::ZipFile zip(path);
|
||||
if (zip.isValid()) {
|
||||
|
@ -143,7 +143,7 @@ QByteArray OnlineDocumentation::loadResource(const QString& filename) const
|
|||
}
|
||||
else if (this->files.contains(fn)) {
|
||||
// load the requested page from zip
|
||||
std::string path = App::GetApplication().GetHomePath();
|
||||
std::string path = App::GetApplication().getHomePath();
|
||||
path += "/doc/docs.zip";
|
||||
zipios::ZipFile zip(path);
|
||||
zipios::ConstEntryPointer entry = zip.getEntry((const char*)fn.toAscii());
|
||||
|
|
|
@ -853,7 +853,7 @@ void PyResource::load( const char* name )
|
|||
// checks whether it's a relative path
|
||||
if (fi.isRelative()) {
|
||||
QString cwd = QDir::currentPath ();
|
||||
QString home= QDir(QString::fromUtf8(App::GetApplication().GetHomePath())).path();
|
||||
QString home= QDir(QString::fromUtf8(App::GetApplication().getHomePath())).path();
|
||||
|
||||
// search in cwd and home path for the file
|
||||
//
|
||||
|
|
|
@ -219,7 +219,7 @@ copyResource(PyObject *self, PyObject *args)
|
|||
if (! PyArg_ParseTuple(args, "ss",&FileName,&DestDir))
|
||||
return NULL;
|
||||
|
||||
std::string resName = App::GetApplication().GetHomePath();
|
||||
std::string resName = App::GetApplication().getHomePath();
|
||||
resName += "Mod";
|
||||
resName += PATHSEP ;
|
||||
resName += "Raytracing";
|
||||
|
|
Loading…
Reference in New Issue
Block a user