Merge remote-tracking branch 'origin/4.6'

Conflicts:
	src/plugins/projectexplorer/msvctoolchain.cpp

Change-Id: If2116aa2dbfdb9d07088595e791f8fa706b39e00
This commit is contained in:
Eike Ziller
2018-03-28 10:01:44 +02:00
11 changed files with 55 additions and 22 deletions

View File

@@ -41,6 +41,11 @@ All Projects
* Added filtering to project kit setup page
CMake Projects
* Fixed that files could be shown multiple times in project tree
(QTCREATORBUG-19020)
Qbs Projects
* Added option to add library paths to dependencies (QTCREATORBUG-19274)
@@ -56,6 +61,7 @@ C++ Support
* Integrated Clang-Tidy and Clazy.
Enable checks in Options > C++ > Code Model > Clang Code Model Warnings
* Added separate highlighting for function definitions (QTCREATORBUG-16625)
* Fixed issues with non-UTF-8 strings (QTCREATORBUG-16941)
QML Support
@@ -71,6 +77,7 @@ Debugging
Qt Quick Designer
* Added font and text properties from Qt 5.10
* Added `Add New Resources` to item library
* Fixed that items blurred when zooming in
* Fixed crash when changing control focus policy (QTCREATORBUG-19563)
* Fixed assert in backend process with Qt 5.9.4 & 5.10.1 and later
@@ -92,6 +99,7 @@ Diff Viewer
Test Integration
* Added Qt Quick Test to auto test wizard
* Added grouping of test cases (QTCREATORBUG-17979)
* Fixed handling of `qCritical` output (QTCREATORBUG-19795)
* Google Test

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.

View File

@@ -4,7 +4,7 @@ include(config/qtcreator-project.qdocconf)
HTML.footer = \
" </div>\n" \
" <p class=\"copy-notice\">\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2017 The Qt Company Ltd.\n" \
" <acronym title=\"Copyright\">&copy;</acronym> $QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners. " \
" The documentation provided herein is licensed under the terms of the" \

View File

@@ -1,3 +1,23 @@
# Run qdoc from the directory that contains this file.
include(config/qtcreator-project.qdocconf)
include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)
HTML.footer = \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
"</div>\n" \
"<div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> $QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners.<br>" \
" The documentation provided herein is licensed under the terms of the" \
" <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation" \
" License version 1.3</a> as published by the Free Software Foundation.<br>" \
" Qt and respective logos are trademarks of The Qt Company Ltd. " \
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
" of their respective owners. </p>\n" \
"</div>\n" \

View File

@@ -15,7 +15,9 @@ qdocindex.name = QDOC_INDEX_DIR
qdocindex.value = $$[QT_INSTALL_DOCS]
qtcdocsdir.name = QTC_DOCS_DIR
qtcdocsdir.value = $$IDE_SOURCE_TREE/doc
QDOC_ENV += qtcver qtcvertag qtdocs qdocindex qtcdocsdir
qtccopyrightyear.name = QTCREATOR_COPYRIGHT_YEAR
qtccopyrightyear.value = $$QTCREATOR_COPYRIGHT_YEAR
QDOC_ENV += qtcver qtcvertag qtdocs qdocindex qtcdocsdir qtccopyrightyear
DOC_INDEX_PATHS += $$IDE_BUILD_TREE/doc
DOC_HTML_INSTALLDIR = $$INSTALL_DOC_PATH

View File

