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:
@@ -236,13 +236,21 @@ bool CheckDeclaration::visit(FunctionDefinitionAST *ast)
|
|||||||
|
|
||||||
_scope->enterSymbol(fun);
|
_scope->enterSymbol(fun);
|
||||||
|
|
||||||
if (ast->ctor_initializer && (ty.isValid() || (fun->identity() && ! fun->identity()->isNameId()))) {
|
if (ast->ctor_initializer) {
|
||||||
translationUnit()->error(ast->ctor_initializer->firstToken(),
|
bool looksLikeCtor = false;
|
||||||
"only constructors take base initializers");
|
if (ty.isValid() || ! fun->identity())
|
||||||
|
looksLikeCtor = false;
|
||||||
|
else if (fun->identity()->isNameId() || fun->identity()->isTemplateNameId())
|
||||||
|
looksLikeCtor = true;
|
||||||
|
|
||||||
|
if (! looksLikeCtor) {
|
||||||
|
translationUnit()->error(ast->ctor_initializer->firstToken(),
|
||||||
|
"only constructors take base initializers");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int previousVisibility = semantic()->switchVisibility(Symbol::Public);
|
const int previousVisibility = semantic()->switchVisibility(Symbol::Public);
|
||||||
int previousMethodKey = semantic()->switchMethodKey(Function::NormalMethod);
|
const int previousMethodKey = semantic()->switchMethodKey(Function::NormalMethod);
|
||||||
|
|
||||||
semantic()->check(ast->function_body, fun->members());
|
semantic()->check(ast->function_body, fun->members());
|
||||||
|
|
||||||
|
|||||||
@@ -791,6 +791,11 @@ bool DebuggerManager::startNewDebugger(StartMode mode)
|
|||||||
m_processArgs = QStringList();
|
m_processArgs = QStringList();
|
||||||
m_workingDir = QString();
|
m_workingDir = QString();
|
||||||
m_attachedPID = dlg.attachPID();
|
m_attachedPID = dlg.attachPID();
|
||||||
|
if (m_attachedPID == 0) {
|
||||||
|
QMessageBox::warning(mainWindow(), tr("Warning"),
|
||||||
|
tr("Cannot attach to PID 0"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else if (startMode() == startInternal) {
|
} else if (startMode() == startInternal) {
|
||||||
if (m_executable.isEmpty()) {
|
if (m_executable.isEmpty()) {
|
||||||
QString startDirectory = m_executable;
|
QString startDirectory = m_executable;
|
||||||
|
|||||||
Reference in New Issue
Block a user