forked from qt-creator/qt-creator
Merge commit 'origin/1.3'
This commit is contained in:
@@ -48,8 +48,6 @@ CppHighlighter::CppHighlighter(QTextDocument *document) :
|
|||||||
|
|
||||||
void CppHighlighter::highlightBlock(const QString &text)
|
void CppHighlighter::highlightBlock(const QString &text)
|
||||||
{
|
{
|
||||||
QTextCharFormat emptyFormat;
|
|
||||||
|
|
||||||
const int previousState = previousBlockState();
|
const int previousState = previousBlockState();
|
||||||
int state = 0, initialBraceDepth = 0;
|
int state = 0, initialBraceDepth = 0;
|
||||||
if (previousState != -1) {
|
if (previousState != -1) {
|
||||||
@@ -226,7 +224,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
|||||||
if (oldState == tokenize.state() && oldBraceDepth != braceDepth) {
|
if (oldState == tokenize.state() && oldBraceDepth != braceDepth) {
|
||||||
int delta = braceDepth - oldBraceDepth;
|
int delta = braceDepth - oldBraceDepth;
|
||||||
QTextBlock block = currentBlock().next();
|
QTextBlock block = currentBlock().next();
|
||||||
while (block.isValid()) {
|
while (block.isValid() && block.userState() != -1) {
|
||||||
TextEditDocumentLayout::changeBraceDepth(block, delta);
|
TextEditDocumentLayout::changeBraceDepth(block, delta);
|
||||||
block = block.next();
|
block = block.next();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -401,18 +401,33 @@ QString CdbSymbolGroupContext::symbolINameAt(unsigned long index) const
|
|||||||
return m_inameIndexMap.key(index);
|
return m_inameIndexMap.key(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for "0x000", "0x000 class X"
|
// Return hexadecimal pointer value from a CDB pointer value
|
||||||
|
// which look like "0x000032a" or "0x00000000`0250124a" on 64-bit systems.
|
||||||
|
static bool inline getPointerValue(QString stringValue, quint64 *value)
|
||||||
|
{
|
||||||
|
*value = 0;
|
||||||
|
if (!stringValue.startsWith(QLatin1String("0x")))
|
||||||
|
return false;
|
||||||
|
stringValue.remove(0, 2);
|
||||||
|
// Remove 64bit separator
|
||||||
|
if (stringValue.size() > 8 && stringValue.at(8) == QLatin1Char('`'))
|
||||||
|
stringValue.remove(8, 1);
|
||||||
|
bool ok;
|
||||||
|
*value = stringValue.toULongLong(&ok, 16);
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
// check for "0x000", "0x000 class X" or its 64-bit equivalents.
|
||||||
static inline bool isNullPointer(const WatchData &wd)
|
static inline bool isNullPointer(const WatchData &wd)
|
||||||
{
|
{
|
||||||
if (!isPointerType(wd.type))
|
if (!isPointerType(wd.type))
|
||||||
return false;
|
return false;
|
||||||
static const QRegExp hexNullPattern(QLatin1String("0x0+"));
|
QString stringValue = wd.value;
|
||||||
Q_ASSERT(hexNullPattern.isValid());
|
const int blankPos = stringValue.indexOf(QLatin1Char(' '));
|
||||||
const int blankPos = wd.value.indexOf(QLatin1Char(' '));
|
if (blankPos != -1)
|
||||||
if (blankPos == -1)
|
stringValue.truncate(blankPos);
|
||||||
return hexNullPattern.exactMatch(wd.value);
|
quint64 value;
|
||||||
const QString addr = wd.value.mid(0, blankPos);
|
return getPointerValue(stringValue, &value) && value == 0u;
|
||||||
return hexNullPattern.exactMatch(addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix a symbol group value. It is set to the class type for
|
// Fix a symbol group value. It is set to the class type for
|
||||||
@@ -713,16 +728,11 @@ static inline bool getIntValue(CIDebugSymbolGroup *sg, int index, int *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get pointer value of symbol group ("0xAAB")
|
// Get pointer value of symbol group ("0xAAB")
|
||||||
|
// Note that this is on "00000000`0250124a" on 64bit systems.
|
||||||
static inline bool getPointerValue(CIDebugSymbolGroup *sg, int index, quint64 *value)
|
static inline bool getPointerValue(CIDebugSymbolGroup *sg, int index, quint64 *value)
|
||||||
{
|
{
|
||||||
*value = 0;
|
const QString stringValue = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index);
|
||||||
QString valueS = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index);
|
return getPointerValue(stringValue, value);
|
||||||
if (!valueS.startsWith(QLatin1String("0x")))
|
|
||||||
return false;
|
|
||||||
valueS.remove(0, 2);
|
|
||||||
bool ok;
|
|
||||||
*value = valueS.toULongLong(&ok, 16);
|
|
||||||
return ok;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd)
|
int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd)
|
||||||
|
|||||||
@@ -724,8 +724,8 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
|
|||||||
switch (idx.column()) {
|
switch (idx.column()) {
|
||||||
case 0: return data.name;
|
case 0: return data.name;
|
||||||
case 1: return formattedValue(data,
|
case 1: return formattedValue(data,
|
||||||
m_handler->m_individualFormats[data.iname],
|
m_handler->m_individualFormats.value(data.iname, -1),
|
||||||
m_handler->m_typeFormats[data.type]);
|
m_handler->m_typeFormats.value(data.type, -1));
|
||||||
case 2:
|
case 2:
|
||||||
if (!data.displayedType.isEmpty())
|
if (!data.displayedType.isEmpty())
|
||||||
return data.displayedType;
|
return data.displayedType;
|
||||||
|
|||||||
@@ -166,14 +166,16 @@ bool CompletionWidget::event(QEvent *e)
|
|||||||
closeList(currentIndex());
|
closeList(currentIndex());
|
||||||
return true;
|
return true;
|
||||||
case Qt::Key_Up:
|
case Qt::Key_Up:
|
||||||
if (currentIndex().row() == 0) {
|
if (!ke->isAutoRepeat()
|
||||||
|
&& currentIndex().row() == 0) {
|
||||||
setCurrentIndex(model()->index(model()->rowCount()-1, 0));
|
setCurrentIndex(model()->index(model()->rowCount()-1, 0));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
forwardKeys = false;
|
forwardKeys = false;
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Down:
|
case Qt::Key_Down:
|
||||||
if (currentIndex().row() == model()->rowCount()-1) {
|
if (!ke->isAutoRepeat()
|
||||||
|
&& currentIndex().row() == model()->rowCount()-1) {
|
||||||
setCurrentIndex(model()->index(0, 0));
|
setCurrentIndex(model()->index(0, 0));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,6 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="spacing">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -25,12 +22,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>200</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -75,53 +66,47 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Properties</string>
|
<string>Properties</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<property name="sizeConstraint">
|
||||||
<layout class="QGridLayout">
|
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="fieldGrowthPolicy">
|
||||||
<number>6</number>
|
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="1">
|
<item row="0" column="0">
|
||||||
<widget class="QLineEdit" name="aliasText"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" rowspan="2">
|
|
||||||
<widget class="QLineEdit" name="prefixText"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="prefixLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Prefix:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="languageLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Language:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="languageText"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" rowspan="2">
|
|
||||||
<widget class="QLabel" name="aliasLabel">
|
<widget class="QLabel" name="aliasLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Alias:</string>
|
<string>Alias:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="aliasText"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="prefixLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Prefix:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="prefixText"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="languageLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Language:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="languageText"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<zorder>centralWidget</zorder>
|
|
||||||
<zorder>groupBox</zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -62,3 +62,4 @@ lib/pkgconfig/QtWebKit.pc
|
|||||||
lib/pkgconfig/QtXmlPatterns.pc
|
lib/pkgconfig/QtXmlPatterns.pc
|
||||||
lib/pkgconfig/QtXml.pc
|
lib/pkgconfig/QtXml.pc
|
||||||
mkspecs/qconfig.pri
|
mkspecs/qconfig.pri
|
||||||
|
.qmake.cache
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
|
|||||||
{ "/bin/QtCored4.dll" },
|
{ "/bin/QtCored4.dll" },
|
||||||
{ "/bin/QtGuid4.dll" },
|
{ "/bin/QtGuid4.dll" },
|
||||||
{ "/bin/QtHelpd4.dll" },
|
{ "/bin/QtHelpd4.dll" },
|
||||||
{ "/bin/QtNetworkd4.dll" },
|
{ "/bin/QtMultimediad4.dll" },
|
||||||
{ "/bin/QtNetworkd4.dll" },
|
{ "/bin/QtNetworkd4.dll" },
|
||||||
{ "/bin/QtOpenGLd4.dll" },
|
{ "/bin/QtOpenGLd4.dll" },
|
||||||
{ "/bin/QtScriptd4.dll" },
|
{ "/bin/QtScriptd4.dll" },
|
||||||
|
|||||||
Reference in New Issue
Block a user