forked from qt-creator/qt-creator
Merge "Merge remote-tracking branch 'origin/4.1'"
This commit is contained in:
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
\li \l{Setting Up a Qbs Project}
|
\li \l{Setting Up a Qbs Project}
|
||||||
|
|
||||||
Qt Build Suite (Qbs) is an all-in-one build
|
\l{Qbs Manual}{Qbs} is an all-in-one build
|
||||||
tool that generates a build graph from a high-level project
|
tool that generates a build graph from a high-level project
|
||||||
description (like qmake or CMake do) and executes the commands in
|
description (like qmake or CMake do) and executes the commands in
|
||||||
the low-level build graph (like make does).
|
the low-level build graph (like make does).
|
||||||
|
|||||||
@@ -178,7 +178,6 @@ Item {
|
|||||||
expressionDialog.visible = false
|
expressionDialog.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ Welcome_BackgroundColor=normalBackground
|
|||||||
Welcome_ButtonBackgroundColor=normalBackground
|
Welcome_ButtonBackgroundColor=normalBackground
|
||||||
Welcome_DividerColor=ff555555
|
Welcome_DividerColor=ff555555
|
||||||
Welcome_HoverColor=ff444444
|
Welcome_HoverColor=ff444444
|
||||||
Welcome_LinkColor=ff5caa15
|
Welcome_LinkColor=ff78bb39
|
||||||
|
|
||||||
Timeline_TextColor=text
|
Timeline_TextColor=text
|
||||||
Timeline_BackgroundColor1=normalBackground
|
Timeline_BackgroundColor1=normalBackground
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ Welcome_BackgroundColor=normalBackground
|
|||||||
Welcome_ButtonBackgroundColor=normalBackground
|
Welcome_ButtonBackgroundColor=normalBackground
|
||||||
Welcome_DividerColor=ff555555
|
Welcome_DividerColor=ff555555
|
||||||
Welcome_HoverColor=ff444444
|
Welcome_HoverColor=ff444444
|
||||||
Welcome_LinkColor=ff5caa15
|
Welcome_LinkColor=ff7fc63c
|
||||||
|
|
||||||
Timeline_TextColor=text
|
Timeline_TextColor=text
|
||||||
Timeline_BackgroundColor1=normalBackground
|
Timeline_BackgroundColor1=normalBackground
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -301,7 +301,8 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
const char *highDpiEnvironmentVariable = setHighDpiEnvironmentVariable();
|
const char *highDpiEnvironmentVariable = setHighDpiEnvironmentVariable();
|
||||||
|
|
||||||
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
|
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false\nqtc.*.info=false"));
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
// increase the number of file that can be opened in Qt Creator.
|
// increase the number of file that can be opened in Qt Creator.
|
||||||
struct rlimit rl;
|
struct rlimit rl;
|
||||||
|
|||||||
@@ -758,14 +758,8 @@ static inline AbstractSymbolGroupNodePtrVector
|
|||||||
AddressSequence(arrayAddress, pointerSize),
|
AddressSequence(arrayAddress, pointerSize),
|
||||||
v.module(), innerType, count);
|
v.module(), innerType, count);
|
||||||
// Check condition for large||static.
|
// Check condition for large||static.
|
||||||
bool isLargeOrStatic = innerTypeSize > pointerSize;
|
const bool isLargeOrStatic = innerTypeSize > pointerSize
|
||||||
if (!isLargeOrStatic && !SymbolGroupValue::isPointerType(innerType)) {
|
|| !SymbolGroupValue::isMovable(innerType, v);
|
||||||
const KnownType kt = knownType(innerType, false); // inner type, no 'class ' prefix.
|
|
||||||
if (kt != KT_Unknown && !(kt & (KT_POD_Type|KT_Qt_PrimitiveType|KT_Qt_MovableType))
|
|
||||||
&& !(kt == KT_QStringList && QtInfo::get(v.context()).version >= 5)) {
|
|
||||||
isLargeOrStatic = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (SymbolGroupValue::verbose)
|
if (SymbolGroupValue::verbose)
|
||||||
DebugPrint() << "isLargeOrStatic " << isLargeOrStatic;
|
DebugPrint() << "isLargeOrStatic " << isLargeOrStatic;
|
||||||
if (isLargeOrStatic) {
|
if (isLargeOrStatic) {
|
||||||
@@ -776,7 +770,8 @@ static inline AbstractSymbolGroupNodePtrVector
|
|||||||
arrayChildList(v.node()->symbolGroup(),
|
arrayChildList(v.node()->symbolGroup(),
|
||||||
AddressArraySequence<ULONG64>(reinterpret_cast<const ULONG64 *>(data)),
|
AddressArraySequence<ULONG64>(reinterpret_cast<const ULONG64 *>(data)),
|
||||||
v.module(), innerType, count) :
|
v.module(), innerType, count) :
|
||||||
arrayChildList(v.node()->symbolGroup(), AddressArraySequence<ULONG32>(reinterpret_cast<const ULONG32 *>(data)),
|
arrayChildList(v.node()->symbolGroup(),
|
||||||
|
AddressArraySequence<ULONG32>(reinterpret_cast<const ULONG32 *>(data)),
|
||||||
v.module(), innerType, count);
|
v.module(), innerType, count);
|
||||||
delete [] data;
|
delete [] data;
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
@@ -163,7 +163,8 @@ bool AbstractSymbolGroupNode::accept(SymbolGroupNodeVisitor &visitor,
|
|||||||
break;
|
break;
|
||||||
case SymbolGroupNodeVisitor::VisitContinue: {
|
case SymbolGroupNodeVisitor::VisitContinue: {
|
||||||
AbstractSymbolGroupNodePtrVector c = children();
|
AbstractSymbolGroupNodePtrVector c = children();
|
||||||
if (visitor.sortChildrenAlphabetically() && !testFlags(SymbolGroupNode::PreSortedChildren)) {
|
if (visitor.sortChildrenAlphabetically()
|
||||||
|
&& !resolveReference()->testFlags(SymbolGroupNode::PreSortedChildren)) {
|
||||||
std::sort(c.begin(), c.end(), [](AbstractSymbolGroupNode *a, AbstractSymbolGroupNode *b) {
|
std::sort(c.begin(), c.end(), [](AbstractSymbolGroupNode *a, AbstractSymbolGroupNode *b) {
|
||||||
return a->name() < b->name();
|
return a->name() < b->name();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1505,6 +1505,14 @@ void formatKnownTypeFlags(std::ostream &os, KnownType kt)
|
|||||||
os << " simple_dumper";
|
os << " simple_dumper";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned SymbolGroupValue::isMovable(const std::string &t, const SymbolGroupValue &v)
|
||||||
|
{
|
||||||
|
KnownType kt = knownType(t, false);
|
||||||
|
if (kt & (KT_POD_Type | KT_Qt_MovableType | KT_Qt_PrimitiveType))
|
||||||
|
return true;
|
||||||
|
return kt == KT_QStringList && QtInfo::get(v.context()).version >= 5;
|
||||||
|
}
|
||||||
|
|
||||||
static inline DumpParameterRecodeResult
|
static inline DumpParameterRecodeResult
|
||||||
checkCharArrayRecode(const SymbolGroupValue &v)
|
checkCharArrayRecode(const SymbolGroupValue &v)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ public:
|
|||||||
static std::string moduleOfType(const std::string &type);
|
static std::string moduleOfType(const std::string &type);
|
||||||
// pointer type, return number of characters to strip
|
// pointer type, return number of characters to strip
|
||||||
static unsigned isPointerType(const std::string &);
|
static unsigned isPointerType(const std::string &);
|
||||||
|
static unsigned isMovable(const std::string &, const SymbolGroupValue &v);
|
||||||
static bool isArrayType(const std::string &);
|
static bool isArrayType(const std::string &);
|
||||||
static bool isVTableType(const std::string &t);
|
static bool isVTableType(const std::string &t);
|
||||||
// add pointer type 'Foo' -> 'Foo *', 'Foo *' -> 'Foo **'
|
// add pointer type 'Foo' -> 'Foo *', 'Foo *' -> 'Foo **'
|
||||||
|
|||||||
@@ -86,6 +86,15 @@ static QStringList uniquePaths(const QStringList &files)
|
|||||||
return paths.toList();
|
return paths.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QString toNdkArch(const QString &arch)
|
||||||
|
{
|
||||||
|
if (arch == QLatin1String("armeabi-v7a") || arch == QLatin1String("armeabi"))
|
||||||
|
return QLatin1String("arch-arm");
|
||||||
|
if (arch == QLatin1String("arm64-v8a"))
|
||||||
|
return QLatin1String("arch-arm64");
|
||||||
|
return QLatin1String("arch-") + arch;
|
||||||
|
}
|
||||||
|
|
||||||
RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *runConfig, QString *errorMessage)
|
RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *runConfig, QString *errorMessage)
|
||||||
{
|
{
|
||||||
Target *target = runConfig->target();
|
Target *target = runConfig->target();
|
||||||
@@ -109,6 +118,9 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
|
|||||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
|
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
|
||||||
params.solibSearchPath.append(qtSoPaths(version));
|
params.solibSearchPath.append(qtSoPaths(version));
|
||||||
params.solibSearchPath.append(uniquePaths(AndroidManager::androidQtSupport(target)->androidExtraLibs(target)));
|
params.solibSearchPath.append(uniquePaths(AndroidManager::androidQtSupport(target)->androidExtraLibs(target)));
|
||||||
|
params.sysRoot = AndroidConfigurations::currentConfig().ndkLocation().appendPath(QLatin1String("platforms"))
|
||||||
|
.appendPath(QLatin1String("android-") + QString::number(AndroidManager::minimumSDK(target)))
|
||||||
|
.appendPath(toNdkArch(AndroidManager::targetArch(target))).toString();
|
||||||
}
|
}
|
||||||
if (aspect->useQmlDebugger()) {
|
if (aspect->useQmlDebugger()) {
|
||||||
QTcpServer server;
|
QTcpServer server;
|
||||||
|
|||||||
@@ -283,6 +283,8 @@ QString AndroidManager::androidNameForApiLevel(int x)
|
|||||||
return QLatin1String("Android 5.1");
|
return QLatin1String("Android 5.1");
|
||||||
case 23:
|
case 23:
|
||||||
return QLatin1String("Android 6.0");
|
return QLatin1String("Android 6.0");
|
||||||
|
case 24:
|
||||||
|
return QLatin1String("Android 7.0");
|
||||||
default:
|
default:
|
||||||
return tr("Unknown Android version. API Level: %1").arg(QString::number(x));
|
return tr("Unknown Android version. API Level: %1").arg(QString::number(x));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,7 +275,8 @@ void AbstractSettings::createDocumentationFile() const
|
|||||||
void AbstractSettings::read()
|
void AbstractSettings::read()
|
||||||
{
|
{
|
||||||
// Set default values
|
// Set default values
|
||||||
setSupportedMimeTypes("text/x-c++src;text/x-c++hdr");
|
setSupportedMimeTypes("text/x-c++src;text/x-c++hdr;text/x-csrc;text/x-chdr;text/x-objcsrc;"
|
||||||
|
"text/x-objc++src");
|
||||||
|
|
||||||
// Read settings, except styles
|
// Read settings, except styles
|
||||||
QSettings *s = Core::ICore::settings();
|
QSettings *s = Core::ICore::settings();
|
||||||
|
|||||||
@@ -183,6 +183,8 @@ void OutputPanePlaceHolder::ensureSizeHintAsMinimum()
|
|||||||
|
|
||||||
int OutputPanePlaceHolder::nonMaximizedSize() const
|
int OutputPanePlaceHolder::nonMaximizedSize() const
|
||||||
{
|
{
|
||||||
|
if (!d->m_initialized)
|
||||||
|
return Internal::OutputPaneManager::outputPaneHeightSetting();
|
||||||
return d->m_nonMaximizedSize;
|
return d->m_nonMaximizedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ void BuiltinEditorDocumentParser::updateHelper(const QFutureInterface<void> &fut
|
|||||||
configFile += part->toolchainDefines;
|
configFile += part->toolchainDefines;
|
||||||
configFile += overwrittenToolchainDefines(*part.data());
|
configFile += overwrittenToolchainDefines(*part.data());
|
||||||
configFile += part->projectDefines;
|
configFile += part->projectDefines;
|
||||||
|
if (!part->projectConfigFile.isEmpty())
|
||||||
|
configFile += ProjectPart::readProjectConfigFile(part);
|
||||||
headerPaths = part->headerPaths;
|
headerPaths = part->headerPaths;
|
||||||
projectConfigFile = part->projectConfigFile;
|
projectConfigFile = part->projectConfigFile;
|
||||||
if (baseConfig.usePrecompiledHeaders)
|
if (baseConfig.usePrecompiledHeaders)
|
||||||
@@ -193,8 +195,6 @@ void BuiltinEditorDocumentParser::updateHelper(const QFutureInterface<void> &fut
|
|||||||
sourceProcessor.setHeaderPaths(state.headerPaths);
|
sourceProcessor.setHeaderPaths(state.headerPaths);
|
||||||
sourceProcessor.setLanguageFeatures(features);
|
sourceProcessor.setLanguageFeatures(features);
|
||||||
sourceProcessor.run(configurationFileName);
|
sourceProcessor.run(configurationFileName);
|
||||||
if (!state.projectConfigFile.isEmpty())
|
|
||||||
sourceProcessor.run(state.projectConfigFile);
|
|
||||||
if (baseConfig.usePrecompiledHeaders) {
|
if (baseConfig.usePrecompiledHeaders) {
|
||||||
foreach (const QString &precompiledHeader, state.precompiledHeaders)
|
foreach (const QString &precompiledHeader, state.precompiledHeaders)
|
||||||
sourceProcessor.run(precompiledHeader);
|
sourceProcessor.run(precompiledHeader);
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ public:
|
|||||||
QStringList debugSourceLocation; // Gdb "directory"
|
QStringList debugSourceLocation; // Gdb "directory"
|
||||||
QString serverStartScript;
|
QString serverStartScript;
|
||||||
ProjectExplorer::IDevice::ConstPtr device;
|
ProjectExplorer::IDevice::ConstPtr device;
|
||||||
QString sysRoot;
|
|
||||||
bool isSnapshot = false; // Set if created internally.
|
bool isSnapshot = false; // Set if created internally.
|
||||||
ProjectExplorer::Abi toolChainAbi;
|
ProjectExplorer::Abi toolChainAbi;
|
||||||
|
|
||||||
|
|||||||
@@ -428,7 +428,8 @@ static DebuggerRunControl *doCreate(DebuggerRunParameters rp, RunConfiguration *
|
|||||||
rp.nativeMixedEnabled = bool(nativeMixedOverride);
|
rp.nativeMixedEnabled = bool(nativeMixedOverride);
|
||||||
|
|
||||||
rp.cppEngineType = DebuggerKitInformation::engineType(kit);
|
rp.cppEngineType = DebuggerKitInformation::engineType(kit);
|
||||||
rp.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
|
if (rp.sysRoot.isEmpty())
|
||||||
|
rp.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
|
||||||
rp.device = DeviceKitInformation::device(kit);
|
rp.device = DeviceKitInformation::device(kit);
|
||||||
|
|
||||||
if (rp.displayName.isEmpty() && runConfig)
|
if (rp.displayName.isEmpty() && runConfig)
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ public:
|
|||||||
QString platform;
|
QString platform;
|
||||||
QString deviceSymbolsRoot;
|
QString deviceSymbolsRoot;
|
||||||
bool continueAfterAttach = false;
|
bool continueAfterAttach = false;
|
||||||
|
QString sysRoot;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|||||||
@@ -633,7 +633,7 @@ void HelpPlugin::handleHelpRequest(const QUrl &url, HelpManager::HelpViewerLocat
|
|||||||
if (url.authority() == "org.qt-project.qtcreator")
|
if (url.authority() == "org.qt-project.qtcreator")
|
||||||
urlPrefix.append(QString::fromLatin1("qtcreator"));
|
urlPrefix.append(QString::fromLatin1("qtcreator"));
|
||||||
else
|
else
|
||||||
urlPrefix.append("latest");
|
urlPrefix.append("qt-5");
|
||||||
address = urlPrefix + address.mid(address.lastIndexOf(QLatin1Char('/')));
|
address = urlPrefix + address.mid(address.lastIndexOf(QLatin1Char('/')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -617,10 +617,7 @@ IOutputParser *GccToolChain::outputParser() const
|
|||||||
|
|
||||||
void GccToolChain::resetToolChain(const FileName &path)
|
void GccToolChain::resetToolChain(const FileName &path)
|
||||||
{
|
{
|
||||||
if (path == m_compilerCommand)
|
bool resetDisplayName = (displayName() == defaultDisplayName());
|
||||||
return;
|
|
||||||
|
|
||||||
bool resetDisplayName = displayName() == defaultDisplayName();
|
|
||||||
|
|
||||||
setCompilerCommand(path);
|
setCompilerCommand(path);
|
||||||
|
|
||||||
@@ -710,14 +707,18 @@ bool GccToolChain::fromMap(const QVariantMap &data)
|
|||||||
m_platformLinkerFlags = data.value(QLatin1String(compilerPlatformLinkerFlagsKeyC)).toStringList();
|
m_platformLinkerFlags = data.value(QLatin1String(compilerPlatformLinkerFlagsKeyC)).toStringList();
|
||||||
m_targetAbi = Abi(data.value(QLatin1String(targetAbiKeyC)).toString());
|
m_targetAbi = Abi(data.value(QLatin1String(targetAbiKeyC)).toString());
|
||||||
m_originalTargetTriple = data.value(QLatin1String(originalTargetTripleKeyC)).toString();
|
m_originalTargetTriple = data.value(QLatin1String(originalTargetTripleKeyC)).toString();
|
||||||
QStringList abiList = data.value(QLatin1String(supportedAbisKeyC)).toStringList();
|
const QStringList abiList = data.value(QLatin1String(supportedAbisKeyC)).toStringList();
|
||||||
m_supportedAbis.clear();
|
m_supportedAbis.clear();
|
||||||
foreach (const QString &a, abiList) {
|
for (const QString &a : abiList) {
|
||||||
Abi abi(a);
|
Abi abi(a);
|
||||||
if (!abi.isValid())
|
if (!abi.isValid())
|
||||||
continue;
|
continue;
|
||||||
m_supportedAbis.append(abi);
|
m_supportedAbis.append(abi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_targetAbi.isValid())
|
||||||
|
resetToolChain(m_compilerCommand);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
#include <QPen>
|
#include <QPen>
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
|
|
||||||
static Q_LOGGING_CATEGORY(itemlibraryPopulate, "itemlibrary.populate")
|
static Q_LOGGING_CATEGORY(itemlibraryPopulate, "qtc.itemlibrary.populate")
|
||||||
|
|
||||||
static bool inline registerItemLibrarySortedModel() {
|
static bool inline registerItemLibrarySortedModel() {
|
||||||
qmlRegisterType<QmlDesigner::ItemLibrarySectionModel>();
|
qmlRegisterType<QmlDesigner::ItemLibrarySectionModel>();
|
||||||
|
|||||||
@@ -405,7 +405,6 @@ void NodeInstanceServerProxy::processFinished(int exitCode, QProcess::ExitStatus
|
|||||||
|
|
||||||
if (m_captureFileForTest.isOpen()) {
|
if (m_captureFileForTest.isOpen()) {
|
||||||
m_captureFileForTest.close();
|
m_captureFileForTest.close();
|
||||||
m_captureFileForTest.remove();
|
|
||||||
Core::AsynchronousMessageBox::warning(tr("QML Emulation Layer (QML Puppet) Crashed"),
|
Core::AsynchronousMessageBox::warning(tr("QML Emulation Layer (QML Puppet) Crashed"),
|
||||||
tr("You are recording a puppet stream and the emulations layer crashed. "
|
tr("You are recording a puppet stream and the emulations layer crashed. "
|
||||||
"It is recommended to reopen the Qt Quick Designer and start again."));
|
"It is recommended to reopen the Qt Quick Designer and start again."));
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
static Q_LOGGING_CATEGORY(puppetStart, "puppet.start")
|
static Q_LOGGING_CATEGORY(puppetStart, "qtc.puppet.start")
|
||||||
static Q_LOGGING_CATEGORY(puppetBuild, "puppet.build")
|
static Q_LOGGING_CATEGORY(puppetBuild, "qtc.puppet.build")
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
using namespace LanguageUtils;
|
using namespace LanguageUtils;
|
||||||
using namespace QmlJS;
|
using namespace QmlJS;
|
||||||
|
|
||||||
static Q_LOGGING_CATEGORY(rewriterBenchmark, "rewriter.load")
|
static Q_LOGGING_CATEGORY(rewriterBenchmark, "qtc.rewriter.load")
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,9 @@
|
|||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QVector>
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QString>
|
|
||||||
#include <QStack>
|
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
#include <QString>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@@ -60,6 +58,7 @@ public:
|
|||||||
QHash<int, QString> notes;
|
QHash<int, QString> notes;
|
||||||
|
|
||||||
QStack<QmlEvent> callStack;
|
QStack<QmlEvent> callStack;
|
||||||
|
QStack<QmlEvent> compileStack;
|
||||||
qint64 qmlTime = 0;
|
qint64 qmlTime = 0;
|
||||||
qint64 lastEndTime = 0;
|
qint64 lastEndTime = 0;
|
||||||
QHash <int, QVector<qint64> > durations;
|
QHash <int, QVector<qint64> > durations;
|
||||||
@@ -71,6 +70,7 @@ QmlProfilerStatisticsModel::QmlProfilerStatisticsModel(QmlProfilerModelManager *
|
|||||||
{
|
{
|
||||||
d->modelManager = modelManager;
|
d->modelManager = modelManager;
|
||||||
d->callStack.push(QmlEvent());
|
d->callStack.push(QmlEvent());
|
||||||
|
d->compileStack.push(QmlEvent());
|
||||||
connect(modelManager, &QmlProfilerModelManager::stateChanged,
|
connect(modelManager, &QmlProfilerModelManager::stateChanged,
|
||||||
this, &QmlProfilerStatisticsModel::dataChanged);
|
this, &QmlProfilerStatisticsModel::dataChanged);
|
||||||
connect(modelManager->notesModel(), &Timeline::TimelineNotesModel::changed,
|
connect(modelManager->notesModel(), &Timeline::TimelineNotesModel::changed,
|
||||||
@@ -143,7 +143,9 @@ void QmlProfilerStatisticsModel::clear()
|
|||||||
d->eventsInBindingLoop.clear();
|
d->eventsInBindingLoop.clear();
|
||||||
d->notes.clear();
|
d->notes.clear();
|
||||||
d->callStack.clear();
|
d->callStack.clear();
|
||||||
|
d->compileStack.clear();
|
||||||
d->callStack.push(QmlEvent());
|
d->callStack.push(QmlEvent());
|
||||||
|
d->compileStack.push(QmlEvent());
|
||||||
d->qmlTime = 0;
|
d->qmlTime = 0;
|
||||||
d->lastEndTime = 0;
|
d->lastEndTime = 0;
|
||||||
d->durations.clear();
|
d->durations.clear();
|
||||||
@@ -210,22 +212,25 @@ void QmlProfilerStatisticsModel::loadEvent(const QmlEvent &event, const QmlEvent
|
|||||||
if (!d->acceptedTypes.contains(type.rangeType()))
|
if (!d->acceptedTypes.contains(type.rangeType()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
QStack<QmlEvent> &stack = type.rangeType() == Compiling ? d->compileStack : d->callStack;
|
||||||
switch (event.rangeStage()) {
|
switch (event.rangeStage()) {
|
||||||
case RangeStart:
|
case RangeStart:
|
||||||
// binding loop detection: check whether event is already in stack
|
// binding loop detection: check whether event is already in stack
|
||||||
for (int ii = 1; ii < d->callStack.size(); ++ii) {
|
if (type.rangeType() == Binding || type.rangeType() == HandlingSignal) {
|
||||||
if (d->callStack.at(ii).typeIndex() == event.typeIndex()
|
for (int ii = 1; ii < stack.size(); ++ii) {
|
||||||
&& type.rangeType() != Javascript) {
|
if (stack.at(ii).typeIndex() == event.typeIndex()) {
|
||||||
d->eventsInBindingLoop.insert(event.typeIndex());
|
d->eventsInBindingLoop.insert(event.typeIndex());
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
d->callStack.push(event);
|
stack.push(event);
|
||||||
break;
|
break;
|
||||||
case RangeEnd: {
|
case RangeEnd: {
|
||||||
// update stats
|
// update stats
|
||||||
|
|
||||||
QmlEventStats *stats = &d->data[event.typeIndex()];
|
QmlEventStats *stats = &d->data[event.typeIndex()];
|
||||||
qint64 duration = event.timestamp() - d->callStack.top().timestamp();
|
qint64 duration = event.timestamp() - stack.top().timestamp();
|
||||||
stats->duration += duration;
|
stats->duration += duration;
|
||||||
stats->durationSelf += duration;
|
stats->durationSelf += duration;
|
||||||
if (duration < stats->minTime)
|
if (duration < stats->minTime)
|
||||||
@@ -241,21 +246,20 @@ void QmlProfilerStatisticsModel::loadEvent(const QmlEvent &event, const QmlEvent
|
|||||||
d->lastEndTime = event.timestamp();
|
d->lastEndTime = event.timestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
d->callStack.pop();
|
stack.pop();
|
||||||
|
|
||||||
if (d->callStack.count() > 1)
|
|
||||||
d->data[d->callStack.top().typeIndex()].durationSelf -= duration;
|
|
||||||
|
|
||||||
|
if (stack.count() > 1)
|
||||||
|
d->data[stack.top().typeIndex()].durationSelf -= duration;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!d->childrenModel.isNull())
|
if (!d->childrenModel.isNull())
|
||||||
d->childrenModel->loadEvent(event);
|
d->childrenModel->loadEvent(type.rangeType(), event);
|
||||||
if (!d->parentsModel.isNull())
|
if (!d->parentsModel.isNull())
|
||||||
d->parentsModel->loadEvent(event);
|
d->parentsModel->loadEvent(type.rangeType(), event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -310,8 +314,6 @@ QmlProfilerStatisticsRelativesModel::QmlProfilerStatisticsRelativesModel(
|
|||||||
QmlProfilerStatisticsRelation relation, QObject *parent) :
|
QmlProfilerStatisticsRelation relation, QObject *parent) :
|
||||||
QObject(parent), m_relation(relation)
|
QObject(parent), m_relation(relation)
|
||||||
{
|
{
|
||||||
m_startTimesPerLevel[0] = 0;
|
|
||||||
|
|
||||||
QTC_CHECK(modelManager);
|
QTC_CHECK(modelManager);
|
||||||
m_modelManager = modelManager;
|
m_modelManager = modelManager;
|
||||||
|
|
||||||
@@ -341,21 +343,16 @@ const QVector<QmlEventType> &QmlProfilerStatisticsRelativesModel::getTypes() con
|
|||||||
return m_modelManager->qmlModel()->eventTypes();
|
return m_modelManager->qmlModel()->eventTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerStatisticsRelativesModel::loadEvent(const QmlEvent &event)
|
void QmlProfilerStatisticsRelativesModel::loadEvent(RangeType type, const QmlEvent &event)
|
||||||
{
|
{
|
||||||
// level computation
|
QStack<Frame> &stack = (type == Compiling) ? m_compileStack : m_callStack;
|
||||||
|
|
||||||
switch (event.rangeStage()) {
|
switch (event.rangeStage()) {
|
||||||
case RangeStart:
|
case RangeStart:
|
||||||
// now lastparent is the new type
|
stack.push({event.timestamp(), event.typeIndex()});
|
||||||
++m_level;
|
|
||||||
m_typesPerLevel[m_level] = event.typeIndex();
|
|
||||||
m_startTimesPerLevel[m_level] = event.timestamp();
|
|
||||||
break;
|
break;
|
||||||
case RangeEnd: {
|
case RangeEnd: {
|
||||||
int parentTypeIndex = -1;
|
int parentTypeIndex = stack.count() > 1 ? stack[stack.count() - 2].typeId : -1;
|
||||||
if (m_level > 0 && m_typesPerLevel.contains(m_level-1))
|
|
||||||
parentTypeIndex = m_typesPerLevel[m_level-1];
|
|
||||||
|
|
||||||
int relativeTypeIndex = (m_relation == QmlProfilerStatisticsParents) ? parentTypeIndex :
|
int relativeTypeIndex = (m_relation == QmlProfilerStatisticsParents) ? parentTypeIndex :
|
||||||
event.typeIndex();
|
event.typeIndex();
|
||||||
int selfTypeIndex = (m_relation == QmlProfilerStatisticsParents) ? event.typeIndex() :
|
int selfTypeIndex = (m_relation == QmlProfilerStatisticsParents) ? event.typeIndex() :
|
||||||
@@ -365,16 +362,16 @@ void QmlProfilerStatisticsRelativesModel::loadEvent(const QmlEvent &event)
|
|||||||
QmlStatisticsRelativesMap::Iterator it = relativesMap.find(relativeTypeIndex);
|
QmlStatisticsRelativesMap::Iterator it = relativesMap.find(relativeTypeIndex);
|
||||||
if (it != relativesMap.end()) {
|
if (it != relativesMap.end()) {
|
||||||
it.value().calls++;
|
it.value().calls++;
|
||||||
it.value().duration += event.timestamp() - m_startTimesPerLevel[m_level];
|
it.value().duration += event.timestamp() - stack.top().startTime;
|
||||||
} else {
|
} else {
|
||||||
QmlStatisticsRelativesData relative = {
|
QmlStatisticsRelativesData relative = {
|
||||||
event.timestamp() - m_startTimesPerLevel[m_level],
|
event.timestamp() - stack.top().startTime,
|
||||||
1,
|
1,
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
relativesMap.insert(relativeTypeIndex, relative);
|
relativesMap.insert(relativeTypeIndex, relative);
|
||||||
}
|
}
|
||||||
--m_level;
|
stack.pop();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -407,9 +404,8 @@ int QmlProfilerStatisticsRelativesModel::count() const
|
|||||||
void QmlProfilerStatisticsRelativesModel::clear()
|
void QmlProfilerStatisticsRelativesModel::clear()
|
||||||
{
|
{
|
||||||
m_data.clear();
|
m_data.clear();
|
||||||
m_startTimesPerLevel.clear();
|
m_callStack.clear();
|
||||||
m_level = 0;
|
m_compileStack.clear();
|
||||||
m_typesPerLevel.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlProfiler
|
} // namespace QmlProfiler
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#include "qmlprofilerconstants.h"
|
#include "qmlprofilerconstants.h"
|
||||||
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
#include <QStack>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
@@ -121,7 +122,7 @@ public:
|
|||||||
const QmlStatisticsRelativesMap &getData(int typeId) const;
|
const QmlStatisticsRelativesMap &getData(int typeId) const;
|
||||||
const QVector<QmlEventType> &getTypes() const;
|
const QVector<QmlEventType> &getTypes() const;
|
||||||
|
|
||||||
void loadEvent(const QmlEvent &event);
|
void loadEvent(RangeType type, const QmlEvent &event);
|
||||||
void finalize(const QSet<int> &eventsInBindingLoop);
|
void finalize(const QSet<int> &eventsInBindingLoop);
|
||||||
|
|
||||||
QmlProfilerStatisticsRelation relation() const;
|
QmlProfilerStatisticsRelation relation() const;
|
||||||
@@ -133,12 +134,12 @@ protected:
|
|||||||
QHash <int, QmlStatisticsRelativesMap> m_data;
|
QHash <int, QmlStatisticsRelativesMap> m_data;
|
||||||
QmlProfilerModelManager *m_modelManager;
|
QmlProfilerModelManager *m_modelManager;
|
||||||
|
|
||||||
// for level computation
|
struct Frame {
|
||||||
QHash<int, qint64> m_startTimesPerLevel;
|
qint64 startTime;
|
||||||
int m_level = 0;
|
int typeId;
|
||||||
|
};
|
||||||
// compute parent-child relationship and call count
|
QStack<Frame> m_callStack;
|
||||||
QHash<int, int> m_typesPerLevel;
|
QStack<Frame> m_compileStack;
|
||||||
const QmlProfilerStatisticsRelation m_relation;
|
const QmlProfilerStatisticsRelation m_relation;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,8 @@ QString RemoteLinuxSignalOperation::interruptProcessByNameCommandLine(const QStr
|
|||||||
|
|
||||||
void RemoteLinuxSignalOperation::killProcess(qint64 pid)
|
void RemoteLinuxSignalOperation::killProcess(qint64 pid)
|
||||||
{
|
{
|
||||||
run(signalProcessByPidCommandLine(pid, 9));
|
run(QString::fromLatin1("%1; %2").arg(signalProcessByPidCommandLine(pid, 15),
|
||||||
|
signalProcessByPidCommandLine(pid, 9)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxSignalOperation::killProcess(const QString &filePath)
|
void RemoteLinuxSignalOperation::killProcess(const QString &filePath)
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ def checkTypeAndProperties(typePropertiesDetails):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
# prepare example project
|
# prepare example project
|
||||||
sourceExample = os.path.join(sdkPath, "Examples", "4.7", "declarative", "animation", "basics",
|
sourceExample = os.path.join(Qt5Path.examplesPath(Targets.DESKTOP_561_DEFAULT),
|
||||||
"property-animation")
|
"quick", "animation")
|
||||||
if not neededFilePresent(sourceExample):
|
if not neededFilePresent(sourceExample):
|
||||||
return
|
return
|
||||||
# open Qt Creator
|
# open Qt Creator
|
||||||
@@ -69,16 +69,16 @@ def main():
|
|||||||
checkTypeAndProperties(typePropDet)
|
checkTypeAndProperties(typePropDet)
|
||||||
|
|
||||||
# select "Open project" and select a project
|
# select "Open project" and select a project
|
||||||
examplePath = os.path.join(prepareTemplate(sourceExample), "propertyanimation.pro")
|
examplePath = os.path.join(prepareTemplate(sourceExample), "animation.pro")
|
||||||
openQmakeProject(examplePath, fromWelcome = True)
|
openQmakeProject(examplePath, fromWelcome = True)
|
||||||
progressBarWait(30000)
|
progressBarWait(30000)
|
||||||
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
||||||
" text~='propertyanimation( \(.*\))?' type='QModelIndex'}"),
|
" text~='animation( \(.*\))?' type='QModelIndex'}"),
|
||||||
"Verifying: The project is opened in 'Edit' mode after configuring.")
|
"Verifying: The project is opened in 'Edit' mode after configuring.")
|
||||||
# go to "Welcome page" again and check if there is an information about recent projects
|
# go to "Welcome page" again and check if there is an information about recent projects
|
||||||
switchViewTo(ViewConstants.WELCOME)
|
switchViewTo(ViewConstants.WELCOME)
|
||||||
test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False,
|
test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False,
|
||||||
"text='propertyanimation'")) and
|
"text='animation'")) and
|
||||||
checkIfObjectExists(getQmlItem("Text", welcomePage, False,
|
checkIfObjectExists(getQmlItem("Text", welcomePage, False,
|
||||||
"text='SampleApp'")),
|
"text='SampleApp'")),
|
||||||
"Verifying: 'Welcome page' displays information about recently created and "
|
"Verifying: 'Welcome page' displays information about recently created and "
|
||||||
|
|||||||
@@ -41,13 +41,12 @@ def handlePackagingMessageBoxes():
|
|||||||
break
|
break
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global sdkPath
|
|
||||||
welcomePage = ":Qt Creator.WelcomePage_QQuickWidget"
|
welcomePage = ":Qt Creator.WelcomePage_QQuickWidget"
|
||||||
# open Qt Creator
|
# open Qt Creator
|
||||||
startApplication("qtcreator" + SettingsPath)
|
startApplication("qtcreator" + SettingsPath)
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
qchs = [os.path.join(sdkPath, "Documentation", "qt.qch")]
|
qchs = []
|
||||||
for p in Qt5Path.getPaths(Qt5Path.DOCS):
|
for p in Qt5Path.getPaths(Qt5Path.DOCS):
|
||||||
qchs.extend([os.path.join(p, "qtopengl.qch"), os.path.join(p, "qtwidgets.qch")])
|
qchs.extend([os.path.join(p, "qtopengl.qch"), os.path.join(p, "qtwidgets.qch")])
|
||||||
addHelpDocumentation(qchs)
|
addHelpDocumentation(qchs)
|
||||||
@@ -64,13 +63,8 @@ def main():
|
|||||||
5, 5, 0, Qt.LeftButton)
|
5, 5, 0, Qt.LeftButton)
|
||||||
test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False, "text='Examples'")),
|
test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False, "text='Examples'")),
|
||||||
"Verifying: 'Examples' topic is opened and the examples are shown.")
|
"Verifying: 'Examples' topic is opened and the examples are shown.")
|
||||||
basePath = "opengl/2dpainting/2dpainting.pro"
|
proFiles = map(lambda p: os.path.join(p, "opengl", "2dpainting", "2dpainting.pro"),
|
||||||
qt4Exmpl = os.path.join(sdkPath, "Examples", "4.7", basePath)
|
Qt5Path.getPaths(Qt5Path.EXAMPLES))
|
||||||
qt5Exmpls = []
|
|
||||||
for p in Qt5Path.getPaths(Qt5Path.EXAMPLES):
|
|
||||||
qt5Exmpls.append(os.path.join(p, basePath))
|
|
||||||
proFiles = [qt4Exmpl]
|
|
||||||
proFiles.extend(qt5Exmpls)
|
|
||||||
cleanUpUserFiles(proFiles)
|
cleanUpUserFiles(proFiles)
|
||||||
for p in proFiles:
|
for p in proFiles:
|
||||||
removePackagingDirectory(os.path.dirname(p))
|
removePackagingDirectory(os.path.dirname(p))
|
||||||
@@ -112,13 +106,8 @@ def main():
|
|||||||
|
|
||||||
# go to "Welcome" page and choose another example
|
# go to "Welcome" page and choose another example
|
||||||
switchViewTo(ViewConstants.WELCOME)
|
switchViewTo(ViewConstants.WELCOME)
|
||||||
basePath = "itemviews/addressbook/addressbook.pro"
|
proFiles = map(lambda p: os.path.join(p, "widgets", "itemviews", "addressbook", "addressbook.pro"),
|
||||||
qt4Exmpl = os.path.join(sdkPath, "Examples", "4.7", basePath)
|
Qt5Path.getPaths(Qt5Path.EXAMPLES))
|
||||||
qt5Exmpls = []
|
|
||||||
for p in Qt5Path.getPaths(Qt5Path.EXAMPLES):
|
|
||||||
qt5Exmpls.append(os.path.join(p, "widgets", basePath))
|
|
||||||
proFiles = [qt4Exmpl]
|
|
||||||
proFiles.extend(qt5Exmpls)
|
|
||||||
cleanUpUserFiles(proFiles)
|
cleanUpUserFiles(proFiles)
|
||||||
for p in proFiles:
|
for p in proFiles:
|
||||||
removePackagingDirectory(os.path.dirname(p))
|
removePackagingDirectory(os.path.dirname(p))
|
||||||
|
|||||||
@@ -27,8 +27,9 @@ source("../../shared/qtcreator.py")
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
# prepare example project
|
# prepare example project
|
||||||
projectName = "declarative-music-browser"
|
projectName = "adding"
|
||||||
sourceExample = os.path.join(sdkPath, "Examples", "QtMobility", projectName)
|
sourceExample = os.path.join(Qt5Path.examplesPath(Targets.DESKTOP_561_DEFAULT),
|
||||||
|
"qml", "referenceexamples", "adding")
|
||||||
proFile = projectName + ".pro"
|
proFile = projectName + ".pro"
|
||||||
if not neededFilePresent(os.path.join(sourceExample, proFile)):
|
if not neededFilePresent(os.path.join(sourceExample, proFile)):
|
||||||
return
|
return
|
||||||
@@ -40,25 +41,33 @@ def main():
|
|||||||
return
|
return
|
||||||
usedProFile = os.path.join(templateDir, proFile)
|
usedProFile = os.path.join(templateDir, proFile)
|
||||||
openQmakeProject(usedProFile)
|
openQmakeProject(usedProFile)
|
||||||
|
openDocument(projectName + "." + projectName + "\\.pro")
|
||||||
|
typeLines(waitForObject(":Qt Creator_TextEditor::TextEditorWidget"),
|
||||||
|
"OTHER_FILES += example.qml")
|
||||||
|
invokeMenuItem("File", "Save All")
|
||||||
|
invokeMenuItem("File", "Close All")
|
||||||
progressBarWait()
|
progressBarWait()
|
||||||
for filetype, filename in [["Headers", "utility.h"],
|
for filetype, filename in [["Headers", "person.h"],
|
||||||
["Sources", "main.cpp"],
|
["Sources", "main.cpp"],
|
||||||
["Sources", "utility.cpp"],
|
["Sources", "person.cpp"],
|
||||||
["Resources", "musicbrowser.qrc"],
|
["Resources", "adding.qrc"],
|
||||||
["QML", "musicbrowser.qml"]]:
|
["QML", "example.qml"]]:
|
||||||
filenames = ["ABCD" + filename.upper(), "abcd" + filename.lower(), "test", "TEST", filename]
|
filenames = ["ABCD" + filename.upper(), "abcd" + filename.lower(), "test", "TEST", filename]
|
||||||
previous = filenames[-1]
|
previous = filenames[-1]
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
tempFiletype = filetype
|
tempFiletype = filetype
|
||||||
if previous in ("test", "TEST") or filetype == "QML" and previous[-4:] != ".qml":
|
if (filetype == "Resources" and previous in ("test", "TEST")
|
||||||
|
or filetype == "QML" and not previous.endswith(".qml")):
|
||||||
tempFiletype = "Other files"
|
tempFiletype = "Other files"
|
||||||
|
elif filetype == "Sources" and previous in ("test", "TEST"):
|
||||||
|
tempFiletype = "Headers"
|
||||||
renameFile(templateDir, usedProFile, projectName + "." + tempFiletype,
|
renameFile(templateDir, usedProFile, projectName + "." + tempFiletype,
|
||||||
previous, filename)
|
previous, filename)
|
||||||
# QTCREATORBUG-13176 does update the navigator async
|
# QTCREATORBUG-13176 does update the navigator async
|
||||||
progressBarWait()
|
progressBarWait()
|
||||||
if tempFiletype == "Headers": # QTCREATORBUG-13204
|
if filetype == "Headers":
|
||||||
verifyRenamedIncludes(templateDir, "main.cpp", previous, filename)
|
verifyRenamedIncludes(templateDir, "main.cpp", previous, filename)
|
||||||
verifyRenamedIncludes(templateDir, "utility.cpp", previous, filename)
|
verifyRenamedIncludes(templateDir, "person.cpp", previous, filename)
|
||||||
previous = filename
|
previous = filename
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user