forked from qt-creator/qt-creator
Merge branch '0.9.1-beta' of git@scm.dev.nokia.troll.no:creator/mainline into 0.9.1-beta
This commit is contained in:
@@ -1191,6 +1191,11 @@ bool Parser::parseClassSpecifier(SpecifierAST *&node)
|
|||||||
NameAST *name = 0;
|
NameAST *name = 0;
|
||||||
parseName(name);
|
parseName(name);
|
||||||
|
|
||||||
|
bool parsed = false;
|
||||||
|
|
||||||
|
const bool previousInFunctionBody = _inFunctionBody;
|
||||||
|
_inFunctionBody = false;
|
||||||
|
|
||||||
if (LA() == T_COLON || LA() == T_LBRACE) {
|
if (LA() == T_COLON || LA() == T_LBRACE) {
|
||||||
BaseSpecifierAST *base_clause = 0;
|
BaseSpecifierAST *base_clause = 0;
|
||||||
if (LA() == T_COLON) {
|
if (LA() == T_COLON) {
|
||||||
@@ -1233,9 +1238,12 @@ bool Parser::parseClassSpecifier(SpecifierAST *&node)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
node = ast;
|
node = ast;
|
||||||
return true;
|
parsed = true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
_inFunctionBody = previousInFunctionBody;
|
||||||
|
|
||||||
|
return parsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Parser::parseAccessSpecifier(SpecifierAST *&node)
|
bool Parser::parseAccessSpecifier(SpecifierAST *&node)
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ Document::Ptr TypeOfExpression::documentForExpression(const QString &expression)
|
|||||||
{
|
{
|
||||||
// create the expression's AST.
|
// create the expression's AST.
|
||||||
Document::Ptr doc = Document::create(QLatin1String("<completion>"));
|
Document::Ptr doc = Document::create(QLatin1String("<completion>"));
|
||||||
doc->setSource(expression.toUtf8());
|
const QByteArray bytes = expression.toUtf8();
|
||||||
|
doc->setSource(bytes);
|
||||||
doc->parse(Document::ParseExpression);
|
doc->parse(Document::ParseExpression);
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,20 +74,6 @@ using namespace Core::Internal;
|
|||||||
|
|
||||||
enum { debugEditorManager=0 };
|
enum { debugEditorManager=0 };
|
||||||
|
|
||||||
QString EditorManager::defaultExternalEditor() const
|
|
||||||
{
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
return m_d->m_core->resourcePath()
|
|
||||||
+QLatin1String("/runInTerminal.command vi %f %l %c %W %H %x %y");
|
|
||||||
#elif defined(Q_OS_UNIX)
|
|
||||||
return QLatin1String("xterm -geom %Wx%H+%x+%y -e vi %f +%l +\"normal %c|\"");
|
|
||||||
#elif defined (Q_OS_WIN)
|
|
||||||
return QLatin1String("notepad %f");
|
|
||||||
#else
|
|
||||||
return QString();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
//===================EditorManager=====================
|
//===================EditorManager=====================
|
||||||
|
|
||||||
EditorManagerPlaceHolder *EditorManagerPlaceHolder::m_current = 0;
|
EditorManagerPlaceHolder *EditorManagerPlaceHolder::m_current = 0;
|
||||||
@@ -388,6 +374,20 @@ QSize EditorManager::minimumSizeHint() const
|
|||||||
return QSize(400, 300);
|
return QSize(400, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString EditorManager::defaultExternalEditor() const
|
||||||
|
{
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
return m_d->m_core->resourcePath()
|
||||||
|
+QLatin1String("/runInTerminal.command vi %f %l %c %W %H %x %y");
|
||||||
|
#elif defined(Q_OS_UNIX)
|
||||||
|
return QLatin1String("xterm -geom %Wx%H+%x+%y -e vi %f +%l +\"normal %c|\"");
|
||||||
|
#elif defined (Q_OS_WIN)
|
||||||
|
return QLatin1String("notepad %f");
|
||||||
|
#else
|
||||||
|
return QString();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
EditorSplitter *EditorManager::editorSplitter() const
|
EditorSplitter *EditorManager::editorSplitter() const
|
||||||
{
|
{
|
||||||
return m_d->m_splitter;
|
return m_d->m_splitter;
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ void GdbEngine::handleResponse()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (token == -1 && *from != '&' && *from != '~') {
|
if (token == -1 && *from != '&' && *from != '~' && *from != '*') {
|
||||||
// FIXME: On Linux the application's std::out is merged in here.
|
// FIXME: On Linux the application's std::out is merged in here.
|
||||||
// High risk of falsely interpreting this as MI output.
|
// High risk of falsely interpreting this as MI output.
|
||||||
// We assume that we _always_ use tokens, so not finding a token
|
// We assume that we _always_ use tokens, so not finding a token
|
||||||
@@ -493,8 +493,10 @@ void GdbEngine::handleResponse()
|
|||||||
m_inbuffer = QByteArray(from, to - from);
|
m_inbuffer = QByteArray(from, to - from);
|
||||||
if (asyncClass == "stopped") {
|
if (asyncClass == "stopped") {
|
||||||
handleAsyncOutput(record);
|
handleAsyncOutput(record);
|
||||||
|
} else if (asyncClass == "running") {
|
||||||
|
// Archer has 'thread-id="all"' here
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "INGNORED ASYNC OUTPUT " << record.toString();
|
qDebug() << "IGNORED ASYNC OUTPUT " << record.toString();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -773,11 +775,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
|
|||||||
if (token == -1)
|
if (token == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!m_cookieForToken.contains(token)) {
|
|
||||||
qDebug() << "NO SUCH TOKEN (ANYMORE): " << token;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GdbCookie cmd = m_cookieForToken.take(token);
|
GdbCookie cmd = m_cookieForToken.take(token);
|
||||||
|
|
||||||
// FIXME: this falsely rejects results from the custom dumper recognition
|
// FIXME: this falsely rejects results from the custom dumper recognition
|
||||||
@@ -788,12 +785,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We get _two_ results for a '-exec-foo' command: First a
|
|
||||||
// 'running' notification, then a 'stopped' or similar.
|
|
||||||
// So put it back.
|
|
||||||
if (record.resultClass == GdbResultRunning)
|
|
||||||
m_cookieForToken[token] = cmd;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
qDebug() << "# handleOutput, "
|
qDebug() << "# handleOutput, "
|
||||||
<< "cmd type: " << cmd.type
|
<< "cmd type: " << cmd.type
|
||||||
|
|||||||
@@ -686,28 +686,19 @@ void ProjectExplorerPlugin::loadAction()
|
|||||||
updateActions();
|
updateActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProjectExplorerPlugin::saveAction(Project *pro)
|
void ProjectExplorerPlugin::unloadProject()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "ProjectExplorerPlugin::saveAction";
|
qDebug() << "ProjectExplorerPlugin::unloadProject";
|
||||||
|
|
||||||
if (!pro)
|
Core::IFile *fi = m_currentProject->file();
|
||||||
pro = m_currentProject;
|
|
||||||
Q_ASSERT(pro);
|
|
||||||
|
|
||||||
Core::IFile *fi = pro->file();
|
|
||||||
|
|
||||||
if (!fi) // TODO Why saving the session here????
|
|
||||||
fi = m_session->file();
|
|
||||||
|
|
||||||
if (!fi || fi->fileName().isEmpty()) //nothing to save?
|
if (!fi || fi->fileName().isEmpty()) //nothing to save?
|
||||||
return false;
|
return;
|
||||||
|
|
||||||
QList<Core::IFile*> filesToSave;
|
QList<Core::IFile*> filesToSave;
|
||||||
|
|
||||||
filesToSave << fi;
|
filesToSave << fi;
|
||||||
if (pro)
|
filesToSave << m_currentProject->dependencies();
|
||||||
filesToSave << pro->dependencies();
|
|
||||||
|
|
||||||
// check the number of modified files
|
// check the number of modified files
|
||||||
int readonlycount = 0;
|
int readonlycount = 0;
|
||||||
@@ -722,20 +713,10 @@ bool ProjectExplorerPlugin::saveAction(Project *pro)
|
|||||||
else
|
else
|
||||||
success = m_core->fileManager()->saveModifiedFilesSilently(filesToSave).isEmpty();
|
success = m_core->fileManager()->saveModifiedFilesSilently(filesToSave).isEmpty();
|
||||||
|
|
||||||
if (success)
|
if (!success)
|
||||||
addToRecentProjects(fi->fileName());
|
|
||||||
updateActions();
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProjectExplorerPlugin::unloadProject()
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
qDebug() << "ProjectExplorerPlugin::unloadProject";
|
|
||||||
|
|
||||||
if (!saveAction(m_currentProject))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
addToRecentProjects(fi->fileName());
|
||||||
m_session->removeProject(m_currentProject);
|
m_session->removeProject(m_currentProject);
|
||||||
updateActions();
|
updateActions();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,6 @@ private slots:
|
|||||||
void cancelBuild();
|
void cancelBuild();
|
||||||
void debugProject();
|
void debugProject();
|
||||||
void editDependencies();
|
void editDependencies();
|
||||||
bool saveAction(ProjectExplorer::Project *pro = 0);
|
|
||||||
void loadAction();
|
void loadAction();
|
||||||
void unloadProject();
|
void unloadProject();
|
||||||
void clearSession();
|
void clearSession();
|
||||||
|
|||||||
@@ -939,6 +939,7 @@ void SessionManager::removeProjects(QList<Project *> remove)
|
|||||||
|
|
||||||
// Delete projects
|
// Delete projects
|
||||||
foreach (Project *pro, remove) {
|
foreach (Project *pro, remove) {
|
||||||
|
pro->saveSettings();
|
||||||
m_file->m_projects.removeOne(pro);
|
m_file->m_projects.removeOne(pro);
|
||||||
|
|
||||||
if (pro == m_file->m_startupProject)
|
if (pro == m_file->m_startupProject)
|
||||||
|
|||||||
Reference in New Issue
Block a user