Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
olena
Commits
beb71cd3
Commit
beb71cd3
authored
Dec 07, 2011
by
Guillaume Lazzara
Committed by
Roland Levillain
Jun 30, 2014
Browse files
demo/viewer/runner.cc: Make detection of scribo-xml2doc more robust.
Signed-off-by:
Roland Levillain
<
roland@lrde.epita.fr
>
parent
d5d6227f
Changes
2
Hide whitespace changes
Inline
Side-by-side
scribo/ChangeLog
View file @
beb71cd3
2011-12-07 Guillaume Lazzara <z@lrde.epita.fr>
* demo/viewer/runner.cc: Make detection of scribo-xml2doc more
robust.
2014-06-27 Roland Levillain <roland@lrde.epita.fr>
2014-06-27 Roland Levillain <roland@lrde.epita.fr>
Address compiler warnings in Scribo.
Address compiler warnings in Scribo.
...
...
scribo/demo/viewer/runner.cc
View file @
beb71cd3
...
@@ -37,14 +37,23 @@ static
...
@@ -37,14 +37,23 @@ static
QString
get_pathto
(
const
QString
&
file
,
QString
get_pathto
(
const
QString
&
file
,
const
QString
localdirsuffix
=
QString
())
const
QString
localdirsuffix
=
QString
())
{
{
// Not installed ?
QFile
f
(
SCRIBO_LOCAL_DEMODIR
"/"
+
localdirsuffix
+
"/"
+
file
);
QFile
f
(
SCRIBO_LOCAL_DEMODIR
"/"
+
localdirsuffix
+
"/"
+
file
);
if
(
f
.
exists
())
if
(
f
.
exists
())
return
SCRIBO_LOCAL_DEMODIR
"/"
+
localdirsuffix
;
return
SCRIBO_LOCAL_DEMODIR
"/"
+
localdirsuffix
;
// Installed in a specific path ?
f
.
setFileName
(
SCRIBO_PREFIX_LIBEXECDIR
"/"
+
file
);
f
.
setFileName
(
SCRIBO_PREFIX_LIBEXECDIR
"/"
+
file
);
if
(
f
.
exists
())
if
(
f
.
exists
())
return
SCRIBO_PREFIX_LIBEXECDIR
;
return
SCRIBO_PREFIX_LIBEXECDIR
;
// Installed in a specific path but moved elsewhere ?
QDir
dir
(
QCoreApplication
::
applicationDirPath
());
dir
.
cdUp
();
// move from prefix/bin to prefix/
f
.
setFileName
(
dir
.
currentPath
()
+
"/libexec/scribo"
+
file
);
if
(
f
.
exists
())
return
dir
.
currentPath
()
+
"/libexec/scribo"
;
qDebug
()
<<
"FATAL ERROR: Can't locate file: "
+
file
;
qDebug
()
<<
"FATAL ERROR: Can't locate file: "
+
file
;
return
""
;
return
""
;
...
...
Write
Preview
Supports
Markdown
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