Merge remote-tracking branch 'origin/2.8'

Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/projectexplorer/projectexplorer.cpp

Change-Id: I37e550646f877b50693043894976a693ac22ad5e
This commit is contained in:
Eike Ziller
2013-07-11 08:02:41 +02:00
25 changed files with 3577 additions and 1757 deletions

View File

@@ -1,6 +1,6 @@
import qbs.base 1.0 import qbs.base 1.0
import qbs.TextFile import qbs.TextFile
import qbs.fileinfo as FileInfo import qbs.FileInfo
Module { Module {
Depends { id: qtcore; name: "Qt.core" } Depends { id: qtcore; name: "Qt.core" }

View File

@@ -507,6 +507,10 @@ class Dumper:
#self.debugger.EnableLog("lldb", ["all"]) #self.debugger.EnableLog("lldb", ["all"])
self.debugger.Initialize() self.debugger.Initialize()
self.debugger.HandleCommand("settings set auto-confirm on") self.debugger.HandleCommand("settings set auto-confirm on")
if not hasattr(lldb.SBType, 'GetCanonicalType'): # "Test" for 179.5
warn("DISABLING DEFAULT FORMATTERS")
self.debugger.HandleCommand('type category delete gnu-libstdc++')
self.debugger.HandleCommand('type category delete libcxx')
self.process = None self.process = None
self.target = None self.target = None
self.eventState = lldb.eStateInvalid self.eventState = lldb.eStateInvalid
@@ -559,7 +563,7 @@ class Dumper:
elif c == ',': elif c == ',':
if level == 0: if level == 0:
if index == 0: if index == 0:
return inner return inner.strip()
index -= 1 index -= 1
inner = '' inner = ''
else: else:
@@ -571,7 +575,7 @@ class Dumper:
else: else:
inner += c inner += c
skipSpace = False skipSpace = False
return inner return inner.strip()
def templateArgument(self, typeobj, index): def templateArgument(self, typeobj, index):
type = typeobj.GetTemplateArgumentType(index) type = typeobj.GetTemplateArgumentType(index)
@@ -1142,7 +1146,7 @@ class Dumper:
for i in xrange(m): for i in xrange(m):
child = value.GetChildAtIndex(i) child = value.GetChildAtIndex(i)
with UnnamedSubItem(self, "@%d" % (i + 1)): with UnnamedSubItem(self, "@%d" % (i + 1)):
#self.put('iname="%s",' % self.currentIName) self.put('iname="%s",' % self.currentIName)
self.put('name="[%s]",' % child.name) self.put('name="[%s]",' % child.name)
self.putItem(child) self.putItem(child)
for i in xrange(m, n): for i in xrange(m, n):
@@ -1618,6 +1622,7 @@ execfile(os.path.join(currentDir, "qttypes.py"))
def doit(): def doit():
db = Dumper() db = Dumper()
db.report('lldbversion="%s"' % lldb.SBDebugger.GetVersionString())
db.report('state="enginesetupok"') db.report('state="enginesetupok"')
while True: while True:

View File

@@ -221,10 +221,10 @@ def qdump__QByteArray(d, value):
d.putDisplay(StopDisplay) d.putDisplay(StopDisplay)
elif format == 2: elif format == 2:
d.putField("editformat", DisplayLatin1String) d.putField("editformat", DisplayLatin1String)
d.putField("editvalue", d.encodeByteArray(value, None)) d.putField("editvalue", d.encodeByteArray(value))
elif format == 3: elif format == 3:
d.putField("editformat", DisplayUtf8String) d.putField("editformat", DisplayUtf8String)
d.putField("editvalue", d.encodeByteArray(value, None)) d.putField("editvalue", d.encodeByteArray(value))
if d.isExpanded(): if d.isExpanded():
d.putArrayData(d.charType(), data, size) d.putArrayData(d.charType(), data, size)
@@ -1734,10 +1734,14 @@ def qdump__QString(d, value):
d.putDisplay(StopDisplay) d.putDisplay(StopDisplay)
elif format == 2: elif format == 2:
d.putField("editformat", DisplayUtf16String) d.putField("editformat", DisplayUtf16String)
d.putField("editvalue", d.encodeString(value, None)) d.putField("editvalue", d.encodeString(value))
def qdump__QStringRef(d, value): def qdump__QStringRef(d, value):
if isNull(value["m_string"]):
d.putValue("(null)");
d.putNumChild(0)
return
s = value["m_string"].dereference() s = value["m_string"].dereference()
data, size, alloc = d.stringData(s) data, size, alloc = d.stringData(s)
data += 2 * int(value["m_position"]) data += 2 * int(value["m_position"])
@@ -2374,9 +2378,10 @@ def qform__std__string():
return "Inline,In Separate Window" return "Inline,In Separate Window"
def qdump__std__string(d, value): def qdump__std__string(d, value):
qdump__std__stringHelper1(d, value, 1)
def qdump__std__stringHelper1(d, value, charSize):
data = value["_M_dataplus"]["_M_p"] data = value["_M_dataplus"]["_M_p"]
baseType = value.type.strip_typedefs()
charSize = d.templateArgument(baseType, 0).sizeof
# We can't lookup the std::string::_Rep type without crashing LLDB, # We can't lookup the std::string::_Rep type without crashing LLDB,
# so hard-code assumption on member position # so hard-code assumption on member position
# struct { size_type _M_length, size_type _M_capacity, int _M_refcount; } # struct { size_type _M_length, size_type _M_capacity, int _M_refcount; }
@@ -2409,9 +2414,7 @@ def qdump_stringHelper(d, data, size, charSize):
d.putDisplay(StopDisplay) d.putDisplay(StopDisplay)
elif format == 2: elif format == 2:
d.putField("editformat", displayType) d.putField("editformat", displayType)
if n != size: d.putField("editvalue", d.readRawMemory(data, size))
mem = d.readRawMemory(p, size)
d.putField("editvalue", mem)
def qdump__std____1__string(d, value): def qdump__std____1__string(d, value):
@@ -2586,13 +2589,15 @@ def qdump__string(d, value):
qdump__std__string(d, value) qdump__std__string(d, value)
def qdump__std__wstring(d, value): def qdump__std__wstring(d, value):
qdump__std__string(d, value) charSize = d.lookupType('wchar_t').sizeof
qdump__std__stringHelper1(d, value, charSize)
def qdump__std__basic_string(d, value): def qdump__std__basic_string(d, value):
qdump__std__string(d, value) innerType = d.templateArgument(value.type, 0)
qdump__std__stringHelper1(d, value, innerType.sizeof)
def qdump__wstring(d, value): def qdump__wstring(d, value):
qdump__std__string(d, value) qdump__std__wstring(d, value)
def qdump____gnu_cxx__hash_set(d, value): def qdump____gnu_cxx__hash_set(d, value):

File diff suppressed because it is too large Load Diff

View File

@@ -39,12 +39,18 @@ CloneType::CloneType(Clone *clone)
FullySpecifiedType CloneType::cloneType(const FullySpecifiedType &type, Subst *subst) FullySpecifiedType CloneType::cloneType(const FullySpecifiedType &type, Subst *subst)
{ {
TypeSubstPair typeSubstPair = std::make_pair(type, subst);
if (_cache.find(typeSubstPair) != _cache.end())
return _cache[typeSubstPair];
std::swap(_subst, subst); std::swap(_subst, subst);
FullySpecifiedType ty(type); FullySpecifiedType ty(type);
std::swap(_type, ty); std::swap(_type, ty);
accept(_type.type()); accept(_type.type());
std::swap(_type, ty); std::swap(_type, ty);
std::swap(_subst, subst); std::swap(_subst, subst);
_cache[typeSubstPair] = ty;
return ty; return ty;
} }
@@ -179,13 +185,22 @@ Symbol *CloneSymbol::cloneSymbol(Symbol *symbol, Subst *subst)
if (! symbol) if (! symbol)
return 0; return 0;
SymbolSubstPair symbolSubstPair = std::make_pair(symbol, subst);
if (_cache.find(symbolSubstPair) != _cache.end()) {
Symbol *cachedSymbol = _cache[symbolSubstPair];
if (cachedSymbol->scope() == symbol->scope())
return cachedSymbol;
}
Symbol *r = 0; Symbol *r = 0;
std::swap(_subst, subst); std::swap(_subst, subst);
std::swap(_symbol, r); std::swap(_symbol, r);
accept(symbol); accept(symbol);
std::swap(_symbol, r); std::swap(_symbol, r);
std::swap(_subst, subst); std::swap(_subst, subst);
CPP_CHECK(r != 0); CPP_CHECK(r != 0);
_cache[symbolSubstPair] = r;
return r; return r;
} }
@@ -394,6 +409,10 @@ const Name *CloneName::cloneName(const Name *name, Subst *subst)
if (! name) if (! name)
return 0; return 0;
NameSubstPair nameSubstPair = std::make_pair(name, subst);
if (_cache.find(nameSubstPair) != _cache.end())
return _cache[nameSubstPair];
const Name *r = 0; const Name *r = 0;
std::swap(_subst, subst); std::swap(_subst, subst);
std::swap(_name, r); std::swap(_name, r);
@@ -401,6 +420,7 @@ const Name *CloneName::cloneName(const Name *name, Subst *subst)
std::swap(_name, r); std::swap(_name, r);
std::swap(_subst, subst); std::swap(_subst, subst);
CPP_CHECK(r != 0); CPP_CHECK(r != 0);
_cache[nameSubstPair] = r;
return r; return r;
} }

