Merge remote-tracking branch 'origin/4.6'

Conflicts:
	src/plugins/coreplugin/locator/locator.cpp
	src/plugins/imageviewer/imageviewerplugin.cpp
	src/plugins/remotelinux/remotelinuxplugin.cpp
	src/tools/clangbackend/source/tokeninfo.cpp
	tests/unit/unittest/data/highlightingmarks.cpp

Change-Id: I74cc3ba3a2836cb9d0e65d3380d8c4f88d720c67
This commit is contained in:
Eike Ziller
2018-02-07 11:58:23 +01:00
119 changed files with 1204 additions and 589 deletions

View File

@@ -98,6 +98,8 @@
#include <QStandardPaths>
#include <QWinEventNotifier>
#include <utils/winutils.h>
#include <windows.h>
#endif
@@ -744,7 +746,7 @@ void MemcheckTool::heobAction()
}
}
if (!hasLocalRc) {
const QString msg = tr("Heob: No local run configuration available");
const QString msg = tr("Heob: No local run configuration available.");
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
return;
@@ -753,7 +755,7 @@ void MemcheckTool::heobAction()
|| abi.os() != Abi::WindowsOS
|| abi.binaryFormat() != Abi::PEFormat
|| (abi.wordWidth() != 32 && abi.wordWidth() != 64)) {
const QString msg = tr("Heob: No toolchain available");
const QString msg = tr("Heob: No toolchain available.");
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
return;
@@ -766,13 +768,13 @@ void MemcheckTool::heobAction()
// target executable
if (executable.isEmpty()) {
const QString msg = tr("Heob: No executable set");
const QString msg = tr("Heob: No executable set.");
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
return;
}
if (!QFile::exists(executable)) {
const QString msg = tr("Heob: Can't find %1").arg(executable);
const QString msg = tr("Heob: Cannot find %1.").arg(executable);
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
return;
@@ -853,7 +855,7 @@ void MemcheckTool::heobAction()
CREATE_UNICODE_ENVIRONMENT | CREATE_SUSPENDED | CREATE_NEW_CONSOLE, envPtr,
reinterpret_cast<LPCWSTR>(workingDirectory.utf16()), &si, &pi)) {
DWORD e = GetLastError();
const QString msg = tr("Heob: Can't create %1 process (%2)").arg(heob).arg(qt_error_string(e));
const QString msg = tr("Heob: Cannot create %1 process (%2).").arg(heob).arg(qt_error_string(e));
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
return;
@@ -1114,13 +1116,13 @@ void MemcheckTool::engineFinished()
const int issuesFound = updateUiAfterFinishedHelper();
Debugger::showPermanentStatusMessage(
tr("Memory Analyzer Tool finished, %n issues were found.", 0, issuesFound));
tr("Memory Analyzer Tool finished. %n issues were found.", 0, issuesFound));
}
void MemcheckTool::loadingExternalXmlLogFileFinished()
{
const int issuesFound = updateUiAfterFinishedHelper();
QString statusMessage = tr("Log file processed, %n issues were found.", 0, issuesFound);
QString statusMessage = tr("Log file processed. %n issues were found.", 0, issuesFound);
if (!m_exitMsg.isEmpty())
statusMessage += ' ' + m_exitMsg;
Debugger::showPermanentStatusMessage(statusMessage);
@@ -1503,15 +1505,7 @@ void HeobData::processFinished()
debugger->setStartMode(AttachExternal);
debugger->setCloseMode(DetachAtClose);
debugger->setContinueAfterAttach(true);
HANDLE p = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, m_data[1]);
if (p != NULL) {
wchar_t path[MAX_PATH];
DWORD pathLen = MAX_PATH;
if (QueryFullProcessImageName(p, 0, path, &pathLen))
debugger->setInferiorExecutable(QString::fromWCharArray(path));
CloseHandle(p);
}
debugger->setInferiorExecutable(Utils::imageName(m_data[1]));
connect(m_runControl, &RunControl::started, this, &HeobData::debugStarted);
connect(m_runControl, &RunControl::stopped, this, &HeobData::debugStopped);
@@ -1530,21 +1524,21 @@ void HeobData::processFinished()
break;
case HEOB_PROCESS_FAIL:
exitMsg = tr("Can't create target process");
exitMsg = tr("Cannot create target process.");
if (m_data[1])
exitMsg += " (" + qt_error_string(m_data[1]) + ')';
break;
case HEOB_WRONG_BITNESS:
exitMsg = tr("Wrong bitness");
exitMsg = tr("Wrong bitness.");
break;
case HEOB_PROCESS_KILLED:
exitMsg = tr("Process killed");
exitMsg = tr("Process killed.");
break;
case HEOB_NO_CRT:
exitMsg = tr("Only works with dynamically linked CRT");
exitMsg = tr("Only works with dynamically linked CRT.");
break;
case HEOB_EXCEPTION:
@@ -1553,15 +1547,15 @@ void HeobData::processFinished()
break;
case HEOB_OUT_OF_MEMORY:
exitMsg = tr("Not enough memory to keep track of allocations");
exitMsg = tr("Not enough memory to keep track of allocations.");
break;
case HEOB_UNEXPECTED_END:
exitMsg = tr("Unexpected end of application");
exitMsg = tr("Application stopped unexpectedly.");
break;
case HEOB_CONSOLE:
exitMsg = tr("Extra console");
exitMsg = tr("Extra console.");
break;
case HEOB_HELP:
@@ -1570,11 +1564,11 @@ void HeobData::processFinished()
return;
default:
exitMsg = tr("Unknown exit reason");
exitMsg = tr("Unknown exit reason.");
break;
}
} else {
exitMsg = tr("Unexpected end of heob");
exitMsg = tr("Heob stopped unexpectedly.");
}
if (needErrorMsg) {
@@ -1613,7 +1607,7 @@ void HeobData::sendHeobAttachPid(DWORD pid)
}
}
const QString msg = tr("Heob: Failure in process attach handshake (%1)").arg(qt_error_string(e));
const QString msg = tr("Heob: Failure in process attach handshake (%1).").arg(qt_error_string(e));
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
deleteLater();