The IsOk() comment is:
/** @brief Was this workspace loaded successfully?
*
* @return True if the workspace was loaded successfully, false if not.
* @note Because the only way to load a workspace is through its
* constructor, and because we don't use exceptions, this is the only
* way to know if loading succeeded.
*/
virtual bool IsOK() const { return m_IsOK; }
But if you look in projectmanager.cpp for the following function:
cbWorkspace* ProjectManager::GetWorkspace()
{
if (!m_pWorkspace)
{
m_pWorkspace = new cbWorkspace(_T(""));
m_pWorkspace->SetTitle(_("Workspace"));
m_pWorkspace->SetModified(false);
}
return m_pWorkspace;
}
Which is called in compilergcc.cpp where m_pWorkspace is null will result in the IsOk() being true as the cbWorkspace::cbWorkspace constructor does not call Load() as the filename is empty
therefore does not set the m_IsOK to false!!!!
I will not be fixing this as it does not affect the GDB/MI debugger. I found this when trying speed up the compiler.gcc target build process.
Have you found out what the implications are when m_isOk is wrong?
I mean, how did you found this out?
I was looking at the state machine that drives the compilation process when adding support for ticket 1253 and extra debug logging so I could see what was happening and found this while learning how the state machine worked.
The implication with this was that the state machine and code malfunctioned in certain conditions, but I cannot remember as it was 2 months ago.
If the file name is empty then a default and valid workspace is created, so m_IsOk must be true.