View File

@@ -27,7 +27,9 @@
#include "Name.h" #include "Name.h"
#include "NameVisitor.h" #include "NameVisitor.h"
#include "SymbolVisitor.h" #include "SymbolVisitor.h"
#include <map> #include <map>
#include <utility>
namespace CPlusPlus { namespace CPlusPlus {
@@ -93,6 +95,9 @@ protected:
virtual void visit(ObjCForwardProtocolDeclaration *type); virtual void visit(ObjCForwardProtocolDeclaration *type);
protected: protected:
typedef std::pair <const FullySpecifiedType, Subst *> TypeSubstPair;
std::map<TypeSubstPair, FullySpecifiedType> _cache;
Clone *_clone; Clone *_clone;
Control *_control; Control *_control;
Subst *_subst; Subst *_subst;
@@ -118,6 +123,9 @@ protected:
virtual void visit(const SelectorNameId *name); virtual void visit(const SelectorNameId *name);
protected: protected:
typedef std::pair <const Name *, Subst *> NameSubstPair;
std::map<NameSubstPair, const Name *> _cache;
Clone *_clone; Clone *_clone;
Control *_control; Control *_control;
Subst *_subst; Subst *_subst;
@@ -163,6 +171,9 @@ protected:
virtual bool visit(ObjCPropertyDeclaration *symbol); virtual bool visit(ObjCPropertyDeclaration *symbol);
protected: protected:
typedef std::pair <Symbol *, Subst *> SymbolSubstPair;
std::map<SymbolSubstPair, Symbol *> _cache;
Clone *_clone; Clone *_clone;
Control *_control; Control *_control;
Subst *_subst; Subst *_subst;

View File

@@ -1232,7 +1232,8 @@ void ClassOrNamespace::NestedClassInstantiator::instantiate(ClassOrNamespace *en
foreach (Symbol *s, nestedClassOrNamespace->_symbols) { foreach (Symbol *s, nestedClassOrNamespace->_symbols) {
Symbol *clone = _cloner.symbol(s, &_subst); Symbol *clone = _cloner.symbol(s, &_subst);
clone->setScope(s->scope()); if (!clone->enclosingScope()) // Not from the cache but just cloned.
clone->setScope(s->enclosingScope());
nestedClassOrNamespaceInstantiation->_symbols.append(clone); nestedClassOrNamespaceInstantiation->_symbols.append(clone);
} }
} }

View File

@@ -67,7 +67,12 @@ private:
class QmlJS::SharedValueOwner : public ValueOwner class QmlJS::SharedValueOwner : public ValueOwner
{ {
public: public:
SharedValueOwner(); enum SharedValueOwnerKind{
Qt4Kind = 1,
Qt5Kind = 2
};
SharedValueOwner(SharedValueOwnerKind kind = Qt5Kind);
ObjectValue *_objectPrototype; ObjectValue *_objectPrototype;
ObjectValue *_functionPrototype; ObjectValue *_functionPrototype;
@@ -109,9 +114,18 @@ public:
ColorValue _colorValue; ColorValue _colorValue;
AnchorLineValue _anchorLineValue; AnchorLineValue _anchorLineValue;
}; };
Q_GLOBAL_STATIC(SharedValueOwner, sharedValueOwner)
SharedValueOwner::SharedValueOwner() SharedValueOwner *ValueOwner::sharedValueOwner(QString kind)
{
static SharedValueOwner qt5owner(SharedValueOwner::Qt5Kind);
static SharedValueOwner qt4owner(SharedValueOwner::Qt4Kind);
if (kind == QLatin1String("Qt4Kind"))
return &qt4owner;
else
return &qt5owner;
}
SharedValueOwner::SharedValueOwner(SharedValueOwnerKind kind)
: ValueOwner(this) // need to avoid recursing in ValueOwner ctor : ValueOwner(this) // need to avoid recursing in ValueOwner ctor
{ {
_objectPrototype = newObject(/*prototype = */ 0); _objectPrototype = newObject(/*prototype = */ 0);
@@ -526,8 +540,21 @@ SharedValueOwner::SharedValueOwner()
// firebug/webkit compat // firebug/webkit compat
ObjectValue *consoleObject = newObject(/*prototype */ 0); ObjectValue *consoleObject = newObject(/*prototype */ 0);
addFunction(consoleObject, QLatin1String("log"), 1); addFunction(consoleObject, QLatin1String("log"), 1, 0, true);
addFunction(consoleObject, QLatin1String("debug"), 1); addFunction(consoleObject, QLatin1String("debug"), 1, 0, true);
if (kind == Qt5Kind) {
addFunction(consoleObject, QLatin1String("info"), 1, 0, true);
addFunction(consoleObject, QLatin1String("warn"), 1, 0, true);
addFunction(consoleObject, QLatin1String("error"), 1, 0, true);
addFunction(consoleObject, QLatin1String("assert"), 1, 0, true);
addFunction(consoleObject, QLatin1String("count"), 0, 1);
addFunction(consoleObject, QLatin1String("profile"), 0);
addFunction(consoleObject, QLatin1String("profileEnd"), 0);
addFunction(consoleObject, QLatin1String("time"), 1);
addFunction(consoleObject, QLatin1String("timeEnd"), 1);
addFunction(consoleObject, QLatin1String("trace"), 0);
addFunction(consoleObject, QLatin1String("exception"), 1, 0, true);
}
_globalObject->setMember(QLatin1String("console"), consoleObject); _globalObject->setMember(QLatin1String("console"), consoleObject);
// translation functions // translation functions

View File

@@ -66,6 +66,7 @@ class QMLJS_EXPORT ValueOwner
Q_DISABLE_COPY(ValueOwner) Q_DISABLE_COPY(ValueOwner)
public: public:
static SharedValueOwner *sharedValueOwner(QString kind = QString());
ValueOwner(const SharedValueOwner *shared = 0); ValueOwner(const SharedValueOwner *shared = 0);
~ValueOwner(); ~ValueOwner();

View File

@@ -1,5 +1,5 @@
import qbs.base 1.0 import qbs.base 1.0
import qbs.fileinfo as FileInfo import qbs.FileInfo
import "../../qbs/defaults.js" as Defaults import "../../qbs/defaults.js" as Defaults
Product { Product {

View File

@@ -1,5 +1,5 @@
import qbs.base 1.0 import qbs.base 1.0
import qbs.fileinfo as FileInfo import qbs.FileInfo
import "../QtcPlugin.qbs" as QtcPlugin import "../QtcPlugin.qbs" as QtcPlugin
import "../../../qbs/defaults.js" as Defaults import "../../../qbs/defaults.js" as Defaults

View File

@@ -1,5 +1,5 @@
import qbs.base 1.0 import qbs.base 1.0
import qbs.fileinfo as FileInfo import qbs.FileInfo
import "../QtcPlugin.qbs" as QtcPlugin import "../QtcPlugin.qbs" as QtcPlugin
import "../../../qbs/defaults.js" as Defaults import "../../../qbs/defaults.js" as Defaults

View File

@@ -7,7 +7,7 @@ include(cpp/cpp.pri)
INCLUDEPATH += ../../tools/utils INCLUDEPATH += ../../tools/utils
greaterThan(QT_MAJOR_VERSION, 4) { greaterThan(QT_MAJOR_VERSION, 4) {
QT += printsupport designer designercomponents QT += printsupport designer designercomponents-private
} else { } else {
# -- figure out shared dir location # -- figure out shared dir location
!exists($$[QT_INSTALL_HEADERS]/QtDesigner/private/qdesigner_integration_p.h) { !exists($$[QT_INSTALL_HEADERS]/QtDesigner/private/qdesigner_integration_p.h) {

View File

@@ -522,22 +522,7 @@ void BranchModel::checkoutBranch(const QModelIndex &idx)
// No StashGuard since this function for now is only used with clean working dir. // No StashGuard since this function for now is only used with clean working dir.
// If it is ever used from another place, please add StashGuard here // If it is ever used from another place, please add StashGuard here
QString errorMessage; m_client->synchronousCheckout(m_workingDirectory, branch);
if (m_client->synchronousCheckout(m_workingDirectory, branch, &errorMessage)) {
if (errorMessage.isEmpty()) {
QModelIndex currentIdx = currentBranch();
if (currentIdx.isValid()) {
m_currentBranch = 0;
emit dataChanged(currentIdx, currentIdx);
}
m_currentBranch = indexToNode(idx);
emit dataChanged(idx, idx);
} else {
refresh(m_workingDirectory, &errorMessage); // not sure all went well... better refresh!
}
}
if (!errorMessage.isEmpty())
VcsBase::VcsBaseOutputWindow::instance()->appendError(errorMessage);
} }
bool BranchModel::branchIsMerged(const QModelIndex &idx) bool BranchModel::branchIsMerged(const QModelIndex &idx)

View File

@@ -1276,7 +1276,8 @@ bool GitClient::synchronousCheckout(const QString &workingDirectory,
QByteArray errorText; QByteArray errorText;
QStringList arguments; QStringList arguments;
arguments << QLatin1String("checkout") << ref; arguments << QLatin1String("checkout") << ref;
const bool rc = fullySynchronousGit(workingDirectory, arguments, &outputText, &errorText); const bool rc = fullySynchronousGit(workingDirectory, arguments, &outputText, &errorText,
VcsBasePlugin::ExpectRepoChanges);
const QString output = commandOutputFromLocal8Bit(outputText); const QString output = commandOutputFromLocal8Bit(outputText);
outputWindow()->append(output); outputWindow()->append(output);
if (!rc) { if (!rc) {

View File

@@ -446,12 +446,11 @@ void DeviceKitInformation::kitsWereLoaded()
foreach (Kit *k, KitManager::instance()->kits()) foreach (Kit *k, KitManager::instance()->kits())
fix(k); fix(k);
connect(DeviceManager::instance(), SIGNAL(deviceAdded(Core::Id)), DeviceManager *dm = DeviceManager::instance();
this, SLOT(deviceAdded(Core::Id))); connect(dm, SIGNAL(deviceListChanged()), this, SLOT(devicesChanged()));
connect(DeviceManager::instance(), SIGNAL(deviceRemoved(Core::Id)), connect(dm, SIGNAL(deviceAdded(Core::Id)), this, SLOT(devicesChanged()));
this, SLOT(deviceRemoved(Core::Id))); connect(dm, SIGNAL(deviceRemoved(Core::Id)), this, SLOT(devicesChanged()));
connect(DeviceManager::instance(), SIGNAL(deviceUpdated(Core::Id)), connect(dm, SIGNAL(deviceUpdated(Core::Id)), this, SLOT(deviceUpdated(Core::Id)));
this, SLOT(deviceUpdated(Core::Id)));
connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)), connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
this, SLOT(kitUpdated(ProjectExplorer::Kit*))); this, SLOT(kitUpdated(ProjectExplorer::Kit*)));
@@ -472,19 +471,9 @@ void DeviceKitInformation::kitUpdated(Kit *k)
setup(k); // Set default device if necessary setup(k); // Set default device if necessary
} }
void DeviceKitInformation::deviceAdded(const Core::Id &id) void DeviceKitInformation::devicesChanged()
{ {
Q_UNUSED(id); foreach (Kit *k, KitManager::instance()->kits())
DeviceMatcher m;
foreach (Kit *k, KitManager::instance()->kits(&m)) {
setup(k); // Set default device if necessary
}
}
void DeviceKitInformation::deviceRemoved(const Core::Id &id)
{
DeviceMatcher m(id);
foreach (Kit *k, KitManager::instance()->kits(&m))
setup(k); // Set default device if necessary setup(k); // Set default device if necessary
} }

View File

@@ -215,9 +215,8 @@ public:
private slots: private slots:
void kitsWereLoaded(); void kitsWereLoaded();
void deviceAdded(const Core::Id &id);
void deviceRemoved(const Core::Id &id);
void deviceUpdated(const Core::Id &id); void deviceUpdated(const Core::Id &id);
void devicesChanged();
void kitUpdated(ProjectExplorer::Kit *k); void kitUpdated(ProjectExplorer::Kit *k);
}; };

View File

@@ -380,13 +380,21 @@ const QList<Project *> &SessionManager::projects() const
QStringList SessionManager::dependencies(const QString &proName) const QStringList SessionManager::dependencies(const QString &proName) const
{ {
QStringList result; QStringList result;
foreach (const QString &dep, m_depMap.value(proName)) dependencies(proName, result);
result += dependencies(dep);
result << proName;
return result; return result;
} }
void SessionManager::dependencies(const QString &proName, QStringList &result) const
{
QStringList depends = m_depMap.value(proName);
foreach (const QString &dep, depends)
dependencies(dep, result);
if (!result.contains(proName))
result.append(proName);
}
QStringList SessionManager::dependenciesOrder() const QStringList SessionManager::dependenciesOrder() const
{ {
QList<QPair<QString, QStringList> > unordered; QList<QPair<QString, QStringList> > unordered;

View File

@@ -160,6 +160,7 @@ private:
bool recursiveDependencyCheck(const QString &newDep, const QString &checkDep) const; bool recursiveDependencyCheck(const QString &newDep, const QString &checkDep) const;
QStringList dependencies(const QString &proName) const; QStringList dependencies(const QString &proName) const;
QStringList dependenciesOrder() const; QStringList dependenciesOrder() const;
void dependencies(const QString &proName, QStringList &result) const;
SessionNode *m_sessionNode; SessionNode *m_sessionNode;
QString m_sessionName; QString m_sessionName;

View File

@@ -229,7 +229,7 @@ void QbsInstallStep::setInstallRoot(const QString &ir)
{ {
if (m_qbsInstallOptions.installRoot() == ir) if (m_qbsInstallOptions.installRoot() == ir)
return; return;
m_qbsInstallOptions.installRoot() = ir; m_qbsInstallOptions.setInstallRoot(ir);
emit changed(); emit changed();
} }

View File

@@ -620,7 +620,10 @@ void QbsProjectNode::update(const qbs::ProjectData &prjData)
} }
} }
if (!prjData.name().isEmpty())
setDisplayName(prjData.name()); setDisplayName(prjData.name());
else
setDisplayName(m_project->displayName());
removeProjectNodes(toRemove); removeProjectNodes(toRemove);
addProjectNodes(toAdd); addProjectNodes(toAdd);

