Merge remote-tracking branch 'origin/4.2'

Conflicts:
	src/plugins/clangrefactoring/refactoringengine.cpp
	src/tools/clangrefactoringbackend/source/symbolfinder.cpp

Change-Id: I7c1c87f3b8ade43a07f6668565501042e967fa8b
This commit is contained in:
Eike Ziller
2016-11-16 16:04:59 +01:00
72 changed files with 693 additions and 544 deletions

View File

@@ -25,7 +25,8 @@ Prerequisites:
* cmake * cmake
* On Mac OS X: latest Xcode * On Mac OS X: latest Xcode
* On Linux: g++ 4.8 or later * On Linux: g++ 4.8 or later
* LLVM 3.8.0 or later (optional, needed for the Clang Code Model) * LLVM 3.9.0 or later (optional, needed for the Clang Code Model)
* Qbs 1.7.x (optional, sources also contain Qbs itself)
The installed toolchains have to match the one Qt was compiled with. The installed toolchains have to match the one Qt was compiled with.
@@ -33,6 +34,8 @@ You can build Qt Creator with
# Optional, needed for the Clang Code Model: # Optional, needed for the Clang Code Model:
export LLVM_INSTALL_DIR=/path/to/llvm (or "set" on Windows) export LLVM_INSTALL_DIR=/path/to/llvm (or "set" on Windows)
# Optional, needed to let the QbsProjectManager plugin use system Qbs:
export QBS_INSTALL_DIR=/path/to/qbs
cd $SOURCE_DIRECTORY cd $SOURCE_DIRECTORY
qmake -r qmake -r

View File

@@ -132,7 +132,7 @@
\list 1 \list 1
\li Acquire Clang 3.8.0 or higher in one of the following ways: \li Acquire Clang 3.9.0 or higher in one of the following ways:
\list \list

View File

