forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.0'
Conflicts: src/plugins/valgrind/valgrindruncontrolfactory.cpp Change-Id: I96c0f8cc3b49f8f55f45ef1f839857f878f532f4
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "clangstaticanalyzerutils.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QThread>
|
||||
|
||||
namespace ClangStaticAnalyzer {
|
||||
@@ -63,7 +64,8 @@ ClangStaticAnalyzerConfigWidget::ClangStaticAnalyzerConfigWidget(
|
||||
chooser->setValidationFunction(validator);
|
||||
bool clangExeIsSet;
|
||||
const QString clangExe = settings->clangExecutable(&clangExeIsSet);
|
||||
chooser->lineEdit()->setPlaceholderText(settings->defaultClangExecutable());
|
||||
chooser->lineEdit()->setPlaceholderText(QDir::toNativeSeparators(
|
||||
settings->defaultClangExecutable()));
|
||||
if (clangExeIsSet) {
|
||||
chooser->setPath(clangExe);
|
||||
} else {
|
||||
|
||||
@@ -585,7 +585,7 @@ void ClangStaticAnalyzerRunControl::handleFinished()
|
||||
void ClangStaticAnalyzerRunControl::onProgressCanceled()
|
||||
{
|
||||
m_progress.reportCanceled();
|
||||
m_progress.reportFinished();
|
||||
stop();
|
||||
}
|
||||
|
||||
void ClangStaticAnalyzerRunControl::updateProgressValue()
|
||||
|
||||
@@ -2051,6 +2051,15 @@ void DebuggerEngine::updateItem(const QByteArray &iname)
|
||||
doUpdateLocals(params);
|
||||
}
|
||||
|
||||
void DebuggerEngine::updateWatchData(const QByteArray &iname)
|
||||
{
|
||||
// This is used in cases where re-evaluation is ok for the same iname
|
||||
// e.g. when changing the expression in a watcher.
|
||||
UpdateParameters params;
|
||||
params.partialVariable = iname;
|
||||
doUpdateLocals(params);
|
||||
}
|
||||
|
||||
void DebuggerEngine::expandItem(const QByteArray &iname)
|
||||
{
|
||||
updateItem(iname);
|
||||
|
||||
@@ -200,6 +200,7 @@ public:
|
||||
virtual bool canHandleToolTip(const DebuggerToolTipContext &) const;
|
||||
virtual void expandItem(const QByteArray &iname); // Called when item in tree gets expanded.
|
||||
virtual void updateItem(const QByteArray &iname); // Called for fresh watch items.
|
||||
void updateWatchData(const QByteArray &iname); // FIXME: Merge with above.
|
||||
virtual void selectWatchData(const QByteArray &iname);
|
||||
|
||||
virtual void startDebugger(DebuggerRunControl *runControl);
|
||||
|
||||
@@ -163,6 +163,8 @@
|
||||
#include <cpptools/cpptoolstestcase.h>
|
||||
#include <cpptools/projectinfo.h>
|
||||
|
||||
#include <utils/executeondestruction.h>
|
||||
|
||||
#include <QTest>
|
||||
#include <QSignalSpy>
|
||||
#include <QTestEventLoop>
|
||||
@@ -3704,6 +3706,9 @@ void DebuggerUnitTests::testStateMachine()
|
||||
ProjectExplorerPlugin::buildProject(SessionManager::startupProject());
|
||||
loop.exec();
|
||||
|
||||
ExecuteOnDestruction guard([] () {
|
||||
EditorManager::closeAllEditors(false);
|
||||
});
|
||||
DebuggerRunParameters rp;
|
||||
Target *t = SessionManager::startupProject()->activeTarget();
|
||||
QVERIFY(t);
|
||||
@@ -3720,7 +3725,6 @@ void DebuggerUnitTests::testStateMachine()
|
||||
});
|
||||
|
||||
QTestEventLoop::instance().enterLoop(5);
|
||||
EditorManager::closeAllEditors(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1448,7 +1448,7 @@ void WatchHandler::watchExpression(const QString &exp0, const QString &name)
|
||||
item->setValue(QString(QLatin1Char(' ')));
|
||||
item->update();
|
||||
} else {
|
||||
m_model->m_engine->updateItem(item->iname);
|
||||
m_model->m_engine->updateWatchData(item->iname);
|
||||
}
|
||||
updateWatchersWindow();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "qbsconstants.h"
|
||||
|
||||
#include <projectexplorer/abi.h>
|
||||
#include <projectexplorer/gcctoolchain.h>
|
||||
#include <projectexplorer/kit.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
@@ -156,6 +157,19 @@ QVariantMap DefaultPropertyProvider::properties(const ProjectExplorer::Kit *k,
|
||||
return data;
|
||||
}
|
||||
|
||||
struct MSVCVersion
|
||||
{
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
};
|
||||
|
||||
static MSVCVersion msvcCompilerVersion(const ProjectExplorer::Abi &abi)
|
||||
{
|
||||
MSVCVersion v;
|
||||
v.major = abi.osFlavor() - ProjectExplorer::Abi::WindowsMsvc2005Flavor + 14;
|
||||
return v;
|
||||
}
|
||||
|
||||
QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplorer::Kit *k,
|
||||
const QVariantMap &defaultData) const
|
||||
{
|
||||
@@ -228,16 +242,25 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
|
||||
const QString toolchainPrefix = extractToolchainPrefix(&compilerName);
|
||||
if (!toolchainPrefix.isEmpty())
|
||||
data.insert(QLatin1String(CPP_TOOLCHAINPREFIX), toolchainPrefix);
|
||||
if (toolchain.contains(QLatin1String("msvc")))
|
||||
if (toolchain.contains(QLatin1String("msvc"))) {
|
||||
data.insert(QLatin1String(CPP_COMPILERNAME), compilerName);
|
||||
else
|
||||
const MSVCVersion v = msvcCompilerVersion(targetAbi);
|
||||
data.insert(QLatin1String(CPP_COMPILERVERSIONMAJOR), v.major);
|
||||
data.insert(QLatin1String(CPP_COMPILERVERSIONMINOR), v.minor);
|
||||
} else {
|
||||
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), compilerName);
|
||||
}
|
||||
if (targetAbi.os() != ProjectExplorer::Abi::WindowsOS
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
|
||||
data.insert(QLatin1String(CPP_LINKERNAME), compilerName);
|
||||
}
|
||||
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath());
|
||||
|
||||
if (ProjectExplorer::GccToolChain *gcc = dynamic_cast<ProjectExplorer::GccToolChain *>(tc)) {
|
||||
data.insert(QLatin1String(CPP_PLATFORMCOMMONCOMPILERFLAGS), gcc->platformCodeGenFlags());
|
||||
data.insert(QLatin1String(CPP_PLATFORMLINKERFLAGS), gcc->platformLinkerFlags());
|
||||
}
|
||||
|
||||
// TODO: Remove this once compiler version properties are set for MSVC
|
||||
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
|
||||
|
||||
@@ -455,6 +455,8 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) :
|
||||
connect(m_step, SIGNAL(qbsBuildOptionsChanged()), this, SLOT(updateState()));
|
||||
connect(&QbsProjectManagerSettings::instance(), &QbsProjectManagerSettings::settingsBaseChanged,
|
||||
this, &QbsBuildStepConfigWidget::updateState);
|
||||
connect(step->buildConfiguration()->target(), &ProjectExplorer::Target::buildDirectoryChanged,
|
||||
this, &QbsBuildStepConfigWidget::updateState);
|
||||
|
||||
setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
|
||||
@@ -37,9 +37,14 @@ const char CPP_TOOLCHAINPATH[] = "cpp.toolchainInstallPath";
|
||||
const char CPP_TOOLCHAINPREFIX[] = "cpp.toolchainPrefix";
|
||||
const char CPP_COMPILERNAME[] = "cpp.compilerName";
|
||||
const char CPP_CXXCOMPILERNAME[] = "cpp.cxxCompilerName";
|
||||
const char CPP_COMPILERVERSIONMAJOR[] = "cpp.compilerVersionMajor";
|
||||
const char CPP_COMPILERVERSIONMINOR[] = "cpp.compilerVersionMinor";
|
||||
const char CPP_COMPILERVERSIONPATCH[] = "cpp.compilerVersionPatch";
|
||||
const char CPP_LINKERNAME[] = "cpp.linkerName";
|
||||
const char CPP_PLATFORMCFLAGS[] = "cpp.platformCFlags";
|
||||
const char CPP_PLATFORMCXXFLAGS[] = "cpp.platformCxxFlags";
|
||||
const char CPP_PLATFORMCOMMONCOMPILERFLAGS[] = "cpp.platformCommonCompilerFlags";
|
||||
const char CPP_PLATFORMLINKERFLAGS[] = "cpp.platformLinkerFlags";
|
||||
const char CPP_PLATFORMPATH[] = "cpp.platformPath";
|
||||
const char CPP_XCODESDKNAME[] = "cpp.xcodeSdkName";
|
||||
const char CPP_XCODESDKVERSION[] = "cpp.xcodeSdkVersion";
|
||||
|
||||
@@ -659,6 +659,7 @@ void TextDocumentLayout::FoldValidator::process(QTextBlock block)
|
||||
&& !TextDocumentLayout::canFold(previous))
|
||||
|| (!TextDocumentLayout::isFolded(previous)
|
||||
&& TextDocumentLayout::canFold(previous)
|
||||
&& previous.isVisible()
|
||||
&& !block.isVisible())) {
|
||||
TextDocumentLayout::setFolded(previous, !TextDocumentLayout::isFolded(previous));
|
||||
}
|
||||
|
||||
@@ -50,12 +50,15 @@ def getQtCreatorVersionFromFile():
|
||||
return ""
|
||||
|
||||
def checkQtCreatorHelpVersion(expectedVersion):
|
||||
def rightStart(x):
|
||||
return x.startswith('Qt Creator Manual')
|
||||
|
||||
switchViewTo(ViewConstants.HELP)
|
||||
try:
|
||||
helpContentWidget = waitForObject(':Qt Creator_QHelpContentWidget', 5000)
|
||||
waitFor("helpContentWidget.model().rowCount > 0", 2000)
|
||||
waitFor("any(map(rightStart, dumpItems(helpContentWidget.model())))", 10000)
|
||||
items = dumpItems(helpContentWidget.model())
|
||||
test.compare(filter(lambda x: x.startswith('Qt Creator Manual'), items)[0],
|
||||
test.compare(filter(rightStart, items)[0],
|
||||
'Qt Creator Manual %s' % expectedVersion,
|
||||
'Verifying whether manual uses expected version.')
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user