@@ -52,6 +52,8 @@ void RefactoringEngine::startLocalRenaming(const CppTools::CursorInEditor &data,
return defaultCallback();
QObject::connect(&m_watcher, &FutureCursorWatcher::finished, [=]() {
if (m_watcher.isCanceled())
return defaultCallback();
const CppTools::CursorInfo info = m_watcher.result();
if (info.useRanges.empty())
return defaultCallback();

View File

@@ -311,10 +311,7 @@ GenericMakeAllStepFactory::GenericMakeAllStepFactory()
{
struct Step : GenericMakeStep
{
Step(BuildStepList *bsl) : GenericMakeStep(bsl)
{
setBuildTarget("all", true);
}
Step(BuildStepList *bsl) : GenericMakeStep(bsl, QString("all")) { }
};
registerStep<Step>(GENERIC_MS_ID);

View File

@@ -798,7 +798,10 @@ void ClangClToolChainConfigWidget::setFromClangClToolChain()
// clang-cl.exe as a [to some extent] compatible drop-in replacement for cl.
// --------------------------------------------------------------------------
static const char clangClBinary[] = "clang-cl.exe";
static QString compilerFromPath(const QString &path)
{
return path + "/bin/clang-cl.exe";
}
ClangClToolChain::ClangClToolChain(const QString &name, const QString &llvmDir,
const Abi &abi,
@@ -806,7 +809,6 @@ ClangClToolChain::ClangClToolChain(const QString &name, const QString &llvmDir,
Detection d)
: MsvcToolChain(Constants::CLANG_CL_TOOLCHAIN_TYPEID, name, abi, varsBat, varsBatArg, language, d)
, m_llvmDir(llvmDir)
, m_compiler(Utils::FileName::fromString(m_llvmDir + QStringLiteral("/bin/") + QLatin1String(clangClBinary)))
{ }
ClangClToolChain::ClangClToolChain() : MsvcToolChain(Constants::CLANG_CL_TOOLCHAIN_TYPEID)
@@ -814,7 +816,7 @@ ClangClToolChain::ClangClToolChain() : MsvcToolChain(Constants::CLANG_CL_TOOLCHA
bool ClangClToolChain::isValid() const
{
return MsvcToolChain::isValid() && m_compiler.exists();
return MsvcToolChain::isValid() && compilerCommand().exists();
}
void ClangClToolChain::addToEnvironment(Utils::Environment &env) const
@@ -823,6 +825,11 @@ void ClangClToolChain::addToEnvironment(Utils::Environment &env) const
env.prependOrSetPath(m_llvmDir + QStringLiteral("/bin"));
}
Utils::FileName ClangClToolChain::compilerCommand() const
{
return Utils::FileName::fromString(compilerFromPath(m_llvmDir));
}
QString ClangClToolChain::typeDisplayName() const
{
return QCoreApplication::translate("ProjectExplorer::ClangToolChainFactory", "Clang");
@@ -1017,7 +1024,7 @@ static void detectClangClToolChain(QList<ToolChain *> *list)
const QString path = QDir::cleanPath(registry.value(QStringLiteral(".")).toString());
if (path.isEmpty())
return;
const QString clangClPath = path + QStringLiteral("/bin/") + QLatin1String(clangClBinary);
const QString clangClPath = compilerFromPath(path);
const unsigned char wordWidth = Utils::is64BitWindowsBinary(clangClPath) ? 64 : 32;
const ToolChain *toolChain = selectMsvcToolChain(clangClPath, *list, wordWidth);
if (!toolChain) {

View File

@@ -114,7 +114,7 @@ public:
QString typeDisplayName() const override;
QList<Utils::FileName> suggestedMkspecList() const override;
void addToEnvironment(Utils::Environment &env) const override;
Utils::FileName compilerCommand() const override { return m_compiler; }
Utils::FileName compilerCommand() const override;
IOutputParser *outputParser() const override;
ToolChain *clone() const override;
QVariantMap toMap() const override;
@@ -125,7 +125,6 @@ public:
private:
QString m_llvmDir;
Utils::FileName m_compiler;
};
// --------------------------------------------------------------------------

View File

@@ -1319,13 +1319,7 @@ void tst_Dumpers::dumper()
"\n#define BREAK qtcDebugBreakFunction();"
"\n\nvoid unused(const void *first,...) { (void) first; }"
"\n#else"
"\n#include <stdint.h>"
"\n#ifndef _WIN32"
"\ntypedef char CHAR;"
"\ntypedef char *PCHAR;"
"\ntypedef wchar_t WCHAR;"
"\ntypedef wchar_t *PWCHAR;"
"\n#endif\n";
"\n#include <stdint.h>";
if (m_debuggerEngine == LldbEngine)
//#ifdef Q_OS_MAC
@@ -5231,7 +5225,11 @@ void tst_Dumpers::dumper_data()
QTest::newRow("CharArrays")
<< Data("",
<< Data("#ifndef _WIN32\n"
"#include <wchar.h>\n"
"typedef char CHAR;\n"
"typedef wchar_t WCHAR;\n"
"#endif\n",
"char s[] = \"aöa\";\n"
"char t[] = \"aöax\";\n"
"wchar_t w[] = L\"aöa\";\n"