@@ -1,7 +1,7 @@
var Environment = loadExtension("qbs.Environment") var Environment = loadExtension("qbs.Environment")
var File = loadExtension("qbs.File") var File = loadExtension("qbs.File")
var FileInfo = loadExtension("qbs.FileInfo") var FileInfo = loadExtension("qbs.FileInfo")
var MinimumLLVMVersion = "3.8.0" var MinimumLLVMVersion = "3.9.0"
var Process = loadExtension("qbs.Process") var Process = loadExtension("qbs.Process")
function readOutput(executable, args) function readOutput(executable, args)
@@ -28,7 +28,7 @@ function llvmConfig(qbs, qtcFunctions)
{ {
var llvmInstallDirFromEnv = Environment.getEnv("LLVM_INSTALL_DIR") var llvmInstallDirFromEnv = Environment.getEnv("LLVM_INSTALL_DIR")
var llvmConfigVariants = [ var llvmConfigVariants = [
"llvm-config", "llvm-config-3.8", "llvm-config-3.9", "llvm-config-4.0", "llvm-config-4.1" "llvm-config", "llvm-config-3.9", "llvm-config-4.0", "llvm-config-4.1"
]; ];
// Prefer llvm-config* from LLVM_INSTALL_DIR // Prefer llvm-config* from LLVM_INSTALL_DIR

View File

@@ -574,7 +574,7 @@ class DumperBase:
res = [] res = []
for item in targs[::-1]: for item in targs[::-1]:
c = ord(item[0]) c = ord(item[0])
if c == '-' or (c >= 48 and c < 58): if c in (45, 46) or (c >= 48 and c < 58): # '-', '.' or digit.
if item.find('.') > -1: if item.find('.') > -1:
res.append(float(item)) res.append(float(item))
else: else:
@@ -2759,6 +2759,20 @@ class DumperBase:
self.targetValue = None # For references. self.targetValue = None # For references.
self.isBaseClass = None self.isBaseClass = None
def copy(self):
val = self.dumper.Value(self.dumper)
val.dumper = self.dumper
val.name = self.name
val.type = self.type
val.ldata = self.ldata
val.laddress = self.laddress
val.lIsInScope = self.lIsInScope
val.ldisplay = self.ldisplay
val.lbitpos = self.lbitpos
val.lbitsize = self.lbitsize
val.targetValue = self.targetValue
return val
def check(self): def check(self):
if self.laddress is not None and not self.dumper.isInt(self.laddress): if self.laddress is not None and not self.dumper.isInt(self.laddress):
error('INCONSISTENT ADDRESS: %s' % type(self.laddress)) error('INCONSISTENT ADDRESS: %s' % type(self.laddress))
@@ -2848,12 +2862,18 @@ class DumperBase:
members = self.members(True) members = self.members(True)
for member in members: for member in members:
#warn('CHECKING FIELD %s' % member.name) #warn('CHECKING FIELD %s' % member.name)
if member.type.code == TypeCodeTypedef:
member = member.detypedef()
if member.name == name: if member.name == name:
return member return member
for member in members: for member in members:
#warn('CHECKING BASE %s' % member.name) #warn('CHECKING BASE %s' % member.name)
#if member.name == name: #if member.name == name:
# return member # return member
if member.type.code == TypeCodeTypedef:
member = member.detypedef()
if member.name == name:
return member
if member.type.code == TypeCodeStruct: if member.type.code == TypeCodeStruct:
res = member.findMemberByName(name) res = member.findMemberByName(name)
if res is not None: if res is not None:
@@ -2979,6 +2999,9 @@ class DumperBase:
res = [] res = []
anonNumber = 0 anonNumber = 0
for field in fields: for field in fields:
if isinstance(field, self.dumper.Value):
res.append(field)
continue
if field.isBaseClass and not includeBases: if field.isBaseClass and not includeBases:
continue continue
if field.name is None or len(field.name) == 0: if field.name is None or len(field.name) == 0:
@@ -3029,10 +3052,8 @@ class DumperBase:
self.check() self.check()
if self.type.code != TypeCodeTypedef: if self.type.code != TypeCodeTypedef:
error("WRONG") error("WRONG")
val = self.dumper.Value(self.dumper) val = self.copy()
val.type = self.type.ltarget val.type = self.type.ltarget
val.ldata = self.ldata
val.laddress = self.laddress
#warn("DETYPEDEF FROM: %s" % self) #warn("DETYPEDEF FROM: %s" % self)
#warn("DETYPEDEF TO: %s" % val) #warn("DETYPEDEF TO: %s" % val)
return val return val

View File

@@ -1014,30 +1014,34 @@ class Dumper(DumperBase):
if not self.currentQtNamespaceGuess is None: if not self.currentQtNamespaceGuess is None:
return self.currentQtNamespaceGuess return self.currentQtNamespaceGuess
# This only works when called from a valid frame. for objfile in gdb.objfiles():
try: name = objfile.filename
cand = 'QArrayData::shared_null' if name.find('/libQt5Core') >= 0:
symbol = gdb.lookup_symbol(cand)[0] ns = ''
if symbol:
ns = symbol.name[:-len(cand)]
self.qtNamespaceToReport = ns
self.qtNamespace = lambda: ns
return ns
except:
pass
try: # This only works when called from a valid frame.
# This is Qt, but not 5.x. try:
cand = 'QByteArray::shared_null' cand = 'QArrayData::shared_null'
symbol = gdb.lookup_symbol(cand)[0] symbol = gdb.lookup_symbol(cand)[0]
if symbol: if symbol:
ns = symbol.name[:-len(cand)] ns = symbol.name[:-len(cand)]
except:
try:
# Some GDB 7.11.1 on Arch Linux.
cand = 'QArrayData::shared_null[0]'
val = gdb.parse_and_eval(cand)
if val.type is not None:
typeobj = val.type.unqualified()
ns = typeobj.name[:-len('QArrayData')]
except:
pass
# This might be wrong, but we can't do better: We found
# a libQt5Core and could not extract a namespace.
# The best guess is that there isn't any.
self.qtNamespaceToReport = ns self.qtNamespaceToReport = ns
self.qtNamespace = lambda: ns self.qtNamespace = lambda: ns
self.fallbackQtVersion = 0x40800
return ns return ns
except:
pass
self.currentQtNamespaceGuess = '' self.currentQtNamespaceGuess = ''
return '' return ''

View File

@@ -247,7 +247,7 @@ class Dumper(DumperBase):
if bitsize > 0: if bitsize > 0:
#bitpos = bitpos % bitsize #bitpos = bitpos % bitsize
bitpos = bitpos % 8 # Reported type is always wrapping type! bitpos = bitpos % 8 # Reported type is always wrapping type!
fieldBits[f.name] = (bitsize, bitpos) fieldBits[f.name] = (bitsize, bitpos, f.IsBitfield())
# Normal members and non-empty base classes. # Normal members and non-empty base classes.
for i in range(fakeValue.GetNumChildren()): for i in range(fakeValue.GetNumChildren()):
@@ -259,11 +259,12 @@ class Dumper(DumperBase):
nativeFieldType = nativeField.GetType() nativeFieldType = nativeField.GetType()
if field.name in fieldBits: if field.name in fieldBits:
(field.lbitsize, field.lbitpos) = fieldBits[field.name] (field.lbitsize, field.lbitpos, isBitfield) = fieldBits[field.name]
else: else:
field.lbitsize = nativeFieldType.GetByteSize() * 8 field.lbitsize = nativeFieldType.GetByteSize() * 8
isBitfield = False
if field.lbitsize != nativeFieldType.GetByteSize() * 8: if isBitfield:
field.ltype = self.createBitfieldType(self.typeName(nativeFieldType), field.lbitsize) field.ltype = self.createBitfieldType(self.typeName(nativeFieldType), field.lbitsize)
else: else:
fakeMember = fakeValue.GetChildAtIndex(i) fakeMember = fakeValue.GetChildAtIndex(i)

View File

@@ -62,7 +62,7 @@ def qdump____m512d(d, value):
d.putArrayData(value.address(), 8, d.lookupType('double')) d.putArrayData(value.address(), 8, d.lookupType('double'))
def qdump____m128i(d, value): def qdump____m128i(d, value):
data = d.hexencode(value.data()) data = d.hexencode(value.data(16))
d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 32, 4))) d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 32, 4)))
if d.isExpanded(): if d.isExpanded():
with Children(d): with Children(d):
@@ -73,7 +73,7 @@ def qdump____m128i(d, value):
d.putArrayItem('uint64x2', addr, 2, 'unsigned long long') d.putArrayItem('uint64x2', addr, 2, 'unsigned long long')
def qdump____m256i(d, value): def qdump____m256i(d, value):
data = d.hexencode(value.data()) data = d.hexencode(value.data(32))
d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 64, 4))) d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 64, 4)))
if d.isExpanded(): if d.isExpanded():
with Children(d): with Children(d):
@@ -84,7 +84,7 @@ def qdump____m256i(d, value):
d.putArrayItem('uint64x4', addr, 4, 'unsigned long long') d.putArrayItem('uint64x4', addr, 4, 'unsigned long long')
def qdump____m512i(d, value): def qdump____m512i(d, value):
data = d.hexencode(value.data()) data = d.hexencode(value.data(64))
d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 64, 4)) d.putValue(':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(0, 64, 4))
+ ', ' + ':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(64, 128, 4))) + ', ' + ':'.join('%04x' % int(data[i:i+4], 16) for i in xrange(64, 128, 4)))
if d.isExpanded(): if d.isExpanded():

View File

@@ -38,13 +38,9 @@ def qdump__QBasicAtomicInt(d, value):
def qdump__QAtomicPointer(d, value): def qdump__QAtomicPointer(d, value):
d.putType(value.type) d.putItem(value.cast(value.type[0].pointer()))
p = value.extractPointer() d.putBetterType(value.type)
d.putValue('@0x%x' % p)
d.putNumChild(1 if p else 0)
if d.isExpanded():
with Children(d):
d.putSubItem('[pointee]', value.dereference())
def qform__QByteArray(): def qform__QByteArray():
return [Latin1StringFormat, SeparateLatin1StringFormat, return [Latin1StringFormat, SeparateLatin1StringFormat,
@@ -1064,6 +1060,7 @@ def qdump__QRegExp(d, value):
privAddress = d.extractPointer(value) privAddress = d.extractPointer(value)
(eng, pattern) = d.split('p{QString}', privAddress) (eng, pattern) = d.split('p{QString}', privAddress)
d.putStringValue(pattern) d.putStringValue(pattern)
d.putNumChild(1)
if d.isExpanded(): if d.isExpanded():
with Children(d): with Children(d):
d.call('void', value, 'capturedTexts') # Warm up internal cache. d.call('void', value, 'capturedTexts') # Warm up internal cache.

View File

@@ -511,10 +511,17 @@ def qdump__std____1__map__const_iterator(d, value):
def qdump__std____1__set__iterator(d, value): def qdump__std____1__set__iterator(d, value):
d.putEmptyValue() d.putEmptyValue()
d.putNumChild(1)
if value.type.name.endswith("::iterator"):
treeTypeName = value.type.name[:-len("::iterator")]
elif value.type.name.endswith("::const_iterator"):
treeTypeName = value.type.name[:-len("::const_iterator")]
treeType = d.lookupType(treeTypeName)
keyType = treeType[0]
if d.isExpanded(): if d.isExpanded():
with Children(d): with Children(d):
node = value['__ptr_'].dereference()['__value_'] node = value['__ptr_'].dereference()['__value_']
node = node.cast(value.type[0]) node = node.cast(keyType)
d.putSubItem('value', node) d.putSubItem('value', node)
def qdump__std____1__set_const_iterator(d, value): def qdump__std____1__set_const_iterator(d, value):

View File

@@ -124,7 +124,7 @@ TextColorHighlight=ffff0000
TextColorLink=textColorLink TextColorLink=textColorLink
TextColorLinkVisited=textColorLinkVisited TextColorLinkVisited=textColorLinkVisited
TextColorNormal=text TextColorNormal=text
TodoItemTextColor=text TodoItemTextColor=ff000000
ToggleButtonBackgroundColor=shadowBackground ToggleButtonBackgroundColor=shadowBackground
ToolBarBackgroundColor=shadowBackground ToolBarBackgroundColor=shadowBackground
TreeViewArrowColorNormal=hoverBackground TreeViewArrowColorNormal=hoverBackground

View File

@@ -122,7 +122,7 @@ TextColorHighlight=ffff0000
TextColorLink=ff007af4 TextColorLink=ff007af4
TextColorLinkVisited=ffa57aff TextColorLinkVisited=ffa57aff
TextColorNormal=text TextColorNormal=text
TodoItemTextColor=text TodoItemTextColor=ff000000
ToggleButtonBackgroundColor=shadowBackground ToggleButtonBackgroundColor=shadowBackground
ToolBarBackgroundColor=shadowBackground ToolBarBackgroundColor=shadowBackground
TreeViewArrowColorNormal=hoverBackground TreeViewArrowColorNormal=hoverBackground

View File

@@ -120,7 +120,7 @@ TextColorHighlight=ffff0000
TextColorLink=ff007af4 TextColorLink=ff007af4
TextColorLinkVisited=ffa57aff TextColorLinkVisited=ffa57aff
TextColorNormal=text TextColorNormal=text
TodoItemTextColor=text TodoItemTextColor=ff000000
ToggleButtonBackgroundColor=shadowBackground ToggleButtonBackgroundColor=shadowBackground
ToolBarBackgroundColor=shadowBackground ToolBarBackgroundColor=shadowBackground
TreeViewArrowColorNormal=hoverBackground TreeViewArrowColorNormal=hoverBackground

View File

@@ -1,177 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1" language="ru"> <TS version="2.1" language="ru">
<context>
<name></name>
<message>
<source>Zoom In</source>
<translation>Увеличить</translation>
</message>
<message>
<source>Zoom In (Ctrl + + / Ctrl + Wheel)</source>
<translation>Увеличить (Ctrl++ / Ctrl+Колёсико)</translation>
</message>
<message>
<source>Zoom Out</source>
<translation>Уменьшить</translation>
</message>
<message>
<source>Zoom Out (Ctrl + - / Ctrl + Wheel)</source>
<translation>Уменьшить (Ctrl+- / Ctrl+Колёсико)</translation>
</message>
<message>
<source>Fit to View</source>
<translation>Растянуть на окно</translation>
</message>
<message>
<source>Fit to View (F11)</source>
<translation>Растянуть на окно (F11)</translation>
</message>
<message>
<source>Panning</source>
<translation>Панорамирование</translation>
</message>
<message>
<source>Panning (Shift)</source>
<translation>Панорамирование (Shift)</translation>
</message>
<message>
<source>Magnifier</source>
<translation>Лупа</translation>
</message>
<message>
<source>Magnifier Tool (Alt)</source>
<translation>Лупа (Alt)</translation>
</message>
<message>
<source>Navigator</source>
<translation>Навигатор</translation>
</message>
<message>
<source>Navigator (Ctrl+E)</source>
<translation>Навигатор (Ctrl+E)</translation>
</message>
<message>
<source>Copy</source>
<translation>Копировать</translation>
</message>
<message>
<source>Copy (Ctrl + C)</source>
<translation>Копировать (Ctrl+C)</translation>
</message>
<message>
<source>Cut</source>
<translation>Вырезать</translation>
</message>
<message>
<source>Cut (Ctrl + X)</source>
<translation>Вырезать (Ctrl+X)</translation>
</message>
<message>
<source>Paste</source>
<translation>Вставить</translation>
</message>
<message>
<source>Paste (Ctrl + V)</source>
<translation>Вставить (Ctrl+V)</translation>
</message>
<message>
<source>Screenshot</source>
<translation>Снимок экрана</translation>
</message>
<message>
<source>Screenshot (Ctrl + Shift + C)</source>
<translation>Снимок экрана (Ctrl+Shift+C)</translation>
</message>
<message>
<source>Export to Image</source>
<translation>В изображение</translation>
</message>
<message>
<source>Toggle Full Namespace</source>
<translation>Переключить пространство имён</translation>
</message>
<message>
<source>Align Left</source>
<translation>По левому краю</translation>
</message>
<message>
<source>Align Left (Ctrl+L,1)</source>
<translation>По левому краю (Ctrl + L,1)</translation>
</message>
<message>
<source>Align Right</source>
<translation>По правому краю</translation>
</message>
<message>
<source>Align Right (Ctrl+L,2)</source>
<translation>По правому краю (Ctrl+L,2)</translation>
</message>
<message>
<source>Align Top</source>
<translation>По верху</translation>
</message>
<message>
<source>Align Top (Ctrl+L,3)</source>
<translation>По верху (Ctrl+L,3)</translation>
</message>
<message>
<source>Align Bottom</source>
<translation>По низу</translation>
</message>
<message>
<source>Align Bottom (Ctrl+L,4)</source>
<translation>По низу (Ctrl+L,4)</translation>
</message>
<message>
<source>Align Horizontal</source>
<translation>Выравнить гоизонтально</translation>
</message>
<message>
<source>Align Horizontal (Ctrl+L,5)</source>
<translation>Выравнить гоизонтально (Ctrl+L,5)</translation>
</message>
<message>
<source>Align Vertical</source>
<translation>Выравнить вертикально</translation>
</message>
<message>
<source>Align Vertical (Ctrl+L,6)</source>
<translation>Выравнить гоизонтально (Ctrl+L,6)</translation>
</message>
<message>
<source>Adjust Width</source>
<translation>Подогнать ширину</translation>
</message>
<message>
<source>Adjust Width (Ctrl+L,7)</source>
<translation>Подогнать ширину (Ctrl+L,7)</translation>
</message>
<message>
<source>Adjust Height</source>
<translation>Подогнать высоту</translation>
</message>
<message>
<source>Adjust Height (Ctrl+L,8)</source>
<translation>Подогнать высоту (Ctrl+L,8)</translation>
</message>
<message>
<source>Adjust Size</source>
<translation>Подогнать размер</translation>
</message>
<message>
<source>Adjust Size (Ctrl+L,9)</source>
<translation>Подогнать размер (Ctrl+L,9)</translation>
</message>
<message>
<source>Show Statistics...</source>
<translation>Показать статистику...</translation>
</message>
<message>
<source>Show Statistics</source>
<translation>Показать статистику</translation>
</message>
</context>
<context> <context>
<name>AddSignalHandlerDialog</name> <name>AddSignalHandlerDialog</name>
<message> <message>
@@ -4129,7 +3958,7 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
<translation>Генератор CMake не создаёт файл CodeBlocks. Qt Creator не сможет обрабатывать проект CMake.</translation> <translation>Генератор CMake не создаёт файл CodeBlocks. Qt Creator не сможет обрабатывать проект CMake.</translation>
</message> </message>
<message> <message>
<source>Generator: %1&lt;br&gt;Extra Generator: %2</source> <source>Generator: %1&lt;br&gt;Extra generator: %2</source>
<translation>Генератор: %1&lt;br&gt;Дополнительный генератор: %2</translation> <translation>Генератор: %1&lt;br&gt;Дополнительный генератор: %2</translation>
</message> </message>
<message> <message>
@@ -4259,8 +4088,8 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
<translation>Настройка «%1»</translation> <translation>Настройка «%1»</translation>
</message> </message>
<message> <message>
<source>*** cmake process crashed!</source> <source>*** cmake process crashed.</source>
<translation>*** процесс cmake аварийно завершился!</translation> <translation>*** процесс cmake аварийно завершился.</translation>
</message> </message>
<message> <message>
<source>*** cmake process exited with exit code %1.</source> <source>*** cmake process exited with exit code %1.</source>
@@ -4454,7 +4283,7 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
<translation>Изменить...</translation> <translation>Изменить...</translation>
</message> </message>
<message> <message>
<source>CMake Generator:</source> <source>CMake generator:</source>
<translation>Генератор CMake:</translation> <translation>Генератор CMake:</translation>
</message> </message>
<message> <message>
@@ -4474,7 +4303,7 @@ For example, &quot;Revision: 15&quot; will leave the branch at revision 15.</sou
<translation>Генератор:</translation> <translation>Генератор:</translation>
</message> </message>
<message> <message>
<source>Extra Generator:</source> <source>Extra generator:</source>
<translation>Дополнительный генератор:</translation> <translation>Дополнительный генератор:</translation>
</message> </message>
<message> <message>
@@ -8626,6 +8455,10 @@ Do you want to kill it?</source>
</context> </context>
<context> <context>
<name>Core::Internal::ThemeChooser</name> <name>Core::Internal::ThemeChooser</name>
<message>
<source>Current theme: %1</source>
<translation>Текущая тема: %1</translation>
</message>
<message> <message>
<source>Restart Required</source> <source>Restart Required</source>
<translation>Требуется перезапуск</translation> <translation>Требуется перезапуск</translation>
@@ -11099,10 +10932,6 @@ Flags: %3</source>
<source>Pat&amp;h:</source> <source>Pat&amp;h:</source>
<translation>Пут&amp;ь:</translation> <translation>Пут&amp;ь:</translation>
</message> </message>
<message>
<source>&lt;p&gt;Specifying the module (base name of the library or executable) for function or file type breakpoints can significantly speed up debugger start-up times (CDB, LLDB).</source>
<translation>&lt;p&gt;Указание модуля (имени библиотеки или программы) для точек останова на функциях или исходниках может значительно повысить скорость запуска отладчика (CDB, LLDB).</translation>
</message>
<message> <message>
<source>&amp;Module:</source> <source>&amp;Module:</source>
<translation>&amp;Модуль:</translation> <translation>&amp;Модуль:</translation>
@@ -11159,14 +10988,6 @@ Flags: %3</source>
<source>Edit Selected Breakpoints...</source> <source>Edit Selected Breakpoints...</source>
<translation>Изменить выбранные точки останова...</translation> <translation>Изменить выбранные точки останова...</translation>
</message> </message>
<message>
<source>Associate Breakpoint With All Threads</source>
<translation>Сопоставить точку останова со всеми потоками</translation>
</message>
<message>
<source>Associate Breakpoint With Thread %1</source>
<translation>Сопоставить точку останова с потоком %1</translation>
</message>
<message> <message>
<source>Disable Selected Breakpoints</source> <source>Disable Selected Breakpoints</source>
<translation>Деактивировать выбранные точки останова</translation> <translation>Деактивировать выбранные точки останова</translation>
@@ -11319,6 +11140,14 @@ Flags: %3</source>
<source>Function Name:</source> <source>Function Name:</source>
<translation>Имя функции:</translation> <translation>Имя функции:</translation>
</message> </message>
<message>
<source>Associate Breakpoint with All Threads</source>
<translation>Сопоставить точку останова со всеми потоками</translation>
</message>
<message>
<source>Associate Breakpoint with Thread %1</source>
<translation>Сопоставить точку останова с потоком %1</translation>
</message>
<message> <message>
<source>Line Number:</source> <source>Line Number:</source>
<translation>Номер строки:</translation> <translation>Номер строки:</translation>
@@ -11359,6 +11188,10 @@ Flags: %3</source>
<source>Breakpoint on QML Signal Emit</source> <source>Breakpoint on QML Signal Emit</source>
<translation>Точка остановка на инициировании сигнала QML</translation> <translation>Точка остановка на инициировании сигнала QML</translation>
</message> </message>
<message>
<source>&lt;p&gt;Specifying the module (base name of the library or executable) for function or file type breakpoints can significantly speed up debugger startup times (CDB, LLDB).</source>
<translation>&lt;p&gt;Указание модуля (имени библиотеки или программы) для точек останова на функциях или исходниках может значительно повысить скорость запуска отладчика (CDB, LLDB).</translation>
</message>
<message> <message>
<source>Function</source> <source>Function</source>
<translation>Функция</translation> <translation>Функция</translation>
@@ -11623,17 +11456,6 @@ Flags: %3</source>
</context> </context>
<context> <context>
<name>Debugger::Internal::CommonOptionsPage</name> <name>Debugger::Internal::CommonOptionsPage</name>
<message>
<source>Stop when %1() is called</source>
<translation>Остановиться на вызове %1()</translation>
</message>
<message>
<source>Always adds a breakpoint on the &lt;i&gt;%1()&lt;/i&gt; function.</source>
<translation>Всегда устанавливать точку останова на функцию &lt;i&gt;%1()&lt;/i&gt;.</translation>
</message>
</context>
<context>
<name>Debugger::Internal::CommonOptionsPageWidget</name>
<message> <message>
<source>Behavior</source> <source>Behavior</source>
<translation>Поведение</translation> <translation>Поведение</translation>
@@ -11642,6 +11464,10 @@ Flags: %3</source>
<source>Use alternating row colors in debug views</source> <source>Use alternating row colors in debug views</source>
<translation>Чередование цвета строк в представлении отладчика</translation> <translation>Чередование цвета строк в представлении отладчика</translation>
</message> </message>
<message>
<source>Changes the font size in the debugger views when the font size in the main editor changes.</source>
<translation>Менять размер шрифта в окне отладчика при изменении его в основном окне редактора.</translation>
</message>
<message> <message>
<source>Debugger font size follows main editor</source> <source>Debugger font size follows main editor</source>
<translation>Размер шрифта отладчика соответствует редактору</translation> <translation>Размер шрифта отладчика соответствует редактору</translation>
@@ -11650,34 +11476,6 @@ Flags: %3</source>
<source>Use tooltips in main editor while debugging</source> <source>Use tooltips in main editor while debugging</source>
<translation>Использовать подсказки в основном редакторе при отладке</translation> <translation>Использовать подсказки в основном редакторе при отладке</translation>
</message> </message>
<message>
<source>Changes the font size in the debugger views when the font size in the main editor changes.</source>
<translation>Менять размер шрифта в окне отладчика при изменении его в основном окне редактора.</translation>
</message>
<message>
<source>Switch to previous mode on debugger exit</source>
<translation>Переключаться в предыдущий режим при завершении отладчика</translation>
</message>
<message>
<source>Bring Qt Creator to foreground when application interrupts</source>
<translation>Переходить в окно Qt Creator при прерывании приложения</translation>
</message>
<message>
<source>Enables a full file path in breakpoints by default also for GDB.</source>
<translation>Включение полного пути к исходным файлам для точек останова так же для GDB.</translation>
</message>
<message>
<source>Registers Qt Creator for debugging crashed applications.</source>
<translation>Зарегистрировать Qt Creator для отладки приложений, завершённых аварийно.</translation>
</message>
<message>
<source>Shows a warning when starting the debugger on a binary with insufficient debug information.</source>
<translation>Показывать предупреждение при запуске отладчика на программе без отладочной информации.</translation>
</message>
<message>
<source>Show QML object tree</source>
<translation>Показывать дерево объектов QML</translation>
</message>
<message> <message>
<source>Stopping and stepping in the debugger will automatically open views associated with the current location.</source> <source>Stopping and stepping in the debugger will automatically open views associated with the current location.</source>
<translation>Остановка и пошаговая отладка автоматически открывают обзор кода соответствующий текущему положению.</translation> <translation>Остановка и пошаговая отладка автоматически открывают обзор кода соответствующий текущему положению.</translation>
@@ -11698,14 +11496,34 @@ Flags: %3</source>
<source>Select this option to close automatically opened memory views when the debugger exits.</source> <source>Select this option to close automatically opened memory views when the debugger exits.</source>
<translation>Включение закрытия автоматически открытых обзоров памяти при завершении отладки.</translation> <translation>Включение закрытия автоматически открытых обзоров памяти при завершении отладки.</translation>
</message> </message>
<message>
<source>Switch to previous mode on debugger exit</source>
<translation>Переключаться в предыдущий режим при завершении отладчика</translation>
</message>
<message>
<source>Bring Qt Creator to foreground when application interrupts</source>
<translation>Переходить в окно Qt Creator при прерывании приложения</translation>
</message>
<message> <message>
<source>Shows QML object tree in Locals and Expressions when connected and not stepping.</source> <source>Shows QML object tree in Locals and Expressions when connected and not stepping.</source>
<translation>Показывать дерево объектов QML в окне «Переменные и выражения» при подключении, но не при пошаговой отладке.</translation> <translation>Показывать дерево объектов QML в окне «Переменные и выражения» при подключении, но не при пошаговой отладке.</translation>
</message> </message>
<message>
<source>Show QML object tree</source>
<translation>Показывать дерево объектов QML</translation>
</message>
<message>
<source>Enables a full file path in breakpoints by default also for GDB.</source>
<translation>Включение по умолчанию полного пути к исходным файлам для точек останова также и для GDB.</translation>
</message>
<message> <message>
<source>Set breakpoints using a full absolute path</source> <source>Set breakpoints using a full absolute path</source>
<translation>Задавать полный путь к точкам останова</translation> <translation>Задавать полный путь к точкам останова</translation>
</message> </message>
<message>
<source>Registers Qt Creator for debugging crashed applications.</source>
<translation>Зарегистрировать Qt Creator для отладки приложений, завершённых аварийно.</translation>
</message>
<message> <message>
<source>Use Qt Creator for post-mortem debugging</source> <source>Use Qt Creator for post-mortem debugging</source>
<translation>Назначить Qt Creator системным отладчиком</translation> <translation>Назначить Qt Creator системным отладчиком</translation>
@@ -11714,6 +11532,10 @@ Flags: %3</source>
<source>Warn when debugging &quot;Release&quot; builds</source> <source>Warn when debugging &quot;Release&quot; builds</source>
<translation>Предупреждать при отладке «выпускаемых» сборок</translation> <translation>Предупреждать при отладке «выпускаемых» сборок</translation>
</message> </message>
<message>
<source>Shows a warning when starting the debugger on a binary with insufficient debug information.</source>
<translation>Показывать предупреждение при запуске отладчика на программе без отладочной информации.</translation>
</message>
<message> <message>
<source>Keep editor stationary when stepping</source> <source>Keep editor stationary when stepping</source>
<translation>Сохранять позицию редактора при пошаговой отладке</translation> <translation>Сохранять позицию редактора при пошаговой отладке</translation>
@@ -11730,6 +11552,14 @@ Flags: %3</source>
<source>&lt;unlimited&gt;</source> <source>&lt;unlimited&gt;</source>
<translation>&lt;бесконечна&gt;</translation> <translation>&lt;бесконечна&gt;</translation>
</message> </message>
<message>
<source>Stop when %1() is called</source>
<translation>Остановиться на вызове %1()</translation>
</message>
<message>
<source>Always adds a breakpoint on the &lt;i&gt;%1()&lt;/i&gt; function.</source>
<translation>Всегда устанавливать точку останова на функцию &lt;i&gt;%1()&lt;/i&gt;.</translation>
</message>
</context> </context>
<context> <context>
<name>Debugger::Internal::Console</name> <name>Debugger::Internal::Console</name>
@@ -13939,7 +13769,7 @@ Do you want to retry?</source>
<translation>Шестнадцатеричный</translation> <translation>Шестнадцатеричный</translation>
</message> </message>
<message> <message>
<source>DecimalFormat</source> <source>Decimal</source>
<translation>Десятичный</translation> <translation>Десятичный</translation>
</message> </message>
<message> <message>
@@ -14674,6 +14504,18 @@ Do you want to retry?</source>
<source>Automatic</source> <source>Automatic</source>
<translation>Автоматический</translation> <translation>Автоматический</translation>
</message> </message>
<message>
<source>Note: Evaluators will be re-evaluated after each step. For details, see the &lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-debug-mode.html#locals-and-expressions&quot;&gt;documentation&lt;/a&gt;.</source>
<translation>Замечание: выражения вычисляются после каждого шага. Подробнее читайте в &lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-debug-mode.html#locals-and-expressions&quot;&gt;документации&lt;/a&gt;.</translation>
</message>
<message>
<source>Stop the program when the data at the address is modified.</source>
<translation>Останавливать программу при изменении данных по указанному адресу.</translation>
</message>
<message>
<source>Stop the program when the data at the address given by the expression is modified.</source>
<translation>Останавливать программу при изменении данных по адресу, заданному выражением.</translation>
</message>
<message> <message>
<source>Raw Data</source> <source>Raw Data</source>
<translation>Сырые данные</translation> <translation>Сырые данные</translation>
@@ -14760,10 +14602,6 @@ Do you want to retry?</source>
<source>Enter an expression to evaluate.</source> <source>Enter an expression to evaluate.</source>
<translation>Введите выражение для вычисления.</translation> <translation>Введите выражение для вычисления.</translation>
</message> </message>
<message>
<source>Note: Evaluators will be re-evaluated after each step. For details check the &lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-debug-mode.html#locals-and-expressions&quot;&gt;documentation&lt;/a&gt;.</source>
<translation>Замечание: выражения вычисляются после каждого шага. Подробнее читайте в &lt;a href=&quot;qthelp://org.qt-project.qtcreator/doc/creator-debug-mode.html#locals-and-expressions&quot;&gt;документации&lt;/a&gt;.</translation>
</message>
<message> <message>
<source>New Evaluated Expression</source> <source>New Evaluated Expression</source>
<translation>Новое вычисляемое выражение</translation> <translation>Новое вычисляемое выражение</translation>
@@ -14808,10 +14646,6 @@ Do you want to retry?</source>
<source>Add Data Breakpoint at Object&apos;s Address (0x%1)</source> <source>Add Data Breakpoint at Object&apos;s Address (0x%1)</source>
<translation>Добавить контрольную точку на адрес объекта (0x%1)</translation> <translation>Добавить контрольную точку на адрес объекта (0x%1)</translation>
</message> </message>
<message>
<source>Setting a data breakpoint on an address will cause the program to stop when the data at the address is modified.</source>
<translation>Установка контрольной точки на адрес приведёт к остановке программы при изменении данных по этому адресу.</translation>
</message>
<message> <message>
<source>Add Data Breakpoint at Pointer&apos;s Address (0x%1)</source> <source>Add Data Breakpoint at Pointer&apos;s Address (0x%1)</source>
<translation>Добавить контрольную точку по адресу указателя (0x%1)</translation> <translation>Добавить контрольную точку по адресу указателя (0x%1)</translation>
@@ -14828,10 +14662,6 @@ Do you want to retry?</source>
<source>Add Data Breakpoint at Expression</source> <source>Add Data Breakpoint at Expression</source>
<translation>Добавить контрольную точку на вычисляемый адрес</translation> <translation>Добавить контрольную точку на вычисляемый адрес</translation>
</message> </message>
<message>
<source>Setting a data breakpoint on an expression will cause the program to stop when the data at the address given by the expression is modified.</source>
<translation>Установка контрольной точки на адрес приведёт к остановке программы при изменении данных по этому адресу.</translation>
</message>
<message> <message>
<source>Open Memory Editor</source> <source>Open Memory Editor</source>
<translation>Открыть редактор памяти</translation> <translation>Открыть редактор памяти</translation>
@@ -17541,6 +17371,10 @@ Would you like to terminate it?</source>
<source>copied</source> <source>copied</source>
<translation>скопирован</translation> <translation>скопирован</translation>
</message> </message>
<message>
<source>typechange</source>
<translation>смена типа</translation>
</message>
<message> <message>
<source> by both</source> <source> by both</source>
<translation> обоими</translation> <translation> обоими</translation>
@@ -20352,38 +20186,6 @@ Ids must begin with a lowercase letter.</source>
<source>Simulator application process error %1</source> <source>Simulator application process error %1</source>
<translation>Приложение из эмулятора вернуло ошибку %1</translation> <translation>Приложение из эмулятора вернуло ошибку %1</translation>
</message> </message>
<message>
<source>Application install on Simulator failed. %1</source>
<translation>Не удалось установить приложение на эмулятор. %1</translation>
</message>
<message>
<source>Application install on Simulator failed. Simulator not running.</source>
<translation>Не удалось установить приложение на эмулятор. Он не запущен.</translation>
</message>
<message>
<source>Application launch on Simulator failed. Invalid Bundle path %1</source>
<translation>Запуск приложения на эмуляторе не удался. Неверный путь пакета %1</translation>
</message>
<message>
<source>Spawning the Application process on Simulator failed.</source>
<translation>Не удалось породить процесс приложения на эмуляторе.</translation>
</message>
<message>
<source>Application launch on Simulator failed. Simulator not running.</source>
<translation>Не удалось запустить приложение на эмуляторе. Он не запущен.</translation>
</message>
<message>
<source>Application launch on Simulator failed. %1</source>
<translation>Запуск приложения на эмуляторе не удался. %1</translation>
</message>
<message>
<source>Spawning the Application process on Simulator failed. Spawning timed out.</source>
<translation>Не удалось породить процесс приложения на эмуляторе. Время порождения истекло.</translation>
</message>
<message>
<source>Simulator application process error %1</source>
<translation>Приложение из эмулятора вернуло ошибку %1</translation>
</message>
</context> </context>
<context> <context>
<name>IosDeployStepWidget</name> <name>IosDeployStepWidget</name>
@@ -21402,6 +21204,10 @@ Ids must begin with a lowercase letter.</source>
<source>Nim source file </source> <source>Nim source file </source>
<translation>Исходник Nim</translation> <translation>Исходник Nim</translation>
</message> </message>
<message>
<source>Nim script file </source>
<translation>Файл сценария Nim</translation>
</message>
<message> <message>
<source>Qt Creator Python project file</source> <source>Qt Creator Python project file</source>
<translation>Проект Qt Creator для Python</translation> <translation>Проект Qt Creator для Python</translation>
@@ -21422,6 +21228,14 @@ Ids must begin with a lowercase letter.</source>
<source>QML file</source> <source>QML file</source>
<translation>Файл QML</translation> <translation>Файл QML</translation>
</message> </message>
<message>
<source>Linguist compiled translations</source>
<translation>Скомпилированные переводы Linguist</translation>
</message>
<message>
<source>Linguist source translations</source>
<translation>Исходные переводы Linguist</translation>
</message>
<message> <message>
<source>SCXML State Chart</source> <source>SCXML State Chart</source>
<translation>Диаграмма состояний SCXML</translation> <translation>Диаграмма состояний SCXML</translation>
@@ -21502,14 +21316,6 @@ Ids must begin with a lowercase letter.</source>
<source>QML Project file</source> <source>QML Project file</source>
<translation>Файл проекта QML</translation> <translation>Файл проекта QML</translation>
</message> </message>
<message>
<source>Linguist translated messages (machine-readable)</source>
<translation>Сообщения переведенные через Linguist (удобные для машины)</translation>
</message>
<message>
<source>Linguist message catalog</source>
<translation>Каталог сообщений Linguist</translation>
</message>
<message> <message>
<source>Qt Resource file</source> <source>Qt Resource file</source>
<translation>Файл ресурсов Qt</translation> <translation>Файл ресурсов Qt</translation>
@@ -24524,11 +24330,11 @@ cannot be found in the path.</source>
<translation>Имя в файловой системе:</translation> <translation>Имя в файловой системе:</translation>
</message> </message>
<message> <message>
<source>Select a file as icon</source> <source>Select Icon File</source>
<translation>Выберите файл значка</translation> <translation>Выбор файла значка</translation>
</message> </message>
<message> <message>
<source>Reset to the device default icon</source> <source>Reset to Device Default Icon</source>
<translation>Назначить стандартный для устройства значок</translation> <translation>Назначить стандартный для устройства значок</translation>
</message> </message>
<message> <message>
@@ -24959,6 +24765,14 @@ to project &quot;%2&quot;.</source>
<source>Projects</source> <source>Projects</source>
<translation>Проекты</translation> <translation>Проекты</translation>
</message> </message>
<message>
<source>Import Existing Build...</source>
<translation>Импорт сборки...</translation>
</message>
<message>
<source>Manage Kits...</source>
<translation>Управление...</translation>
</message>
<message> <message>
<source>Import directory</source> <source>Import directory</source>
<translation>Импортируемый каталог</translation> <translation>Импортируемый каталог</translation>
@@ -25111,17 +24925,6 @@ to project &quot;%2&quot;.</source>
<translation>Новое название конфигурации установки &lt;b&gt;%1&lt;/b&gt;:</translation> <translation>Новое название конфигурации установки &lt;b&gt;%1&lt;/b&gt;:</translation>
</message> </message>
</context> </context>
<context>
<name>ProjectExplorer::Internal::SelectorModel</name>
<message>
<source>Import Existing Build...</source>
<translation>Импорт сборки...</translation>
</message>
<message>
<source>Manage Kits...</source>
<translation>Управление...</translation>
</message>
</context>
<context> <context>
<name>ProjectExplorer::Internal::SessionDialog</name> <name>ProjectExplorer::Internal::SessionDialog</name>
<message> <message>
@@ -26182,7 +25985,7 @@ Preselects a desktop Qt for building the application if available.</source>
</message> </message>
<message> <message>
<source>Material</source> <source>Material</source>
<translation type="unfinished">Материальный</translation> <translation>Материальный</translation>
</message> </message>
<message> <message>
<source>Universal</source> <source>Universal</source>
@@ -26316,6 +26119,14 @@ Preselects a desktop Qt for building the application if available.</source>
<source>Nim File</source> <source>Nim File</source>
<translation>Файл Nim</translation> <translation>Файл Nim</translation>
</message> </message>
<message>
<source>Creates an empty Nim script file using UTF-8 charset.</source>
<translation>Создание пустого файла сценария Nim с использованием кодировки UTF-8.</translation>
</message>
<message>
<source>Nim Script File</source>
<translation>Файл сценария Nim</translation>
</message>
<message> <message>
<source>State Chart Name and Location</source> <source>State Chart Name and Location</source>
<translation>Название и размещение диаграммы состояний</translation> <translation>Название и размещение диаграммы состояний</translation>
@@ -28653,9 +28464,8 @@ These files are preserved.</source>
<context> <context>
<name>QbsProjectManager::Internal::QbsProject</name> <name>QbsProjectManager::Internal::QbsProject</name>
<message> <message>
<source>Failed!</source> <source>Failed</source>
<translatorcomment>Очень плохое сообщение, скорее всего не дописали</translatorcomment> <translation>Сбой</translation>
<translation>Ошибка</translation>
</message> </message>
<message> <message>
<source>Could not write project file %1.</source> <source>Could not write project file %1.</source>
@@ -30203,12 +30013,12 @@ Neither the path to the library nor the path to its includes is added to the .pr
<translation>Закрытие сетевого соединения</translation> <translation>Закрытие сетевого соединения</translation>
</message> </message>
<message> <message>
<source>Socket state changed to BoundState. This should not happen!</source> <source>Socket state changed to BoundState. This should not happen.</source>
<translation>Состояние сокета изменилось на BoundState. Это не должно было произойти!</translation> <translation>Состояние сокета изменилось на BoundState. Это не должно было произойти.</translation>
</message> </message>
<message> <message>
<source>Socket state changed to ListeningState. This should not happen!</source> <source>Socket state changed to ListeningState. This should not happen.</source>
<translation>Состояние сокета изменилось на ListeningState. Это не должно было произойти!</translation> <translation>Состояние сокета изменилось на ListeningState. Это не должно было произойти.</translation>
</message> </message>
<message> <message>
<source>Unknown state %1</source> <source>Unknown state %1</source>
@@ -31628,7 +31438,7 @@ This is independent of the visibility property in QML.</source>
<translation>Файл или каталог не найден.</translation> <translation>Файл или каталог не найден.</translation>
</message> </message>
<message> <message>
<source>QML module not found(%1). <source>QML module not found (%1).
Import paths: Import paths:
%2 %2
@@ -33474,8 +33284,8 @@ Do you want to retry?</source>
Повторить?</translation> Повторить?</translation>
</message> </message>
<message> <message>
<source>Failed to connect!</source> <source>Failed to connect.</source>
<translation>Не удалось подключиться!</translation> <translation>Не удалось подключиться.</translation>
</message> </message>
<message> <message>
<source>Disable Profiling</source> <source>Disable Profiling</source>
@@ -36406,6 +36216,177 @@ Description: %4</source>
Описание: %4</translation> Описание: %4</translation>
</message> </message>
</context> </context>
<context>
<name>ScxmlEditor::PluginInterface::ActionHandler</name>
<message>
<source>Zoom In</source>
<translation>Увеличить</translation>
</message>
<message>
<source>Zoom In (Ctrl + + / Ctrl + Wheel)</source>
<translation>Увеличить (Ctrl++ / Ctrl+Колёсико)</translation>
</message>
<message>
<source>Zoom Out</source>
<translation>Уменьшить</translation>
</message>
<message>
<source>Zoom Out (Ctrl + - / Ctrl + Wheel)</source>
<translation>Уменьшить (Ctrl+- / Ctrl+Колёсико)</translation>
</message>
<message>
<source>Fit to View</source>
<translation>Растянуть на окно</translation>
</message>
<message>
<source>Fit to View (F11)</source>
<translation>Растянуть на окно (F11)</translation>
</message>
<message>
<source>Panning</source>
<translation>Панорамирование</translation>
</message>
<message>
<source>Panning (Shift)</source>
<translation>Панорамирование (Shift)</translation>
</message>
<message>
<source>Magnifier</source>
<translation>Лупа</translation>
</message>
<message>
<source>Magnifier Tool (Alt)</source>
<translation>Лупа (Alt)</translation>
</message>
<message>
<source>Navigator</source>
<translation>Навигатор</translation>
</message>
<message>
<source>Navigator (Ctrl+E)</source>
<translation>Навигатор (Ctrl+E)</translation>
</message>
<message>
<source>Copy</source>
<translation>Копировать</translation>
</message>
<message>
<source>Copy (Ctrl + C)</source>
<translation>Копировать (Ctrl+C)</translation>
</message>
<message>
<source>Cut</source>
<translation>Вырезать</translation>
</message>
<message>
<source>Cut (Ctrl + X)</source>
<translation>Вырезать (Ctrl+X)</translation>
</message>
<message>
<source>Paste</source>
<translation>Вставить</translation>
</message>
<message>
<source>Paste (Ctrl + V)</source>
<translation>Вставить (Ctrl+V)</translation>
</message>
<message>
<source>Screenshot</source>
<translation>Снимок экрана</translation>
</message>
<message>
<source>Screenshot (Ctrl + Shift + C)</source>
<translation>Снимок экрана (Ctrl+Shift+C)</translation>
</message>
<message>
<source>Export to Image</source>
<translation>В изображение</translation>
</message>
<message>
<source>Toggle Full Namespace</source>
<translation>Переключить пространство имён</translation>
</message>
<message>
<source>Align Left</source>
<translation>По левому краю</translation>
</message>
<message>
<source>Align Left (Ctrl+L,1)</source>
<translation>По левому краю (Ctrl + L,1)</translation>
</message>
<message>
<source>Align Right</source>
<translation>По правому краю</translation>
</message>
<message>
<source>Align Right (Ctrl+L,2)</source>
<translation>По правому краю (Ctrl+L,2)</translation>
</message>
<message>
<source>Align Top</source>
<translation>По верху</translation>
</message>
<message>
<source>Align Top (Ctrl+L,3)</source>
<translation>По верху (Ctrl+L,3)</translation>
</message>
<message>
<source>Align Bottom</source>
<translation>По низу</translation>
</message>
<message>
<source>Align Bottom (Ctrl+L,4)</source>
<translation>По низу (Ctrl+L,4)</translation>
</message>
<message>
<source>Align Horizontal</source>
<translation>Выравнить гоизонтально</translation>
</message>
<message>
<source>Align Horizontal (Ctrl+L,5)</source>
<translation>Выравнить гоизонтально (Ctrl+L,5)</translation>
</message>
<message>
<source>Align Vertical</source>
<translation>Выравнить вертикально</translation>
</message>
<message>
<source>Align Vertical (Ctrl+L,6)</source>
<translation>Выравнить гоизонтально (Ctrl+L,6)</translation>
</message>
<message>
<source>Adjust Width</source>
<translation>Подогнать ширину</translation>
</message>
<message>
<source>Adjust Width (Ctrl+L,7)</source>
<translation>Подогнать ширину (Ctrl+L,7)</translation>
</message>
<message>
<source>Adjust Height</source>
<translation>Подогнать высоту</translation>
</message>
<message>
<source>Adjust Height (Ctrl+L,8)</source>
<translation>Подогнать высоту (Ctrl+L,8)</translation>
</message>
<message>
<source>Adjust Size</source>
<translation>Подогнать размер</translation>
</message>
<message>
<source>Adjust Size (Ctrl+L,9)</source>
<translation>Подогнать размер (Ctrl+L,9)</translation>
</message>
<message>
<source>Show Statistics...</source>
<translation>Показать статистику...</translation>
</message>
<message>
<source>Show Statistics</source>
<translation>Показать статистику</translation>
</message>
</context>
<context> <context>
<name>ScxmlEditor::PluginInterface::BaseItem</name> <name>ScxmlEditor::PluginInterface::BaseItem</name>
<message> <message>
@@ -36981,11 +36962,11 @@ with a password, which you can enter below.</source>
<context> <context>
<name>StatesDelegate</name> <name>StatesDelegate</name>
<message> <message>
<source>Set when condition</source> <source>Set when Condition</source>
<translation>Задать условие when</translation> <translation>Задать условие when</translation>
</message> </message>
<message> <message>
<source>Reset when condition</source> <source>Reset when Condition</source>
<translation>Сбросить условие when</translation> <translation>Сбросить условие when</translation>
</message> </message>
</context> </context>
@@ -37589,9 +37570,13 @@ with a password, which you can enter below.</source>
<source>Aborting replace.</source> <source>Aborting replace.</source>
<translation>Прерывание замены.</translation> <translation>Прерывание замены.</translation>
</message> </message>
<message> <message numerus="yes">
<source>%1 found</source> <source>%n found</source>
<translation>найдено: %1</translation> <translation>
<numerusform>%n найден</numerusform>
<numerusform>%n найдено</numerusform>
<numerusform>%n найдено</numerusform>
</translation>
</message> </message>
</context> </context>
<context> <context>
@@ -43536,6 +43521,10 @@ should a repository require SSH-authentication (see documentation on SSH and the
<source>Auto width</source> <source>Auto width</source>
<translation>Автоширина</translation> <translation>Автоширина</translation>
</message> </message>
<message>
<source>&lt;font color=red&gt;Invalid syntax.&lt;/font&gt;</source>
<translation>&lt;font color=red&gt;Неверный синтаксис.&lt;/font&gt;</translation>
</message>
<message> <message>
<source>Box</source> <source>Box</source>
<translation>Коробкой</translation> <translation>Коробкой</translation>
@@ -43576,10 +43565,6 @@ should a repository require SSH-authentication (see documentation on SSH and the
<source>Boundaries</source> <source>Boundaries</source>
<translation>Границы</translation> <translation>Границы</translation>
</message> </message>
<message>
<source>&lt;font color=red&gt;Invalid syntax!&lt;/font&gt;</source>
<translation>&lt;font color=red&gt;Неверный синтаксис!&lt;/font&gt;</translation>
</message>
<message> <message>
<source>Multi-Selection</source> <source>Multi-Selection</source>
<translation>Множественное выделение</translation> <translation>Множественное выделение</translation>

View File

@@ -33,6 +33,16 @@ Item {
property int screenDependHeightDistance: Math.min(50, Math.max(16, height / 30)) property int screenDependHeightDistance: Math.min(50, Math.max(16, height / 30))
DropArea {
anchors.fill: parent
keys: ["text/uri-list"]
onDropped: {
if ((drop.supportedActions & Qt.CopyAction != 0)
&& welcomeMode.openDroppedFiles(drop.urls))
drop.accept(Qt.CopyAction);
}
}
SideBar { SideBar {
id: sideBar id: sideBar
model: pagesModel model: pagesModel

View File

@@ -369,9 +369,12 @@ template <typename ForwardIterator, typename InitFunction, typename MapFunction,
QFuture<ReduceResult> QFuture<ReduceResult>
mapReduce(ForwardIterator begin, ForwardIterator end, InitFunction &&init, MapFunction &&map, mapReduce(ForwardIterator begin, ForwardIterator end, InitFunction &&init, MapFunction &&map,
ReduceFunction &&reduce, CleanUpFunction &&cleanup, ReduceFunction &&reduce, CleanUpFunction &&cleanup,
MapReduceOption option = MapReduceOption::Unordered, int size = -1) MapReduceOption option = MapReduceOption::Unordered,
QThread::Priority priority = QThread::InheritPriority,
int size = -1)
{ {
return runAsync(Internal::blockingIteratorMapReduce< return runAsync(priority,
Internal::blockingIteratorMapReduce<
ForwardIterator, ForwardIterator,
typename std::decay<InitFunction>::type, typename std::decay<InitFunction>::type,
typename std::decay<MapFunction>::type, typename std::decay<MapFunction>::type,
@@ -438,9 +441,11 @@ template <typename Container, typename InitFunction, typename MapFunction,
QFuture<ReduceResult> QFuture<ReduceResult>
mapReduce(Container &&container, InitFunction &&init, MapFunction &&map, mapReduce(Container &&container, InitFunction &&init, MapFunction &&map,
ReduceFunction &&reduce, CleanUpFunction &&cleanup, ReduceFunction &&reduce, CleanUpFunction &&cleanup,
MapReduceOption option = MapReduceOption::Unordered) MapReduceOption option = MapReduceOption::Unordered,
QThread::Priority priority = QThread::InheritPriority)
{ {
return runAsync(Internal::blockingContainerMapReduce< return runAsync(priority,
Internal::blockingContainerMapReduce<
typename std::decay<Container>::type, typename std::decay<Container>::type,
typename std::decay<InitFunction>::type, typename std::decay<InitFunction>::type,
typename std::decay<MapFunction>::type, typename std::decay<MapFunction>::type,
@@ -458,9 +463,11 @@ template <typename Container, typename InitFunction, typename MapFunction,
QFuture<ReduceResult> QFuture<ReduceResult>
mapReduce(std::reference_wrapper<Container> containerWrapper, InitFunction &&init, MapFunction &&map, mapReduce(std::reference_wrapper<Container> containerWrapper, InitFunction &&init, MapFunction &&map,
ReduceFunction &&reduce, CleanUpFunction &&cleanup, ReduceFunction &&reduce, CleanUpFunction &&cleanup,
MapReduceOption option = MapReduceOption::Unordered) MapReduceOption option = MapReduceOption::Unordered,
QThread::Priority priority = QThread::InheritPriority)
{ {
return runAsync(Internal::blockingContainerRefMapReduce< return runAsync(priority,
Internal::blockingContainerRefMapReduce<
Container, Container,
typename std::decay<InitFunction>::type, typename std::decay<InitFunction>::type,
typename std::decay<MapFunction>::type, typename std::decay<MapFunction>::type,
@@ -478,14 +485,15 @@ template <typename ForwardIterator, typename MapFunction, typename State, typena
typename MapResult = typename Internal::resultType<MapFunction>::type> typename MapResult = typename Internal::resultType<MapFunction>::type>
QFuture<StateResult> QFuture<StateResult>
mapReduce(ForwardIterator begin, ForwardIterator end, MapFunction &&map, State &&initialState, mapReduce(ForwardIterator begin, ForwardIterator end, MapFunction &&map, State &&initialState,
ReduceFunction &&reduce, MapReduceOption option = MapReduceOption::Unordered, int size = -1) ReduceFunction &&reduce, MapReduceOption option = MapReduceOption::Unordered,
QThread::Priority priority = QThread::InheritPriority, int size = -1)
{ {
return mapReduce(begin, end, return mapReduce(begin, end,
Internal::StateWrapper<State>(std::forward<State>(initialState)), Internal::StateWrapper<State>(std::forward<State>(initialState)),
std::forward<MapFunction>(map), std::forward<MapFunction>(map),
Internal::ReduceWrapper<StateResult, MapResult, ReduceFunction>(std::forward<ReduceFunction>(reduce)), Internal::ReduceWrapper<StateResult, MapResult, ReduceFunction>(std::forward<ReduceFunction>(reduce)),
&Internal::cleanupReportingState<StateResult>, &Internal::cleanupReportingState<StateResult>,
option, size); option, priority, size);
} }
template <typename Container, typename MapFunction, typename State, typename ReduceFunction, template <typename Container, typename MapFunction, typename State, typename ReduceFunction,
@@ -493,14 +501,15 @@ template <typename Container, typename MapFunction, typename State, typename Red
typename MapResult = typename Internal::resultType<MapFunction>::type> typename MapResult = typename Internal::resultType<MapFunction>::type>
QFuture<StateResult> QFuture<StateResult>
mapReduce(Container &&container, MapFunction &&map, State &&initialState, ReduceFunction &&reduce, mapReduce(Container &&container, MapFunction &&map, State &&initialState, ReduceFunction &&reduce,
MapReduceOption option = MapReduceOption::Unordered) MapReduceOption option = MapReduceOption::Unordered,
QThread::Priority priority = QThread::InheritPriority)
{ {
return mapReduce(std::forward<Container>(container), return mapReduce(std::forward<Container>(container),
Internal::StateWrapper<State>(std::forward<State>(initialState)), Internal::StateWrapper<State>(std::forward<State>(initialState)),
std::forward<MapFunction>(map), std::forward<MapFunction>(map),
Internal::ReduceWrapper<StateResult, MapResult, ReduceFunction>(std::forward<ReduceFunction>(reduce)), Internal::ReduceWrapper<StateResult, MapResult, ReduceFunction>(std::forward<ReduceFunction>(reduce)),
&Internal::cleanupReportingState<StateResult>, &Internal::cleanupReportingState<StateResult>,
option); option, priority);
} }
template <typename ForwardIterator, typename MapFunction, typename State, typename ReduceFunction, template <typename ForwardIterator, typename MapFunction, typename State, typename ReduceFunction,
@@ -509,12 +518,13 @@ template <typename ForwardIterator, typename MapFunction, typename State, typena
Q_REQUIRED_RESULT Q_REQUIRED_RESULT
StateResult StateResult
mappedReduced(ForwardIterator begin, ForwardIterator end, MapFunction &&map, State &&initialState, mappedReduced(ForwardIterator begin, ForwardIterator end, MapFunction &&map, State &&initialState,
ReduceFunction &&reduce, MapReduceOption option = MapReduceOption::Unordered, int size = -1) ReduceFunction &&reduce, MapReduceOption option = MapReduceOption::Unordered,
QThread::Priority priority = QThread::InheritPriority, int size = -1)
{ {
return mapReduce(begin, end, return mapReduce(begin, end,
std::forward<MapFunction>(map), std::forward<State>(initialState), std::forward<MapFunction>(map), std::forward<State>(initialState),
std::forward<ReduceFunction>(reduce), std::forward<ReduceFunction>(reduce),
option, size).result(); option, priority, size).result();
} }
template <typename Container, typename MapFunction, typename State, typename ReduceFunction, template <typename Container, typename MapFunction, typename State, typename ReduceFunction,
@@ -523,38 +533,41 @@ template <typename Container, typename MapFunction, typename State, typename Red
Q_REQUIRED_RESULT Q_REQUIRED_RESULT
StateResult StateResult
mappedReduced(Container &&container, MapFunction &&map, State &&initialState, ReduceFunction &&reduce, mappedReduced(Container &&container, MapFunction &&map, State &&initialState, ReduceFunction &&reduce,
MapReduceOption option = MapReduceOption::Unordered) MapReduceOption option = MapReduceOption::Unordered,
QThread::Priority priority = QThread::InheritPriority)
{ {
return mapReduce(std::forward<Container>(container), std::forward<MapFunction>(map), return mapReduce(std::forward<Container>(container), std::forward<MapFunction>(map),
std::forward<State>(initialState), std::forward<ReduceFunction>(reduce), std::forward<State>(initialState), std::forward<ReduceFunction>(reduce),
option).result(); option, priority).result();
} }
template <typename ForwardIterator, typename MapFunction, template <typename ForwardIterator, typename MapFunction,
typename MapResult = typename Internal::resultType<MapFunction>::type> typename MapResult = typename Internal::resultType<MapFunction>::type>
QFuture<MapResult> QFuture<MapResult>
map(ForwardIterator begin, ForwardIterator end, MapFunction &&map, map(ForwardIterator begin, ForwardIterator end, MapFunction &&map,
MapReduceOption option = MapReduceOption::Ordered, int size = -1) MapReduceOption option = MapReduceOption::Ordered,
QThread::Priority priority = QThread::InheritPriority, int size = -1)
{ {
return mapReduce(begin, end, return mapReduce(begin, end,
&Internal::dummyInit<MapResult>, &Internal::dummyInit<MapResult>,
std::forward<MapFunction>(map), std::forward<MapFunction>(map),
Internal::DummyReduce<MapResult>(), Internal::DummyReduce<MapResult>(),
&Internal::dummyCleanup<MapResult>, &Internal::dummyCleanup<MapResult>,
option, size); option, priority, size);
} }
template <typename Container, typename MapFunction, template <typename Container, typename MapFunction,
typename MapResult = typename Internal::resultType<MapFunction>::type> typename MapResult = typename Internal::resultType<MapFunction>::type>
QFuture<MapResult> QFuture<MapResult>
map(Container &&container, MapFunction &&map, MapReduceOption option = MapReduceOption::Ordered) map(Container &&container, MapFunction &&map, MapReduceOption option = MapReduceOption::Ordered,
QThread::Priority priority = QThread::InheritPriority)
{ {
return mapReduce(std::forward<Container>(container), return mapReduce(std::forward<Container>(container),
Internal::dummyInit<MapResult>, Internal::dummyInit<MapResult>,
std::forward<MapFunction>(map), std::forward<MapFunction>(map),
Internal::DummyReduce<MapResult>(), Internal::DummyReduce<MapResult>(),
Internal::dummyCleanup<MapResult>, Internal::dummyCleanup<MapResult>,
option); option, priority);
} }
template <template<typename> class ResultContainer, typename ForwardIterator, typename MapFunction, template <template<typename> class ResultContainer, typename ForwardIterator, typename MapFunction,
@@ -562,11 +575,12 @@ template <template<typename> class ResultContainer, typename ForwardIterator, ty
Q_REQUIRED_RESULT Q_REQUIRED_RESULT
ResultContainer<MapResult> ResultContainer<MapResult>
mapped(ForwardIterator begin, ForwardIterator end, MapFunction &&mapFun, mapped(ForwardIterator begin, ForwardIterator end, MapFunction &&mapFun,
MapReduceOption option = MapReduceOption::Ordered, int size = -1) MapReduceOption option = MapReduceOption::Ordered,
QThread::Priority priority = QThread::InheritPriority, int size = -1)
{ {
return Utils::transform<ResultContainer>(map(begin, end, return Utils::transform<ResultContainer>(map(begin, end,
std::forward<MapFunction>(mapFun), std::forward<MapFunction>(mapFun),
option, size).results(), option, priority, size).results(),
[](const MapResult &r) { return r; }); [](const MapResult &r) { return r; });
} }
@@ -574,11 +588,13 @@ template <template<typename> class ResultContainer, typename Container, typename
typename MapResult = typename Internal::resultType<MapFunction>::type> typename MapResult = typename Internal::resultType<MapFunction>::type>
Q_REQUIRED_RESULT Q_REQUIRED_RESULT
ResultContainer<MapResult> ResultContainer<MapResult>
mapped(Container &&container, MapFunction &&mapFun, MapReduceOption option = MapReduceOption::Ordered) mapped(Container &&container, MapFunction &&mapFun,
MapReduceOption option = MapReduceOption::Ordered,
QThread::Priority priority = QThread::InheritPriority)
{ {
return Utils::transform<ResultContainer>(map(container, return Utils::transform<ResultContainer>(map(container,
std::forward<MapFunction>(mapFun), std::forward<MapFunction>(mapFun),
option).results(), option, priority).results(),
[](const MapResult &r) { return r; }); [](const MapResult &r) { return r; });
} }

View File

@@ -25,6 +25,8 @@
#pragma once #pragma once
#include <qsystemdetection.h>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <memory> #include <memory>
@@ -35,7 +37,7 @@ namespace Memory {
inline char *allocate(std::size_t size) inline char *allocate(std::size_t size)
{ {
#ifdef WIN32 #ifdef Q_OS_WIN32
return static_cast<char*>(_aligned_malloc(size, 64)); return static_cast<char*>(_aligned_malloc(size, 64));
#else #else
return static_cast<char*>(std::malloc(size)); return static_cast<char*>(std::malloc(size));
@@ -44,7 +46,7 @@ inline char *allocate(std::size_t size)
inline void deallocate(char *memory) inline void deallocate(char *memory)
{ {
#ifdef WIN32 #ifdef Q_OS_WIN32
_aligned_free(memory); _aligned_free(memory);
#else #else
#pragma GCC diagnostic push #pragma GCC diagnostic push
@@ -58,7 +60,7 @@ inline void deallocate(char *memory)
inline char *reallocate(char *oldMemory, std::size_t newSize) inline char *reallocate(char *oldMemory, std::size_t newSize)
{ {
#ifdef WIN32 #ifdef Q_OS_WIN32
return static_cast<char*>(_aligned_realloc(oldMemory, newSize, 64)); return static_cast<char*>(_aligned_realloc(oldMemory, newSize, 64));
#else #else
return static_cast<char*>(std::realloc(oldMemory, newSize)); return static_cast<char*>(std::realloc(oldMemory, newSize));

View File

@@ -5,16 +5,6 @@
<file>images/sort@2x.png</file> <file>images/sort@2x.png</file>
<file>images/leafsort.png</file> <file>images/leafsort.png</file>
<file>images/leafsort@2x.png</file> <file>images/leafsort@2x.png</file>
<file>images/debug.png</file>
<file>images/fail.png</file>
<file>images/fatal.png</file>
<file>images/pass.png</file>
<file>images/skip.png</file>
<file>images/warn.png</file>
<file>images/xfail.png</file>
<file>images/xpass.png</file>
<file>images/blacklisted_fail.png</file>
<file>images/blacklisted_pass.png</file>
<file>images/benchmark.png</file> <file>images/benchmark.png</file>
<file>images/runselected_boxes.png</file> <file>images/runselected_boxes.png</file>
<file>images/runselected_boxes@2x.png</file> <file>images/runselected_boxes@2x.png</file>

View File

@@ -38,5 +38,39 @@ const Utils::Icon RUN_SELECTED_OVERLAY({
{QLatin1String(":/images/runselected_boxes.png"), Utils::Theme::BackgroundColorDark}, {QLatin1String(":/images/runselected_boxes.png"), Utils::Theme::BackgroundColorDark},
{QLatin1String(":/images/runselected_tickmarks.png"), Utils::Theme::IconsBaseColor}}); {QLatin1String(":/images/runselected_tickmarks.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon RESULT_PASS({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestPassTextColor}},
Utils::Icon::Tint);
const Utils::Icon RESULT_FAIL({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestFailTextColor}},
Utils::Icon::Tint);
const Utils::Icon RESULT_XFAIL({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestXFailTextColor}},
Utils::Icon::Tint);
const Utils::Icon RESULT_XPASS({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestXPassTextColor}},
Utils::Icon::Tint);
const Utils::Icon RESULT_SKIP({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestSkipTextColor}},
Utils::Icon::Tint);
const Utils::Icon RESULT_BLACKLISTEDPASS({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestPassTextColor},
{":/projectexplorer/images/buildstepdisable.png", Utils::Theme::PanelTextColorDark}},
Utils::Icon::Tint | Utils::Icon::PunchEdges);
const Utils::Icon RESULT_BLACKLISTEDFAIL({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestFailTextColor},
{":/projectexplorer/images/buildstepdisable.png", Utils::Theme::PanelTextColorDark}},
Utils::Icon::Tint | Utils::Icon::PunchEdges);
const Utils::Icon RESULT_BENCHMARK(":/images/benchmark.png");
const Utils::Icon RESULT_MESSAGEDEBUG({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestDebugTextColor}},
Utils::Icon::Tint);
const Utils::Icon RESULT_MESSAGEWARN({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestWarnTextColor}},
Utils::Icon::Tint);
const Utils::Icon RESULT_MESSAGEFATAL({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestFatalTextColor}},
Utils::Icon::Tint);
} // namespace Icons } // namespace Icons
} // namespace Autotest } // namespace Autotest

View File

@@ -178,6 +178,7 @@ void AutotestPlugin::onRunSelectedTriggered()
void AutotestPlugin::updateMenuItemsEnabledState() void AutotestPlugin::updateMenuItemsEnabledState()
{ {
const bool enabled = !TestRunner::instance()->isTestRunning() const bool enabled = !TestRunner::instance()->isTestRunning()
&& TestTreeModel::instance()->parser()->enabled()
&& TestTreeModel::instance()->parser()->state() == TestCodeParser::Idle; && TestTreeModel::instance()->parser()->state() == TestCodeParser::Idle;
const bool hasTests = TestTreeModel::instance()->hasTests(); const bool hasTests = TestTreeModel::instance()->hasTests();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

View File

@@ -81,7 +81,7 @@ TestCodeParser::~TestCodeParser()
void TestCodeParser::setState(State state) void TestCodeParser::setState(State state)
{ {
if (m_parserState == Shutdown) if (m_parserState == Shutdown || !m_enabled)
return; return;
qCDebug(LOG) << "setState(" << state << "), currentState:" << m_parserState; qCDebug(LOG) << "setState(" << state << "), currentState:" << m_parserState;
// avoid triggering parse before code model parsing has finished, but mark as dirty // avoid triggering parse before code model parsing has finished, but mark as dirty
@@ -91,17 +91,13 @@ void TestCodeParser::setState(State state)
return; return;
} }
if ((state == Disabled || state == Idle) if ((state == Idle) && (m_parserState == PartialParse || m_parserState == FullParse)) {
&& (m_parserState == PartialParse || m_parserState == FullParse)) {
qCDebug(LOG) << "Not setting state, parse is running"; qCDebug(LOG) << "Not setting state, parse is running";
return; return;
} }
m_parserState = state; m_parserState = state;
if (m_parserState == Disabled) { if (m_parserState == Idle && ProjectExplorer::SessionManager::startupProject()) {
m_fullUpdatePostponed = m_partialUpdatePostponed = false;
m_postponedFiles.clear();
} else if (m_parserState == Idle && ProjectExplorer::SessionManager::startupProject()) {
if (m_fullUpdatePostponed || m_dirty) { if (m_fullUpdatePostponed || m_dirty) {
emitUpdateTestTree(); emitUpdateTestTree();
} else if (m_partialUpdatePostponed) { } else if (m_partialUpdatePostponed) {
@@ -115,7 +111,7 @@ void TestCodeParser::setState(State state)
void TestCodeParser::syncTestFrameworks(const QVector<Core::Id> &frameworkIds) void TestCodeParser::syncTestFrameworks(const QVector<Core::Id> &frameworkIds)
{ {
if (m_parserState != Disabled && m_parserState != Idle) { if (m_enabled && m_parserState != Idle) {
// there's a running parse // there's a running parse
m_fullUpdatePostponed = m_partialUpdatePostponed = false; m_fullUpdatePostponed = m_partialUpdatePostponed = false;
m_postponedFiles.clear(); m_postponedFiles.clear();
@@ -129,7 +125,7 @@ void TestCodeParser::syncTestFrameworks(const QVector<Core::Id> &frameworkIds)
QTC_ASSERT(testParser, continue); QTC_ASSERT(testParser, continue);
m_testCodeParsers.append(testParser); m_testCodeParsers.append(testParser);
} }
if (m_parserState != Disabled) if (m_enabled)
updateTestTree(); updateTestTree();
} }
@@ -211,7 +207,7 @@ void TestCodeParser::onProjectPartsUpdated(ProjectExplorer::Project *project)
{ {
if (project != ProjectExplorer::SessionManager::startupProject()) if (project != ProjectExplorer::SessionManager::startupProject())
return; return;
if (m_codeModelParsing || m_parserState == Disabled) if (m_codeModelParsing || !m_enabled)
m_fullUpdatePostponed = true; m_fullUpdatePostponed = true;
else else
emitUpdateTestTree(); emitUpdateTestTree();
@@ -276,7 +272,6 @@ bool TestCodeParser::postponed(const QStringList &fileList)
m_partialUpdatePostponed = true; m_partialUpdatePostponed = true;
} }
return true; return true;
case Disabled:
case Shutdown: case Shutdown:
break; break;
} }
@@ -297,7 +292,9 @@ static void parseFileForTests(const QVector<ITestParser *> &parsers,
void TestCodeParser::scanForTests(const QStringList &fileList) void TestCodeParser::scanForTests(const QStringList &fileList)
{ {
if (m_parserState == Disabled || m_parserState == Shutdown) { if (m_parserState == Shutdown)
return;
if (!m_enabled) {
m_dirty = true; m_dirty = true;
if (fileList.isEmpty()) { if (fileList.isEmpty()) {
m_fullUpdatePostponed = true; m_fullUpdatePostponed = true;
@@ -357,7 +354,8 @@ void TestCodeParser::scanForTests(const QStringList &fileList)
[this](QFutureInterface<TestParseResultPtr> &fi, const QString &file) { [this](QFutureInterface<TestParseResultPtr> &fi, const QString &file) {
parseFileForTests(m_testCodeParsers, fi, file); parseFileForTests(m_testCodeParsers, fi, file);
}, },
Utils::MapReduceOption::Unordered); Utils::MapReduceOption::Unordered,
QThread::LowestPriority);
m_futureWatcher.setFuture(future); m_futureWatcher.setFuture(future);
if (list.size() > 5) { if (list.size() > 5) {
Core::ProgressManager::addTask(future, tr("Scanning for Tests"), Core::ProgressManager::addTask(future, tr("Scanning for Tests"),
@@ -419,11 +417,6 @@ void TestCodeParser::onFinished()
} }
m_dirty = false; m_dirty = false;
break; break;
case Disabled: // can happen if all Test related widgets become hidden while parsing
qCDebug(LOG) << "emitting parsingFinished (onFinished, Disabled)";
emit parsingFinished();
qCDebug(LOG) << QDateTime::currentDateTime().toString("hh:mm:ss.zzz") << "ParsingFin";
break;
case Shutdown: case Shutdown:
qCDebug(LOG) << "Shutdown complete - not emitting parsingFinished (onFinished)"; qCDebug(LOG) << "Shutdown complete - not emitting parsingFinished (onFinished)";
break; break;

View File

@@ -49,7 +49,6 @@ public:
Idle, Idle,
PartialParse, PartialParse,
FullParse, FullParse,
Disabled,
Shutdown Shutdown
}; };
@@ -57,6 +56,8 @@ public:
virtual ~TestCodeParser(); virtual ~TestCodeParser();
void setState(State state); void setState(State state);
State state() const { return m_parserState; } State state() const { return m_parserState; }
void setEnabled(bool enabled) { m_enabled = enabled; }
bool enabled() const { return m_enabled; }
bool isParsing() const { return m_parserState == PartialParse || m_parserState == FullParse; } bool isParsing() const { return m_parserState == PartialParse || m_parserState == FullParse; }
void setDirty() { m_dirty = true; } void setDirty() { m_dirty = true; }
void syncTestFrameworks(const QVector<Core::Id> &frameworkIds); void syncTestFrameworks(const QVector<Core::Id> &frameworkIds);
@@ -95,6 +96,7 @@ private:
TestTreeModel *m_model; TestTreeModel *m_model;
bool m_enabled = false;
bool m_codeModelParsing = false; bool m_codeModelParsing = false;
bool m_fullUpdatePostponed = false; bool m_fullUpdatePostponed = false;
bool m_partialUpdatePostponed = false; bool m_partialUpdatePostponed = false;
@@ -102,7 +104,7 @@ private:
bool m_singleShotScheduled = false; bool m_singleShotScheduled = false;
bool m_reparseTimerTimedOut = false; bool m_reparseTimerTimedOut = false;
QSet<QString> m_postponedFiles; QSet<QString> m_postponedFiles;
State m_parserState = Disabled; State m_parserState = Idle;
QFutureWatcher<TestParseResultPtr> m_futureWatcher; QFutureWatcher<TestParseResultPtr> m_futureWatcher;
QVector<ITestParser *> m_testCodeParsers; // ptrs are still owned by TestFrameworkManager QVector<ITestParser *> m_testCodeParsers; // ptrs are still owned by TestFrameworkManager
QTimer m_reparseTimer; QTimer m_reparseTimer;

View File

@@ -115,7 +115,7 @@ TestNavigationWidget::~TestNavigationWidget()
void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event) void TestNavigationWidget::contextMenuEvent(QContextMenuEvent *event)
{ {
const bool enabled = !TestRunner::instance()->isTestRunning() const bool enabled = !TestRunner::instance()->isTestRunning()
&& m_model->parser()->state() == TestCodeParser::Idle; && m_model->parser()->enabled() && m_model->parser()->state() == TestCodeParser::Idle;
const bool hasTests = m_model->hasTests(); const bool hasTests = m_model->hasTests();
QMenu menu; QMenu menu;

View File

@@ -23,6 +23,7 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotesticons.h"
#include "testresultdelegate.h" #include "testresultdelegate.h"
#include "testresultmodel.h" #include "testresultmodel.h"
@@ -46,20 +47,20 @@ TestResultItem::~TestResultItem()
} }
static QIcon testResultIcon(Result::Type result) { static QIcon testResultIcon(Result::Type result) {
static QIcon icons[] = { const static QIcon icons[] = {
QIcon(QLatin1String(":/images/pass.png")), Icons::RESULT_PASS.icon(),
QIcon(QLatin1String(":/images/fail.png")), Icons::RESULT_FAIL.icon(),
QIcon(QLatin1String(":/images/xfail.png")), Icons::RESULT_XFAIL.icon(),
QIcon(QLatin1String(":/images/xpass.png")), Icons::RESULT_XPASS.icon(),
QIcon(QLatin1String(":/images/skip.png")), Icons::RESULT_SKIP.icon(),
QIcon(QLatin1String(":/images/blacklisted_pass.png")), Icons::RESULT_BLACKLISTEDPASS.icon(),
QIcon(QLatin1String(":/images/blacklisted_fail.png")), Icons::RESULT_BLACKLISTEDFAIL.icon(),
QIcon(QLatin1String(":/images/benchmark.png")), Icons::RESULT_BENCHMARK.icon(),
QIcon(QLatin1String(":/images/debug.png")), Icons::RESULT_MESSAGEDEBUG.icon(),
QIcon(QLatin1String(":/images/debug.png")), // Info get's the same handling as Debug for now Icons::RESULT_MESSAGEDEBUG.icon(), // Info gets the same handling as Debug for now
QIcon(QLatin1String(":/images/warn.png")), Icons::RESULT_MESSAGEWARN.icon(),
QIcon(QLatin1String(":/images/fatal.png")), Icons::RESULT_MESSAGEFATAL.icon(),
QIcon(QLatin1String(":/images/fatal.png")), // System get's same handling as Fatal for now Icons::RESULT_MESSAGEFATAL.icon(), // System gets same handling as Fatal for now
}; // provide an icon for unknown?? }; // provide an icon for unknown??
if (result < 0 || result >= Result::MessageInternal) { if (result < 0 || result >= Result::MessageInternal) {

View File

@@ -90,6 +90,7 @@ void TestTreeModel::setupParsingConnections()
if (!m_connectionsInitialized) if (!m_connectionsInitialized)
m_parser->setDirty(); m_parser->setDirty();
m_parser->setEnabled(true);
m_parser->setState(TestCodeParser::Idle); m_parser->setState(TestCodeParser::Idle);
if (m_connectionsInitialized) if (m_connectionsInitialized)
return; return;
@@ -117,13 +118,13 @@ void TestTreeModel::setupParsingConnections()
void TestTreeModel::disableParsing() void TestTreeModel::disableParsing()
{ {
if (!m_refCounter.deref() && !AutotestPlugin::instance()->settings()->alwaysParse) if (!m_refCounter.deref() && !AutotestPlugin::instance()->settings()->alwaysParse)
m_parser->setState(TestCodeParser::Disabled); m_parser->setEnabled(false);
} }
void TestTreeModel::disableParsingFromSettings() void TestTreeModel::disableParsingFromSettings()
{ {
if (!m_refCounter.load()) if (!m_refCounter.load())
m_parser->setState(TestCodeParser::Disabled); m_parser->setEnabled(false);
} }
bool TestTreeModel::setData(const QModelIndex &index, const QVariant &value, int role) bool TestTreeModel::setData(const QModelIndex &index, const QVariant &value, int role)

View File

@@ -401,9 +401,30 @@ static QStringList warningOptions(CppTools::ProjectPart *projectPart)
return CppTools::codeModelSettings()->clangDiagnosticConfig().commandLineOptions(); return CppTools::codeModelSettings()->clangDiagnosticConfig().commandLineOptions();
} }
static QStringList precompiledHeaderOptions(
const QString& filePath,
CppTools::ProjectPart *projectPart)
{
using namespace CppTools;
if (CppTools::getPchUsage() == CompilerOptionsBuilder::PchUsage::None)
return QStringList();
if (projectPart->precompiledHeaders.contains(filePath))
return QStringList();
const CppTools::ProjectPart theProjectPart = projectPartForLanguageOption(projectPart);
CppTools::CompilerOptionsBuilder builder(theProjectPart);
builder.addPrecompiledHeaderOptions(CompilerOptionsBuilder::PchUsage::Use);
return builder.options();
}
static QStringList fileArguments(const QString &filePath, CppTools::ProjectPart *projectPart) static QStringList fileArguments(const QString &filePath, CppTools::ProjectPart *projectPart)
{ {
return languageOptions(filePath, projectPart) + warningOptions(projectPart); return languageOptions(filePath, projectPart)
+ warningOptions(projectPart)
+ precompiledHeaderOptions(filePath, projectPart);
} }
ClangBackEnd::FileContainer ClangBackEnd::FileContainer

View File

@@ -192,27 +192,6 @@ QStringList createClangOptions(const ProjectPart::Ptr &pPart, ProjectFile::Kind
return LibClangOptionsBuilder::build(pPart, fileKind); return LibClangOptionsBuilder::build(pPart, fileKind);
} }
/// @return Option to speed up parsing with precompiled header
QStringList createPCHInclusionOptions(const QStringList &pchFiles)
{
QStringList opts;
foreach (const QString &pchFile, pchFiles) {
if (QFile(pchFile).exists()) {
opts += QLatin1String("-include-pch");
opts += pchFile;
}
}
return opts;
}
/// @return Option to speed up parsing with precompiled header
QStringList createPCHInclusionOptions(const QString &pchFile)
{
return createPCHInclusionOptions(QStringList() << pchFile);
}
ProjectPart::Ptr projectPartForFile(const QString &filePath) ProjectPart::Ptr projectPartForFile(const QString &filePath)
{ {
if (const auto parser = CppTools::BaseEditorDocumentParser::get(filePath)) if (const auto parser = CppTools::BaseEditorDocumentParser::get(filePath))

View File

@@ -34,7 +34,6 @@ QStringList createClangOptions(const CppTools::ProjectPart::Ptr &pPart,
CppTools::ProjectFile::Kind fileKind); CppTools::ProjectFile::Kind fileKind);
QStringList createClangOptions(const CppTools::ProjectPart::Ptr &pPart, QStringList createClangOptions(const CppTools::ProjectPart::Ptr &pPart,
const QString &fileName = QString()); const QString &fileName = QString());
QStringList createPCHInclusionOptions(const QString &pchFile);
CppTools::ProjectPart::Ptr projectPartForFile(const QString &filePath); CppTools::ProjectPart::Ptr projectPartForFile(const QString &filePath);
CppTools::ProjectPart::Ptr projectPartForFileBasedOnProcessor(const QString &filePath); CppTools::ProjectPart::Ptr projectPartForFileBasedOnProcessor(const QString &filePath);

View File

@@ -117,7 +117,8 @@ void RefactoringCompilerOptionsBuilder::addExtraOptions()
} }
Utils::SmallStringVector RefactoringCompilerOptionsBuilder::build(CppTools::ProjectPart *projectPart, Utils::SmallStringVector RefactoringCompilerOptionsBuilder::build(CppTools::ProjectPart *projectPart,
CppTools::ProjectFile::Kind fileKind) CppTools::ProjectFile::Kind fileKind,
PchUsage pchUsage)
{ {
if (projectPart == nullptr) if (projectPart == nullptr)
return Utils::SmallStringVector(); return Utils::SmallStringVector();
@@ -138,6 +139,7 @@ Utils::SmallStringVector RefactoringCompilerOptionsBuilder::build(CppTools::Proj
optionsBuilder.addPredefinedMacrosAndHeaderPathsOptions(); optionsBuilder.addPredefinedMacrosAndHeaderPathsOptions();
optionsBuilder.addWrappedQtHeadersIncludePath(); optionsBuilder.addWrappedQtHeadersIncludePath();
optionsBuilder.addHeaderPathOptions(); optionsBuilder.addHeaderPathOptions();
optionsBuilder.addPrecompiledHeaderOptions(pchUsage);
optionsBuilder.addProjectConfigFileInclude(); optionsBuilder.addProjectConfigFileInclude();
optionsBuilder.addMsvcCompatibilityVersion(); optionsBuilder.addMsvcCompatibilityVersion();

View File

@@ -41,7 +41,8 @@ class RefactoringCompilerOptionsBuilder : public CppTools::CompilerOptionsBuilde
{ {
public: public:
static Utils::SmallStringVector build(CppTools::ProjectPart *projectPart, static Utils::SmallStringVector build(CppTools::ProjectPart *projectPart,
CppTools::ProjectFile::Kind fileKind); CppTools::ProjectFile::Kind fileKind,
PchUsage pchUsage);
private: private:
RefactoringCompilerOptionsBuilder(CppTools::ProjectPart *projectPart); RefactoringCompilerOptionsBuilder(CppTools::ProjectPart *projectPart);

View File

@@ -32,6 +32,8 @@
#include <refactoringserverinterface.h> #include <refactoringserverinterface.h>
#include <requestsourcelocationforrenamingmessage.h> #include <requestsourcelocationforrenamingmessage.h>
#include <cpptools/cpptoolsreuse.h>
#include <QTextCursor> #include <QTextCursor>
#include <QTextDocument> #include <QTextDocument>
@@ -59,7 +61,8 @@ void RefactoringEngine::startLocalRenaming(const QTextCursor &textCursor,
client.setLocalRenamingCallback(std::move(renameSymbolsCallback)); client.setLocalRenamingCallback(std::move(renameSymbolsCallback));
auto commandLine = RefactoringCompilerOptionsBuilder::build(projectPart, auto commandLine = RefactoringCompilerOptionsBuilder::build(projectPart,
fileKindInProjectPart(projectPart, filePath.toString())); fileKindInProjectPart(projectPart, filePath.toString()),
CppTools::getPchUsage());
commandLine.push_back(filePath.toString()); commandLine.push_back(filePath.toString());

View File

@@ -40,6 +40,7 @@
#include <cpptools/compileroptionsbuilder.h> #include <cpptools/compileroptionsbuilder.h>
#include <cpptools/cppmodelmanager.h> #include <cpptools/cppmodelmanager.h>
#include <cpptools/cppprojectfile.h> #include <cpptools/cppprojectfile.h>
#include <cpptools/cpptoolsreuse.h>
#include <cpptools/projectinfo.h> #include <cpptools/projectinfo.h>
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
@@ -165,7 +166,8 @@ class ClangStaticAnalyzerOptionsBuilder : public CompilerOptionsBuilder
{ {
public: public:
static QStringList build(const CppTools::ProjectPart &projectPart, static QStringList build(const CppTools::ProjectPart &projectPart,
CppTools::ProjectFile::Kind fileKind) CppTools::ProjectFile::Kind fileKind,
PchUsage pchUsage)
{ {
ClangStaticAnalyzerOptionsBuilder optionsBuilder(projectPart); ClangStaticAnalyzerOptionsBuilder optionsBuilder(projectPart);
@@ -184,6 +186,7 @@ public:
optionsBuilder.undefineClangVersionMacrosForMsvc(); optionsBuilder.undefineClangVersionMacrosForMsvc();
optionsBuilder.undefineCppLanguageFeatureMacrosForMsvc2015(); optionsBuilder.undefineCppLanguageFeatureMacrosForMsvc2015();
optionsBuilder.addHeaderPathOptions(); optionsBuilder.addHeaderPathOptions();
optionsBuilder.addPrecompiledHeaderOptions(pchUsage);
optionsBuilder.addMsvcCompatibilityVersion(); optionsBuilder.addMsvcCompatibilityVersion();
if (type != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) if (type != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID)
@@ -243,10 +246,17 @@ private:
QString includeOption() const override QString includeOption() const override
{ {
if (m_isMsvcToolchain) if (m_isMsvcToolchain)
return QLatin1String("/I"); return QLatin1String("/FI");
return CompilerOptionsBuilder::includeOption(); return CompilerOptionsBuilder::includeOption();
} }
QString includeDirOption() const override
{
if (m_isMsvcToolchain)
return QLatin1String("/I");
return CompilerOptionsBuilder::includeDirOption();
}
QString defineOption() const override QString defineOption() const override
{ {
if (m_isMsvcToolchain) if (m_isMsvcToolchain)
@@ -376,8 +386,9 @@ static AnalyzeUnits unitsToAnalyzeFromProjectParts(const QList<ProjectPart::Ptr>
continue; continue;
QTC_CHECK(file.kind != ProjectFile::Unclassified); QTC_CHECK(file.kind != ProjectFile::Unclassified);
if (ProjectFile::isSource(file.kind)) { if (ProjectFile::isSource(file.kind)) {
const CompilerOptionsBuilder::PchUsage pchUsage = CppTools::getPchUsage();
const QStringList arguments const QStringList arguments
= ClangStaticAnalyzerOptionsBuilder::build(*projectPart.data(), file.kind); = ClangStaticAnalyzerOptionsBuilder::build(*projectPart.data(), file.kind, pchUsage);
unitsToAnalyze << AnalyzeUnit(file.path, arguments); unitsToAnalyze << AnalyzeUnit(file.path, arguments);
} }
} }

View File

@@ -58,12 +58,12 @@ public:
bool isSupportedVersion() const bool isSupportedVersion() const
{ {
return majorNumber == 3 && minorNumber == 8; return majorNumber == 3 && minorNumber == 9;
} }
static QString supportedVersionAsString() static QString supportedVersionAsString()
{ {
return QLatin1String("3.8"); return QLatin1String("3.9");
} }
QString toString() const QString toString() const

View File

@@ -163,6 +163,8 @@ ActionManager::ActionManager(QObject *parent)
{ {
m_instance = this; m_instance = this;
d = new ActionManagerPrivate; d = new ActionManagerPrivate;
if (Utils::HostOsInfo::isMacHost())
QCoreApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
} }
/*! /*!

View File

@@ -306,8 +306,6 @@ static QString msgActionWarning(QAction *newAction, Id id, QAction *oldAction)
void Action::addOverrideAction(QAction *action, const Context &context, bool scriptable) void Action::addOverrideAction(QAction *action, const Context &context, bool scriptable)
{ {
if (Utils::HostOsInfo::isMacHost())
action->setIconVisibleInMenu(false);
// disallow TextHeuristic menu role, because it doesn't work with translations, // disallow TextHeuristic menu role, because it doesn't work with translations,
// e.g. QTCREATORBUG-13101 // e.g. QTCREATORBUG-13101
if (action->menuRole() == QAction::TextHeuristicRole) if (action->menuRole() == QAction::TextHeuristicRole)

View File

@@ -159,12 +159,6 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_forwardButton->setDefaultAction(d->m_goForwardAction); d->m_forwardButton->setDefaultAction(d->m_goForwardAction);
if (Utils::HostOsInfo::isMacHost()) {
d->m_horizontalSplitAction->setIconVisibleInMenu(false);
d->m_verticalSplitAction->setIconVisibleInMenu(false);
d->m_splitNewWindowAction->setIconVisibleInMenu(false);
}
d->m_splitButton->setIcon(Utils::Icons::SPLIT_HORIZONTAL_TOOLBAR.icon()); d->m_splitButton->setIcon(Utils::Icons::SPLIT_HORIZONTAL_TOOLBAR.icon());
d->m_splitButton->setToolTip(tr("Split")); d->m_splitButton->setToolTip(tr("Split"));
d->m_splitButton->setPopupMode(QToolButton::InstantPopup); d->m_splitButton->setPopupMode(QToolButton::InstantPopup);

View File

@@ -4817,7 +4817,7 @@ void MoveFuncDefOutside::match(const CppQuickFixInterface &interface, QuickFixOp
} }
} }
if (!funcAST) if (!funcAST || !funcAST->symbol)
return; return;
bool isHeaderFile = false; bool isHeaderFile = false;

View File

@@ -112,7 +112,7 @@ void CompilerOptionsBuilder::enableExceptions()
void CompilerOptionsBuilder::addHeaderPathOptions() void CompilerOptionsBuilder::addHeaderPathOptions()
{ {
typedef ProjectPartHeaderPath HeaderPath; typedef ProjectPartHeaderPath HeaderPath;
const QString defaultPrefix = includeOption(); const QString defaultPrefix = includeDirOption();
QStringList result; QStringList result;
@@ -141,6 +141,24 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
m_options.append(result); m_options.append(result);
} }
void CompilerOptionsBuilder::addPrecompiledHeaderOptions(PchUsage pchUsage)
{
if (pchUsage == PchUsage::None)
return;
QStringList result;
const QString includeOptionString = includeOption();
foreach (const QString &pchFile, m_projectPart.precompiledHeaders) {
if (QFile::exists(pchFile)) {
result += includeOptionString;
result += QDir::toNativeSeparators(pchFile);
}
}
m_options.append(result);
}
void CompilerOptionsBuilder::addToolchainAndProjectDefines() void CompilerOptionsBuilder::addToolchainAndProjectDefines()
{ {
addDefines(m_projectPart.toolchainDefines); addDefines(m_projectPart.toolchainDefines);
@@ -376,7 +394,7 @@ void CompilerOptionsBuilder::addDefineFloat128ForMingw()
addDefine("#define __float128 void"); addDefine("#define __float128 void");
} }
QString CompilerOptionsBuilder::includeOption() const QString CompilerOptionsBuilder::includeDirOption() const
{ {
return QLatin1String("-I"); return QLatin1String("-I");
} }
@@ -399,6 +417,11 @@ QString CompilerOptionsBuilder::undefineOption() const
return QLatin1String("-U"); return QLatin1String("-U");
} }
QString CompilerOptionsBuilder::includeOption() const
{
return QLatin1String("-include");
}
static bool isGccOrMinGwToolchain(const Core::Id &toolchainType) static bool isGccOrMinGwToolchain(const Core::Id &toolchainType)
{ {
return toolchainType == ProjectExplorer::Constants::GCC_TOOLCHAIN_TYPEID return toolchainType == ProjectExplorer::Constants::GCC_TOOLCHAIN_TYPEID

View File

@@ -34,6 +34,11 @@ namespace CppTools {
class CPPTOOLS_EXPORT CompilerOptionsBuilder class CPPTOOLS_EXPORT CompilerOptionsBuilder
{ {
public: public:
enum class PchUsage {
None,
Use
};
CompilerOptionsBuilder(const ProjectPart &projectPart); CompilerOptionsBuilder(const ProjectPart &projectPart);
virtual ~CompilerOptionsBuilder() {} virtual ~CompilerOptionsBuilder() {}
@@ -48,6 +53,7 @@ public:
virtual void addTargetTriple(); virtual void addTargetTriple();
virtual void enableExceptions(); virtual void enableExceptions();
void addHeaderPathOptions(); void addHeaderPathOptions();
void addPrecompiledHeaderOptions(PchUsage pchUsage);
void addToolchainAndProjectDefines(); void addToolchainAndProjectDefines();
void addDefines(const QByteArray &defineDirectives); void addDefines(const QByteArray &defineDirectives);
virtual void addLanguageOption(ProjectFile::Kind fileKind); virtual void addLanguageOption(ProjectFile::Kind fileKind);
@@ -67,6 +73,7 @@ protected:
virtual QString defineOption() const; virtual QString defineOption() const;
virtual QString undefineOption() const; virtual QString undefineOption() const;
virtual QString includeOption() const; virtual QString includeOption() const;
virtual QString includeDirOption() const;
const ProjectPart m_projectPart; const ProjectPart m_projectPart;

View File

@@ -346,9 +346,9 @@ void CheckSymbols::run()
_usages << QVector<Result>::fromList(_macroUses); _usages << QVector<Result>::fromList(_macroUses);
flush(); flush();
} }
}
emit codeWarningsUpdated(_doc, _diagMsgs); emit codeWarningsUpdated(_doc, _diagMsgs);
}
reportFinished(); reportFinished();
} }

View File

@@ -288,4 +288,12 @@ bool fileSizeExceedsLimit(const QFileInfo &fileInfo, int sizeLimitInMb)
return false; return false;
} }
CompilerOptionsBuilder::PchUsage getPchUsage()
{
const QSharedPointer<CppCodeModelSettings> cms = codeModelSettings();
if (cms->pchUsage() == CppCodeModelSettings::PchUse_None)
return CompilerOptionsBuilder::PchUsage::None;
return CompilerOptionsBuilder::PchUsage::Use;
}
} // CppTools } // CppTools

View File

@@ -29,6 +29,8 @@
#include <texteditor/texteditor.h> #include <texteditor/texteditor.h>
#include <cpptools/compileroptionsbuilder.h>
#include <cplusplus/CppDocument.h> #include <cplusplus/CppDocument.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@@ -72,6 +74,8 @@ void CPPTOOLS_EXPORT switchHeaderSource();
class CppCodeModelSettings; class CppCodeModelSettings;
QSharedPointer<CppCodeModelSettings> CPPTOOLS_EXPORT codeModelSettings(); QSharedPointer<CppCodeModelSettings> CPPTOOLS_EXPORT codeModelSettings();
CompilerOptionsBuilder::PchUsage CPPTOOLS_EXPORT getPchUsage();
int indexerFileSizeLimitInMb(); int indexerFileSizeLimitInMb();
bool fileSizeExceedsLimit(const QFileInfo &fileInfo, int sizeLimitInMb); bool fileSizeExceedsLimit(const QFileInfo &fileInfo, int sizeLimitInMb);

View File

@@ -107,7 +107,7 @@ DebuggerKitChooser::DebuggerKitChooser(Mode mode, QWidget *parent)
{ {
setKitMatcher([this](const Kit *k) { setKitMatcher([this](const Kit *k) {
// Match valid debuggers and restrict local debugging to compatible toolchains. // Match valid debuggers and restrict local debugging to compatible toolchains.
if (!DebuggerKitInformation::isValidDebugger(k)) if (DebuggerKitInformation::configurationErrors(k))
return false; return false;
if (m_mode == LocalDebugging) if (m_mode == LocalDebugging)
return ToolChainKitInformation::targetAbi(k).os() == m_hostAbi.os(); return ToolChainKitInformation::targetAbi(k).os() == m_hostAbi.os();
@@ -223,7 +223,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->kitChooser = new KitChooser(this); d->kitChooser = new KitChooser(this);
d->kitChooser->setKitMatcher([this](const Kit *k) { d->kitChooser->setKitMatcher([this](const Kit *k) {
return DebuggerKitInformation::isValidDebugger(k); return !DebuggerKitInformation::configurationErrors(k);
}); });
d->kitChooser->populate(); d->kitChooser->populate();

View File

@@ -191,15 +191,7 @@ void DebuggerKitInformation::fix(Kit *k)
// Check the configuration errors and return a flag mask. Provide a quick check and // Check the configuration errors and return a flag mask. Provide a quick check and
// a verbose one with a list of errors. // a verbose one with a list of errors.
enum DebuggerConfigurationErrors { DebuggerKitInformation::ConfigurationErrors DebuggerKitInformation::configurationErrors(const Kit *k)
NoDebugger = 0x1,
DebuggerNotFound = 0x2,
DebuggerNotExecutable = 0x4,
DebuggerNeedsAbsolutePath = 0x8,
DebuggerDoesNotMatch = 0x10
};
static unsigned debuggerConfigurationErrors(const Kit *k)
{ {
QTC_ASSERT(k, return NoDebugger); QTC_ASSERT(k, return NoDebugger);
@@ -210,7 +202,7 @@ static unsigned debuggerConfigurationErrors(const Kit *k)
if (item->command().isEmpty()) if (item->command().isEmpty())
return NoDebugger; return NoDebugger;
unsigned result = 0; ConfigurationErrors result = NoConfigurationError;
const QFileInfo fi = item->command().toFileInfo(); const QFileInfo fi = item->command().toFileInfo();
if (!fi.exists() || fi.isDir()) if (!fi.exists() || fi.isDir())
result |= DebuggerNotFound; result |= DebuggerNotFound;
@@ -257,17 +249,12 @@ StandardRunnable DebuggerKitInformation::runnable(const Kit *kit)
return runnable; return runnable;
} }
bool DebuggerKitInformation::isValidDebugger(const Kit *k)
{
return debuggerConfigurationErrors(k) == 0;
}
QList<Task> DebuggerKitInformation::validateDebugger(const Kit *k) QList<Task> DebuggerKitInformation::validateDebugger(const Kit *k)
{ {
QList<Task> result; QList<Task> result;
const unsigned errors = debuggerConfigurationErrors(k); const ConfigurationErrors errors = configurationErrors(k);
if (!errors) if (errors == NoConfigurationError)
return result; return result;
QString path; QString path;

View File

@@ -52,8 +52,19 @@ public:
static const DebuggerItem *debugger(const ProjectExplorer::Kit *kit); static const DebuggerItem *debugger(const ProjectExplorer::Kit *kit);
static ProjectExplorer::StandardRunnable runnable(const ProjectExplorer::Kit *kit); static ProjectExplorer::StandardRunnable runnable(const ProjectExplorer::Kit *kit);
enum ConfigurationError
{
NoConfigurationError = 0x0,
NoDebugger = 0x1,
DebuggerNotFound = 0x2,
DebuggerNotExecutable = 0x4,
DebuggerNeedsAbsolutePath = 0x8,
DebuggerDoesNotMatch = 0x10
};
Q_DECLARE_FLAGS(ConfigurationErrors, ConfigurationError)
static QList<ProjectExplorer::Task> validateDebugger(const ProjectExplorer::Kit *k); static QList<ProjectExplorer::Task> validateDebugger(const ProjectExplorer::Kit *k);
static bool isValidDebugger(const ProjectExplorer::Kit *k); static ConfigurationErrors configurationErrors(const ProjectExplorer::Kit *k);
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override; ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
void addToMacroExpander(ProjectExplorer::Kit *kit, Utils::MacroExpander *expander) const override; void addToMacroExpander(ProjectExplorer::Kit *kit, Utils::MacroExpander *expander) const override;

View File

@@ -583,7 +583,7 @@ static std::function<bool(const Kit *)> cdbMatcher(char wordWidth = 0)
{ {
return [wordWidth](const Kit *k) -> bool { return [wordWidth](const Kit *k) -> bool {
if (DebuggerKitInformation::engineType(k) != CdbEngineType if (DebuggerKitInformation::engineType(k) != CdbEngineType
|| !DebuggerKitInformation::isValidDebugger(k)) { || DebuggerKitInformation::configurationErrors(k)) {
return false; return false;
} }
if (wordWidth) if (wordWidth)
@@ -1125,13 +1125,13 @@ static Kit *guessKitFromParameters(const DebuggerRunParameters &rp)
// Try exact abis. // Try exact abis.
kit = KitManager::find(KitMatcher([abis](const Kit *k) -> bool { kit = KitManager::find(KitMatcher([abis](const Kit *k) -> bool {
const Abi tcAbi = ToolChainKitInformation::targetAbi(k); const Abi tcAbi = ToolChainKitInformation::targetAbi(k);
return abis.contains(tcAbi) && DebuggerKitInformation::isValidDebugger(k); return abis.contains(tcAbi) && !DebuggerKitInformation::configurationErrors(k);
})); }));
if (!kit) { if (!kit) {
// Or something compatible. // Or something compatible.
kit = KitManager::find(KitMatcher([abis](const Kit *k) -> bool { kit = KitManager::find(KitMatcher([abis](const Kit *k) -> bool {
const Abi tcAbi = ToolChainKitInformation::targetAbi(k); const Abi tcAbi = ToolChainKitInformation::targetAbi(k);
return DebuggerKitInformation::isValidDebugger(k) return !DebuggerKitInformation::configurationErrors(k)
&& Utils::contains(abis, [tcAbi](const Abi &a) { return a.isCompatibleWith(tcAbi); }); && Utils::contains(abis, [tcAbi](const Abi &a) { return a.isCompatibleWith(tcAbi); });
})); }));
} }

View File

@@ -692,13 +692,6 @@ bool DebuggerToolTipContext::isSame(const DebuggerToolTipContext &other) const
&& filesMatch(fileName, other.fileName); && filesMatch(fileName, other.fileName);
} }
void DebuggerToolTipContext::appendFormatRequest(DebuggerCommand *cmd) const
{
cmd->arg("expression", expression);
cmd->arg("fileName", fileName);
cmd->arg("iname", iname);
}
QString DebuggerToolTipContext::toolTip() const QString DebuggerToolTipContext::toolTip() const
{ {
return DebuggerToolTipManager::tr("Expression %1 in function %2 from line %3 to %4") return DebuggerToolTipManager::tr("Expression %1 in function %2 from line %3 to %4")

View File

@@ -49,7 +49,6 @@ public:
bool isValid() const { return !expression.isEmpty(); } bool isValid() const { return !expression.isEmpty(); }
bool matchesFrame(const StackFrame &frame) const; bool matchesFrame(const StackFrame &frame) const;
bool isSame(const DebuggerToolTipContext &other) const; bool isSame(const DebuggerToolTipContext &other) const;
void appendFormatRequest(DebuggerCommand *cmd) const;
QString toolTip() const; QString toolTip() const;
QString fileName; QString fileName;

View File

@@ -1687,9 +1687,6 @@ void GdbEngine::handleShowVersion(const DebuggerResponse &response)
else else
runCommand({"set target-async off", ConsoleCommand}); runCommand({"set target-async off", ConsoleCommand});
if (runParameters().multiProcess)
runCommand({"set detach-on-fork off", ConsoleCommand});
//runCommand("set build-id-verbose 2", ConsoleCommand); //runCommand("set build-id-verbose 2", ConsoleCommand);
} }
} }
@@ -4047,7 +4044,7 @@ void GdbEngine::startGdb(const QStringList &args)
runCommand({"set auto-solib-add on", ConsoleCommand}); runCommand({"set auto-solib-add on", ConsoleCommand});
} }
if (boolSetting(MultiInferior)) { if (boolSetting(MultiInferior) || runParameters().multiProcess) {
//runCommand("set follow-exec-mode new"); //runCommand("set follow-exec-mode new");
runCommand({"set detach-on-fork off"}); runCommand({"set detach-on-fork off"});
} }

View File

@@ -39,7 +39,7 @@ class Project;
class Target; class Target;
// Documentation inside. // Documentation inside.
class PROJECTEXPLORER_EXPORT ProjectImporter class PROJECTEXPLORER_EXPORT ProjectImporter : public QObject
{ {
public: public:
ProjectImporter(const Utils::FileName &path); ProjectImporter(const Utils::FileName &path);

View File

@@ -518,6 +518,9 @@ public:
ProjectWindow::ProjectWindow() ProjectWindow::ProjectWindow()
{ {
setBackgroundRole(QPalette::Base); setBackgroundRole(QPalette::Base);
// Request custom context menu but do not provide any to avoid
// the creation of the dock window selection menu.
setContextMenuPolicy(Qt::CustomContextMenu); setContextMenuPolicy(Qt::CustomContextMenu);
auto selectorModel = new SelectorModel(this, [this](QWidget *panel) { setPanel(panel); }); auto selectorModel = new SelectorModel(this, [this](QWidget *panel) { setPanel(panel); });
@@ -553,15 +556,6 @@ ProjectWindow::ProjectWindow()
auto selectorDock = addDockForWidget(selectorView, true); auto selectorDock = addDockForWidget(selectorView, true);
addDockWidget(Qt::LeftDockWidgetArea, selectorDock); addDockWidget(Qt::LeftDockWidgetArea, selectorDock);
connect(this, &QWidget::customContextMenuRequested,
selectorModel, &SelectorModel::openContextMenu);
}
void ProjectWindow::contextMenuEvent(QContextMenuEvent *event)
{
Q_UNUSED(event)
// Do nothing to avoid creation of the dock window selection menu.
} }
void ProjectWindow::setPanel(QWidget *panel) void ProjectWindow::setPanel(QWidget *panel)

View File

@@ -56,7 +56,6 @@ public:
ProjectWindow(); ProjectWindow();
private: private:
void contextMenuEvent(QContextMenuEvent *event) override;
void setPanel(QWidget *panel); void setPanel(QWidget *panel);
}; };

View File

@@ -32,6 +32,7 @@
#include <utils/wizardpage.h> #include <utils/wizardpage.h>
#include <QPointer>
#include <QString> #include <QString>
#include <QMap> #include <QMap>
@@ -109,7 +110,7 @@ private:
KitMatcher m_requiredMatcher; KitMatcher m_requiredMatcher;
KitMatcher m_preferredMatcher; KitMatcher m_preferredMatcher;
ProjectImporter *m_importer = nullptr; QPointer<ProjectImporter> m_importer = nullptr;
QLayout *m_baseLayout = nullptr; QLayout *m_baseLayout = nullptr;
QString m_projectPath; QString m_projectPath;
QString m_defaultShadowBuildLocation; QString m_defaultShadowBuildLocation;

View File

@@ -666,20 +666,24 @@ static bool isInLayoutable(NodeAbstractProperty &parentProperty)
static void reparentModelNodeToNodeProperty(NodeAbstractProperty &parentProperty, const ModelNode &modelNode) static void reparentModelNodeToNodeProperty(NodeAbstractProperty &parentProperty, const ModelNode &modelNode)
{ {
if (!modelNode.hasParentProperty() || parentProperty != modelNode.parentProperty()) { try {
if (isInLayoutable(parentProperty)) { if (!modelNode.hasParentProperty() || parentProperty != modelNode.parentProperty()) {
removePosition(modelNode); if (isInLayoutable(parentProperty)) {
parentProperty.reparentHere(modelNode); removePosition(modelNode);
} else {
if (QmlItemNode::isValidQmlItemNode(modelNode)) {
QPointF scenePosition = QmlItemNode(modelNode).instanceScenePosition();
parentProperty.reparentHere(modelNode); parentProperty.reparentHere(modelNode);
if (!scenePosition.isNull())
setScenePosition(modelNode, scenePosition);
} else { } else {
parentProperty.reparentHere(modelNode); if (QmlItemNode::isValidQmlItemNode(modelNode)) {
QPointF scenePosition = QmlItemNode(modelNode).instanceScenePosition();
parentProperty.reparentHere(modelNode);
if (!scenePosition.isNull())
setScenePosition(modelNode, scenePosition);
} else {
parentProperty.reparentHere(modelNode);
}
} }
} }
} catch (const RewritingException &exception) { //better safe than sorry! There always might be cases where we fail
exception.showException();
} }
} }

View File

@@ -52,6 +52,7 @@
#include <QDir> #include <QDir>
#include <QQmlPropertyMap> #include <QQmlPropertyMap>
#include <QQuickImageProvider> #include <QQuickImageProvider>
#include <QTimer>
#include <QtQuickWidgets/QQuickWidget> #include <QtQuickWidgets/QQuickWidget>
#include <QtQml/QQmlContext> #include <QtQml/QQmlContext>
@@ -135,6 +136,8 @@ public:
QStringList recentProjectsShortcuts() const { return m_recentProjectsShortcuts; } QStringList recentProjectsShortcuts() const { return m_recentProjectsShortcuts; }
QStringList sessionsShortcuts() const { return m_sessionsShortcuts; } QStringList sessionsShortcuts() const { return m_sessionsShortcuts; }
Q_INVOKABLE bool openDroppedFiles(const QList<QUrl> &urls);
public slots: public slots:
void setActivePlugin(int pos) void setActivePlugin(int pos)
{ {
@@ -307,6 +310,18 @@ void WelcomeMode::initPlugins()
m_welcomePage->setSource(QUrl::fromLocalFile(path)); m_welcomePage->setSource(QUrl::fromLocalFile(path));
} }
bool WelcomeMode::openDroppedFiles(const QList<QUrl> &urls)
{
const QList<QUrl> localUrls = Utils::filtered(urls, &QUrl::isLocalFile);
if (!localUrls.isEmpty()) {
QTimer::singleShot(0, [localUrls]() {
ICore::openFiles(Utils::transform(localUrls, &QUrl::toLocalFile), ICore::SwitchMode);
});
return true;
}
return false;
}
void WelcomeMode::welcomePluginAdded(QObject *obj) void WelcomeMode::welcomePluginAdded(QObject *obj)
{ {
IWelcomePage *page = qobject_cast<IWelcomePage*>(obj); IWelcomePage *page = qobject_cast<IWelcomePage*>(obj);

View File

@@ -2,7 +2,6 @@
\"Name\" : \"WinRt\", \"Name\" : \"WinRt\",
\"Version\" : \"$$QTCREATOR_VERSION\", \"Version\" : \"$$QTCREATOR_VERSION\",
\"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\", \"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
\"Experimental\" : true,
\"Platform\" : \"Windows (8.1|10)\", \"Platform\" : \"Windows (8.1|10)\",
\"Vendor\" : \"The Qt Company Ltd\", \"Vendor\" : \"The Qt Company Ltd\",
\"Copyright\" : \"(C) 2016 The Qt Company Ltd\", \"Copyright\" : \"(C) 2016 The Qt Company Ltd\",

View File

@@ -97,8 +97,8 @@ LIBTOOLING_LIBS += $$CLANGTOOLING_LIBS $$LLVM_STATIC_LIBS
contains(QMAKE_DEFAULT_INCDIRS, $$LLVM_INCLUDEPATH): LLVM_INCLUDEPATH = contains(QMAKE_DEFAULT_INCDIRS, $$LLVM_INCLUDEPATH): LLVM_INCLUDEPATH =
isEmpty(LLVM_VERSION): error("Cannot determine clang version at $$LLVM_INSTALL_DIR") isEmpty(LLVM_VERSION): error("Cannot determine clang version at $$LLVM_INSTALL_DIR")
!versionIsAtLeast($$LLVM_VERSION, 3, 8, 0): { !versionIsAtLeast($$LLVM_VERSION, 3, 9, 0): {
error("LLVM/Clang version >= 3.8.0 required, version provided: $$LLVM_VERSION") error("LLVM/Clang version >= 3.9.0 required, version provided: $$LLVM_VERSION")
} }
unix:LLVM_CXXFLAGS = -fno-rtti -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS unix:LLVM_CXXFLAGS = -fno-rtti -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

View File

@@ -35,7 +35,7 @@ namespace ClangBackEnd {
using USRName = llvm::SmallVector<char, 128>; using USRName = llvm::SmallVector<char, 128>;
// use std::filesystem::path if it is supported by all compilers // use std::filesystem::path if it is supported by all compilers
#ifdef WIN32 #ifdef _WIN32
const char nativeSeperator = '\\'; const char nativeSeperator = '\\';
#else #else
const char nativeSeperator = '/'; const char nativeSeperator = '/';

View File

@@ -33,7 +33,7 @@ namespace {
std::string toNativePath(std::string &&path) std::string toNativePath(std::string &&path)
{ {
#ifdef WIN32 #ifdef _WIN32
std::replace(path.begin(), path.end(), '/', '\\'); std::replace(path.begin(), path.end(), '/', '\\');
#endif #endif

View File

@@ -61,7 +61,7 @@ Utils::SmallString fromNativePath(Container container)
{ {
Utils::SmallString path(container.data(), container.size()); Utils::SmallString path(container.data(), container.size());
#ifdef WIN32 #ifdef _WIN32
std::replace(path.begin(), path.end(), '\\', '/'); std::replace(path.begin(), path.end(), '\\', '/');
#endif #endif

View File

@@ -587,6 +587,7 @@ struct Profile
{ {
Profile(const QByteArray &contents) : contents(contents) {} Profile(const QByteArray &contents) : contents(contents) {}
QByteArray includes;
QByteArray contents; QByteArray contents;
}; };
@@ -609,6 +610,7 @@ struct BoostProfile : public Profile
contents = QByteArray("INCLUDEPATH += ") + boostIncPath.constData(); contents = QByteArray("INCLUDEPATH += ") + boostIncPath.constData();
else else
contents = "macx:INCLUDEPATH += /usr/local/include"; contents = "macx:INCLUDEPATH += /usr/local/include";
includes = "#include <boost/version.hpp>\n";
} }
}; };
@@ -668,6 +670,7 @@ public:
const Data &operator+(const Profile &profile) const const Data &operator+(const Profile &profile) const
{ {
profileExtra += profile.contents; profileExtra += profile.contents;
includes += profile.includes;
return *this; return *this;
} }
@@ -2752,6 +2755,7 @@ void tst_Dumpers::dumper_data()
"int pos1 = re.indexIn(str1); unused(&pos1);\n" "int pos1 = re.indexIn(str1); unused(&pos1);\n"
"int pos2 = re.indexIn(str2); unused(&pos2);\n") "int pos2 = re.indexIn(str2); unused(&pos2);\n")
+ CoreProfile() + CoreProfile()
+ UseDebugImage()
+ Check("re", "\"a(.*)b(.*)c\"", "@QRegExp") + Check("re", "\"a(.*)b(.*)c\"", "@QRegExp")
+ Check("re.captures.0", "[0]", "\"a1121b344c\"", "@QString") + Check("re.captures.0", "[0]", "\"a1121b344c\"", "@QString")
+ Check("re.captures.1", "[1]", "\"1121\"", "@QString") + Check("re.captures.1", "[1]", "\"1121\"", "@QString")
@@ -2931,6 +2935,31 @@ void tst_Dumpers::dumper_data()
" QSharedDataPointer<EmployeeData> d;\n" " QSharedDataPointer<EmployeeData> d;\n"
" };\n"; " };\n";
QTest::newRow("QAtomicPointer")
<< Data("#include <QAtomicPointer>\n"
"#include <QStringList>\n\n"
"template <class T> struct Pointer : QAtomicPointer<T> {\n"
" Pointer(T *value = 0) : QAtomicPointer<T>(value) {}\n"
"};\n\n"
"struct SomeStruct {\n"
" int a = 1;\n"
" long b = 2;\n"
" double c = 3.0;\n"
" QString d = \"4\";\n"
" QList<QString> e = {\"5\", \"6\" };\n"
"};\n\n"
"typedef Pointer<SomeStruct> SomeStructPointer;\n\n",
"SomeStruct *s = new SomeStruct; unused(s);\n"
"SomeStructPointer p(s); unused(p);\n"
"Pointer<SomeStruct> pp(s); unused(pp);\n"
"QAtomicPointer<SomeStruct> ppp(s); unused(ppp);\n")
+ Cxx11Profile()
+ Check("p.@1.a", "1", "int")
+ Check("p.@1.e", "<2 items>", "@QList<@QString>")
+ Check("pp.@1.a", "1", "int")
+ Check("ppp.a", "1", "int");
QTest::newRow("QScopedPointer") QTest::newRow("QScopedPointer")
<< Data("#include <QScopedPointer>\n" << Data("#include <QScopedPointer>\n"
@@ -5982,19 +6011,20 @@ void tst_Dumpers::dumper_data()
+ Check("tt.@2.@1.v", "45", "int") % LldbEngine + Check("tt.@2.@1.v", "45", "int") % LldbEngine
+ Check("dd.@1.@1.a", "1", "int") // B::a + Check("dd.@1.@1.a", "1", "int") // B::a
+ Check("dd.@2.@1.a", "1", "int") // C::a // C::a - fails with command line LLDB 3.8/360.x
+ Check("dd.@2.@1.a", "1", "int") % NoLldbEngine // C::a
+ Check("dd.@1.b", "2", "int") + Check("dd.@1.b", "2", "int")
+ Check("dd.@2.c", "3", "int") + Check("dd.@2.c", "3", "int")
+ Check("dd.d", "4", "int") + Check("dd.d", "4", "int")
+ Check("dp.@1.@1.a", "1", "int") // B::a + Check("dp.@1.@1.a", "1", "int") // B::a
+ Check("dp.@2.@1.a", "1", "int") // C::a + Check("dp.@2.@1.a", "1", "int") % NoLldbEngine // C::a
+ Check("dp.@1.b", "2", "int") + Check("dp.@1.b", "2", "int")
+ Check("dp.@2.c", "3", "int") + Check("dp.@2.c", "3", "int")
+ Check("dp.d", "4", "int") + Check("dp.d", "4", "int")
+ Check("dr.@1.@1.a", "1", "int") // B::a + Check("dr.@1.@1.a", "1", "int") // B::a
+ Check("dr.@2.@1.a", "1", "int") // C::a + Check("dr.@2.@1.a", "1", "int") % NoLldbEngine // C::a
+ Check("dr.@1.b", "2", "int") + Check("dr.@1.b", "2", "int")
+ Check("dr.@2.c", "3", "int") + Check("dr.@2.c", "3", "int")
+ Check("dr.d", "4", "int"); + Check("dr.d", "4", "int");

View File

@@ -214,7 +214,7 @@ void tst_MapReduce::map()
QCOMPARE(container, QList<int>({4, 10, 2})); QCOMPARE(container, QList<int>({4, 10, 2}));
Utils::map(container.begin(), container.end(), [](int &x) { x *= 2; }, Utils::map(container.begin(), container.end(), [](int &x) { x *= 2; },
Utils::MapReduceOption::Unordered, 3).waitForFinished(); Utils::MapReduceOption::Unordered, QThread::InheritPriority, 3).waitForFinished();
QCOMPARE(container, QList<int>({8, 20, 4})); QCOMPARE(container, QList<int>({8, 20, 4}));
} }

View File

@@ -28,7 +28,7 @@
#include <string> #include <string>
// use std::filesystem::path if it is supported by all compilers // use std::filesystem::path if it is supported by all compilers
#ifdef WIN32 #ifdef _WIN32
const char nativeSeperator = '\\'; const char nativeSeperator = '\\';
#else #else
const char nativeSeperator = '/'; const char nativeSeperator = '/';
@@ -37,7 +37,7 @@ const char nativeSeperator = '/';
inline inline
std::string toNativePath(std::string &&path) std::string toNativePath(std::string &&path)
{ {
#ifdef WIN32 #ifdef _WIN32
std::replace(path.begin(), path.end(), '/', '\\'); std::replace(path.begin(), path.end(), '/', '\\');
#endif #endif