aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-11-21 10:25:45 +0200
committerOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-11-21 10:25:45 +0200
commit6d1d1a4416fb0c4d13942a69eba1b00e6f043ff1 (patch)
tree99e183a55108d5f03ecef864663fe567376deebb
parent6a061b2a3579b266033599f69e8f3270ff24c426 (diff)
parent97c9213358181547e02795740369bc451e26648f (diff)
Merge remote-tracking branch 'origin/4.2'
-rw-r--r--share/qtcreator/debugger/boosttypes.py75
-rw-r--r--share/qtcreator/debugger/cdbbridge.py5
-rw-r--r--share/qtcreator/debugger/dumper.py72
-rw-r--r--share/qtcreator/debugger/lldbbridge.py2
-rw-r--r--share/qtcreator/debugger/qttypes.py139
-rw-r--r--share/qtcreator/debugger/stdtypes.py56
-rw-r--r--share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json6
-rw-r--r--src/app/main.cpp1
-rw-r--r--src/libs/qmljs/qmljscheck.cpp21
-rw-r--r--src/libs/qtcreatorcdbext/qtcreatorcdbext.pro12
-rw-r--r--src/plugins/clangrefactoring/clangquerycurrentfilefindfilter.cpp7
-rw-r--r--src/plugins/cppeditor/cppinsertvirtualmethods.cpp4
-rw-r--r--src/plugins/cppeditor/cppquickfix_test.cpp2
-rw-r--r--src/plugins/cppeditor/cppquickfixes.cpp194
-rw-r--r--src/plugins/cpptools/baseeditordocumentprocessor.h2
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp6
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp13
-rw-r--r--src/plugins/debugger/gdb/gdbengine.h2
-rw-r--r--src/plugins/debugger/watchhandler.cpp2
-rw-r--r--src/plugins/designer/resourcehandler.cpp15
-rw-r--r--src/plugins/diffeditor/diffeditorplugin.cpp16
-rw-r--r--src/plugins/qmldesigner/components/navigator/export_unchecked.pngbin116 -> 113 bytes
-rw-r--r--src/plugins/qmldesigner/components/navigator/export_unchecked@2x.pngbin120 -> 117 bytes
-rw-r--r--src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp1
-rw-r--r--src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp4
-rw-r--r--src/plugins/qmljseditor/qmljsquickfixes.cpp4
-rw-r--r--src/plugins/qmljseditor/qmljswrapinloader.cpp4
-rw-r--r--src/plugins/subversion/subversionclient.cpp2
-rw-r--r--src/plugins/texteditor/quickfix.h11
-rw-r--r--src/tools/icons/qtcreatoricons.svg12
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp63
-rw-r--r--tests/unit/mockup/cpptools/cpptoolsreuse.h32
-rw-r--r--tests/unit/unittest/clangquerycurrentfilefindfilter-test.cpp6
-rw-r--r--tests/unit/unittest/refactoringclient-test.cpp3
-rw-r--r--tests/unit/unittest/refactoringengine-test.cpp3
-rw-r--r--tests/unit/unittest/unittest.pro1
36 files changed, 489 insertions, 309 deletions
diff --git a/share/qtcreator/debugger/boosttypes.py b/share/qtcreator/debugger/boosttypes.py
index 938a0a2967..552b059412 100644
--- a/share/qtcreator/debugger/boosttypes.py
+++ b/share/qtcreator/debugger/boosttypes.py
@@ -108,45 +108,36 @@ def qdump__boost__posix_time__time_duration(d, value):
def qdump__boost__unordered__unordered_set(d, value):
- base = value.address()
- ptrSize = d.ptrSize()
- size = d.extractInt(base + 2 * ptrSize)
- d.putItemCount(size)
-
- if d.isExpanded():
- innerType = value.type[0]
- bucketCount = d.extractInt(base + ptrSize)
- #warn("A BUCKET COUNT: %s" % bucketCount)
- #warn("X BUCKET COUNT: %s" % d.parseAndEvaluate("s1.table_.bucket_count_").value())
- try:
- # boost 1.58
- table = value["table_"]
- bucketsAddr = table["buckets_"].integer()
- #warn("A BUCKETS: 0x%x" % bucketsAddr)
- #warn("X BUCKETS: 0x%x" % d.parseAndEvaluate("s1.table_.buckets_").pointer())
- lastBucketAddr = bucketsAddr + bucketCount * ptrSize
- #warn("A LAST BUCKET: 0x%x" % lastBucketAddr)
- #warn("X LAST BUCKET: 0x%x" % d.parseAndEvaluate("s1.table_.get_bucket(s1.table_.bucket_count_)").pointer())
- previousStartAddr = lastBucketAddr
- #warn("A PREVIOUS START: 0x%x" % previousStartAddr)
- #warn("X PREVIOUS START: 0x%x" % d.parseAndEvaluate("s1.table_.get_previous_start()").pointer())
- item = d.extractPointer(previousStartAddr)
- #warn("A KEY ADDR: 0x%x" % item)
- #warn("X KEY ADDR: 0x%x" % d.parseAndEvaluate("s1.table_.get_previous_start()->next_").pointer())
- item = d.extractPointer(previousStartAddr)
- #warn("A VALUE: %x" % d.extractInt(item + ptrSize))
- #warn("X VALUE: %x" % d.parseAndEvaluate("*(int*)(s1.table_.get_previous_start()->next_ + 1)").integer())
- with Children(d, size, maxNumChild=10000):
- for j in d.childRange():
- d.putSubItem(j, d.createValue(item + 2 * ptrSize, innerType))
- item = d.extractPointer(item)
- except:
- # boost 1.48
- offset = int((innerType.size() + ptrSize - 1) / ptrSize) * ptrSize
- with Children(d, size, maxNumChild=10000):
- afterBuckets = d.extractPointer(base + 5 * ptrSize)
- afterBuckets += bucketCount * ptrSize
- item = d.extractPointer(afterBuckets)
- for j in d.childRange():
- d.putSubItem(j, d.createValue(item - offset, innerType))
- item = d.extractPointer(item)
+ innerType = value.type[0]
+ if value.type.size() == 6 * d.ptrSize(): # 48 for boost 1.55+, 40 for 1.48
+ # boost 1.58 or 1.55
+ # bases are 3? bytes, and mlf is actually a float, but since
+ # its followed by size_t maxload, it's # effectively padded to a size_t
+ bases, bucketCount, size, mlf, maxload, buckets = value.split('tttttp')
+ # Distinguish 1.58 and 1.55. 1.58 used one template argument, 1.55 two.
+ ittype = d.lookupType(value.type.name + '::iterator').target()
+ forward = len(ittype.templateArguments()) == 1
+ else:
+ # boost 1.48
+ # Values are stored before the next pointers. Determine the offset.
+ buckets, bucketCount, size, mlf, maxload = value.split('ptttt')
+ forward = False
+
+ if forward:
+ # boost 1.58
+ code = 'pp{%s}' % innerType.name
+ def children(p):
+ while True:
+ p, dummy, val = d.split(code, p)
+ yield val
+ else:
+ # boost 1.48 or 1.55
+ code = '{%s}@p' % innerType.name
+ (pp, ssize, fields) = d.describeStruct(code)
+ offset = fields[2].offset()
+ def children(p):
+ while True:
+ val, pad, p = d.split(code, p - offset)
+ yield val
+ p = d.extractPointer(buckets + bucketCount * d.ptrSize())
+ d.putItems(size, children(p), maxNumChild = 10000)
diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py
index 827502e170..f6ed0439a4 100644
--- a/share/qtcreator/debugger/cdbbridge.py
+++ b/share/qtcreator/debugger/cdbbridge.py
@@ -170,10 +170,7 @@ class Dumper(DumperBase):
else:
targs.append(self.Type(self, targ))
elif isinstance(targ, int):
- value = self.Value(self)
- value.type = self.lookupType('int')
- value.ldata = targ.to_bytes(4, sys.byteorder)
- targs.append(value)
+ targs.append(targ)
else:
error('CDBCRAP %s' % type(targ))
return targs
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 259cad968a..2d75b2eca5 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -866,26 +866,27 @@ class DumperBase:
baseIndex = 0
for item in value.members(True):
#warn('FIELD: %s' % item)
- if item.name is not None and item.name.startswith('_vptr.'):
- with SubItem(self, '[vptr]'):
- # int (**)(void)
- self.putType(' ')
- self.putField('sortgroup', 20)
- self.putValue(item.name)
- n = 10
- if self.isExpanded():
- with Children(self):
- p = item.pointer()
- for i in xrange(n):
- deref = self.extractPointer(p)
- if deref == 0:
- n = i
- break
- with SubItem(self, i):
- self.putItem(self.createPointerValue(deref, 'void'))
- p += self.ptrSize()
- self.putNumChild(n)
- continue
+ if item.name is not None:
+ if item.name.startswith('_vptr.') or item.name.startswith('__vfptr'):
+ with SubItem(self, '[vptr]'):
+ # int (**)(void)
+ self.putType(' ')
+ self.putField('sortgroup', 20)
+ self.putValue(item.name)
+ n = 10
+ if self.isExpanded():
+ with Children(self):
+ p = item.pointer()
+ for i in xrange(n):
+ deref = self.extractPointer(p)
+ if deref == 0:
+ n = i
+ break
+ with SubItem(self, i):
+ self.putItem(self.createPointerValue(deref, 'void'))
+ p += self.ptrSize()
+ self.putNumChild(n)
+ continue
if item.isBaseClass and dumpBase:
baseIndex += 1
@@ -2585,6 +2586,13 @@ class DumperBase:
return True
return False
+ def putItems(self, count, generator, maxNumChild=10000):
+ self.putItemCount(count)
+ if self.isExpanded():
+ with Children(self, count, maxNumChild=maxNumChild):
+ for i, val in zip(self.childRange(), generator):
+ self.putSubItem(i, val)
+
def putItem(self, value):
self.preping('putItem')
self.putItemX(value)
@@ -2738,6 +2746,19 @@ class DumperBase:
return tiVersion
return None
+ def qtDeclarativeHookDataSymbolName(self):
+ return 'qtDeclarativeHookData'
+
+ def qtDeclarativeTypeInfoVersion(self):
+ addr = self.symbolAddress(self.qtDeclarativeHookDataSymbolName())
+ if addr:
+ # Only available with Qt 5.6+
+ (hookVersion, x, tiVersion) = self.split('ppp', addr)
+ if hookVersion >= 1:
+ self.qtTypeInfoVersion = lambda: tiVersion
+ return tiVersion
+ return None
+
def addToCache(self, typeobj):
typename = typeobj.name
if typename in self.typesReported:
@@ -3316,6 +3337,12 @@ class DumperBase:
def unqualified(self):
return self
+ def templateArguments(self):
+ tdata = self.typeData()
+ if tdata is None:
+ return self.dumper.listTemplateParameters(self.typeId)
+ return tdata.templateArguments
+
def templateArgument(self, position):
tdata = self.typeData()
#warn('TDATA: %s' % tdata)
@@ -3768,11 +3795,14 @@ class DumperBase:
readingTypeName = False
fieldType = self.createType(typeName)
fieldAlign = fieldType.alignment()
- builder.addField(n, fieldIsStruct = True, fieldType = fieldType, fieldAlign = fieldAlign)
+ builder.addField(n, fieldIsStruct = True,
+ fieldType = fieldType, fieldAlign = fieldAlign)
typeName = None
n = None
else:
typeName += c
+ elif c == 't': # size_t
+ builder.addField(ptrSize, self.ptrCode(), fieldAlign = ptrSize)
elif c == 'p': # Pointer as int
builder.addField(ptrSize, self.ptrCode(), fieldAlign = ptrSize)
elif c == 'P': # Pointer as Value
diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py
index 5f257fb324..6a5c691fd2 100644
--- a/share/qtcreator/debugger/lldbbridge.py
+++ b/share/qtcreator/debugger/lldbbridge.py
@@ -1384,7 +1384,7 @@ class Dumper(DumperBase):
'd = lldb.theDumper',
'output = d.hexencode(sys.stdout.getvalue())',
'sys.stdout = origout',
- 'd.report("output={channel=\"stderr\",data=\"' + output + '\"}")',
+ 'd.report("output={channel=\"stderr\",data=\" + output + \"}")',
'if result is False:',
' d.reportState("continueafternextstop")',
'return True'
diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py
index 65f4e1fbdd..25faf326a3 100644
--- a/share/qtcreator/debugger/qttypes.py
+++ b/share/qtcreator/debugger/qttypes.py
@@ -470,7 +470,7 @@ def qdump__QFile(d, value):
offset = 144 if is32bit else 232
else:
offset = 140 if is32bit else 232
- privAddress = d.extractPointer(value.address() + d.ptrSize())
+ vtable, privAddress = value.split('pp')
fileNameAddress = privAddress + offset
d.putStringValue(fileNameAddress)
d.putNumChild(1)
@@ -578,11 +578,10 @@ def qform__QFiniteStack():
return arrayForms()
def qdump__QFiniteStack(d, value):
- alloc = int(value['_alloc'])
- size = int(value['_size'])
+ array, alloc, size = value.split('pii')
d.check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
d.putItemCount(size)
- d.putPlotData(value['_array'], size, value.type[0])
+ d.putPlotData(array, size, value.type[0])
def qdump__QFlags(d, value):
@@ -1572,6 +1571,7 @@ qdumpHelper_QVariants_F = [
def qdump__QVariant(d, value):
(data, typeStuff) = d.split('8sI', value)
variantType = typeStuff & 0x3fffffff
+ isShared = bool(typeStuff & 0x40000000)
# Well-known simple type.
if variantType <= 6:
@@ -1616,14 +1616,12 @@ def qdump__QVariant(d, value):
#data = value['d']['data']
innerType = d.qtNamespace() + innert
- isShared = bool(typeStuff & 0x40000000)
#warn('SHARED: %s' % isShared)
if isShared:
base1 = d.extractPointer(value)
#warn('BASE 1: %s %s' % (base1, innert))
base = d.extractPointer(base1)
#warn('SIZE 1: %s' % size)
- innerType = d.createType(d.qtNamespace() + innert)
val = d.createValue(base, innerType)
else:
#warn('DIRECT ITEM 1: %s' % innerType)
@@ -1643,19 +1641,9 @@ def qdump__QVariant(d, value):
d.putType('%sQVariant (%s)' % (ns, variantType))
d.putNumChild(1)
if d.isExpanded():
- typeName = None
+ innerType = None
with Children(d):
ev = d.parseAndEvaluate
- data = d.call('const void *', value, 'constData')
-
- addr = value.address()
- data = ev('((%sQVariant*)0x%x)->constData()' % (ns, addr))
- if data is None:
- data = ev('((QVariant*)0x%x)->constData()' % addr)
- if data is None:
- d.putSpecialValue('notcallable')
- return None
-
p = None
if p is None:
# Without debug info.
@@ -1671,15 +1659,24 @@ def qdump__QVariant(d, value):
return None
ptr = p.pointer()
(elided, blob) = d.encodeCArray(ptr, 1, 100)
- typeName = d.hexdecode(blob)
+ innerType = d.hexdecode(blob)
+
# Prefer namespaced version.
if len(ns) > 0:
- if not d.lookupNativeType(ns + typeName) is None:
- typeName = ns + typeName
- data.type = d.createType(typeName + ' *')
- d.putSubItem('data', data)
- if not typeName is None:
- d.putBetterType('%sQVariant (%s)' % (ns, typeName))
+ if not d.lookupNativeType(ns + innerType) is None:
+ innerType = ns + innerType
+
+ if isShared:
+ base1 = d.extractPointer(value)
+ base = d.extractPointer(base1)
+ val = d.createValue(base, innerType)
+ else:
+ val = d.createValue(data, innerType)
+ val.laddress = value.laddress
+ d.putSubItem('data', val)
+
+ if not innerType is None:
+ d.putBetterType('%sQVariant (%s)' % (ns, innerType))
return None
@@ -1963,40 +1960,6 @@ if False:
QV4_ValueTypeInternal_Boolean_Type_Internal = QV4_ValueType_Boolean_Type | QV4_ConvertibleToInt
QV4_ValueTypeInternal_Integer_Type_Internal = QV4_ValueType_Integer_Type | QV4_ConvertibleToInt
-else:
- # 64 bit.
- QV4_NaNEncodeMask = 0xffff800000000000
- QV4_IsInt32Mask = 0x0002000000000000
- QV4_IsDoubleMask = 0xfffc000000000000
- QV4_IsNumberMask = QV4_IsInt32Mask | QV4_IsDoubleMask
- QV4_IsNullOrUndefinedMask = 0x0000800000000000
- QV4_IsNullOrBooleanMask = 0x0001000000000000
- QV4_PointerMask = 0xfffffffffffffffd
-
- QV4_Masks_NaN_Mask = 0x7ff80000
- QV4_Masks_Type_Mask = 0xffff8000
- QV4_Masks_IsDouble_Mask = 0xfffc0000
- QV4_Masks_Immediate_Mask = 0x00018000
- QV4_Masks_IsNullOrUndefined_Mask = 0x00008000
- QV4_Masks_IsNullOrBoolean_Mask = 0x00010000
- QV4_Masks_Tag_Shift = 32
-
- QV4_ValueType_Undefined_Type = QV4_Masks_IsNullOrUndefined_Mask
- QV4_ValueType_Null_Type = QV4_Masks_IsNullOrUndefined_Mask | QV4_Masks_IsNullOrBoolean_Mask
- QV4_ValueType_Boolean_Type = QV4_Masks_IsNullOrBoolean_Mask
- QV4_ValueType_Integer_Type = 0x20000 | QV4_Masks_IsNullOrBoolean_Mask
- QV4_ValueType_Managed_Type = 0
- QV4_ValueType_Empty_Type = QV4_ValueType_Undefined_Type | 0x4000
-
- QV4_ValueTypeInternal_Null_Type_Internal = QV4_ValueType_Null_Type
- QV4_ValueTypeInternal_Boolean_Type_Internal = QV4_ValueType_Boolean_Type
- QV4_ValueTypeInternal_Integer_Type_Internal = QV4_ValueType_Integer_Type
-
- QV4_IsDouble_Shift = 64-14
- QV4_IsNumber_Shift = 64-15
- QV4_IsConvertibleToInt_Shift = 64-16
- QV4_IsManaged_Shift = 64-17
-
def QV4_getValue(d, jsval): # (Dumper, QJSValue *jsval) -> QV4::Value *
dd = d.split('Q', jsval)[0]
@@ -2106,6 +2069,56 @@ def qdump_32__QV4__Value(d, value):
d.putFields(value)
def qdump_64__QV4__Value(d, value):
+ dti = d.qtDeclarativeTypeInfoVersion()
+ new = dti is not None and dti >= 2
+ if new:
+ QV4_NaNEncodeMask = 0xfffc000000000000
+ QV4_Masks_Immediate_Mask = 0x00020000 # bit 49
+
+ QV4_ValueTypeInternal_Empty_Type_Internal = QV4_Masks_Immediate_Mask | 0
+ QV4_ConvertibleToInt = QV4_Masks_Immediate_Mask | 0x10000 # bit 48
+ QV4_ValueTypeInternal_Null_Type_Internal = QV4_ConvertibleToInt | 0x08000
+ QV4_ValueTypeInternal_Boolean_Type_Internal = QV4_ConvertibleToInt | 0x04000
+ QV4_ValueTypeInternal_Integer_Type_Internal = QV4_ConvertibleToInt | 0x02000
+
+ QV4_ValueType_Undefined_Type = 0 # Dummy to make generic code below pass.
+
+ else:
+ QV4_NaNEncodeMask = 0xffff800000000000
+ QV4_Masks_Immediate_Mask = 0x00018000
+
+ QV4_IsInt32Mask = 0x0002000000000000
+ QV4_IsDoubleMask = 0xfffc000000000000
+ QV4_IsNumberMask = QV4_IsInt32Mask | QV4_IsDoubleMask
+ QV4_IsNullOrUndefinedMask = 0x0000800000000000
+ QV4_IsNullOrBooleanMask = 0x0001000000000000
+
+ QV4_Masks_NaN_Mask = 0x7ff80000
+ QV4_Masks_Type_Mask = 0xffff8000
+ QV4_Masks_IsDouble_Mask = 0xfffc0000
+ QV4_Masks_IsNullOrUndefined_Mask = 0x00008000
+ QV4_Masks_IsNullOrBoolean_Mask = 0x00010000
+
+ QV4_ValueType_Undefined_Type = QV4_Masks_IsNullOrUndefined_Mask
+ QV4_ValueType_Null_Type = QV4_Masks_IsNullOrUndefined_Mask \
+ | QV4_Masks_IsNullOrBoolean_Mask
+ QV4_ValueType_Boolean_Type = QV4_Masks_IsNullOrBoolean_Mask
+ QV4_ValueType_Integer_Type = 0x20000 | QV4_Masks_IsNullOrBoolean_Mask
+ QV4_ValueType_Managed_Type = 0
+ QV4_ValueType_Empty_Type = QV4_ValueType_Undefined_Type | 0x4000
+
+ QV4_ValueTypeInternal_Null_Type_Internal = QV4_ValueType_Null_Type
+ QV4_ValueTypeInternal_Boolean_Type_Internal = QV4_ValueType_Boolean_Type
+ QV4_ValueTypeInternal_Integer_Type_Internal = QV4_ValueType_Integer_Type
+
+ QV4_PointerMask = 0xfffffffffffffffd
+
+ QV4_Masks_Tag_Shift = 32
+ QV4_IsDouble_Shift = 64-14
+ QV4_IsNumber_Shift = 64-15
+ QV4_IsConvertibleToInt_Shift = 64-16
+ QV4_IsManaged_Shift = 64-17
+
v = value.split('Q')[0]
tag = v >> QV4_Masks_Tag_Shift
vtable = v & QV4_PointerMask
@@ -2119,15 +2132,19 @@ def qdump_64__QV4__Value(d, value):
elif (v >> QV4_IsDouble_Shift):
d.putBetterType('%sQV4::Value (double)' % ns)
d.putValue('%x' % (v ^ QV4_NaNEncodeMask), 'float:8')
- elif tag == QV4_ValueType_Undefined_Type:
+ elif tag == QV4_ValueType_Undefined_Type and not new:
d.putBetterType('%sQV4::Value (undefined)' % ns)
d.putValue('(undefined)')
elif tag == QV4_ValueTypeInternal_Null_Type_Internal:
d.putBetterType('%sQV4::Value (null?)' % ns)
d.putValue('(null?)')
elif v == 0:
- d.putBetterType('%sQV4::Value (null)' % ns)
- d.putValue('(null)')
+ if new:
+ d.putBetterType('%sQV4::Value (undefined)' % ns)
+ d.putValue('(undefined)')
+ else:
+ d.putBetterType('%sQV4::Value (null)' % ns)
+ d.putValue('(null)')
#elif ((v >> QV4_IsManaged_Shift) & ~1) == 1:
# d.putBetterType('%sQV4::Value (null/undef)' % ns)
# d.putValue('(null/undef)')
diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py
index 5fa4522cfe..a6de8e187a 100644
--- a/share/qtcreator/debugger/stdtypes.py
+++ b/share/qtcreator/debugger/stdtypes.py
@@ -64,44 +64,46 @@ def qdump__std__deque(d, value):
innerSize = innerType.size()
bufsize = 1
if innerSize < 512:
- bufsize = int(512 / innerSize)
+ bufsize = 512 // innerSize
- #(mapptr, mapsize, startCur, startFirst, startLast, startNode,
- # finishCur, finishFirst, finishLast, finishNode) = d.split("pppppppppp", value)
-#
-# numInBuf = bufsize * (int((finishNode - startNode) / innerSize) - 1)
-# numFirstItems = int((startLast - startCur) / innerSize)
-# numLastItems = int((finishCur - finishFirst) / innerSize)
+ (mapptr, mapsize, startCur, startFirst, startLast, startNode,
+ finishCur, finishFirst, finishLast, finishNode) = value.split("pppppppppp")
- impl = value["_M_impl"]
- start = impl["_M_start"]
- finish = impl["_M_finish"]
- size = bufsize * ((finish["_M_node"].pointer() - start["_M_node"].pointer()) // d.ptrSize() - 1)
- size += ((finish["_M_cur"].pointer() - finish["_M_first"].pointer()) // innerSize)
- size += ((start["_M_last"].pointer() - start["_M_cur"].pointer()) // innerSize)
+ size = bufsize * ((finishNode - startNode) // d.ptrSize() - 1)
+ size += (finishCur - finishFirst) // innerSize
+ size += (startLast - startCur) // innerSize
d.check(0 <= size and size <= 1000 * 1000 * 1000)
d.putItemCount(size)
if d.isExpanded():
with Children(d, size, maxNumChild=2000, childType=innerType):
- pcur = start["_M_cur"].pointer()
- pfirst = start["_M_first"]
- plast = start["_M_last"].pointer()
- pnode = start["_M_node"]
+ pcur = startCur
+ plast = startLast
+ pnode = startNode
for i in d.childRange():
d.putSubItem(i, d.createValue(pcur, innerType))
pcur += innerSize
if pcur == plast:
- # FIXME: Remove pointer operation.
- newnode = pnode + 1 # Type is std::_Deque_iterator<Foo, Foo&, Foo*>::_Map_pointer\"} a.k.a 'Foo **'
- #warn("TYPE: %s" % pnode.type)
- #warn("PNODE: 0x%x %s" % (pnode.pointer(), pnode))
- #warn("NEWNODE: 0x%x %s" % (newnode.pointer(), newnode))
- pnode = newnode
- #warn("PNODE 2: 0x%x %s" % (pnode.pointer(), pnode))
- pfirst = newnode.dereference().pointer()
+ newnode = pnode + d.ptrSize()
+ pfirst = d.extractPointer(newnode)
plast = pfirst + bufsize * d.ptrSize()
pcur = pfirst
+ pnode = newnode
+
+def qdump__std____1__deque(d, value):
+ mptr, mfirst, mbegin, mend, start, size = value.split("pppptt")
+ d.check(0 <= size and size <= 1000 * 1000 * 1000)
+ d.putItemCount(size)
+ if d.isExpanded():
+ innerType = value.type[0]
+ innerSize = innerType.size()
+ ptrSize = d.ptrSize()
+ bufsize = (4096 // innerSize) if innerSize < 256 else 16
+ with Children(d, size, maxNumChild=2000, childType=innerType):
+ for i in d.childRange():
+ k, j = divmod(start + i, bufsize)
+ base = d.extractPointer(mfirst + k * ptrSize)
+ d.putSubItem(i, d.createValue(base + j * innerSize, innerType))
def qdump__std__deque__QNX(d, value):
innerType = value.type[0]
@@ -534,6 +536,10 @@ def qdump__std__stack(d, value):
def qdump__std____debug__stack(d, value):
qdump__std__stack(d, value)
+def qdump__std____1__stack(d, value):
+ d.putItem(value["c"])
+ d.putBetterType(value.type)
+
def qform__std__string():
return [Latin1StringFormat, SeparateLatin1StringFormat,
Utf8StringFormat, SeparateUtf8StringFormat ]
diff --git a/share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json b/share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json
index 53c6f6c496..0454f97965 100644
--- a/share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json
+++ b/share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json
@@ -43,6 +43,11 @@
"QtQuick.Controls 1.3",
"QtQuick.Controls 1.4",
"QtQuick.Controls 2.0",
+ "QtQuick.Controls 2.1",
+ "QtQuick.Controls.Material 2.0",
+ "QtQuick.Controls.Material 2.1",
+ "QtQuick.Controls.Universal 2.0",
+ "QtQuick.Controls.Universal 2.1",
"QtQuick.Controls.Styles 1.0",
"QtQuick.Controls.Styles 1.1",
"QtQuick.Controls.Styles 1.2",
@@ -57,6 +62,7 @@
"QtQuick.LocalStorage 2.0",
"QtQuick.Particles 2.0",
"QtQuick.Templates 2.0",
+ "QtQuick.Templates 2.1",
"QtQuick.Window 2.0",
"QtQuick.XmlListModel 2.0",
"QtSensors 5.3",
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 85fe4e5e89..de23bea974 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -311,6 +311,7 @@ int main(int argc, char **argv)
setrlimit(RLIMIT_NOFILE, &rl);
#endif
+ SharedTools::QtSingleApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv);
loadFonts();
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp
index df463e69e6..483b563a04 100644
--- a/src/libs/qmljs/qmljscheck.cpp
+++ b/src/libs/qmljs/qmljscheck.cpp
@@ -1428,6 +1428,17 @@ static QString functionName(ExpressionNode *ast, SourceLocation *location)
return QString();
}
+static QString functionNamespace(ExpressionNode *ast)
+{
+ if (FieldMemberExpression *fme = cast<FieldMemberExpression *>(ast)) {
+ if (!fme->name.isEmpty()) {
+ SourceLocation location;
+ return functionName(fme->base, &location);
+ }
+ }
+ return QString();
+}
+
void Check::checkNewExpression(ExpressionNode *ast)
{
SourceLocation location;
@@ -1612,12 +1623,18 @@ bool Check::visit(CallExpression *ast)
SourceLocation location;
const QString name = functionName(ast->base, &location);
+ const QString namespaceName = functionNamespace(ast->base);
+
// We have to allow the qsTr function for translation.
- bool isTranslationFunction = (name == QLatin1String("qsTr") || name == QLatin1String("qsTrId"));
+
+ const bool isTranslationFunction = (name == QLatin1String("qsTr") || name == QLatin1String("qsTrId"));
+ // We allow the Math. functions
+
+ const bool isMathFunction = namespaceName == "Math";
// allow adding connections with the help of the qt quick designer ui
bool isDirectInConnectionsScope =
(!m_typeStack.isEmpty() && m_typeStack.last() == QLatin1String("Connections"));
- if (!isTranslationFunction && !isDirectInConnectionsScope)
+ if (!isTranslationFunction && !isMathFunction && !isDirectInConnectionsScope)
addMessage(ErrFunctionsNotSupportedInQmlUi, location);
if (!name.isEmpty() && name.at(0).isUpper()
diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro b/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro
index 0e8d790832..78812f5718 100644
--- a/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro
+++ b/src/libs/qtcreatorcdbext/qtcreatorcdbext.pro
@@ -24,12 +24,14 @@ DEF_FILE=$$PWD/qtcreatorcdbext.def
# Find out whether we are _building_ 64/32bit and determine target
# directories accordingly.
#
-# Newer MSVC versions set CPU, olders do not, so use hacky check on
-# LIBPATH if CPU is not available
-ENV_CPU=$$(CPU)
+# Check for VSCMD_ARG_TGT_ARCH (VS 17) or Platform=X64 (VS 13, 15)
+# For older versions, fall back to hacky check on LIBPATH
+
+ENV_TARGET_ARCH=$$(VSCMD_ARG_TGT_ARCH)
+isEmpty(ENV_TARGET_ARCH):ENV_TARGET_ARCH = $$(Platform)
ENV_LIBPATH=$$(LIBPATH)
-contains(ENV_CPU, ^AMD64$) {
+contains(ENV_TARGET_ARCH, .*64$) {
DIRNAME=$${BASENAME}64
CDB_PLATFORM=amd64
@@ -38,7 +40,7 @@ contains(ENV_CPU, ^AMD64$) {
} else {
LIBS+= -L$$CDB_PATH/lib/x64 -ldbgeng
}
-} else:isEmpty(ENV_CPU):contains(ENV_LIBPATH, ^.*amd64.*$) {
+} else:isEmpty(ENV_TARGET_ARCH):contains(ENV_LIBPATH, ^.*amd64.*$) {
DIRNAME=$${BASENAME}64
CDB_PLATFORM=amd64
diff --git a/src/plugins/clangrefactoring/clangquerycurrentfilefindfilter.cpp b/src/plugins/clangrefactoring/clangquerycurrentfilefindfilter.cpp
index 32e9077f63..5df78f9bdc 100644
--- a/src/plugins/clangrefactoring/clangquerycurrentfilefindfilter.cpp
+++ b/src/plugins/clangrefactoring/clangquerycurrentfilefindfilter.cpp
@@ -116,9 +116,10 @@ Utils::SmallStringVector ClangQueryCurrentFileFindFilter::createCommandLine() co
{
using ClangRefactoring::RefactoringCompilerOptionsBuilder;
- auto commandLine = RefactoringCompilerOptionsBuilder::build(projectPart.data(),
- fileKindInProjectPart(projectPart.data(),
- currentDocumentFilePath));
+ auto commandLine = RefactoringCompilerOptionsBuilder::build(
+ projectPart.data(),
+ fileKindInProjectPart(projectPart.data(), currentDocumentFilePath),
+ RefactoringCompilerOptionsBuilder::PchUsage::None);
commandLine.push_back(currentDocumentFilePath);
diff --git a/src/plugins/cppeditor/cppinsertvirtualmethods.cpp b/src/plugins/cppeditor/cppinsertvirtualmethods.cpp
index c61e5bc31c..cc97d5282d 100644
--- a/src/plugins/cppeditor/cppinsertvirtualmethods.cpp
+++ b/src/plugins/cppeditor/cppinsertvirtualmethods.cpp
@@ -1222,11 +1222,9 @@ InsertVirtualMethods::~InsertVirtualMethods()
void InsertVirtualMethods::match(const CppQuickFixInterface &interface,
QuickFixOperations &result)
{
- InsertVirtualMethodsOp *op = new InsertVirtualMethodsOp(interface, m_dialog);
+ QSharedPointer<InsertVirtualMethodsOp> op(new InsertVirtualMethodsOp(interface, m_dialog));
if (op->isValid())
result.append(op);
- else
- delete op;
}
#ifdef WITH_TESTS
diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp
index 3434f87b72..3364b89b56 100644
--- a/src/plugins/cppeditor/cppquickfix_test.cpp
+++ b/src/plugins/cppeditor/cppquickfix_test.cpp
@@ -301,7 +301,7 @@ public:
void match(const CppQuickFixInterface &cppQuickFixInterface, QuickFixOperations &result)
{
- result.append(new AddIncludeForUndefinedIdentifierOp(cppQuickFixInterface, 0, m_include));
+ result << new AddIncludeForUndefinedIdentifierOp(cppQuickFixInterface, 0, m_include);
}
private:
diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp
index a4382a3d84..39aeb5897a 100644
--- a/src/plugins/cppeditor/cppquickfixes.cpp
+++ b/src/plugins/cppeditor/cppquickfixes.cpp
@@ -427,7 +427,7 @@ void InverseLogicalComparison::match(const CppQuickFixInterface &interface,
return;
}
- result.append(new InverseLogicalComparisonOp(interface, index, binary, invertToken));
+ result << new InverseLogicalComparisonOp(interface, index, binary, invertToken);
}
namespace {
@@ -517,7 +517,7 @@ void FlipLogicalOperands::match(const CppQuickFixInterface &interface, QuickFixO
replacement = QLatin1String(tok.spell());
}
- result.append(new FlipLogicalOperandsOp(interface, index, binary, replacement));
+ result << new FlipLogicalOperandsOp(interface, index, binary, replacement);
}
namespace {
@@ -696,13 +696,13 @@ void SplitSimpleDeclaration::match(const CppQuickFixInterface &interface,
if (cursorPosition >= startOfDeclSpecifier && cursorPosition <= endOfDeclSpecifier) {
// the AST node under cursor is a specifier.
- result.append(new SplitSimpleDeclarationOp(interface, index, declaration));
+ result << new SplitSimpleDeclarationOp(interface, index, declaration);
return;
}
if (core_declarator && interface.isCursorOn(core_declarator)) {
// got a core-declarator under the text cursor.
- result.append(new SplitSimpleDeclarationOp(interface, index, declaration));
+ result << new SplitSimpleDeclarationOp(interface, index, declaration);
return;
}
}
@@ -757,7 +757,7 @@ void AddBracesToIf::match(const CppQuickFixInterface &interface, QuickFixOperati
IfStatementAST *ifStatement = path.at(index)->asIfStatement();
if (ifStatement && interface.isCursorOn(ifStatement->if_token) && ifStatement->statement
&& !ifStatement->statement->asCompoundStatement()) {
- result.append(new AddBracesToIfOp(interface, index, ifStatement->statement));
+ result << new AddBracesToIfOp(interface, index, ifStatement->statement);
return;
}
@@ -768,7 +768,7 @@ void AddBracesToIf::match(const CppQuickFixInterface &interface, QuickFixOperati
if (ifStatement && ifStatement->statement
&& interface.isCursorOn(ifStatement->statement)
&& !ifStatement->statement->asCompoundStatement()) {
- result.append(new AddBracesToIfOp(interface, index, ifStatement->statement));
+ result << new AddBracesToIfOp(interface, index, ifStatement->statement);
return;
}
}
@@ -1056,7 +1056,7 @@ void SplitIfStatement::match(const CppQuickFixInterface &interface, QuickFixOper
}
if (interface.isCursorOn(condition->binary_op_token)) {
- result.append(new SplitIfStatementOp(interface, index, pattern, condition));
+ result << new SplitIfStatementOp(interface, index, pattern, condition);
return;
}
}
@@ -1213,15 +1213,15 @@ void WrapStringLiteral::match(const CppQuickFixInterface &interface, QuickFixOpe
if (type == TypeChar) {
unsigned actions = EncloseInQLatin1CharAction;
QString description = msgQtStringLiteralDescription(replacement(actions));
- result.append(new WrapStringLiteralOp(interface, priority, actions, description, literal));
+ result << new WrapStringLiteralOp(interface, priority, actions, description, literal);
if (NumericLiteralAST *charLiteral = literal->asNumericLiteral()) {
const QByteArray contents(file->tokenAt(charLiteral->literal_token).identifier->chars());
if (!charToStringEscapeSequences(contents).isEmpty()) {
actions = DoubleQuoteAction | ConvertEscapeSequencesToStringAction;
description = QApplication::translate("CppTools::QuickFix",
"Convert to String Literal");
- result.append(new WrapStringLiteralOp(interface, priority, actions,
- description, literal));
+ result << new WrapStringLiteralOp(interface, priority, actions,
+ description, literal);
}
}
} else {
@@ -1235,21 +1235,21 @@ void WrapStringLiteral::match(const CppQuickFixInterface &interface, QuickFixOpe
| ConvertEscapeSequencesToCharAction | objectiveCActions;
QString description = QApplication::translate("CppTools::QuickFix",
"Convert to Character Literal and Enclose in QLatin1Char(...)");
- result.append(new WrapStringLiteralOp(interface, priority, actions,
- description, literal));
+ result << new WrapStringLiteralOp(interface, priority, actions,
+ description, literal);
actions &= ~EncloseInQLatin1CharAction;
description = QApplication::translate("CppTools::QuickFix",
"Convert to Character Literal");
- result.append(new WrapStringLiteralOp(interface, priority, actions,
- description, literal));
+ result << new WrapStringLiteralOp(interface, priority, actions,
+ description, literal);
}
}
actions = EncloseInQLatin1StringAction | objectiveCActions;
- result.append(new WrapStringLiteralOp(interface, priority, actions,
- msgQtStringLiteralDescription(replacement(actions), 4), literal));
+ result << new WrapStringLiteralOp(interface, priority, actions,
+ msgQtStringLiteralDescription(replacement(actions), 4), literal);
actions = EncloseInQStringLiteralAction | objectiveCActions;
- result.append(new WrapStringLiteralOp(interface, priority, actions,
- msgQtStringLiteralDescription(replacement(actions), 5), literal));
+ result << new WrapStringLiteralOp(interface, priority, actions,
+ msgQtStringLiteralDescription(replacement(actions), 5), literal);
}
}
@@ -1334,9 +1334,9 @@ void TranslateStringLiteral::match(const CppQuickFixInterface &interface,
Symbol *s = r.declaration();
if (s->type()->isFunctionType()) {
// no context required for tr
- result.append(new WrapStringLiteralOp(interface, path.size() - 1,
- WrapStringLiteral::TranslateTrAction,
- description, literal));
+ result << new WrapStringLiteralOp(interface, path.size() - 1,
+ WrapStringLiteral::TranslateTrAction,
+ description, literal);
return;
}
}
@@ -1352,17 +1352,17 @@ void TranslateStringLiteral::match(const CppQuickFixInterface &interface,
// ... or global if none available!
if (trContext.isEmpty())
trContext = QLatin1String("GLOBAL");
- result.append(new WrapStringLiteralOp(interface, path.size() - 1,
- WrapStringLiteral::TranslateQCoreApplicationAction,
- description, literal, trContext));
+ result << new WrapStringLiteralOp(interface, path.size() - 1,
+ WrapStringLiteral::TranslateQCoreApplicationAction,
+ description, literal, trContext);
return;
}
}
// We need to use Q_TRANSLATE_NOOP
- result.append(new WrapStringLiteralOp(interface, path.size() - 1,
- WrapStringLiteral::TranslateNoopAction,
- description, literal, trContext));
+ result << new WrapStringLiteralOp(interface, path.size() - 1,
+ WrapStringLiteral::TranslateNoopAction,
+ description, literal, trContext);
}
namespace {
@@ -1425,8 +1425,8 @@ void ConvertCStringToNSString::match(const CppQuickFixInterface &interface,
if (!isQtStringLiteral(enclosingFunction))
qlatin1Call = 0;
- result.append(new ConvertCStringToNSStringOp(interface, path.size() - 1, literal->asStringLiteral(),
- qlatin1Call));
+ result << new ConvertCStringToNSStringOp(interface, path.size() - 1, literal->asStringLiteral(),
+ qlatin1Call);
}
namespace {
@@ -1513,7 +1513,7 @@ void ConvertNumericLiteral::match(const CppQuickFixInterface &interface, QuickFi
auto op = new ConvertNumericLiteralOp(interface, start, start + numberLength, replacement);
op->setDescription(QApplication::translate("CppTools::QuickFix", "Convert to Hexadecimal"));
op->setPriority(priority);
- result.append(op);
+ result << op;
}
if (value != 0) {
@@ -1531,7 +1531,7 @@ void ConvertNumericLiteral::match(const CppQuickFixInterface &interface, QuickFi
auto op = new ConvertNumericLiteralOp(interface, start, start + numberLength, replacement);
op->setDescription(QApplication::translate("CppTools::QuickFix", "Convert to Octal"));
op->setPriority(priority);
- result.append(op);
+ result << op;
}
}
@@ -1550,7 +1550,7 @@ void ConvertNumericLiteral::match(const CppQuickFixInterface &interface, QuickFi
auto op = new ConvertNumericLiteralOp(interface, start, start + numberLength, replacement);
op->setDescription(QApplication::translate("CppTools::QuickFix", "Convert to Decimal"));
op->setPriority(priority);
- result.append(op);
+ result << op;
}
}
}
@@ -1644,7 +1644,7 @@ void AddLocalDeclaration::match(const CppQuickFixInterface &interface, QuickFixO
}
if (!decl) {
- result.append(new AddLocalDeclarationOp(interface, index, binary, nameAST));
+ result << new AddLocalDeclarationOp(interface, index, binary, nameAST);
return;
}
}
@@ -1720,7 +1720,7 @@ void ConvertToCamelCase::match(const CppQuickFixInterface &interface, QuickFixOp
return;
for (int i = 1; i < newName.length() - 1; ++i) {
if (ConvertToCamelCaseOp::isConvertibleUnderscore(newName, i)) {
- result.append(new ConvertToCamelCaseOp(interface, path.size() - 1, newName));
+ result << new ConvertToCamelCaseOp(interface, path.size() - 1, newName);
return;
}
}
@@ -1957,8 +1957,8 @@ void AddIncludeForUndefinedIdentifier::match(const CppQuickFixInterface &interfa
if (looksLikeAQtClass(include.mid(1, include.size() - 2)))
qtHeaderFileIncludeOffered = true;
- result.append(new AddIncludeForUndefinedIdentifierOp(interface, priority,
- include));
+ result << new AddIncludeForUndefinedIdentifierOp(interface, priority,
+ include);
}
}
}
@@ -1970,7 +1970,7 @@ void AddIncludeForUndefinedIdentifier::match(const CppQuickFixInterface &interfa
if (!qtHeaderFileIncludeOffered && looksLikeAQtClass(className)) {
const QString include = findQtIncludeWithSameName(className, headerPaths);
if (!include.isEmpty())
- result.append(new AddIncludeForUndefinedIdentifierOp(interface, 1, include));
+ result << new AddIncludeForUndefinedIdentifierOp(interface, 1, include);
}
}
@@ -2050,11 +2050,11 @@ void RearrangeParamDeclarationList::match(const CppQuickFixInterface &interface,
return;
if (prevParamListNode)
- result.append(new RearrangeParamDeclarationListOp(interface, paramListNode->value,
- prevParamListNode->value, RearrangeParamDeclarationListOp::TargetPrevious));
+ result << new RearrangeParamDeclarationListOp(interface, paramListNode->value,
+ prevParamListNode->value, RearrangeParamDeclarationListOp::TargetPrevious);
if (paramListNode->next)
- result.append(new RearrangeParamDeclarationListOp(interface, paramListNode->value,
- paramListNode->next->value, RearrangeParamDeclarationListOp::TargetNext));
+ result << new RearrangeParamDeclarationListOp(interface, paramListNode->value,
+ paramListNode->next->value, RearrangeParamDeclarationListOp::TargetNext);
}
namespace {
@@ -2172,14 +2172,14 @@ void ReformatPointerDeclaration::match(const CppQuickFixInterface &interface,
// any AST and therefore no quick fix will be triggered.
change = formatter.format(file->cppDocument()->translationUnit()->ast());
if (!change.isEmpty())
- result.append(new ReformatPointerDeclarationOp(interface, change));
+ result << new ReformatPointerDeclarationOp(interface, change);
} else {
const QList<AST *> suitableASTs
= ReformatPointerDeclarationASTPathResultsFilter().filter(path);
foreach (AST *ast, suitableASTs) {
change = formatter.format(ast);
if (!change.isEmpty()) {
- result.append(new ReformatPointerDeclarationOp(interface, change));
+ result << new ReformatPointerDeclarationOp(interface, change);
return;
}
}
@@ -2349,8 +2349,8 @@ void CompleteSwitchCaseStatement::match(const CppQuickFixInterface &interface,
foreach (const QString &usedValue, usedValues)
values.removeAll(usedValue);
if (!values.isEmpty())
- result.append(new CompleteSwitchCaseStatementOp(interface, depth,
- compoundStatement, values));
+ result << new CompleteSwitchCaseStatementOp(interface, depth,
+ compoundStatement, values);
return;
}
@@ -2493,12 +2493,12 @@ void InsertDeclFromDef::match(const CppQuickFixInterface &interface, QuickFixOpe
// Add several possible insertion locations for declaration
DeclOperationFactory operation(interface, fileName, matchingClass, decl);
- result.append(operation(InsertionPointLocator::Public, 5));
- result.append(operation(InsertionPointLocator::PublicSlot, 4));
- result.append(operation(InsertionPointLocator::Protected, 3));
- result.append(operation(InsertionPointLocator::ProtectedSlot, 2));
- result.append(operation(InsertionPointLocator::Private, 1));
- result.append(operation(InsertionPointLocator::PrivateSlot, 0));
+ result << operation(InsertionPointLocator::Public, 5)
+ << operation(InsertionPointLocator::PublicSlot, 4)
+ << operation(InsertionPointLocator::Protected, 3)
+ << operation(InsertionPointLocator::ProtectedSlot, 2)
+ << operation(InsertionPointLocator::Private, 1)
+ << operation(InsertionPointLocator::PrivateSlot, 0);
}
}
@@ -2708,7 +2708,7 @@ void InsertDefFromDecl::match(const CppQuickFixInterface &interface, QuickFixOpe
}
if (op)
- result.append(op);
+ result << op;
break;
}
}
@@ -2718,10 +2718,10 @@ void InsertDefFromDecl::match(const CppQuickFixInterface &interface, QuickFixOpe
// Insert Position: Outside Class
if (!isFreeFunction) {
- result.append(new InsertDefOperation(interface, decl, declAST,
- InsertionLocation(),
- DefPosOutsideClass,
- interface.fileName()));
+ result << new InsertDefOperation(interface, decl, declAST,
+ InsertionLocation(),
+ DefPosOutsideClass,
+ interface.fileName());
}
// Insert Position: Inside Class
@@ -2732,9 +2732,9 @@ void InsertDefFromDecl::match(const CppQuickFixInterface &interface, QuickFixOpe
const InsertionLocation loc
= InsertionLocation(interface.fileName(), QString(), QString(),
line, column);
- result.append(new InsertDefOperation(interface, decl, declAST, loc,
- DefPosInsideClass, QString(),
- isFreeFunction));
+ result << new InsertDefOperation(interface, decl, declAST, loc,
+ DefPosInsideClass, QString(),
+ isFreeFunction);
return;
}
@@ -3137,12 +3137,12 @@ void GenerateGetterSetter::match(const CppQuickFixInterface &interface,
{
GenerateGetterSetterOperation *op = new GenerateGetterSetterOperation(interface);
if (op->m_type != GenerateGetterSetterOperation::InvalidType) {
- result.append(op);
+ result << op;
if (op->m_type == GenerateGetterSetterOperation::GetterSetterType) {
- result.append(new GenerateGetterSetterOperation(
- interface, op, GenerateGetterSetterOperation::GetterType));
- result.append(new GenerateGetterSetterOperation(
- interface, op, GenerateGetterSetterOperation::SetterType));
+ result << new GenerateGetterSetterOperation(
+ interface, op, GenerateGetterSetterOperation::GetterType);
+ result << new GenerateGetterSetterOperation(
+ interface, op, GenerateGetterSetterOperation::SetterType);
}
} else {
delete op;
@@ -3730,13 +3730,11 @@ void ExtractFunction::match(const CppQuickFixInterface &interface, QuickFixOpera
// The current implementation doesn't try to be too smart since it preserves the original form
// of the declarations. This might be or not the desired effect. An improvement would be to
// let the user somehow customize the function interface.
- result.append(new ExtractFunctionOperation(interface,
- analyser.m_extractionStart,
- analyser.m_extractionEnd,
- refFuncDef,
- funcReturn,
- relevantDecls,
- m_functionNameGetter));
+ result << new ExtractFunctionOperation(interface,
+ analyser.m_extractionStart,
+ analyser.m_extractionEnd,
+ refFuncDef, funcReturn, relevantDecls,
+ m_functionNameGetter);
}
namespace {
@@ -4055,7 +4053,7 @@ void ExtractLiteralAsParameter::match(const CppQuickFixInterface &interface,
}
const int priority = path.size() - 1;
- result.append(new ExtractLiteralAsParameterOp(interface, priority, literal, function));
+ result << new ExtractLiteralAsParameterOp(interface, priority, literal, function);
}
namespace {
@@ -4402,8 +4400,8 @@ void ConvertFromAndToPointer::match(const CppQuickFixInterface &interface,
}
const int priority = path.size() - 1;
- result.append(new ConvertFromAndToPointerOp(interface, priority, mode, isAutoDeclaration,
- simpleDeclaration, declarator, identifier, symbol));
+ result << new ConvertFromAndToPointerOp(interface, priority, mode, isAutoDeclaration,
+ simpleDeclaration, declarator, identifier, symbol);
}
namespace {
@@ -4587,9 +4585,9 @@ void InsertQtPropertyMembers::match(const CppQuickFixInterface &interface,
if (getterName.isEmpty() && setterName.isEmpty() && signalName.isEmpty())
return;
- result.append(new InsertQtPropertyMembersOp(interface, path.size() - 1, qtPropertyDeclaration, c,
- generateFlags, getterName, setterName,
- signalName, storageName));
+ result << new InsertQtPropertyMembersOp(interface, path.size() - 1, qtPropertyDeclaration, c,
+ generateFlags, getterName, setterName,
+ signalName, storageName);
}
namespace {
@@ -4628,7 +4626,7 @@ void ApplyDeclDefLinkChanges::match(const CppQuickFixInterface &interface,
auto op = new ApplyDeclDefLinkOperation(interface, link);
op->setDescription(FunctionDeclDefLink::tr("Apply Function Signature Changes"));
- result.append(op);
+ result << op;
}
namespace {
@@ -4827,12 +4825,12 @@ void MoveFuncDefOutside::match(const CppQuickFixInterface &interface, QuickFixOp
const MoveFuncDefRefactoringHelper::MoveType type = moveOutsideMemberDefinition
? MoveFuncDefRefactoringHelper::MoveOutsideMemberToCppFile
: MoveFuncDefRefactoringHelper::MoveToCppFile;
- result.append(new MoveFuncDefOutsideOp(interface, type, funcAST, cppFileName));
+ result << new MoveFuncDefOutsideOp(interface, type, funcAST, cppFileName);
}
if (classAST)
- result.append(new MoveFuncDefOutsideOp(interface, MoveFuncDefRefactoringHelper::MoveOutside,
- funcAST, QLatin1String("")));
+ result << new MoveFuncDefOutsideOp(interface, MoveFuncDefRefactoringHelper::MoveOutside,
+ funcAST, QLatin1String(""));
return;
}
@@ -4917,12 +4915,12 @@ void MoveAllFuncDefOutside::match(const CppQuickFixInterface &interface, QuickFi
bool isHeaderFile = false;
const QString cppFileName = correspondingHeaderOrSource(interface.fileName(), &isHeaderFile);
if (isHeaderFile && !cppFileName.isEmpty()) {
- result.append(new MoveAllFuncDefOutsideOp(interface,
- MoveFuncDefRefactoringHelper::MoveToCppFile,
- classAST, cppFileName));
+ result << new MoveAllFuncDefOutsideOp(interface,
+ MoveFuncDefRefactoringHelper::MoveToCppFile,
+ classAST, cppFileName);
}
- result.append(new MoveAllFuncDefOutsideOp(interface, MoveFuncDefRefactoringHelper::MoveOutside,
- classAST, QLatin1String("")));
+ result << new MoveAllFuncDefOutsideOp(interface, MoveFuncDefRefactoringHelper::MoveOutside,
+ classAST, QLatin1String(""));
}
namespace {
@@ -5105,11 +5103,11 @@ void MoveFuncDefToDecl::match(const CppQuickFixInterface &interface, QuickFixOpe
}
if (!declFileName.isEmpty() && !declText.isEmpty())
- result.append(new MoveFuncDefToDeclOp(interface,
- interface.fileName(),
- declFileName,
- funcAST, declText,
- defRange, declRange));
+ result << new MoveFuncDefToDeclOp(interface,
+ interface.fileName(),
+ declFileName,
+ funcAST, declText,
+ defRange, declRange);
}
namespace {
@@ -5312,7 +5310,7 @@ void AssignToLocalVariable::match(const CppQuickFixInterface &interface, QuickFi
const Name *name = nameAST->name;
const int insertPos = interface.currentFile()->startOf(outerAST);
- result.append(new AssignToLocalVariableOperation(interface, insertPos, outerAST, name));
+ result << new AssignToLocalVariableOperation(interface, insertPos, outerAST, name);
return;
}
}
@@ -5493,9 +5491,9 @@ void OptimizeForLoop::match(const CppQuickFixInterface &interface, QuickFixOpera
}
if (optimizePostcrement || optimizeCondition) {
- result.append(new OptimizeForLoopOperation(interface, forAst, optimizePostcrement,
- (optimizeCondition) ? conditionExpression : 0,
- conditionType));
+ result << new OptimizeForLoopOperation(interface, forAst, optimizePostcrement,
+ (optimizeCondition) ? conditionExpression : 0,
+ conditionType);
}
}
@@ -5660,10 +5658,10 @@ void EscapeStringLiteral::match(const CppQuickFixInterface &interface, QuickFixO
}
if (canEscape)
- result.append(new EscapeStringLiteralOperation(interface, literal, true));
+ result << new EscapeStringLiteralOperation(interface, literal, true);
if (canUnescape)
- result.append(new EscapeStringLiteralOperation(interface, literal, false));
+ result << new EscapeStringLiteralOperation(interface, literal, false);
}
@@ -5977,7 +5975,7 @@ void ConvertQt4Connect::match(const CppQuickFixInterface &interface, QuickFixOpe
changes.replace(file->endOf(arg3), file->endOf(arg3), receiverAccessFunc);
changes.replace(file->startOf(arg4), file->endOf(arg4), newMethod);
- result.append(new ConvertQt4ConnectOperation(interface, changes));
+ result << new ConvertQt4ConnectOperation(interface, changes);
return;
}
}
diff --git a/src/plugins/cpptools/baseeditordocumentprocessor.h b/src/plugins/cpptools/baseeditordocumentprocessor.h
index 3ac8a3524d..f40c09ae76 100644
--- a/src/plugins/cpptools/baseeditordocumentprocessor.h
+++ b/src/plugins/cpptools/baseeditordocumentprocessor.h
@@ -30,6 +30,7 @@
#include "cpptools_global.h"
#include <texteditor/codeassist/assistinterface.h>
+#include <texteditor/quickfix.h>
#include <texteditor/texteditor.h>
#include <texteditor/textdocument.h>
@@ -41,7 +42,6 @@
namespace TextEditor {
class TextDocument;
-class QuickFixOperations;
}
namespace CppTools {
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index d950a26b3f..b3317ca75d 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -107,7 +107,11 @@ DebuggerKitChooser::DebuggerKitChooser(Mode mode, QWidget *parent)
{
setKitMatcher([this](const Kit *k) {
// Match valid debuggers and restrict local debugging to compatible toolchains.
- if (DebuggerKitInformation::configurationErrors(k))
+ auto errors = DebuggerKitInformation::configurationErrors(k);
+ // we do not care for mismatched ABI if we want *any* debugging
+ if (m_mode == AnyDebugging && errors == DebuggerKitInformation::DebuggerDoesNotMatch)
+ errors = DebuggerKitInformation::NoConfigurationError;
+ if (errors)
return false;
if (m_mode == LocalDebugging)
return ToolChainKitInformation::targetAbi(k).os() == m_hostAbi.os();
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index b9b4069478..8a8e649522 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -966,6 +966,8 @@ void GdbEngine::runCommand(const DebuggerCommand &command)
Q_ARG(QString, buffer));
} else {
write(cmd.function.toUtf8() + "\r\n");
+ if (command.flags & NeedsFlush)
+ write("p 0\r\n");
// Start Watchdog.
if (m_commandTimer.interval() <= 20000)
@@ -1103,6 +1105,8 @@ void GdbEngine::handleResultRecord(DebuggerResponse *response)
// the exception now in a box.
if (msg.startsWith("During startup program exited with"))
notifyInferiorExited();
+ else if (msg.contains("Command aborted."))
+ notifyInferiorSpontaneousStop();
QString logMsg;
if (!m_lastWinException.isEmpty())
logMsg = m_lastWinException + '\n';
@@ -2009,7 +2013,7 @@ void GdbEngine::continueInferiorInternal()
cmd.callback = CB(handleExecuteContinue);
runCommand(cmd);
} else {
- DebuggerCommand cmd("-exec-continue", RunRequest);
+ DebuggerCommand cmd("-exec-continue", RunRequest|NeedsFlush);
cmd.callback = CB(handleExecuteContinue);
runCommand(cmd);
}
@@ -2034,7 +2038,7 @@ void GdbEngine::executeStep()
runCommand(cmd);
} else {
DebuggerCommand cmd;
- cmd.flags = RunRequest;
+ cmd.flags = RunRequest|NeedsFlush;
cmd.function = QLatin1String(isReverseDebugging() ? "reverse-step" : "-exec-step");
cmd.callback = CB(handleExecuteStep);
runCommand(cmd);
@@ -2084,7 +2088,7 @@ void GdbEngine::executeStepI()
notifyInferiorRunRequested();
showStatusMessage(tr("Step by instruction requested..."), 5000);
DebuggerCommand cmd;
- cmd.flags = RunRequest;
+ cmd.flags = RunRequest|NeedsFlush;
cmd.function = QLatin1String(isReverseDebugging() ? "reverse-stepi" : "-exec-step-instruction");
cmd.callback = CB(handleExecuteContinue);
runCommand(cmd);
@@ -2100,12 +2104,11 @@ void GdbEngine::executeStepOut()
if (isNativeMixedActiveFrame()) {
runCommand({"executeStepOut", RunRequest|PythonCommand});
} else {
- runCommand({"-exec-finish", RunRequest, CB(handleExecuteContinue)});
// -exec-finish in 'main' results (correctly) in
// 40^error,msg="\"finish\" not meaningful in the outermost frame."
// However, this message does not seem to get flushed before
// anything else happen - i.e. "never". Force some extra output.
- runCommand({"print 32"});
+ runCommand({"-exec-finish", RunRequest|NeedsFlush, CB(handleExecuteContinue)});
}
}
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index 02a933aa14..1ee9aecb03 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -154,6 +154,8 @@ private: ////////// Gdb Command Management //////////
NeedsStop = 1,
// No need to wait for the reply before continuing inferior.
Discardable = 2,
+ // Needs a dummy extra command to force GDB output flushing.
+ NeedsFlush = 4,
// Callback expects ResultRunning instead of ResultDone.
RunRequest = 16,
// Callback expects ResultExit instead of ResultDone.
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index b0de874251..04b065fd55 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -2004,7 +2004,7 @@ void WatchHandler::notifyUpdateStarted(const UpdateParameters &updateParameters)
{
QStringList inames = updateParameters.partialVariables();
if (inames.isEmpty())
- inames.append("local");
+ inames = QStringList({ "local", "return" });
auto marker = [](WatchItem *item) { item->outdated = true; };
diff --git a/src/plugins/designer/resourcehandler.cpp b/src/plugins/designer/resourcehandler.cpp
index 32e86796cc..fbcad4d346 100644
--- a/src/plugins/designer/resourcehandler.cpp
+++ b/src/plugins/designer/resourcehandler.cpp
@@ -30,7 +30,6 @@
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/nodesvisitor.h>
#include <projectexplorer/project.h>
-#include <projectexplorer/projecttree.h>
#include <projectexplorer/session.h>
#include <resourceeditor/resourcenode.h>
@@ -88,12 +87,16 @@ void ResourceHandler::ensureInitialized()
return;
m_initialized = true;
- ProjectTree *tree = ProjectTree::instance();
- connect(tree, &ProjectTree::filesAdded, this, &ResourceHandler::updateResources);
- connect(tree, &ProjectTree::filesRemoved, this, &ResourceHandler::updateResources);
- connect(tree, &ProjectTree::foldersAdded, this, &ResourceHandler::updateResources);
- connect(tree, &ProjectTree::foldersRemoved, this, &ResourceHandler::updateResources);
+ auto connector = [this](Project *p) {
+ connect(p, &Project::fileListChanged, this, &ResourceHandler::updateResources);
+ };
+
+ foreach (Project *p, SessionManager::projects())
+ connector(p);
+
+ connect(SessionManager::instance(), &SessionManager::projectAdded, this, connector);
+
m_originalUiQrcPaths = m_form->activeResourceFilePaths();
if (Designer::Constants::Internal::debug)
qDebug() << "ResourceHandler::ensureInitialized() origPaths=" << m_originalUiQrcPaths;
diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp
index 4eb0a07878..e27c3e892d 100644
--- a/src/plugins/diffeditor/diffeditorplugin.cpp
+++ b/src/plugins/diffeditor/diffeditorplugin.cpp
@@ -106,10 +106,10 @@ public:
DiffCurrentFileController(IDocument *document, const QString &fileName);
protected:
- void reload();
+ void reload() override;
private:
- QString m_fileName;
+ const QString m_fileName;
};
DiffCurrentFileController::DiffCurrentFileController(IDocument *document, const QString &fileName) :
@@ -164,7 +164,7 @@ public:
DiffOpenFilesController(IDocument *document);
protected:
- void reload();
+ void reload() override;
};
DiffOpenFilesController::DiffOpenFilesController(IDocument *document) :
@@ -224,10 +224,10 @@ public:
DiffModifiedFilesController(IDocument *document, const QStringList &fileNames);
protected:
- void reload();
+ void reload() override;
private:
- QStringList m_fileNames;
+ const QStringList m_fileNames;
};
DiffModifiedFilesController::DiffModifiedFilesController(IDocument *document, const QStringList &fileNames) :
@@ -286,11 +286,11 @@ public:
const QString &rightFileName);
protected:
- void reload();
+ void reload() override;
private:
- QString m_leftFileName;
- QString m_rightFileName;
+ const QString m_leftFileName;
+ const QString m_rightFileName;
};
DiffExternalFilesController::DiffExternalFilesController(IDocument *document, const QString &leftFileName,
diff --git a/src/plugins/qmldesigner/components/navigator/export_unchecked.png b/src/plugins/qmldesigner/components/navigator/export_unchecked.png
index 8f981200da..377c97fa8a 100644
--- a/src/plugins/qmldesigner/components/navigator/export_unchecked.png
+++ b/src/plugins/qmldesigner/components/navigator/export_unchecked.png
Binary files differ
diff --git a/src/plugins/qmldesigner/components/navigator/export_unchecked@2x.png b/src/plugins/qmldesigner/components/navigator/export_unchecked@2x.png
index cbfb9d512a..6a309be703 100644
--- a/src/plugins/qmldesigner/components/navigator/export_unchecked@2x.png
+++ b/src/plugins/qmldesigner/components/navigator/export_unchecked@2x.png
Binary files differ
diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
index 8df5df04c9..65aa907a64 100644
--- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp
@@ -381,6 +381,7 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
environment.set(QLatin1String("QML_BAD_GUI_RENDER_LOOP"), QLatin1String("true"));
environment.set(QLatin1String("QML_USE_MOCKUPS"), QLatin1String("true"));
environment.set(QLatin1String("QML_PUPPET_MODE"), QLatin1String("true"));
+ environment.set(QLatin1String("QML_DISABLE_DISK_CACHE"), QLatin1String("true"));
environment.set(QLatin1String("QT_AUTO_SCREEN_SCALE_FACTOR"), QLatin1String("1"));
#ifndef QMLDESIGNER_TEST
diff --git a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp
index daf05a6abd..ff58c4cb1f 100644
--- a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp
+++ b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp
@@ -246,13 +246,13 @@ void ComponentFromObjectDef::match(const QmlJSQuickFixInterface &interface, Quic
return;
// check that the node is not the root node
if (i > 0 && !cast<UiProgram*>(path.at(i - 1))) {
- result.append(new Operation(interface, objDef));
+ result << new Operation(interface, objDef);
return;
}
} else if (UiObjectBinding *objBinding = cast<UiObjectBinding *>(node)) {
if (!interface->currentFile()->isCursorOn(objBinding->qualifiedTypeNameId))
return;
- result.append(new Operation(interface, objBinding));
+ result << new Operation(interface, objBinding);
return;
}
}
diff --git a/src/plugins/qmljseditor/qmljsquickfixes.cpp b/src/plugins/qmljseditor/qmljsquickfixes.cpp
index e5e1fef829..83ed0e3b53 100644
--- a/src/plugins/qmljseditor/qmljsquickfixes.cpp
+++ b/src/plugins/qmljseditor/qmljsquickfixes.cpp
@@ -77,7 +77,7 @@ class SplitInitializerOp: public QmlJSQuickFixFactory
}
if (objectInitializer)
- result.append(new Operation(interface, objectInitializer));
+ result << new Operation(interface, objectInitializer);
}
class Operation: public QmlJSQuickFixOperation
@@ -135,7 +135,7 @@ public:
foreach (const StaticAnalysis::Message &message, messages) {
if (interface->currentFile()->isCursorOn(message.location)) {
- result.append(new Operation(interface, message));
+ result << new Operation(interface, message);
return;
}
}
diff --git a/src/plugins/qmljseditor/qmljswrapinloader.cpp b/src/plugins/qmljseditor/qmljswrapinloader.cpp
index b95a4a8fe7..a99ca687bc 100644
--- a/src/plugins/qmljseditor/qmljswrapinloader.cpp
+++ b/src/plugins/qmljseditor/qmljswrapinloader.cpp
@@ -186,13 +186,13 @@ void WrapInLoader::match(const QmlJSQuickFixInterface &interface, QuickFixOperat
return;
// check that the node is not the root node
if (i > 0 && !cast<UiProgram*>(path.at(i - 1))) {
- result.append(new Operation<UiObjectDefinition>(interface, objDef));
+ result << new Operation<UiObjectDefinition>(interface, objDef);
return;
}
} else if (UiObjectBinding *objBinding = cast<UiObjectBinding *>(node)) {
if (!interface->currentFile()->isCursorOn(objBinding->qualifiedTypeNameId))
return;
- result.append(new Operation<UiObjectBinding>(interface, objBinding));
+ result << new Operation<UiObjectBinding>(interface, objBinding);
return;
}
}
diff --git a/src/plugins/subversion/subversionclient.cpp b/src/plugins/subversion/subversionclient.cpp
index 73e69806e2..1b01c85b67 100644
--- a/src/plugins/subversion/subversionclient.cpp
+++ b/src/plugins/subversion/subversionclient.cpp
@@ -177,7 +177,7 @@ public:
void setChangeNumber(int changeNumber);
protected:
- void reload();
+ void reload() override;
private slots:
void slotTextualDiffOutputReceived(const QString &contents);
diff --git a/src/plugins/texteditor/quickfix.h b/src/plugins/texteditor/quickfix.h
index efb9f10619..715d9e09b7 100644
--- a/src/plugins/texteditor/quickfix.h
+++ b/src/plugins/texteditor/quickfix.h
@@ -85,12 +85,13 @@ private:
QString _description;
};
-class TEXTEDITOR_EXPORT QuickFixOperations : public QList<QuickFixOperation::Ptr>
+typedef QList<QuickFixOperation::Ptr> QuickFixOperations;
+
+inline QuickFixOperations &operator<<(QuickFixOperations &list, QuickFixOperation *op)
{
-public:
- using QList<QuickFixOperation::Ptr>::append;
- void append(QuickFixOperation *op) { append(QuickFixOperation::Ptr(op)); }
-};
+ list.append(QuickFixOperation::Ptr(op));
+ return list;
+}
typedef QSharedPointer<const AssistInterface> QuickFixInterface;
diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg
index 3e7abe3c63..21a6bbbe69 100644
--- a/src/tools/icons/qtcreatoricons.svg
+++ b/src/tools/icons/qtcreatoricons.svg
@@ -2485,15 +2485,17 @@
height="16"
id="rect7336" />
<path
- style="opacity:0.8;fill:#000000;fill-opacity:1"
- d="m 353,302 0,3 1,0 0,-2 10,0 0,11 -10,0 0,-2 -1,0 0,3 12,0 0,-13 z"
+ style="fill:#000000"
+ d="m 354,303 10,0 0,11 -10,0 z m -1,12 12,0 0,-13 -12,0 z"
id="path7346"
- inkscape:connector-curvature="0" />
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccc" />
<path
id="path7338"
style="opacity:0.5;fill:#000000;fill-opacity:1"
- d="m 353,310 0,1 3,0 0,-1 z m 0,-2 0,1 3,0 0,-1 z m 0,-2 0,1 3,0 0,-1 z"
- inkscape:connector-curvature="0" />
+ d="m 354,310 0,1 5,0 0,-1 z m 0,-2 0,1 5,0 0,-1 z m 0,-2 0,1 5,0 0,-1 z"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccc" />
</g>
<g
transform="translate(710,268)"
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index 0c78e88ff6..be41a3fc8c 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -3041,6 +3041,69 @@ void tst_Dumpers::dumper_data()
+ Check("ptr53", "", "@QWeakPointer<Foo>");
+ QTest::newRow("QFiniteStack")
+ << Data("#include <stdlib.h>\n" // Needed on macOS.
+ "#include <private/qfinitestack_p.h>\n" + fooData,
+
+ "QFiniteStack<int> s1;\n"
+ "s1.allocate(2);\n"
+ "s1.push(1);\n"
+ "s1.push(2);\n\n"
+
+ "QFiniteStack<int> s2;\n"
+ "s2.allocate(100000);\n"
+ "for (int i = 0; i != 10000; ++i)\n"
+ " s2.push(i);\n\n"
+
+ "QFiniteStack<Foo *> s3;\n"
+ "s3.allocate(10);\n"
+ "s3.push(new Foo(1));\n"
+ "s3.push(0);\n"
+ "s3.push(new Foo(2));\n"
+ "unused(&s3);\n\n"
+
+ "QFiniteStack<Foo> s4;\n"
+ "s4.allocate(10);\n"
+ "s4.push(1);\n"
+ "s4.push(2);\n"
+ "s4.push(3);\n"
+ "s4.push(4);\n\n"
+
+ "QFiniteStack<bool> s5;\n"
+ "s5.allocate(10);\n"
+ "s5.push(true);\n"
+ "s5.push(false);\n\n")
+
+ + QmlPrivateProfile()
+
+ + BigArrayProfile()
+
+ + Check("s1", "<2 items>", "@QFiniteStack<int>")
+ + Check("s1.0", "[0]", "1", "int")
+ + Check("s1.1", "[1]", "2", "int")
+
+ + Check("s2", "<10000 items>", "@QFiniteStack<int>")
+ + Check("s2.0", "[0]", "0", "int")
+ + Check("s2.8999", "[8999]", "8999", "int")
+
+ + Check("s3", "<3 items>", "@QFiniteStack<Foo*>")
+ + Check("s3.0", "[0]", "", "Foo")
+ + Check("s3.0.a", "1", "int")
+ + Check("s3.1", "[1]", "0x0", "Foo *")
+ + Check("s3.2", "[2]", "", "Foo")
+ + Check("s3.2.a", "2", "int")
+
+ + Check("s4", "<4 items>", "@QFiniteStack<Foo>")
+ + Check("s4.0", "[0]", "", "Foo")
+ + Check("s4.0.a", "1", "int")
+ + Check("s4.3", "[3]", "", "Foo")
+ + Check("s4.3.a", "4", "int")
+
+ + Check("s5", "<2 items>", "@QFiniteStack<bool>")
+ + Check("s5.0", "[0]", "1", "bool") // 1 -> true is done on display
+ + Check("s5.1", "[1]", "0", "bool");
+
+
/*
QTest::newRow("QStandardItemModel")
<< Data("#include <QStandardItemModel>\n",
diff --git a/tests/unit/mockup/cpptools/cpptoolsreuse.h b/tests/unit/mockup/cpptools/cpptoolsreuse.h
new file mode 100644
index 0000000000..fec5388641
--- /dev/null
+++ b/tests/unit/mockup/cpptools/cpptoolsreuse.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+namespace CppTools {
+
+CompilerOptionsBuilder::PchUsage getPchUsage() { return CompilerOptionsBuilder::PchUsage::None; }
+
+} // CppTools
diff --git a/tests/unit/unittest/clangquerycurrentfilefindfilter-test.cpp b/tests/unit/unittest/clangquerycurrentfilefindfilter-test.cpp
index 96071fb3c9..c83680d335 100644
--- a/tests/unit/unittest/clangquerycurrentfilefindfilter-test.cpp
+++ b/tests/unit/unittest/clangquerycurrentfilefindfilter-test.cpp
@@ -138,8 +138,10 @@ void ClangQueryCurrentFileFindFilter::SetUp()
projectPart = CppTools::ProjectPart::Ptr(new CppTools::ProjectPart);
projectPart->files.push_back(projectFile);
- commandLine = RefactoringCompilerOptionsBuilder::build(projectPart.data(),
- projectFile.kind);
+ commandLine = RefactoringCompilerOptionsBuilder::build(
+ projectPart.data(),
+ projectFile.kind,
+ RefactoringCompilerOptionsBuilder::PchUsage::None);
commandLine.push_back(curentDocumentFilePath);
findFilter.setCurrentDocumentFilePath(curentDocumentFilePath);
diff --git a/tests/unit/unittest/refactoringclient-test.cpp b/tests/unit/unittest/refactoringclient-test.cpp
index 719add7531..ce21df5b7f 100644
--- a/tests/unit/unittest/refactoringclient-test.cpp
+++ b/tests/unit/unittest/refactoringclient-test.cpp
@@ -185,7 +185,8 @@ void RefactoringClient::SetUp()
projectPart->files.push_back(projectFile);
commandLine = RefactoringCompilerOptionsBuilder::build(projectPart.data(),
- projectFile.kind);
+ projectFile.kind,
+ RefactoringCompilerOptionsBuilder::PchUsage::None);
client.setSearchHandle(&mockSearchHandle);
}
diff --git a/tests/unit/unittest/refactoringengine-test.cpp b/tests/unit/unittest/refactoringengine-test.cpp
index e42d555829..8bca61b826 100644
--- a/tests/unit/unittest/refactoringengine-test.cpp
+++ b/tests/unit/unittest/refactoringengine-test.cpp
@@ -129,7 +129,8 @@ void RefactoringEngine::SetUp()
projectPart->files.push_back(projectFile);
commandLine = RefactoringCompilerOptionsBuilder::build(projectPart.data(),
- projectFile.kind);
+ projectFile.kind,
+ RefactoringCompilerOptionsBuilder::PchUsage::None);
commandLine.push_back(qStringFilePath);
}
diff --git a/tests/unit/unittest/unittest.pro b/tests/unit/unittest/unittest.pro
index 1c8b875558..7bca7f4ee0 100644
--- a/tests/unit/unittest/unittest.pro
+++ b/tests/unit/unittest/unittest.pro
@@ -72,6 +72,7 @@ SOURCES += \
diagnosticset-test.cpp \
diagnostic-test.cpp \
fixit-test.cpp \
+ gtest-qt-printing.cpp \
highlightingmarksreporter-test.cpp \
highlightingmarks-test.cpp \
projectpart-test.cpp \