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
dbcd3bbd
Commit
dbcd3bbd
authored
Feb 03, 2011
by
Mathias Goldau
Browse files
[FIX] Now ow also starts when argv[0] is empty since Qt looks up the path for us.
parent
4f0dad66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/gui/qt4/WQt4Gui.cpp
src/gui/qt4/WQt4Gui.cpp
+6
-3
No files found.
src/gui/qt4/WQt4Gui.cpp
View file @
dbcd3bbd
...
...
@@ -139,16 +139,19 @@ int WQt4Gui::run()
m_loggerConnection
=
WLogger
::
getLogger
()
->
subscribeSignal
(
WLogger
::
AddLog
,
boost
::
bind
(
&
WQt4Gui
::
slotAddLog
,
this
,
_1
)
);
wlog
::
info
(
"GUI"
)
<<
"Bringing up GUI"
;
// make qapp instance before using the applicationDirPath() function
QApplication
appl
(
m_argc
,
m_argv
,
true
);
// the call path of the application
boost
::
filesystem
::
path
walnutBin
=
boost
::
filesystem
::
path
(
std
::
string
(
m_argv
[
0
]
)
);
boost
::
filesystem
::
path
walnutBin
=
boost
::
filesystem
::
path
(
QApplication
::
applicationDirPath
().
toStdString
()
);
wlog
::
debug
(
"WQt4GUI"
)
<<
"Walnut binary path: "
<<
walnutBin
;
// setup path helper which provides several paths to others
WPathHelper
::
getPathHelper
()
->
setAppPath
(
walnutBin
.
parent_path
()
);
WPathHelper
::
getPathHelper
()
->
setAppPath
(
walnutBin
);
// init preference system
WPreferences
::
setPreferenceFile
(
WPathHelper
::
getConfigFile
()
);
QApplication
appl
(
m_argc
,
m_argv
,
true
);
// startup graphics engine
m_ge
=
WGraphicsEngine
::
getGraphicsEngine
();
...
...
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