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)
|
||||
{
|
||||
QTextCharFormat emptyFormat;
|
||||
|
||||
const int previousState = previousBlockState();
|
||||
int state = 0, initialBraceDepth = 0;
|
||||
if (previousState != -1) {
|
||||
@@ -226,7 +224,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
if (oldState == tokenize.state() && oldBraceDepth != braceDepth) {
|
||||
int delta = braceDepth - oldBraceDepth;
|
||||
QTextBlock block = currentBlock().next();
|
||||
while (block.isValid()) {
|
||||
while (block.isValid() && block.userState() != -1) {
|
||||
TextEditDocumentLayout::changeBraceDepth(block, delta);
|
||||
block = block.next();
|
||||
}
|
||||
|
||||
@@ -401,18 +401,33 @@ QString CdbSymbolGroupContext::symbolINameAt(unsigned long index) const
|
||||
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)
|
||||
{
|
||||
if (!isPointerType(wd.type))
|
||||
return false;
|
||||
static const QRegExp hexNullPattern(QLatin1String("0x0+"));
|
||||
Q_ASSERT(hexNullPattern.isValid());
|
||||
const int blankPos = wd.value.indexOf(QLatin1Char(' '));
|
||||
if (blankPos == -1)
|
||||
return hexNullPattern.exactMatch(wd.value);
|
||||
const QString addr = wd.value.mid(0, blankPos);
|
||||
return hexNullPattern.exactMatch(addr);
|
||||
QString stringValue = wd.value;
|
||||
const int blankPos = stringValue.indexOf(QLatin1Char(' '));
|
||||
if (blankPos != -1)
|
||||
stringValue.truncate(blankPos);
|
||||
quint64 value;
|
||||
return getPointerValue(stringValue, &value) && value == 0u;
|
||||
}
|
||||
|
||||
// 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")
|
||||
// Note that this is on "00000000`0250124a" on 64bit systems.
|
||||
static inline bool getPointerValue(CIDebugSymbolGroup *sg, int index, quint64 *value)
|
||||
{
|
||||
*value = 0;
|
||||
QString valueS = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index);
|
||||
if (!valueS.startsWith(QLatin1String("0x")))
|
||||
return false;
|
||||
valueS.remove(0, 2);
|
||||
bool ok;
|
||||
*value = valueS.toULongLong(&ok, 16);
|
||||
return ok;
|
||||
const QString stringValue = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index);
|
||||
return getPointerValue(stringValue, value);
|
||||
}
|
||||
|
||||
int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd)
|
||||
|
||||
@@ -724,8 +724,8 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
|
||||
switch (idx.column()) {
|
||||
case 0: return data.name;
|
||||
case 1: return formattedValue(data,
|
||||
m_handler->m_individualFormats[data.iname],
|
||||
m_handler->m_typeFormats[data.type]);
|
||||
m_handler->m_individualFormats.value(data.iname, -1),
|
||||
m_handler->m_typeFormats.value(data.type, -1));
|
||||
case 2:
|
||||
if (!data.displayedType.isEmpty())
|
||||
return data.displayedType;
|
||||
|
||||
@@ -166,14 +166,16 @@ bool CompletionWidget::event(QEvent *e)
|
||||
closeList(currentIndex());
|
||||
return true;
|
||||
case Qt::Key_Up:
|
||||
if (currentIndex().row() == 0) {
|
||||
if (!ke->isAutoRepeat()
|
||||
&& currentIndex().row() == 0) {
|
||||
setCurrentIndex(model()->index(model()->rowCount()-1, 0));
|
||||
return true;
|
||||
}
|
||||
forwardKeys = false;
|
||||
break;
|
||||
case Qt::Key_Down:
|
||||
if (currentIndex().row() == model()->rowCount()-1) {
|
||||
if (!ke->isAutoRepeat()
|
||||
&& currentIndex().row() == model()->rowCount()-1) {
|
||||
setCurrentIndex(model()->index(0, 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
@@ -25,12 +22,6 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -75,53 +66,47 @@
|
||||
<property name="title">
|
||||
<string>Properties</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||
</property>
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="aliasLabel">
|
||||
<property name="text">
|
||||
<string>Alias:</string>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</widget>
|
||||
</item>
|
||||
<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>
|
||||
<item row="0" column="1">
|
||||
<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">
|
||||
<property name="text">
|
||||
<string>Alias:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>centralWidget</zorder>
|
||||
<zorder>groupBox</zorder>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -62,3 +62,4 @@ lib/pkgconfig/QtWebKit.pc
|
||||
lib/pkgconfig/QtXmlPatterns.pc
|
||||
lib/pkgconfig/QtXml.pc
|
||||
mkspecs/qconfig.pri
|
||||
.qmake.cache
|
||||
|
||||
@@ -169,7 +169,7 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
|
||||
{ "/bin/QtCored4.dll" },
|
||||
{ "/bin/QtGuid4.dll" },
|
||||
{ "/bin/QtHelpd4.dll" },
|
||||
{ "/bin/QtNetworkd4.dll" },
|
||||
{ "/bin/QtMultimediad4.dll" },
|
||||
{ "/bin/QtNetworkd4.dll" },
|
||||
{ "/bin/QtOpenGLd4.dll" },
|
||||
{ "/bin/QtScriptd4.dll" },
|
||||
|
||||
Reference in New Issue
Block a user