Commit 361fdad3 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/4.4'

Change-Id: I778acc044ac105a11054b314aecac5b1c2cfee6a
parents 5e38bdbf 41ae823b
Qt Creator version 4.4 contains bug fixes and new features.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/4.3..v4.4.0
General
* Added highlighting of search term in Locator results
* Added larger icons to `New` dialog
* Added locator input to extra editor and help windows (QTCREATORBUG-9696)
* Fixed theming of Debugger Console and TODO pane (QTCREATORBUG-17532)
Editing
* Added inline annotations for errors, warnings and bookmarks
* Added optional smooth scrolling when navigating within the same file
(for example with Locator or `Follow Symbol Under Cursor`)
* Added overridable `DeleteStartOfLine` and `DeleteEndOfLine` actions
(QTCREATORBUG-18095)
* Added support for relative path to active project to `Advanced Find` >
`Files in File System` (QTCREATORBUG-18139)
* Added colors to default text editor scheme (the previous default is
available as `Default Classic`)
* FakeVim
* Fixed `gt`/`gT`/`:tabnext`/`:tabprevious`
All Projects
* Improved detection of cross-compilers
CMake Projects
* Added option to filter for CMake variables in build configuration
(QTCREATORBUG-17973)
* Added warning when detecting `CMakeCache.txt` in source directory even though
build is configured for out-of-source build (QTCREATORBUG-18381)
* CMake >= 3.7
* Fixed that headers from top level directory were not shown in project tree
(QTCREATORBUG-17760)
* Improved handling of `CMAKE_RUNTIME_OUTPUT_DIRECTORY` (QTCREATORBUG-18158)
Qbs Projects
* Re-added `Qbs install` deploy step (QTCREATORBUG-17958)
* Added `rebuild` and `clean` actions to products and subprojects
(QTCREATORBUG-15919)
C++ Support
* Added option to rename files when renaming symbol using same name
(QTCREATORBUG-14696)
* Added auto-insertion of matching curly brace (QTCREATORBUG-15073)
* Fixed that C++ and Qt keywords were considered keywords in C files
(QTCREATORBUG-2818, QTCREATORBUG-18004)
* Fixed highlighting of raw string literals (QTCREATORBUG-17720)
* Fixed `Add #include` refactoring action for static functions
* Clang Code Model
* Added highlighting of identifier under cursor, which was still
delegated to built-in code model
* Improved order of items in completion list
(QTCREATORBUG-18319, QTCREATORBUG-15445)
* Fixed function signature hint when completing constructors and functors
(QTCREATORBUG-14882)
* Fixed that completing function pointer was adding parentheses
(QTCREATORBUG-17578)
* Fixed completion inside function template (QTCREATORBUG-17222)
* Fixed wrong column number with non-ASCII characters (QTCREATORBUG-16775)
* Fixed highlighting of primitive types and operators (QTCREATORBUG-17867)
* Fixed highlighting of partial template specializations
* Fixed highlighting of functions in `using` declarations
* Fixed that keywords were highlighted in preprocessor directives
(QTCREATORBUG-15516)
* Built-in Code Model
* Fixed completion of STL containers (QTCREATORBUG-1892)
QML Support
* Updated QML parser to newer QML version (QTCREATORBUG-17842)
Debugging
* Added `Alt+V` + letter shortcuts to open views
* Added dumper for `qfloat16`
* Added dumpers for `std::{optional,byte}`, `gsl::{span,byte}`, `boost::variant`
* Improved display of enum bitfields
* Fixed support for `long double` (QTCREATORBUG-18023)
* CDB
* Added support for extra debugging helpers and debugging helper
customization
* Added warning if run configuration uses unsupported shell command
Version Control Systems
* Fixed format of visual whitespace in blame, log and git rebase editors
(QTCREATORBUG-17735)
* Git
* Improved branch listing in `Show` (QTCREATORBUG-16949)
* Gerrit
* Added validation of server certificate when using REST API
* Fixed that non-Gerrit remotes were shown in `Push to Gerrit` dialog
(QTCREATORBUG-16367)
* ClearCase
* Disabled by default
Diff Viewer
* Fixed state of actions in `Edit` menu
* Fixed that context information for chunks was not shown in side-by-side view
(QTCREATORBUG-18289)
* Fixed that UI blocked when showing very large diffs
Test Integration
* Added view with complete, unprocessed test output
* Made it possible to enable and disable all tests using a specific test
framework
* QTest
* Added option to run verbose and with logging of signals and slots
(`-vb` and `-vs`)
Beautifier
* Added option for using a different AStyle configuration file
* Added option for fallback style for `clang-format`
Platform Specific
Windows
* Removed support for Windows CE
Android
* Added option to run commands before app starts and after app stopped
* Fixed state of actions in `Edit` menu in text based manifest editor
iOS
* Added UI for managing simulator devices (QTCREATORBUG-17602)
Remote Linux
* Added support for `ssh-agent` (QTCREATORBUG-16245)
Credits for these changes go to:
Alessandro Portale
Alexander Drozdov
Andre Hartmann
André Pönitz
Christian Kandeler
Christian Stenger
Daniel Teske
David Schulz
Eike Ziller
Felix Kälberer
Florian Apolloner
Friedemann Kleint
Ivan Donchevskii
Jake Petroules
Jaroslaw Kobus
Jesus Fernandez
Jochen Becher
Jörg Bornemann
Kai Köhne
Leandro T. C. Melo
Leena Miettinen
Lorenz Haas
Marco Benelli
Marco Bubke
Mitch Curtis
Montel Laurent
Nikita Baryshnikov
Nikolai Kosjar
Orgad Shaneh
Przemyslaw Gorszkowski
Robert Löhning
Serhii Moroz
Tasuku Suzuki
Thiago Macieira
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Tomasz Olszak
Tor Arne Vestbø
Ulf Hermann
Vikas Pachdha
......@@ -129,14 +129,29 @@
\image qtcreator-clang-code-model-options.png
\li In the \uicontrol {Configuration to use} list, configure the
diagnostics that Clang should issue.
\li To instruct the code model to interpret ambiguous header files as C
language files if you develop mainly using C, select the
\uicontrol {Interpret ambiguous headers as C headers} check box.
\li To process pre-compiled headers, deselect the
\uicontrol {Ignore pre-compiled headers} check box.
You can either select one of the predefined configurations, or
create a copy of a configuration and edit it to fit your needs:
\li To avoid out-of-memory crashes caused by indexing huge source files
that are typically auto-generated by scripts or code, the size of
files to index is limited to 5MB by default. To adjust the limit,
edit the value for the \uicontrol {Do not index files greater than}
check box. To index all files, deselect the check box.
\li In the \uicontrol {Clang Code Model Warnings} group, configure the
diagnostics that Clang should issue.
\list
\li In the \uicontrol {Configuration to use} list, select one of
the predefined configurations, or select \uicontrol Copy to
create a copy of a configuration and edit it to fit your
needs.
\li \uicontrol {Pedantic Warnings} uses the \c -Wpendantic
option that requests all the warnings demanded by strict
ISO C and ISO C++.
......@@ -160,15 +175,17 @@
{Options to Request or Suppress Warnings} or the GCC or Clang
manual pages.
\li To process pre-compiled headers, deselect the
\uicontrol {Ignore pre-compiled headers} check box.
\endlist
\li To avoid out-of-memory crashes caused by indexing huge source files
that are typically auto-generated by scripts or code, the size of
files to index is limited to 5MB by default. To adjust the limit,
edit the value for the \uicontrol {Do not index files greater than}
check box. To index all files, deselect the check box.
You can specify Clang settings at project level in the build settings of
the project by selecting \uicontrol Projects >
\uicontrol {Clang Code Model}. In addition to configuring the diagnostics,
you can select the \uicontrol {Enable MSVC-compliant template parsing} check
box to parse templates in a MSVC-compliant way. This enables Clang to parse
headers for example from Active Template Library (ATL) or Windows Runtime
Library (WRL). However, using the relaxed and extended rules means that no
highlighting or completion can be provided within template functions.
\endlist
\image qtcreator-clang-code-model-build-settings.png
*/
......@@ -304,9 +304,9 @@ int MetaObject::metaCall(QMetaObject::Call call, int id, void **a)
&& property(id).name() == QLatin1String("parent"))) {
QObject *contextDummyObject = objectNodeInstance->nodeInstanceServer()->dummyContextObject();
int properyIndex = contextDummyObject->metaObject()->indexOfProperty(propertyById.name());
if (properyIndex >= 0)
metaCallReturnValue = contextDummyObject->qt_metacall(call, properyIndex, a);
int propertyIndex = contextDummyObject->metaObject()->indexOfProperty(propertyById.name());
if (propertyIndex >= 0)
metaCallReturnValue = contextDummyObject->qt_metacall(call, propertyIndex, a);
}
}
*/
......
......@@ -6,7 +6,7 @@
"trDescription": "Creates an empty Nim file using UTF-8 charset.",
"trDisplayName": "Nim File",
"trDisplayCategory": "Nim",
"icon": "icon.png",
"icon": "../../projects/nim/icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('Nim') >= 0}",
"pages" :
......
......@@ -6,7 +6,7 @@
"trDescription": "Creates an empty Nim script file using UTF-8 charset.",
"trDisplayName": "Nim Script File",
"trDisplayCategory": "Nim",
"icon": "icon.png",
"icon": "../../projects/nim/icon.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('Nim') >= 0}",
"pages" :
......
......@@ -6,7 +6,7 @@
"trDescription": "Creates a deployable Qt Quick 2 application.",
"trDisplayName": "Qt Quick Application",
"trDisplayCategory": "Application",
"icon": "qml_wizard.png",
"icon": "icon-empty.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.3" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
......
......@@ -6,7 +6,7 @@
"trDescription": "Creates a deployable Qt Quick 2 application using Qt Quick Controls 2.<br/><br/><b>Note:</b> Qt Quick Controls 2 are available with Qt 5.7 and later.",
"trDisplayName": "Qt Quick Controls 2 Application",
"trDisplayCategory": "Application",
"icon": "../qtquickapplication/qml_wizard.png",
"icon": "../qtquickapplication/icon-swipe.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQtQuick.Controls.2" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
......
......@@ -27,6 +27,8 @@
#include "ObjectiveCTypeQualifiers.h"
#include "QtContextKeywords.h"
#include <utils/qtcfallthrough.h>
#include <unordered_map>
#include <utility>
......@@ -442,7 +444,7 @@ bool Parser::skipUntilStatement()
case T_AT_THROW:
if (_languageFeatures.objCEnabled)
return true;
Q_FALLTHROUGH();
default:
consumeToken();
}
......
......@@ -143,9 +143,13 @@ bool MatchingText::contextAllowsAutoParentheses(const QTextCursor &cursor,
if (!textToInsert.isEmpty())
ch = textToInsert.at(0);
if (ch == QLatin1Char('{') && cursor.block().text().trimmed().isEmpty())
return false; // User just might want to wrap up some lines.
if (!shouldInsertMatchingText(cursor) && ch != QLatin1Char('\'') && ch != QLatin1Char('"'))
return false;
else if (isInCommentHelper(cursor))
if (isInCommentHelper(cursor))
return false;
return true;
......
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include <QtGlobal>
#ifndef Q_FALLTHROUGH
#ifndef QT_HAS_CPP_ATTRIBUTE
#ifdef __has_cpp_attribute
# define QT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
#else
# define QT_HAS_CPP_ATTRIBUTE(x) 0
#endif
#endif
#if defined(__cplusplus)
#if QT_HAS_CPP_ATTRIBUTE(fallthrough)
# define Q_FALLTHROUGH() [[fallthrough]]
#elif QT_HAS_CPP_ATTRIBUTE(clang::fallthrough)
# define Q_FALLTHROUGH() [[clang::fallthrough]]
#elif QT_HAS_CPP_ATTRIBUTE(gnu::fallthrough)
# define Q_FALLTHROUGH() [[gnu::fallthrough]]
#endif
#endif
#ifndef Q_FALLTHROUGH
# if (defined(Q_CC_GNU) && Q_CC_GNU >= 700) && !defined(Q_CC_INTEL)
# define Q_FALLTHROUGH() __attribute__((fallthrough))
# else
# define Q_FALLTHROUGH() (void)0
#endif
#endif
#endif
......@@ -239,6 +239,7 @@ HEADERS += \
$$PWD/asconst.h \
$$PWD/smallstringfwd.h \
$$PWD/optional.h \
$$PWD/qtcfallthrough.h \
$$PWD/../3rdparty/optional/optional.hpp
FORMS += $$PWD/filewizardpage.ui \
......
......@@ -175,6 +175,7 @@ Project {
"proxycredentialsdialog.cpp",
"proxycredentialsdialog.h",
"proxycredentialsdialog.ui",
"qtcfallthrough.h",
"qtcassert.cpp",
"qtcassert.h",
"qtcolorbutton.cpp",
......
......@@ -99,7 +99,7 @@ IpcReceiver::IpcReceiver()
IpcReceiver::~IpcReceiver()
{
deleteAndClearWaitingAssistProcessors();
reset();
}
void IpcReceiver::setAliveHandler(const IpcReceiver::AliveHandler &handler)
......@@ -116,12 +116,6 @@ void IpcReceiver::addExpectedCodeCompletedMessage(
m_assistProcessorsTable.insert(ticket, processor);
}
void IpcReceiver::deleteAndClearWaitingAssistProcessors()
{
qDeleteAll(m_assistProcessorsTable.begin(), m_assistProcessorsTable.end());
m_assistProcessorsTable.clear();
}
void IpcReceiver::deleteProcessorsOfEditorWidget(TextEditor::TextEditorWidget *textEditorWidget)
{
QMutableHashIterator<quint64, ClangCompletionAssistProcessor *> it(m_assistProcessorsTable);
......@@ -155,6 +149,18 @@ bool IpcReceiver::isExpectingCodeCompletedMessage() const
return !m_assistProcessorsTable.isEmpty();
}
void IpcReceiver::reset()
{
// Clean up waiting assist processors
qDeleteAll(m_assistProcessorsTable.begin(), m_assistProcessorsTable.end());
m_assistProcessorsTable.clear();
// Clean up futures for references
for (ReferencesEntry &entry : m_referencesTable)
entry.futureInterface.cancel();
m_referencesTable.clear();
}
void IpcReceiver::alive()
{
if (printAliveMessage())
......@@ -719,7 +725,7 @@ void IpcCommunicator::onConnectedToBackend()
if (m_connectedCount > 1)
logRestartedDueToUnexpectedFinish();
m_ipcReceiver.deleteAndClearWaitingAssistProcessors();
m_ipcReceiver.reset();
m_ipcSender.reset(new IpcSender(m_connection));
initializeBackendWithCurrentData();
......
......@@ -73,14 +73,14 @@ public:
void setAliveHandler(const AliveHandler &handler);
void addExpectedCodeCompletedMessage(quint64 ticket, ClangCompletionAssistProcessor *processor);
void deleteAndClearWaitingAssistProcessors();
void deleteProcessorsOfEditorWidget(TextEditor::TextEditorWidget *textEditorWidget);
QFuture<CppTools::CursorInfo> addExpectedReferencesMessage(quint64 ticket,
QTextDocument *textDocument);
bool isExpectingCodeCompletedMessage() const;
void reset();
private:
void alive() override;
void echo(const ClangBackEnd::EchoMessage &message) override;
......
......@@ -278,6 +278,8 @@ namespace Internal {
ClangDiagnosticManager::ClangDiagnosticManager(TextEditor::TextDocument *textDocument)
: m_textDocument(textDocument)
{
m_textMarkDelay.setInterval(1500);
m_textMarkDelay.setSingleShot(true);
}
ClangDiagnosticManager::~ClangDiagnosticManager()
......@@ -295,6 +297,7 @@ void ClangDiagnosticManager::cleanMarks()
}
void ClangDiagnosticManager::generateTextMarks()
{
QObject::disconnect(&m_textMarkDelay, &QTimer::timeout, 0, 0);
cleanMarks();
m_clangTextMarks.reserve(m_warningDiagnostics.size() + m_errorDiagnostics.size());
addClangTextMarks(m_warningDiagnostics);
......@@ -350,6 +353,7 @@ ClangDiagnosticManager::diagnosticsAt(uint line, uint column) const
void ClangDiagnosticManager::invalidateDiagnostics()
{
m_textMarkDelay.start();
if (m_diagnosticsInvalidated)
return;
......@@ -383,9 +387,18 @@ void ClangDiagnosticManager::processNewDiagnostics(
m_showTextMarkAnnotations = showTextMarkAnnotations;
filterDiagnostics(allDiagnostics);
generateTextMarks();
generateEditorSelections();
generateFixItAvailableMarkers();
if (m_firstDiagnostics) {
m_firstDiagnostics = false;
generateTextMarks();
} else if (!m_textMarkDelay.isActive()) {
generateTextMarks();
} else {
QObject::connect(&m_textMarkDelay, &QTimer::timeout, [this]() {
generateTextMarks();
});
}
}
const QVector<ClangBackEnd::DiagnosticContainer> &
......
......@@ -34,6 +34,7 @@
#include <QList>
#include <QSet>
#include <QTextEdit>
#include <QTimer>
#include <QVector>
#include <vector>
......@@ -82,8 +83,10 @@ private:
QList<QTextEdit::ExtraSelection> m_extraSelections;
TextEditor::RefactorMarkers m_fixItAvailableMarkers;
std::vector<ClangTextMark *> m_clangTextMarks;
bool m_firstDiagnostics = true;
bool m_diagnosticsInvalidated = false;
bool m_showTextMarkAnnotations = false;
QTimer m_textMarkDelay;
};
} // namespace Internal
......
......@@ -143,7 +143,7 @@ bool ClangStaticAnalyzerPlugin::initialize(const QStringList &arguments, QString
};
RunControl::registerWorker<ClangStaticAnalyzerToolRunner>
(Constants::CLANGSTATICANALYZER_RUN_MODE, constraint);
(Constants::CLANGSTATICANALYZER_RUN_MODE, constraint, /*priority*/ -1);
return true;
}
......
......@@ -79,7 +79,9 @@ ClangStaticAnalyzerToolRunner::ClangStaticAnalyzerToolRunner(RunControl *runCont
RunConfiguration *runConfiguration = runControl->runConfiguration();
auto tool = ClangStaticAnalyzerTool::instance();
tool->stopAction()->disconnect();
connect(tool->stopAction(), &QAction::triggered, runControl, &RunControl::initiateStop);
tool->handleWorkerStart(this);
ProjectInfo projectInfoBeforeBuild = tool->projectInfoBeforeBuild();
QTC_ASSERT(projectInfoBeforeBuild.isValid(), return);
......@@ -495,10 +497,14 @@ void ClangStaticAnalyzerToolRunner::start()
m_success = false;
ClangStaticAnalyzerTool::instance()->onEngineIsStarting();
connect(runControl(), &RunControl::stopped, this, [this] {
ClangStaticAnalyzerTool::instance()->onEngineFinished(m_success);
});
QTC_ASSERT(m_projectInfo.isValid(), reportFailure(); return);
const Utils::FileName projectFile = m_projectInfo.project()->projectFilePath();
appendMessage(tr("Running Clang Static Analyzer on %1").arg(projectFile.toUserOutput())
+ QLatin1Char('\n'), Utils::NormalMessageFormat);
appendMessage(tr("Running Clang Static Analyzer on %1").arg(projectFile.toUserOutput()),
Utils::NormalMessageFormat);
// Check clang executable
bool isValidClangExecutable;
......@@ -507,7 +513,7 @@ void ClangStaticAnalyzerToolRunner::start()
if (!isValidClangExecutable) {
const QString errorMessage = tr("Clang Static Analyzer: Invalid executable \"%1\", stop.")
.arg(executable);
appendMessage(errorMessage + QLatin1Char('\n'), Utils::ErrorMessageFormat);
appendMessage(errorMessage, Utils::ErrorMessageFormat);
TaskHub::addTask(Task::Error, errorMessage, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
reportFailure();
......@@ -522,7 +528,7 @@ void ClangStaticAnalyzerToolRunner::start()
= tr("Clang Static Analyzer: Running with possibly unsupported version, "
"could not determine version from executable \"%1\".")
.arg(versionCheckExecutable);
appendMessage(warningMessage + QLatin1Char('\n'), Utils::StdErrFormat);
appendMessage(warningMessage, Utils::StdErrFormat);
TaskHub::addTask(Task::Warning, warningMessage, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
} else if (!version.isSupportedVersion()) {
......@@ -531,7 +537,7 @@ void ClangStaticAnalyzerToolRunner::start()
"supported version is %2.")
.arg(version.toString())
.arg(ClangExecutableVersion::supportedVersionAsString());
appendMessage(warningMessage + QLatin1Char('\n'), Utils::StdErrFormat);
appendMessage(warningMessage, Utils::StdErrFormat);
TaskHub::addTask(Task::Warning, warningMessage, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
}
......@@ -544,7 +550,7 @@ void ClangStaticAnalyzerToolRunner::start()
if (!temporaryDir.isValid()) {
const QString errorMessage
= tr("Clang Static Analyzer: Failed to create temporary dir, stop.");
appendMessage(errorMessage + QLatin1Char('\n'), Utils::ErrorMessageFormat);
appendMessage(errorMessage, Utils::ErrorMessageFormat);
TaskHub::addTask(Task::Error, errorMessage, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
reportFailure(errorMessage);
......@@ -599,15 +605,11 @@ void ClangStaticAnalyzerToolRunner::stop()
}
m_runners.clear();
m_unitsToProcess.clear();
appendMessage(tr("Clang Static Analyzer stopped by user.") + QLatin1Char('\n'),
appendMessage(tr("Clang Static Analyzer stopped by user."),
Utils::NormalMessageFormat);
m_progress.reportFinished();
reportStopped();
}
void ClangStaticAnalyzerToolRunner::onFinished()
{
ClangStaticAnalyzerTool::instance()->onEngineFinished(m_success);
reportStopped();
}
void ClangStaticAnalyzerToolRunner::analyzeNextFile()
......@@ -629,7 +631,7 @@ void ClangStaticAnalyzerToolRunner::analyzeNextFile()
QTC_ASSERT(runner->run(unit.file, unit.arguments), return);
appendMessage(tr("Analyzing \"%1\".").arg(
Utils::FileName::fromString(unit.file).toUserOutput()) + QLatin1Char('\n'),
Utils::FileName::fromString(unit.file).toUserOutput()),
Utils::StdOutFormat);
}
......@@ -658,9 +660,8 @@ void ClangStaticAnalyzerToolRunner::onRunnerFinishedWithSuccess(const QString &l
if (!errorMessage.isEmpty()) {
qCDebug(LOG) << "onRunnerFinishedWithSuccess: Error reading log file:" << errorMessage;
const QString filePath = qobject_cast<ClangStaticAnalyzerRunner *>(sender())->filePath();
appendMessage(tr("Failed to analyze \"%1\": %2").arg(filePath, errorMessage)
+ QLatin1Char('\n')
, Utils::StdErrFormat);
appendMessage(tr("Failed to analyze \"%1\": %2").arg(filePath, errorMessage),
Utils::StdErrFormat);
} else {
++m_filesAnalyzed;
if (!diagnostics.isEmpty())
......@@ -679,9 +680,8 @@ void ClangStaticAnalyzerToolRunner::onRunnerFinishedWithFailure(const QString &e
++m_filesNotAnalyzed;
m_success = false;
const QString filePath = qobject_cast<ClangStaticAnalyzerRunner *>(sender())->filePath();
appendMessage(tr("Failed to analyze \"%1\": %2").arg(filePath, errorMessage)
+ QLatin1Char('\n')
, Utils::StdErrFormat);
appendMessage(tr("Failed to analyze \"%1\": %2").arg(filePath, errorMessage),
Utils::StdErrFormat);
appendMessage(errorDetails, Utils::StdErrFormat);
TaskHub::addTask(Task::Warning, errorMessage, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::addTask(Task::Warning, errorDetails, Debugger::Constants::ANALYZERTASK_ID);
......@@ -699,7 +699,7 @@ void ClangStaticAnalyzerToolRunner::handleFinished()
void ClangStaticAnalyzerToolRunner::onProgressCanceled()
{
m_progress.reportCanceled();
stop();
runControl()->initiateStop();
}
void ClangStaticAnalyzerToolRunner::updateProgressValue()
......@@ -711,9 +711,7 @@ void ClangStaticAnalyzerToolRunner::finalize()
{
appendMessage(tr("Clang Static Analyzer finished: "
"Processed %1 files successfully, %2 failed.")
.arg(m_filesAnalyzed)
.arg(m_filesNotAnalyzed)
+ QLatin1Char('\n'),
.arg(m_filesAnalyzed).arg(m_filesNotAnalyzed),
Utils::NormalMessageFormat);