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

Change-Id: I9665e3ae097f3d472692254d7f1fee0fe5757fb5
This commit is contained in:
Eike Ziller
2018-10-22 09:47:05 +02:00
10 changed files with 81 additions and 5 deletions

48
dist/changes-4.7.2.md vendored Normal file
View File

@@ -0,0 +1,48 @@
Qt Creator version 4.7.2 contains bug fixes.
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/v4.7.1..v4.7.2
Editing
* Fixed that collapsed text no longer showed up in tooltip (QTCREATORBUG-21040)
* Fixed crash with generic text completion (QTCREATORBUG-21192)
C++ Support
* Fixed wrong value of `__cplusplus` define (QTCREATORBUG-20884)
* Clang Code Model
* Fixed possible crash in `Follow Symbol Under Cursor`
* Fixed crash when using `Select Block Up/Down` with lambda
(QTCREATORBUG-20994)
Debugging
* CDB
* Fixed pretty printing of `std::vector` without Python (QTCREATORBUG-21074)
Platform Specific
Windows
* Fixed saving of files when another application blocks atomic save operation
(QTCREATORBUG-7668)
Remote Linux
* Fixed superfluous empty lines in application output (QTCREATORBUG-19367)
Credits for these changes go to:
David Schulz
Eike Ziller
Friedemann Kleint
Hannes Domani
Ivan Donchevskii
Jonathan Liu
Kai Köhne
Nikolai Kosjar
Sergey Belyashov

View File

@@ -31,6 +31,7 @@
#include "../project.h" #include "../project.h"
#include "../projectexplorer.h" #include "../projectexplorer.h"
#include "../projectexplorerconstants.h" #include "../projectexplorerconstants.h"
#include "../projecttree.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
@@ -290,7 +291,7 @@ void JsonWizard::accept()
openFiles(m_files); openFiles(m_files);
auto node = static_cast<ProjectExplorer::Node*>(value(ProjectExplorer::Constants::PREFERRED_PROJECT_NODE).value<void*>()); auto node = static_cast<ProjectExplorer::Node*>(value(ProjectExplorer::Constants::PREFERRED_PROJECT_NODE).value<void*>());
if (node) // PREFERRED_PROJECT_NODE is not set for newly created projects if (node && ProjectTree::hasNode(node)) // PREFERRED_PROJECT_NODE is not set for newly created projects
openProjectForNode(node); openProjectForNode(node);
} }

View File

@@ -1296,6 +1296,11 @@ bool MsvcToolChain::operator ==(const ToolChain &other) const
return m_varsBatArg == msvcTc->m_varsBatArg; return m_varsBatArg == msvcTc->m_varsBatArg;
} }
void MsvcToolChain::cancelMsvcToolChainDetection()
{
envModThreadPool()->clear();
}
bool MsvcToolChainFactory::canRestore(const QVariantMap &data) bool MsvcToolChainFactory::canRestore(const QVariantMap &data)
{ {
const Core::Id id = typeIdFromMap(data); const Core::Id id = typeIdFromMap(data);

View File

@@ -82,6 +82,8 @@ public:
bool operator == (const ToolChain &) const override; bool operator == (const ToolChain &) const override;
static void cancelMsvcToolChainDetection();
protected: protected:
explicit MsvcToolChain(Core::Id typeId, const QString &name, const Abi &abi, explicit MsvcToolChain(Core::Id typeId, const QString &name, const Abi &abi,
const QString &varsBat, const QString &varsBatArg, const QString &varsBat, const QString &varsBatArg,

View File

@@ -1710,6 +1710,7 @@ ExtensionSystem::IPlugin::ShutdownFlag ProjectExplorerPlugin::aboutToShutdown()
disconnect(ModeManager::instance(), &ModeManager::currentModeChanged, disconnect(ModeManager::instance(), &ModeManager::currentModeChanged,
dd, &ProjectExplorerPluginPrivate::currentModeChanged); dd, &ProjectExplorerPluginPrivate::currentModeChanged);
ProjectTree::aboutToShutDown(); ProjectTree::aboutToShutDown();
ToolChainManager::aboutToShutdown();
SessionManager::closeAllProjects(); SessionManager::closeAllProjects();
dd->m_shuttingDown = true; dd->m_shuttingDown = true;

View File

@@ -127,12 +127,18 @@ ProjectWelcomePage::ProjectWelcomePage()
auto act = new QAction(tr("Open Session #%1").arg(i), this); auto act = new QAction(tr("Open Session #%1").arg(i), this);
Command *cmd = ActionManager::registerAction(act, sessionBase.withSuffix(i), welcomeContext); Command *cmd = ActionManager::registerAction(act, sessionBase.withSuffix(i), welcomeContext);
cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? tr("Ctrl+Meta+%1") : tr("Ctrl+Alt+%1")).arg(i))); cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? tr("Ctrl+Meta+%1") : tr("Ctrl+Alt+%1")).arg(i)));
connect(act, &QAction::triggered, this, [this, i] { openSessionAt(i - 1); }); connect(act, &QAction::triggered, this, [this, i] {
if (i <= m_sessionModel->rowCount())
openSessionAt(i - 1);
});
act = new QAction(tr("Open Recent Project #%1").arg(i), this); act = new QAction(tr("Open Recent Project #%1").arg(i), this);
cmd = ActionManager::registerAction(act, projectBase.withSuffix(i), welcomeContext); cmd = ActionManager::registerAction(act, projectBase.withSuffix(i), welcomeContext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+%1").arg(i))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+%1").arg(i)));
connect(act, &QAction::triggered, this, [this, i] { openProjectAt(i - 1); }); connect(act, &QAction::triggered, this, [this, i] {
if (i <= m_projectModel->rowCount(QModelIndex()))
openProjectAt(i - 1);
});
} }
} }

