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
c06fcc00
Commit
c06fcc00
authored
Mar 11, 2010
by
dt
Browse files
Fix crash for closing creator while evaluate is still in progress
parent
af3b1ce7
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/profilereader.cpp
View file @
c06fcc00
...
...
@@ -110,8 +110,6 @@ ProFile *ProFileReader::proFileFor(const QString &name)
return
m_includeFiles
.
value
(
name
);
}
ProFileCacheManager
*
ProFileCacheManager
::
s_instance
=
0
;
ProFileCacheManager
::
ProFileCacheManager
(
QObject
*
parent
)
:
...
...
src/plugins/qt4projectmanager/qt4nodes.cpp
View file @
c06fcc00
...
...
@@ -839,6 +839,11 @@ Qt4ProFileNode::~Qt4ProFileNode()
delete
it
.
value
();
}
m_parseFutureWatcher
.
waitForFinished
();
if
(
m_readerExact
)
{
// Oh we need to clean up
applyEvaluate
(
true
,
true
);
m_project
->
decrementPendingEvaluateFutures
();
}
}
bool
Qt4ProFileNode
::
isParent
(
Qt4ProFileNode
*
node
)
...
...
@@ -958,9 +963,10 @@ Qt4ProjectType proFileTemplateTypeToProjectType(ProFileEvaluator::TemplateType t
void
Qt4ProFileNode
::
applyEvaluate
(
bool
parseResult
,
bool
async
)
{
if
(
!
m_readerExact
)
return
;
if
(
!
parseResult
||
m_project
->
wasEvaluateCanceled
())
{
if
(
m_readerExact
)
m_project
->
destroyProFileReader
(
m_readerExact
);
m_project
->
destroyProFileReader
(
m_readerExact
);
if
(
m_readerCumulative
)
m_project
->
destroyProFileReader
(
m_readerCumulative
);
m_readerExact
=
m_readerCumulative
=
0
;
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
c06fcc00
...
...
@@ -248,8 +248,11 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) :
Qt4Project
::~
Qt4Project
()
{
m_asyncUpdateState
=
ShuttingDown
;
m_manager
->
unregisterProject
(
this
);
delete
m_projectFiles
;
m_cancelEvaluate
=
true
;
delete
m_rootProjectNode
;
}
void
Qt4Project
::
updateFileList
()
...
...
@@ -729,17 +732,16 @@ void Qt4Project::decrementPendingEvaluateFutures()
m_asyncUpdateFutureInterface
=
0
;
m_cancelEvaluate
=
false
;
// After beeing done, we need to call:
updateFileList
();
updateCodeModel
();
checkForNewApplicationProjects
();
checkForDeletedApplicationProjects
();
// TODO clear the profile cache ?
if
(
m_asyncUpdateState
==
AsyncFullUpdatePending
||
m_asyncUpdateState
==
AsyncPartialUpdatePending
)
{
qDebug
()
<<
" Oh update is pending start the timer"
;
m_asyncUpdateTimer
.
start
();
}
else
{
}
else
if
(
m_asyncUpdateState
!=
ShuttingDown
){
// After beeing done, we need to call:
updateFileList
();
updateCodeModel
();
checkForNewApplicationProjects
();
checkForDeletedApplicationProjects
();
qDebug
()
<<
" Setting state to Base"
;
m_asyncUpdateState
=
Base
;
}
...
...
src/plugins/qt4projectmanager/qt4project.h
View file @
c06fcc00
...
...
@@ -229,7 +229,7 @@ private:
QTimer
m_asyncUpdateTimer
;
QFutureInterface
<
void
>
*
m_asyncUpdateFutureInterface
;
int
m_pendingEvaluateFuturesCount
;
enum
AsyncUpdateState
{
NoState
,
Base
,
AsyncFullUpdatePending
,
AsyncPartialUpdatePending
,
AsyncUpdateInProgress
};
enum
AsyncUpdateState
{
NoState
,
Base
,
AsyncFullUpdatePending
,
AsyncPartialUpdatePending
,
AsyncUpdateInProgress
,
ShuttingDown
};
AsyncUpdateState
m_asyncUpdateState
;
bool
m_cancelEvaluate
;
QList
<
Internal
::
Qt4ProFileNode
*>
m_partialEvaluate
;
...
...
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