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:
@@ -91,7 +91,8 @@ Document::Ptr TypeOfExpression::documentForExpression(const QString &expression)
|
||||
{
|
||||
// create the expression's AST.
|
||||
Document::Ptr doc = Document::create(QLatin1String("<completion>"));
|
||||
doc->setSource(expression.toUtf8());
|
||||
const QByteArray bytes = expression.toUtf8();
|
||||
doc->setSource(bytes);
|
||||
doc->parse(Document::ParseExpression);
|
||||
return doc;
|
||||
}
|
||||
|
||||
@@ -74,20 +74,6 @@ using namespace Core::Internal;
|
||||
|
||||
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=====================
|
||||
|
||||
EditorManagerPlaceHolder *EditorManagerPlaceHolder::m_current = 0;
|
||||
@@ -388,6 +374,20 @@ QSize EditorManager::minimumSizeHint() const
|
||||
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
|
||||
{
|
||||
return m_d->m_splitter;
|
||||
|
||||
@@ -444,7 +444,7 @@ void GdbEngine::handleResponse()
|
||||
break;
|
||||
}
|
||||
|
||||
if (token == -1 && *from != '&' && *from != '~') {
|
||||
if (token == -1 && *from != '&' && *from != '~' && *from != '*') {
|
||||
// FIXME: On Linux the application's std::out is merged in here.
|
||||
// High risk of falsely interpreting this as MI output.
|
||||
// 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);
|
||||
if (asyncClass == "stopped") {
|
||||
handleAsyncOutput(record);
|
||||
} else if (asyncClass == "running") {
|
||||
// Archer has 'thread-id="all"' here
|
||||
} else {
|
||||
qDebug() << "INGNORED ASYNC OUTPUT " << record.toString();
|
||||
qDebug() << "IGNORED ASYNC OUTPUT " << record.toString();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -773,11 +775,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
|
||||
if (token == -1)
|
||||
return;
|
||||
|
||||
if (!m_cookieForToken.contains(token)) {
|
||||
qDebug() << "NO SUCH TOKEN (ANYMORE): " << token;
|
||||
return;
|
||||
}
|
||||
|
||||
GdbCookie cmd = m_cookieForToken.take(token);
|
||||
|
||||
// FIXME: this falsely rejects results from the custom dumper recognition
|
||||
@@ -788,12 +785,6 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
|
||||
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
|
||||
qDebug() << "# handleOutput, "
|
||||
<< "cmd type: " << cmd.type
|
||||
|
||||
@@ -686,28 +686,19 @@ void ProjectExplorerPlugin::loadAction()
|
||||
updateActions();
|
||||
}
|
||||
|
||||
bool ProjectExplorerPlugin::saveAction(Project *pro)
|
||||
void ProjectExplorerPlugin::unloadProject()
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "ProjectExplorerPlugin::saveAction";
|
||||
qDebug() << "ProjectExplorerPlugin::unloadProject";
|
||||
|
||||
if (!pro)
|
||||
pro = m_currentProject;
|
||||
Q_ASSERT(pro);
|
||||
|
||||
Core::IFile *fi = pro->file();
|
||||
|
||||
if (!fi) // TODO Why saving the session here????
|
||||
fi = m_session->file();
|
||||
Core::IFile *fi = m_currentProject->file();
|
||||
|
||||
if (!fi || fi->fileName().isEmpty()) //nothing to save?
|
||||
return false;
|
||||
return;
|
||||
|
||||
QList<Core::IFile*> filesToSave;
|
||||
|
||||
filesToSave << fi;
|
||||
if (pro)
|
||||
filesToSave << pro->dependencies();
|
||||
filesToSave << m_currentProject->dependencies();
|
||||
|
||||
// check the number of modified files
|
||||
int readonlycount = 0;
|
||||
@@ -722,20 +713,10 @@ bool ProjectExplorerPlugin::saveAction(Project *pro)
|
||||
else
|
||||
success = m_core->fileManager()->saveModifiedFilesSilently(filesToSave).isEmpty();
|
||||
|
||||
if (success)
|
||||
addToRecentProjects(fi->fileName());
|
||||
updateActions();
|
||||
return success;
|
||||
}
|
||||
|
||||
void ProjectExplorerPlugin::unloadProject()
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "ProjectExplorerPlugin::unloadProject";
|
||||
|
||||
if (!saveAction(m_currentProject))
|
||||
if (!success)
|
||||
return;
|
||||
|
||||
addToRecentProjects(fi->fileName());
|
||||
m_session->removeProject(m_currentProject);
|
||||
updateActions();
|
||||
}
|
||||
|
||||
@@ -139,7 +139,6 @@ private slots:
|
||||
void cancelBuild();
|
||||
void debugProject();
|
||||
void editDependencies();
|
||||
bool saveAction(ProjectExplorer::Project *pro = 0);
|
||||
void loadAction();
|
||||
void unloadProject();
|
||||
void clearSession();
|
||||
|
||||
@@ -939,6 +939,7 @@ void SessionManager::removeProjects(QList<Project *> remove)
|
||||
|
||||
// Delete projects
|
||||
foreach (Project *pro, remove) {
|
||||
pro->saveSettings();
|
||||
m_file->m_projects.removeOne(pro);
|
||||
|
||||
if (pro == m_file->m_startupProject)
|
||||
|
||||
Reference in New Issue
Block a user