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
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
f0174c53
Commit
f0174c53
authored
Aug 14, 2015
by
Mathias Goldau
Browse files
[CHANGE] Reduced code duplication.
parent
c03ab703
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
src/core/common/WPathHelper.cpp
src/core/common/WPathHelper.cpp
+2
-7
src/qtgui/WQtGui.cpp
src/qtgui/WQtGui.cpp
+1
-1
No files found.
src/core/common/WPathHelper.cpp
View file @
f0174c53
...
...
@@ -78,18 +78,13 @@ void WPathHelper::setBasePaths( boost::filesystem::path appPath, boost::filesyst
void
WPathHelper
::
setBasePathsOSXBundle
(
boost
::
filesystem
::
path
appPath
,
boost
::
filesystem
::
path
homePath
)
{
//W_ASSERT( appPath.substr( size()-sizeof( "MacOS" ), sizeof( "MacOS" ) ) == "MacOS" );
m_appPath
=
appPath
;
m_homePath
=
homePath
;
setBasePaths
(
appPath
,
homePath
);
// set all to ordinary paths, but the following are different:
m_sharePath
=
m_appPath
/
"../Resources/openwalnut"
;
m_docPath
=
m_appPath
/
"../Resources/doc"
;
m_configPath
=
m_appPath
/
"../Resources/openwalnut"
;
m_libPath
=
m_appPath
/
".."
/
W_LIB_DIR_RELATIVE
;
// NOTE: this variable is set by CMake.
// This is the default search path. Use getAllModulePaths for finding all modules, including those whose
// directories where defined by the user.
m_modulePath
=
m_appPath
/
"../Resources/modules"
;
// this is the relative path for module resources. It is relative to the path of the lib containing the module.
// The MacOSX bundle stores the modules in Resources/modules. We want the additional resources to be stored in the module's directory.
m_moduleResourcePathRelative
=
boost
::
filesystem
::
path
(
"."
);
}
...
...
src/qtgui/WQtGui.cpp
View file @
f0174c53
...
...
@@ -158,7 +158,7 @@ int WQtGui::run()
WApplication
appl
(
m_argc
,
m_argv
,
true
);
// the call path of the application, this uses QApplication which needs to be instantiated.
boost
::
filesystem
::
path
walnutBin
=
boost
::
filesystem
::
path
(
QApplication
::
applicationDirPath
().
toStdString
()
);
boost
::
filesystem
::
path
walnutBin
(
QApplication
::
applicationDirPath
().
toStdString
()
);
// setup path helper which provides several paths to others
#ifdef Q_OS_OSX
...
...
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