Merge remote-tracking branch 'origin/4.7' into 4.8

Change-Id: Iaae859601ae4f529c1fa7ada3a5c569820abb0d6
This commit is contained in:
Eike Ziller
2018-09-26 09:38:33 +02:00
8 changed files with 26 additions and 14 deletions

View File

@@ -43,7 +43,7 @@ class SourceNameIdDoesNotExists : std::exception
public:
const char *what() const noexcept override
{
return "The source name id does not exists in the database!";
return "The source name id does not exist in the database!";
}
};
@@ -52,7 +52,7 @@ class DirectoryPathIdDoesNotExists : std::exception
public:
const char *what() const noexcept override
{
return "The directory path id does not exists in the database!";
return "The directory path id does not exist in the database!";
}
};

View File

@@ -226,7 +226,7 @@ void SqlStatementBuilder::clearSqlStatement()
void SqlStatementBuilder::checkIfPlaceHolderExists(Utils::SmallStringView name) const
{
if (name.size() < 2 || !name.startsWith('$') || !m_sqlTemplate.contains(name))
throwException("SqlStatementBuilder::bind: placeholder name does not exists!", name.data());
throwException("SqlStatementBuilder::bind: placeholder name does not exist!", name.data());
}
void SqlStatementBuilder::checkIfNoPlaceHoldersAynmoreExists() const

View File

@@ -320,7 +320,7 @@ class FollowSymbolUnderCursorTokenAction : public TestActionsTestCase::AbstractA
{
public:
/// Follow symbol under cursor
/// Warning: May block if file does not exists (e.g. a not generated ui_* file).
/// Warning: May block if file does not exist (e.g. a not generated ui_* file).
void run(CppEditorWidget *editorWidget);
};
@@ -511,7 +511,7 @@ void CppEditorPlugin::test_moveTokenWiseThroughEveryFile()
TestActionsTestCase(singleAction(ActionPointer(new NoOpTokenAction)));
}
/// May block if file does not exists (e.g. a not generated ui_* file).
/// May block if file does not exist (e.g. a not generated ui_* file).
void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndFollowSymbol()
{
TestActionsTestCase(singleAction(ActionPointer(new FollowSymbolUnderCursorTokenAction)));

View File

@@ -244,13 +244,19 @@ void SshDeviceProcess::handleProcessFinished(int exitStatus)
void SshDeviceProcess::handleStdout()
{
d->stdOut += d->process->readAllStandardOutput();
QByteArray output = d->process->readAllStandardOutput();
if (output.isEmpty())
return;
d->stdOut += output;
emit readyReadStandardOutput();
}
void SshDeviceProcess::handleStderr()
{
d->stdErr += d->process->readAllStandardError();
QByteArray output = d->process->readAllStandardError();
if (output.isEmpty())
return;
d->stdErr += output;
emit readyReadStandardError();
}

View File

@@ -385,6 +385,8 @@ static Utils::FileName findLocalCompiler(const Utils::FileName &compilerPath,
return path.isEmpty() ? compilerPath : path;
}
Q_GLOBAL_STATIC_WITH_ARGS(const QVector<QByteArray>, unwantedMacros, ({"__cplusplus"}))
ToolChain::PredefinedMacrosRunner GccToolChain::createPredefinedMacrosRunner() const
{
// Using a clean environment breaks ccache/distcc/etc.
@@ -442,17 +444,20 @@ ToolChain::PredefinedMacrosRunner GccToolChain::createPredefinedMacrosRunner() c
= gccPredefinedMacros(findLocalCompiler(compilerCommand, env),
arguments,
env.toStringList());
macroCache->insert(arguments, macros);
const QVector<Macro> filteredMacros = Utils::filtered(macros, [](const Macro &m) {
return !unwantedMacros->contains(m.key);
});
macroCache->insert(arguments, filteredMacros);
qCDebug(gccLog) << "Reporting macros to code model:";
for (const Macro &m : macros) {
for (const Macro &m : filteredMacros) {
qCDebug(gccLog) << compilerCommand.toUserOutput()
<< (lang == Constants::CXX_LANGUAGE_ID ? ": C++ [" : ": C [")
<< arguments.join(", ") << "]"
<< QString::fromUtf8(m.toByteArray());
}
return macros;
return filteredMacros;
};
}

View File

@@ -749,8 +749,9 @@ void MemcheckTool::heobAction()
TaskHub::requestPopup();
return;
}
if (!QFile::exists(executable)
&& !QFile::exists(Utils::HostOsInfo::withExecutableSuffix(executable))) {
if (!QFile::exists(executable))
executable = Utils::HostOsInfo::withExecutableSuffix(executable);
if (!QFile::exists(executable)) {
const QString msg = tr("Heob: Cannot find %1.").arg(executable);
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();

View File

@@ -52,7 +52,7 @@ enum class PreferredTranslationUnit
#endif
// CLANG-UPGRADE-CHECK: Remove IS_SKIPWARNINGSFROMINCLUDEDFILES_SUPPORTED once we require clang >= 7.0
#if defined(CINDEX_VERSION_HAS_SKIPWARNINGSFROMINCLUDEDFILES_BACKPORTED) || CINDEX_VERSION_MINOR >= 46
#if defined(CINDEX_VERSION_HAS_SKIPWARNINGSFROMINCLUDEDFILES_BACKPORTED)
# define IS_SKIPWARNINGSFROMINCLUDEDFILES_SUPPORTED
#endif

View File

@@ -58,7 +58,7 @@ DocumentDoesNotExistException::DocumentDoesNotExistException(const Utf8String &f
+ filePath
+ Utf8StringLiteral("' with the project part id '")
+ projectPartId
+ Utf8StringLiteral("' does not exists!");
+ Utf8StringLiteral("' does not exist!");
}
DocumentFileDoesNotExistException::DocumentFileDoesNotExistException(