diff --git a/src/plugins/cpptools/cppselectionchanger.cpp b/src/plugins/cpptools/cppselectionchanger.cpp index 5ac29f97cac..59ac0a1634c 100644 --- a/src/plugins/cpptools/cppselectionchanger.cpp +++ b/src/plugins/cpptools/cppselectionchanger.cpp @@ -924,6 +924,9 @@ void CppSelectionChanger::fineTuneASTNodePositions(ASTNodePositions &positions) // TODO: Fix more lambda cases. LambdaIntroducerAST *lambdaIntroducerAST = lambdaExpressionAST->lambda_introducer; LambdaDeclaratorAST *lambdaDeclaratorAST = lambdaExpressionAST->lambda_declarator; + if (!lambdaDeclaratorAST) + return; + TrailingReturnTypeAST *trailingReturnTypeAST = lambdaDeclaratorAST->trailing_return_type; unsigned firstSquareBracketTokenIndex = lambdaIntroducerAST->lbracket_token; unsigned lastParenTokenIndex = lambdaDeclaratorAST->rparen_token; diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 21ddbf03360..afb4b6d9819 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -1610,12 +1610,12 @@ void SimpleTargetRunner::start() connect(&m_launcher, &ApplicationLauncher::remoteStderr, this, [this](const QString &output) { - appendMessage(output, Utils::StdErrFormatSameLine); + appendMessage(output, Utils::StdErrFormatSameLine, false); }); connect(&m_launcher, &ApplicationLauncher::remoteStdout, this, [this](const QString &output) { - appendMessage(output, Utils::StdOutFormatSameLine); + appendMessage(output, Utils::StdOutFormatSameLine, false); }); connect(&m_launcher, &ApplicationLauncher::finished, diff --git a/src/tools/qtcdebugger/main.cpp b/src/tools/qtcdebugger/main.cpp index 7453c08afca..38507c85394 100644 --- a/src/tools/qtcdebugger/main.cpp +++ b/src/tools/qtcdebugger/main.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -138,6 +139,26 @@ static bool parseArguments(const QStringList &args, QString *errorMessage) return true; } +static bool readDebugger(const wchar_t *key, QString *debugger, + QString *errorMessage) +{ + bool success = false; + HKEY handle; + const RegistryAccess::AccessMode accessMode = optIsWow +#ifdef Q_OS_WIN64 + ? RegistryAccess::Registry32Mode +#else + ? RegistryAccess::Registry64Mode +#endif + : RegistryAccess::DefaultAccessMode; + + if (openRegistryKey(HKEY_LOCAL_MACHINE, debuggerRegistryKeyC, false, &handle, accessMode, errorMessage)) { + success = registryReadStringKey(handle, key, debugger, errorMessage); + RegCloseKey(handle); + } + return success; +} + static void usage(const QString &binary, const QString &message = QString()) { QString msg; @@ -170,10 +191,16 @@ static void usage(const QString &binary, const QString &message = QString()) << "

On 64-bit systems, do the same for the key HKEY_LOCAL_MACHINE\\" << wCharToQString(debuggerWow32RegistryKeyC) << ", " << "setting the new value to

\"" << QDir::toNativeSeparators(binary) << "\" -wow %ld %ld

" << "

How to run a command with administrative privileges:

" - << "
runas /env /noprofile /user:Administrator \"command arguments\"
" - << ""; + << "
runas /env /noprofile /user:Administrator \"command arguments\"
"; + QString currentDebugger; + QString errorMessage; + if (readDebugger(debuggerRegistryValueNameC, ¤tDebugger, &errorMessage)) + str << "

Currently registered debugger:

" << currentDebugger << "
"; + str << "

Qt " << QT_VERSION_STR << ", " << QSysInfo::WordSize + << "bit

"; QMessageBox msgBox(QMessageBox::Information, QLatin1String(titleC), msg, QMessageBox::Ok); + msgBox.setTextInteractionFlags(Qt::TextBrowserInteraction); msgBox.exec(); } @@ -321,22 +348,7 @@ bool startCreatorAsDebugger(bool asClient, QString *errorMessage) bool readDefaultDebugger(QString *defaultDebugger, QString *errorMessage) { - bool success = false; - HKEY handle; - const RegistryAccess::AccessMode accessMode = optIsWow -#ifdef Q_OS_WIN64 - ? RegistryAccess::Registry32Mode -#else - ? RegistryAccess::Registry64Mode -#endif - : RegistryAccess::DefaultAccessMode; - - if (openRegistryKey(HKEY_LOCAL_MACHINE, debuggerRegistryKeyC, false, &handle, accessMode, errorMessage)) { - success = registryReadStringKey(handle, debuggerRegistryDefaultValueNameC, - defaultDebugger, errorMessage); - RegCloseKey(handle); - } - return success; + return readDebugger(debuggerRegistryDefaultValueNameC, defaultDebugger, errorMessage); } bool startDefaultDebugger(QString *errorMessage)