View File

@@ -392,6 +392,10 @@ void QbsProject::parse(const QVariantMap &config, const Utils::Environment &env,
{ {
QTC_ASSERT(!dir.isNull(), return); QTC_ASSERT(!dir.isNull(), return);
// Clear buildsystem related tasks:
ProjectExplorer::ProjectExplorerPlugin::instance()->taskHub()
->clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
qbs::SetupProjectParameters params; qbs::SetupProjectParameters params;
params.setBuildConfiguration(config); params.setBuildConfiguration(config);
qbs::ErrorInfo err = params.expandBuildConfiguration(m_manager->settings()); qbs::ErrorInfo err = params.expandBuildConfiguration(m_manager->settings());

View File

@@ -168,6 +168,7 @@ void MemcheckRunner::logSocketConnected()
void MemcheckRunner::readLogSocket() void MemcheckRunner::readLogSocket()
{ {
QTC_ASSERT(d->logSocket, return);
emit logMessageReceived(d->logSocket->readAll()); emit logMessageReceived(d->logSocket->readAll());
} }

View File

@@ -914,7 +914,9 @@ void tst_Dumpers::dumper()
contents.replace("\\\"", "\""); contents.replace("\\\"", "\"");
} else if (m_debuggerEngine == DumpTestLldbEngine) { } else if (m_debuggerEngine == DumpTestLldbEngine) {
//qDebug() << "GOT OUTPUT: " << output; //qDebug() << "GOT OUTPUT: " << output;
QVERIFY(output.startsWith("data=")); int pos = output.indexOf("data=[{");
QVERIFY(pos != -1);
output = output.mid(pos);
contents = output; contents = output;
//int posNameSpaceStart = output.indexOf("@NS@"); //int posNameSpaceStart = output.indexOf("@NS@");
@@ -3113,9 +3115,12 @@ void tst_Dumpers::dumper_data()
QTest::newRow("QStringRef1") QTest::newRow("QStringRef1")
<< Data("#include <QStringRef>\n", << Data("#include <QStringRef>\n",
"QString str = \"Hello\";\n" "QString str = \"Hello\";\n"
"QStringRef ref(&str, 1, 2);") "QStringRef ref1(&str, 1, 2);\n"
"QStringRef ref2;\n"
"unused(&ref1, &ref2);\n")
% CoreProfile() % CoreProfile()
% Check("ref", "\"el\"", "@QStringRef"); % Check("ref1", "\"el\"", "@QStringRef")
% Check("ref2", "(null)", "@QStringRef");
QTest::newRow("QStringList") QTest::newRow("QStringList")
<< Data("#include <QStringList>\n", << Data("#include <QStringList>\n",