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
Marco Bubke
flatpak-qt-creator
Commits
ba5750d4
Commit
ba5750d4
authored
Sep 08, 2010
by
Tobias Hunger
Browse files
Handle more make errors
parent
de885384
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/gnumakeparser.cpp
View file @
ba5750d4
...
...
@@ -49,7 +49,7 @@ GnuMakeParser::GnuMakeParser(const QString &dir) :
m_makeDir
.
setPattern
(
QLatin1String
(
MAKE_PATTERN
)
+
QLatin1String
(
"(
\\
w+) directory .(.+).$"
));
m_makeDir
.
setMinimal
(
true
);
m_makeLine
.
setPattern
(
QLatin1String
(
MAKE_PATTERN
)
+
QLatin1String
(
"
\\
*
\\
*
\\
*
\\
s(.*)$"
));
m_makeLine
.
setPattern
(
QLatin1String
(
MAKE_PATTERN
)
+
QLatin1String
(
"
(
\\
*
\\
*
\\
*
\\
s
)?
(.*)$"
));
m_makeLine
.
setMinimal
(
true
);
m_makefileError
.
setPattern
(
QLatin1String
(
"^(.*):(
\\
d+):
\\
s
\\
*
\\
*
\\
*
\\
s(.*)$"
));
m_makefileError
.
setMinimal
(
true
);
...
...
@@ -93,11 +93,12 @@ void GnuMakeParser::stdError(const QString &line)
return
;
}
if
(
m_makeLine
.
indexIn
(
lne
)
>
-
1
)
{
++
m_fatalErrorCount
;
if
(
!
m_makeLine
.
cap
(
7
).
isEmpty
())
++
m_fatalErrorCount
;
if
(
!
m_suppressIssues
)
{
m_suppressIssues
=
true
;
addTask
(
Task
(
Task
::
Error
,
m_makeLine
.
cap
(
7
),
m_makeLine
.
cap
(
8
),
QString
()
/* filename */
,
-
1
,
/* line */
Constants
::
TASK_CATEGORY_BUILDSYSTEM
));
...
...
@@ -308,6 +309,18 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
Constants
::
TASK_CATEGORY_BUILDSYSTEM
))
<<
QString
()
<<
QStringList
();
QTest
::
newRow
(
"missing g++"
)
<<
QStringList
()
<<
QString
::
fromLatin1
(
"make: g++: Command not found"
)
<<
OutputParserTester
::
STDERR
<<
QString
()
<<
QString
()
<<
(
QList
<
Task
>
()
<<
Task
(
Task
::
Error
,
QString
::
fromLatin1
(
"g++: Command not found"
),
QString
(),
-
1
,
Constants
::
TASK_CATEGORY_BUILDSYSTEM
))
<<
QString
()
<<
QStringList
();
}
void
ProjectExplorerPlugin
::
testGnuMakeParserParsing
()
...
...
src/plugins/projectexplorer/taskwindow.cpp
View file @
ba5750d4
...
...
@@ -509,9 +509,8 @@ public:
QMenu
*
m_contextMenu
;
QModelIndex
m_contextMenuIndex
;
ITaskHandler
*
m_defaultHandler
;
QToolButton
*
m_filterWarningsButton
;
QToolButton
*
m_categoriesButton
;
QMenu
*
m_categoriesMenu
;
QToolButton
*
m_filterButton
;
QMenu
*
m_filterMenu
;
TaskHub
*
m_taskHub
;
};
...
...
@@ -569,20 +568,16 @@ TaskWindow::TaskWindow(TaskHub *taskhub) : d(new TaskWindowPrivate)
connect
(
d
->
m_listview
,
SIGNAL
(
customContextMenuRequested
(
QPoint
)),
this
,
SLOT
(
showContextMenu
(
QPoint
)));
d
->
m_filter
WarningsButton
=
createFilterButton
(
d
->
m_model
->
taskTypeIcon
(
Task
::
Warning
),
tr
(
"Show Warnings"
),
this
,
SLOT
(
setShowWarnings
(
bool
)));
d
->
m_filter
Menu
=
new
QMenu
;
connect
(
d
->
m_filterMenu
,
SIGNAL
(
aboutToShow
()),
this
,
SLOT
(
updateCategoriesMenu
()));
connect
(
d
->
m_filterMenu
,
SIGNAL
(
triggered
(
QAction
*
)),
this
,
SLOT
(
filterMenuTriggered
(
QAction
*
)));
d
->
m_categoriesMenu
=
new
QMenu
;
connect
(
d
->
m_categoriesMenu
,
SIGNAL
(
aboutToShow
()),
this
,
SLOT
(
updateCategoriesMenu
()));
connect
(
d
->
m_categoriesMenu
,
SIGNAL
(
triggered
(
QAction
*
)),
this
,
SLOT
(
filterCategoryTriggered
(
QAction
*
)));
d
->
m_categoriesButton
=
new
QToolButton
;
d
->
m_categoriesButton
->
setIcon
(
QIcon
(
QLatin1String
(
Core
::
Constants
::
ICON_FILTER
)));
d
->
m_categoriesButton
->
setToolTip
(
tr
(
"Filter by categories"
));
d
->
m_categoriesButton
->
setAutoRaise
(
true
);
d
->
m_categoriesButton
->
setPopupMode
(
QToolButton
::
InstantPopup
);
d
->
m_categoriesButton
->
setMenu
(
d
->
m_categoriesMenu
);
d
->
m_filterButton
=
new
QToolButton
;
d
->
m_filterButton
->
setIcon
(
QIcon
(
QLatin1String
(
Core
::
Constants
::
ICON_FILTER
)));
d
->
m_filterButton
->
setToolTip
(
tr
(
"Filter by categories"
));
d
->
m_filterButton
->
setAutoRaise
(
true
);
d
->
m_filterButton
->
setPopupMode
(
QToolButton
::
InstantPopup
);
d
->
m_filterButton
->
setMenu
(
d
->
m_filterMenu
);
connect
(
d
->
m_taskHub
,
SIGNAL
(
categoryAdded
(
QString
,
QString
)),
this
,
SLOT
(
addCategory
(
QString
,
QString
)));
...
...
@@ -598,7 +593,6 @@ TaskWindow::~TaskWindow()
{
Core
::
ICore
::
instance
()
->
removeContextObject
(
d
->
m_taskWindowContext
);
cleanContextMenu
();
delete
d
->
m_filterWarningsButton
;
delete
d
->
m_listview
;
delete
d
->
m_filter
;
delete
d
->
m_model
;
...
...
@@ -607,7 +601,7 @@ TaskWindow::~TaskWindow()
QList
<
QWidget
*>
TaskWindow
::
toolBarWidgets
()
const
{
return
QList
<
QWidget
*>
()
<<
d
->
m_filter
WarningsButton
<<
d
->
m_categories
Button
;
return
QList
<
QWidget
*>
()
<<
d
->
m_filterButton
;
}
QWidget
*
TaskWindow
::
outputWidget
(
QWidget
*
)
...
...
@@ -731,38 +725,80 @@ void TaskWindow::setShowWarnings(bool show)
void
TaskWindow
::
updateCategoriesMenu
()
{
d
->
m_
categories
Menu
->
clear
();
d
->
m_
filter
Menu
->
clear
();
const
QStringList
filteredCategories
=
d
->
m_filter
->
filteredCategories
();
foreach
(
const
QString
&
categoryId
,
d
->
m_model
->
categoryIds
())
{
const
QString
categoryName
=
d
->
m_model
->
categoryDisplayName
(
categoryId
);
QAction
*
action
=
new
QAction
(
d
->
m_
categories
Menu
);
QAction
*
action
=
new
QAction
(
d
->
m_
filter
Menu
);
action
->
setCheckable
(
true
);
action
->
setText
(
categoryName
);
action
->
setData
(
categoryId
);
action
->
setChecked
(
!
filteredCategories
.
contains
(
categoryId
));
d
->
m_
categories
Menu
->
addAction
(
action
);
d
->
m_
filter
Menu
->
addAction
(
action
);
}
d
->
m_filterMenu
->
addSeparator
();
QAction
*
unknownType
=
new
QAction
(
d
->
m_model
->
taskTypeIcon
(
Task
::
Unknown
),
tr
(
"Informational"
),
d
->
m_filterMenu
);
unknownType
->
setCheckable
(
true
);
unknownType
->
setData
(
Task
::
Unknown
);
unknownType
->
setChecked
(
d
->
m_filter
->
filterIncludesUnknowns
());
d
->
m_filterMenu
->
addAction
(
unknownType
);
QAction
*
warningType
=
new
QAction
(
d
->
m_model
->
taskTypeIcon
(
Task
::
Warning
),
tr
(
"Warnings"
),
d
->
m_filterMenu
);
warningType
->
setCheckable
(
true
);
warningType
->
setData
(
Task
::
Warning
);
warningType
->
setChecked
(
d
->
m_filter
->
filterIncludesUnknowns
());
d
->
m_filterMenu
->
addAction
(
warningType
);
QAction
*
errorType
=
new
QAction
(
d
->
m_model
->
taskTypeIcon
(
Task
::
Error
),
tr
(
"Errors"
),
d
->
m_filterMenu
);
errorType
->
setCheckable
(
true
);
errorType
->
setData
(
Task
::
Error
);
errorType
->
setChecked
(
d
->
m_filter
->
filterIncludesUnknowns
());
d
->
m_filterMenu
->
addAction
(
errorType
);
}
void
TaskWindow
::
filter
Category
Triggered
(
QAction
*
action
)
void
TaskWindow
::
filter
Menu
Triggered
(
QAction
*
action
)
{
QString
categoryId
=
action
->
data
().
toString
();
Q_ASSERT
(
!
categoryId
.
isEmpty
());
if
(
action
->
data
().
type
()
==
QVariant
::
String
)
{
QString
categoryId
=
action
->
data
().
toString
();
Q_ASSERT
(
!
categoryId
.
isEmpty
());
QStringList
categories
=
d
->
m_filter
->
filteredCategories
();
Q_ASSERT
(
d
->
m_filter
->
filteredCategories
().
contains
(
categoryId
)
==
action
->
isChecked
());
QStringList
categories
=
d
->
m_filter
->
filteredCategories
();
Q_ASSERT
(
d
->
m_filter
->
filteredCategories
().
contains
(
categoryId
)
==
action
->
isChecked
());
if
(
action
->
isChecked
())
{
categories
.
removeOne
(
categoryId
);
if
(
action
->
isChecked
())
{
categories
.
removeOne
(
categoryId
);
}
else
{
categories
.
append
(
categoryId
);
}
d
->
m_filter
->
setFilteredCategories
(
categories
);
}
else
{
categories
.
append
(
categoryId
);
}
bool
ok
;
Task
::
TaskType
type
=
static_cast
<
Task
::
TaskType
>
(
action
->
data
().
toInt
(
&
ok
));
Q_ASSERT
(
ok
);
switch
(
type
)
{
case
ProjectExplorer
::
Task
::
Unknown
:
d
->
m_filter
->
setFilterIncludesUnknowns
(
action
->
isChecked
());
break
;
case
ProjectExplorer
::
Task
::
Error
:
d
->
m_filter
->
setFilterIncludesErrors
(
action
->
isChecked
());
break
;
case
ProjectExplorer
::
Task
::
Warning
:
d
->
m_filter
->
setFilterIncludesWarnings
(
action
->
isChecked
());
break
;
d
->
m_filter
->
setFilteredCategories
(
categories
);
}
}
}
int
TaskWindow
::
taskCount
()
const
...
...
src/plugins/projectexplorer/taskwindow.h
View file @
ba5750d4
...
...
@@ -91,7 +91,7 @@ private slots:
void
contextMenuEntryTriggered
(
QAction
*
);
void
setShowWarnings
(
bool
);
void
updateCategoriesMenu
();
void
filter
Category
Triggered
(
QAction
*
action
);
void
filter
Menu
Triggered
(
QAction
*
action
);
private:
void
cleanContextMenu
();
...
...
src/plugins/qt4projectmanager/qt-s60/s60devices.cpp
View file @
ba5750d4
...
...
@@ -400,7 +400,7 @@ AutoDetectS60QtDevices::AutoDetectS60QtDevices(QObject *parent) :
// Detect a Qt version that is installed into a Symbian SDK
static
QString
detect_SDK_installedQt
(
const
QString
&
epocRoot
)
{
const
QString
coreLibDllFileName
=
epocRoot
+
QLatin1String
(
"/epoc32/release/
winscw
/udeb/QtCore.dll"
);
const
QString
coreLibDllFileName
=
epocRoot
+
QLatin1String
(
"/epoc32/release/
armv5
/udeb/QtCore.dll"
);
QFile
coreLibDllFile
(
coreLibDllFileName
);
if
(
!
coreLibDllFile
.
exists
()
||
!
coreLibDllFile
.
open
(
QIODevice
::
ReadOnly
))
return
QString
();
...
...
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