Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
2dc6ea68
Commit
2dc6ea68
authored
Aug 12, 2010
by
Tobias Hunger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve SBSv2 parser
* Report all commands that failed.
parent
7a5df3c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
14 deletions
+41
-14
src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
+41
-14
No files found.
src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
View file @
2dc6ea68
...
...
@@ -148,23 +148,50 @@ void SbsV2Parser::readWarning()
void
SbsV2Parser
::
readRecipe
()
{
Q_ASSERT
(
m_log
.
isStartElement
()
&&
m_log
.
name
()
==
QLatin1String
(
"recipe"
));
const
QString
name
=
m_log
.
attributes
().
value
(
QLatin1String
(
"name"
)).
toString
();
m_currentSource
=
QDir
(
m_log
.
attributes
().
value
(
"source"
).
toString
()).
absolutePath
();
m_currentTarget
=
QDir
(
m_log
.
attributes
().
value
(
"target"
).
toString
()).
absolutePath
();
int
returnCode
=
0
;
QString
outputText
;
QXmlStreamReader
::
TokenType
tokenType
=
QXmlStreamReader
::
Invalid
;
while
((
tokenType
=
m_log
.
readNext
())
!=
QXmlStreamReader
::
Invalid
)
{
if
(
tokenType
==
QXmlStreamReader
::
Characters
)
{
outputText
.
append
(
m_log
.
text
());
}
else
if
(
tokenType
==
QXmlStreamReader
::
StartElement
)
{
if
(
m_log
.
name
()
==
QLatin1String
(
"status"
))
{
if
(
m_log
.
attributes
().
value
(
QLatin1String
(
"exit"
))
==
QLatin1String
(
"failed"
))
returnCode
=
m_log
.
attributes
().
value
(
QLatin1String
(
"code"
)).
toString
().
toInt
();
}
}
else
if
(
tokenType
==
QXmlStreamReader
::
EndElement
)
{
if
(
m_log
.
name
()
==
QLatin1String
(
"recipe"
))
break
;
}
}
if
(
name
==
QLatin1String
(
"compile"
)
||
name
==
QLatin1String
(
"qmake_extra_pre_targetdep"
))
{
m_currentSource
=
QDir
(
m_log
.
attributes
().
value
(
"source"
).
toString
()).
absolutePath
();
m_currentTarget
=
QDir
(
m_log
.
attributes
().
value
(
"target"
).
toString
()).
absolutePath
();
qDebug
()
<<
"SOURCE:"
<<
m_currentSource
.
absolutePath
();
qDebug
()
<<
"TARGET:"
<<
m_currentTarget
.
absolutePath
();
QStringList
output
=
m_log
.
readElementText
().
split
(
QChar
(
'\n'
));
foreach
(
const
QString
&
line
,
output
)
{
if
(
line
.
isEmpty
()
||
line
.
startsWith
(
QChar
(
'+'
)))
continue
;
IOutputParser
::
stdError
(
line
);
QStringList
output
=
outputText
.
split
(
QChar
(
'\n'
));
outputText
.
clear
();
foreach
(
const
QString
&
line
,
output
)
{
if
(
line
.
isEmpty
())
continue
;
if
(
line
.
startsWith
(
QChar
(
'+'
)))
{
outputText
.
append
(
tr
(
"Running command: %1
\n
"
).
arg
(
line
.
mid
(
2
)));
continue
;
}
}
else
{
m_log
.
skipCurrentElement
();
outputText
.
append
(
line
);
outputText
.
append
(
QChar
(
'\n'
));
if
(
name
==
QLatin1String
(
"compile"
)
||
name
==
QLatin1String
(
"qmake_extra_pre_targetdep"
))
IOutputParser
::
stdError
(
line
);
}
if
(
returnCode
!=
0
)
{
//: %1 is the SBSv2 build recipe name, %2 the return code of the failed command
QString
description
=
tr
(
"Recipe %1 failed with exit code %2."
).
arg
(
name
).
arg
(
returnCode
);
m_hub
->
addTask
(
Task
(
Task
::
Error
,
description
,
QString
(),
-
1
,
ProjectExplorer
::
Constants
::
TASK_CATEGORY_BUILDSYSTEM
));
m_hub
->
addTask
(
Task
(
Task
::
Unknown
,
outputText
,
QString
(),
-
1
,
ProjectExplorer
::
Constants
::
TASK_CATEGORY_BUILDSYSTEM
));
}
}
...
...
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