View File

@@ -456,10 +456,11 @@ void ProjectWizardPage::initializeProjectTree(Node *context, const QStringList &
} }
root->prependChild(createNoneNode(&selector)); root->prependChild(createNoneNode(&selector));
// Set combobox to context node: // Set combobox to context node if that appears in the tree:
auto predicate = [context](TreeItem *ti) { return static_cast<AddNewTree*>(ti)->node() == context; }; auto predicate = [context](TreeItem *ti) { return static_cast<AddNewTree*>(ti)->node() == context; };
TreeItem *contextItem = root->findAnyChild(predicate); TreeItem *contextItem = root->findAnyChild(predicate);
m_ui->projectComboBox->setCurrentIndex(m_model.indexForItem(contextItem)); if (contextItem)
m_ui->projectComboBox->setCurrentIndex(m_model.indexForItem(contextItem));
setAdditionalInfo(selector.deployingProjects()); setAdditionalInfo(selector.deployingProjects());
setBestNode(selector.bestChoice()); setBestNode(selector.bestChoice());

View File

@@ -27,6 +27,7 @@
#include "abi.h" #include "abi.h"
#include "kitinformation.h" #include "kitinformation.h"
#include "msvctoolchain.h"
#include "toolchain.h" #include "toolchain.h"
#include "toolchainsettingsaccessor.h" #include "toolchainsettingsaccessor.h"
@@ -249,4 +250,11 @@ bool ToolChainManager::isLanguageSupported(const Core::Id &id)
return Utils::contains(d->m_languages, Utils::equal(&LanguageDisplayPair::id, id)); return Utils::contains(d->m_languages, Utils::equal(&LanguageDisplayPair::id, id));
} }
void ToolChainManager::aboutToShutdown()
{
#ifdef Q_OS_WIN
MsvcToolChain::cancelMsvcToolChainDetection();
#endif
}
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -74,6 +74,8 @@ public:
static QString displayNameOfLanguageId(const Core::Id &id); static QString displayNameOfLanguageId(const Core::Id &id);
static bool isLanguageSupported(const Core::Id &id); static bool isLanguageSupported(const Core::Id &id);
static void aboutToShutdown();
void saveToolChains(); void saveToolChains();
signals: signals:

View File

@@ -177,6 +177,8 @@ void WinDebugInterface::dispatchDebugOutput()
m_outputMutex.lock(); m_outputMutex.lock();
for (auto &entry : m_debugOutput) { for (auto &entry : m_debugOutput) {
std::vector<QString> &src = entry.second; std::vector<QString> &src = entry.second;
if (src.empty())
continue;
QString dst; QString dst;
size_t n = std::min(maxMessagesToSend, src.size()); size_t n = std::min(maxMessagesToSend, src.size());
for (size_t i = 0; i < n; ++i) for (size_t i = 0; i < n; ++i)