forked from qt-creator/qt-creator
Merge remote branch 'origin/1.3'
Conflicts: doc/qtcreator.qdoc src/plugins/debugger/watchhandler.cpp
This commit is contained in:
+14
-26
@@ -1,28 +1,25 @@
|
||||
QDOC_BIN = $$[QT_INSTALL_BINS]/qdoc3
|
||||
win32:QDOC_BIN = $$replace(QDOC_BIN, "/", "\\")
|
||||
QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
|
||||
HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)
|
||||
|
||||
unix {
|
||||
QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$QDOC_BIN
|
||||
HELPGENERATOR = $$[QT_INSTALL_BINS]/qhelpgenerator
|
||||
} else {
|
||||
equals(QMAKE_DIR_SEP, /) { # unix, mingw+msys
|
||||
QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$QDOC_BIN
|
||||
} else:win32-g++* { # just mingw
|
||||
# The lack of spaces in front of the && is necessary!
|
||||
QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/doc/html&& $$QDOC_BIN
|
||||
# Always run qhelpgenerator inside its own cmd; this is a workaround for
|
||||
# an unusual bug which causes qhelpgenerator.exe to do nothing
|
||||
HELPGENERATOR = cmd /C $$replace($$list($$[QT_INSTALL_BINS]/qhelpgenerator.exe), "/", "\\")
|
||||
} else { # nmake
|
||||
QDOC = set SRCDIR=$$PWD $$escape_expand(\n\t) \
|
||||
set OUTDIR=$$OUT_PWD/doc/html $$escape_expand(\n\t) \
|
||||
$$QDOC_BIN
|
||||
}
|
||||
|
||||
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
|
||||
QCH_FILE = $$OUT_PWD/share/doc/qtcreator/qtcreator.qch
|
||||
QCH_FILE = $$IDE_DOC_PATH/qtcreator.qch
|
||||
|
||||
unix {
|
||||
html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf
|
||||
} else {
|
||||
html_docs.commands = \"$$QDOC $$PWD/qtcreator.qdocconf\"
|
||||
}
|
||||
html_docs.depends += $$PWD/qtcreator.qdoc $$PWD/qtcreator.qdocconf
|
||||
html_docs.files = $$QHP_FILE
|
||||
|
||||
qch_docs.commands = $$HELPGENERATOR -o $$QCH_FILE $$QHP_FILE
|
||||
qch_docs.commands = $$HELPGENERATOR -o \"$$QCH_FILE\" $$QHP_FILE
|
||||
qch_docs.depends += html_docs
|
||||
qch_docs.files = $$QCH_FILE
|
||||
|
||||
@@ -32,17 +29,8 @@ unix:!macx {
|
||||
INSTALLS += qch_docs
|
||||
}
|
||||
|
||||
macx {
|
||||
DOC_DIR = "$${OUT_PWD}/bin/Qt Creator.app/Contents/Resources/doc"
|
||||
cp_docs.commands = mkdir -p \"$${DOC_DIR}\" ; $${QMAKE_COPY} \"$${QCH_FILE}\" \"$${DOC_DIR}\"
|
||||
cp_docs.depends += qch_docs
|
||||
docs.depends = cp_docs
|
||||
QMAKE_EXTRA_TARGETS += html_docs qch_docs cp_docs docs
|
||||
}
|
||||
!macx {
|
||||
docs.depends = qch_docs
|
||||
QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
|
||||
}
|
||||
docs.depends = qch_docs
|
||||
QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
|
||||
|
||||
OTHER_FILES = $$PWD/qtcreator.qdoc \
|
||||
$$PWD/qtcreator.qdocconf
|
||||
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
my $file = $ARGV[0];
|
||||
open FILE, $file or die "File $file cannot be opened.";
|
||||
my @toc = ();
|
||||
my %title2page = ();
|
||||
my $doctitle = "";
|
||||
my $curpage = "";
|
||||
my $intoc = 0;
|
||||
while (<FILE>) {
|
||||
if (!$intoc) {
|
||||
if (keys(%title2page) == 1 && /^\h*\\list/) {
|
||||
$intoc = 1;
|
||||
} elsif (/^\h*\\page\h+(\H+)/) {
|
||||
$curpage = $1;
|
||||
} elsif (/^\h*\\title\h+(.+)$/) {
|
||||
if ($curpage eq "") {
|
||||
die "Title '$1' appears in no \\page\n";
|
||||
}
|
||||
$title2page{$1} = $curpage;
|
||||
$doctitle = $1 if (!$doctitle);
|
||||
$curpage = "";
|
||||
}
|
||||
} else {
|
||||
if (/^\h*\\endlist/) {
|
||||
$intoc = 0;
|
||||
} elsif (/^\h*\\o\h+\\l{(.*)}$/) {
|
||||
push @toc, $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
|
||||
my %prev = ();
|
||||
my %next = ();
|
||||
my $last = $doctitle;
|
||||
for my $title (@toc) {
|
||||
$next{$last} = $title2page{$title};
|
||||
$prev{$title} = $title2page{$last};
|
||||
$last = $title;
|
||||
}
|
||||
|
||||
open IN, $file or die "File $file cannot be opened a second time?!";
|
||||
open OUT, '>'.$file.".out" or die "File $file.out cannot be created.";
|
||||
my $cutting = 0;
|
||||
while (<IN>) {
|
||||
if (!$cutting) {
|
||||
if (/^\h*\\contentspage/) {
|
||||
$cutting = 1;
|
||||
}
|
||||
} else {
|
||||
if (/^\h*\\title\h+(.+)$/) {
|
||||
print OUT " \\previouspage ".$prev{$1} if ($prev{$1});
|
||||
print OUT " \\page ".$title2page{$1};
|
||||
print OUT " \\nextpage ".$next{$1} if ($next{$1});
|
||||
print OUT "\n";
|
||||
$cutting = 0;
|
||||
} else {
|
||||
next;
|
||||
}
|
||||
}
|
||||
print OUT $_;
|
||||
}
|
||||
close OUT;
|
||||
close IN;
|
||||
|
||||
rename($file.".out", $file) or die "Cannot replace $file with new version.";
|
||||
+706
-667
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -12,8 +12,7 @@ defineReplace(cleanPath) {
|
||||
}
|
||||
|
||||
defineReplace(targetPath) {
|
||||
win32:1 ~= s|/|\|g
|
||||
return($$1)
|
||||
return($$replace(1, /, $$QMAKE_DIR_SEP))
|
||||
}
|
||||
|
||||
# For use in custom compilers which just copy files
|
||||
@@ -60,6 +59,7 @@ macx {
|
||||
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH
|
||||
IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
|
||||
IDE_DATA_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources
|
||||
IDE_DOC_PATH = $$IDE_DATA_PATH/doc
|
||||
contains(QT_CONFIG, ppc):CONFIG += ppc x86
|
||||
copydata = 1
|
||||
} else {
|
||||
@@ -74,6 +74,7 @@ macx {
|
||||
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins
|
||||
IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME
|
||||
IDE_DATA_PATH = $$IDE_BUILD_TREE/share/qtcreator
|
||||
IDE_DOC_PATH = $$IDE_BUILD_TREE/share/doc/qtcreator
|
||||
!isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<message>
|
||||
<location/>
|
||||
<source>+</source>
|
||||
<translation></translation>
|
||||
<translation>+</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location/>
|
||||
@@ -901,7 +901,7 @@
|
||||
<message>
|
||||
<location filename="../../../src/plugins/cvs/settingspage.cpp" line="-34"/>
|
||||
<source>CVS Command</source>
|
||||
<translation></translation>
|
||||
<translation>CVS-Kommando</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -2199,7 +2199,7 @@ Sollen sie überschrieben werden?</translation>
|
||||
<message>
|
||||
<location line="+20"/>
|
||||
<source>Plugin Errors of %1</source>
|
||||
<translation></translation>
|
||||
<translation>Fehler in %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -3009,7 +3009,7 @@ Sollen sie überschrieben werden?</translation>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Delete all breakpoints</source>
|
||||
<translation></translation>
|
||||
<translation>Alle Haltepunkte löschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+13"/>
|
||||
@@ -3762,7 +3762,7 @@ Sollen sie überschrieben werden?</translation>
|
||||
<message>
|
||||
<location line="+35"/>
|
||||
<source>Ctrl+Shift+F11</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+Shift+F11</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -4525,7 +4525,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
|
||||
<message>
|
||||
<location filename="../../../src/plugins/debugger/stackhandler.cpp" line="+143"/>
|
||||
<source>...</source>
|
||||
<translation></translation>
|
||||
<translation>...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
@@ -5221,7 +5221,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>F3</source>
|
||||
<translation></translation>
|
||||
<translation>F3</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+4"/>
|
||||
@@ -5231,7 +5231,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>F4</source>
|
||||
<translation></translation>
|
||||
<translation>F4</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+4"/>
|
||||
@@ -5246,42 +5246,42 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Meta+H</source>
|
||||
<translation></translation>
|
||||
<translation>Meta+H</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Ctrl+H</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+H</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Meta+L</source>
|
||||
<translation></translation>
|
||||
<translation>Meta+L</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Ctrl+L</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+L</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+17"/>
|
||||
<source>Meta+G</source>
|
||||
<translation></translation>
|
||||
<translation>Meta+G</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Ctrl+G</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+G</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<source>Meta+J</source>
|
||||
<translation></translation>
|
||||
<translation>Meta+J</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Ctrl+J</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+J</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+20"/>
|
||||
@@ -5306,7 +5306,7 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<source>Ctrl+Alt+R</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+Alt+R</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+15"/>
|
||||
@@ -5992,7 +5992,7 @@ Grund: %3</translation>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>Ctrl+Shift+F</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+Shift+F</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -6010,7 +6010,7 @@ Grund: %3</translation>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>Ctrl+E</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+E</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+6"/>
|
||||
@@ -6030,7 +6030,7 @@ Grund: %3</translation>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>Ctrl+=</source>
|
||||
<translation></translation>
|
||||
<translation>Ctrl+=</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
@@ -6489,7 +6489,7 @@ Grund: %3</translation>
|
||||
<message>
|
||||
<location filename="../../../src/plugins/git/branchdialog.ui"/>
|
||||
<source>Branches</source>
|
||||
<translation></translation>
|
||||
<translation>Branches</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location/>
|
||||
@@ -6499,12 +6499,12 @@ Grund: %3</translation>
|
||||
<message>
|
||||
<location/>
|
||||
<source>Repository:</source>
|
||||
<translation></translation>
|
||||
<translation>Repository:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location/>
|
||||
<source>Remote branches</source>
|
||||
<translation>Entferne Branches</translation>
|
||||
<translation>Nichtlokale Branches</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -8840,7 +8840,7 @@ p, li { white-space: pre-wrap; }
|
||||
<message>
|
||||
<location filename="../../../src/plugins/perforce/submitpanel.ui"/>
|
||||
<source>Submit</source>
|
||||
<translation></translation>
|
||||
<translation>Abschicken</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location/>
|
||||
@@ -10892,7 +10892,7 @@ unter Versionsverwaltung (%2) gestellt werden?</translation>
|
||||
<message>
|
||||
<location/>
|
||||
<source>W&hat's this:</source>
|
||||
<translation></translation>
|
||||
<translation>W&hat's this:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location/>
|
||||
@@ -11872,8 +11872,8 @@ unter Versionsverwaltung (%2) gestellt werden?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>Select the CSL Arm Toolchain (GCCE) Directory</source>
|
||||
<translation>Ordner der CSL Arm Toolchain (GCCE)</translation>
|
||||
<source>Select the CSL ARM Toolchain (GCCE) Directory</source>
|
||||
<translation>Ordner der CSL ARM Toolchain (GCCE)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+11"/>
|
||||
@@ -15829,7 +15829,7 @@ Qt Centre</translation>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Attached to stopped inferior.</source>
|
||||
<translation></translation>
|
||||
<translation>Debugge angehaltenen Prozess.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9982,8 +9982,8 @@ to version control (%2)?</source>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>Select the CSL Arm Toolchain (GCCE) Directory</source>
|
||||
<translation>CSL Arm ツールチェイン (GCCE) のディレクトリを選択</translation>
|
||||
<source>Select the CSL ARM Toolchain (GCCE) Directory</source>
|
||||
<translation>CSL ARM ツールチェイン (GCCE) のディレクトリを選択</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+11"/>
|
||||
|
||||
@@ -13436,7 +13436,7 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona.</tr
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>Select the CSL Arm Toolchain (GCCE) Directory</source>
|
||||
<source>Select the CSL ARM Toolchain (GCCE) Directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
|
||||
@@ -12310,8 +12310,8 @@ to version control (%2)?</source>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>Select the CSL Arm Toolchain (GCCE) Directory</source>
|
||||
<translation>Выберите каталог с инструментарием CSL Arm (GCCE)</translation>
|
||||
<source>Select the CSL ARM Toolchain (GCCE) Directory</source>
|
||||
<translation>Выберите каталог с инструментарием CSL ARM (GCCE)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+11"/>
|
||||
|
||||
@@ -524,8 +524,8 @@ void LookupContext::expandFunction(Function *function,
|
||||
q->isGlobal());
|
||||
const QList<Symbol *> candidates = resolveClassOrNamespace(nestedNameSpec, visibleScopes);
|
||||
for (int j = 0; j < candidates.size(); ++j) {
|
||||
expand(candidates.at(j)->asScopedSymbol()->members(),
|
||||
visibleScopes, expandedScopes);
|
||||
if (ScopedSymbol *scopedSymbol = candidates.at(j)->asScopedSymbol())
|
||||
expand(scopedSymbol->members(), visibleScopes, expandedScopes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,9 +38,14 @@
|
||||
|
||||
// Format a hex address with a given field width if possible. Convert
|
||||
// to number to ensure it is not truncated should it be larger than the
|
||||
// field width.
|
||||
static inline void formatAddress(QTextStream &str, const QString &hexAddressS, int fieldWidth)
|
||||
// field width. Check the 64 bit address format '00000001`40002c84'
|
||||
static inline void formatAddress(QTextStream &str, QString hexAddressS, int fieldWidth)
|
||||
{
|
||||
if (hexAddressS.size() > 9) {
|
||||
const int sepPos = hexAddressS.size() - 9;
|
||||
if (hexAddressS.at(sepPos) == QLatin1Char('`'))
|
||||
hexAddressS.remove(sepPos, 1);
|
||||
}
|
||||
const QChar oldPadChar = str.padChar();
|
||||
const int oldFieldWidth = str.fieldWidth();
|
||||
const int oldIntegerBase = str.integerBase();
|
||||
|
||||
@@ -402,16 +402,20 @@ QString CdbSymbolGroupContext::symbolINameAt(unsigned long index) const
|
||||
}
|
||||
|
||||
// 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)
|
||||
// which look like "0x000032a" or "0x00000000`0250124a" or
|
||||
// "0x1`0250124a" on 64-bit systems.
|
||||
static bool inline getUnsignedHexValue(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);
|
||||
if (stringValue.size() > 9) {
|
||||
const int sepPos = stringValue.size() - 9;
|
||||
if (stringValue.at(sepPos) == QLatin1Char('`'))
|
||||
stringValue.remove(sepPos, 1);
|
||||
}
|
||||
bool ok;
|
||||
*value = stringValue.toULongLong(&ok, 16);
|
||||
return ok;
|
||||
@@ -427,7 +431,7 @@ static inline bool isNullPointer(const WatchData &wd)
|
||||
if (blankPos != -1)
|
||||
stringValue.truncate(blankPos);
|
||||
quint64 value;
|
||||
return getPointerValue(stringValue, &value) && value == 0u;
|
||||
return getUnsignedHexValue(stringValue, &value) && value == 0u;
|
||||
}
|
||||
|
||||
// Fix a symbol group value. It is set to the class type for
|
||||
@@ -445,11 +449,22 @@ static inline QString removeInnerTemplateType(QString value)
|
||||
return value;
|
||||
}
|
||||
|
||||
static inline QString fixValue(const QString &value)
|
||||
// Fix display values: Pass through strings, convert unsigned integers
|
||||
// to decimal ('0x5454`fedf'), remove inner templates from
|
||||
// "0x4343 class list<>".
|
||||
static inline QString fixValue(const QString &value, const QString &type)
|
||||
{
|
||||
if (value.size() < 20 || value.endsWith(QLatin1Char('"')))
|
||||
// Pass through strings, chars
|
||||
if (value.endsWith(QLatin1Char('"')) || value.endsWith(QLatin1Char('\'')))
|
||||
return value;
|
||||
return removeInnerTemplateType(value);
|
||||
const int size = value.size();
|
||||
// Unsigned hex numbers
|
||||
if (isIntType(type) && (size > 2 && value.at(1) == QLatin1Char('x'))) {
|
||||
quint64 intValue;
|
||||
if (getUnsignedHexValue(value, &intValue))
|
||||
return QString::number(intValue);
|
||||
}
|
||||
return size < 20 ? value : removeInnerTemplateType(value);
|
||||
}
|
||||
|
||||
WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const
|
||||
@@ -481,7 +496,7 @@ WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const
|
||||
return wd;
|
||||
}
|
||||
const QString value = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolValueTextWide, index);
|
||||
wd.setValue(fixValue(value));
|
||||
wd.setValue(fixValue(value, type));
|
||||
wd.setChildrenNeeded(); // compensate side effects of above setters
|
||||
// Figure out children. The SubElement is only a guess unless the symbol,
|
||||
// is expanded, so, we leave this as a guess for later updates.
|
||||
@@ -729,10 +744,10 @@ 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)
|
||||
static inline bool getUnsignedHexValue(CIDebugSymbolGroup *sg, int index, quint64 *value)
|
||||
{
|
||||
const QString stringValue = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index);
|
||||
return getPointerValue(stringValue, value);
|
||||
return getUnsignedHexValue(stringValue, value);
|
||||
}
|
||||
|
||||
int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd)
|
||||
@@ -756,7 +771,7 @@ int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd)
|
||||
if (!getIntValue(m_symbolGroup, sizeIndex, &size))
|
||||
return 4;
|
||||
quint64 array;
|
||||
if (!getPointerValue(m_symbolGroup, arrayIndex, &array))
|
||||
if (!getUnsignedHexValue(m_symbolGroup, arrayIndex, &array))
|
||||
return 5;
|
||||
// Fetch
|
||||
const bool truncated = size > maxLength;
|
||||
|
||||
@@ -613,21 +613,32 @@ QString WatchModel::niceType(const QString &typeIn) const
|
||||
return type;
|
||||
}
|
||||
|
||||
template <class IntType> QString reformatInteger(IntType value, int format)
|
||||
{
|
||||
switch (format) {
|
||||
case HexadecimalFormat:
|
||||
return ("(hex) ") + QString::number(value, 16);
|
||||
case BinaryFormat:
|
||||
return ("(bin) ") + QString::number(value, 2);
|
||||
case OctalFormat:
|
||||
return ("(oct) ") + QString::number(value, 8);
|
||||
}
|
||||
return QString::number(value); // not reached
|
||||
}
|
||||
|
||||
static QString formattedValue(const WatchData &data,
|
||||
int individualFormat, int typeFormat)
|
||||
{
|
||||
if (isIntType(data.type)) {
|
||||
int format = individualFormat == -1 ? typeFormat : individualFormat;
|
||||
int value = data.value.toInt();
|
||||
if (format == HexadecimalFormat)
|
||||
return ("(hex) ") + QString::number(value, 16);
|
||||
if (format == BinaryFormat)
|
||||
return ("(bin) ") + QString::number(value, 2);
|
||||
if (format == OctalFormat)
|
||||
return ("(oct) ") + QString::number(value, 8);
|
||||
return data.value;
|
||||
const int format = individualFormat == -1 ? typeFormat : individualFormat;
|
||||
if (format <= 0)
|
||||
return data.value;
|
||||
if (data.type.contains(QLatin1String("unsigned"))) {
|
||||
return reformatInteger(data.value.toULongLong(), format);
|
||||
} else {
|
||||
return reformatInteger(data.value.toLongLong(), format);
|
||||
}
|
||||
}
|
||||
|
||||
return data.value;
|
||||
}
|
||||
|
||||
@@ -796,15 +807,9 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
|
||||
break;
|
||||
|
||||
case TypeFormatRole:
|
||||
return m_handler->m_typeFormats[data.type];
|
||||
|
||||
case IndividualFormatRole: {
|
||||
int format = m_handler->m_individualFormats[data.iname];
|
||||
if (format == -1)
|
||||
return m_handler->m_typeFormats[data.type];
|
||||
return format;
|
||||
}
|
||||
|
||||
return m_handler->m_typeFormats.value(data.type, -1);
|
||||
case IndividualFormatRole:
|
||||
return m_handler->m_individualFormats.value(data.iname, -1);
|
||||
case AddressRole: {
|
||||
if (!data.addr.isEmpty())
|
||||
return data.addr;
|
||||
@@ -834,8 +839,13 @@ bool WatchModel::setData(const QModelIndex &index, const QVariant &value, int ro
|
||||
}
|
||||
} else if (role == TypeFormatRole) {
|
||||
m_handler->setFormat(data.type, value.toInt());
|
||||
} else if (role == IndividualFormatRole) {
|
||||
m_handler->m_individualFormats[data.iname] = value.toInt();
|
||||
} else if (role == IndividualFormatRole) {
|
||||
const int format = value.toInt();
|
||||
if (format == -1) {
|
||||
m_handler->m_individualFormats.remove(data.iname);
|
||||
} else {
|
||||
m_handler->m_individualFormats[data.iname] = format;
|
||||
}
|
||||
}
|
||||
emit dataChanged(index, index);
|
||||
return true;
|
||||
@@ -1411,9 +1421,12 @@ void WatchHandler::saveTypeFormats()
|
||||
QHashIterator<QString, int> it(m_typeFormats);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
QString key = it.key().trimmed();
|
||||
if (!key.isEmpty())
|
||||
typeFormats.insert(key, it.value());
|
||||
const int format = it.value();
|
||||
if (format != DecimalFormat) {
|
||||
const QString key = it.key().trimmed();
|
||||
if (!key.isEmpty())
|
||||
typeFormats.insert(key, format);
|
||||
}
|
||||
}
|
||||
m_manager->setSessionValue("DefaultFormats", QVariant(typeFormats));
|
||||
}
|
||||
|
||||
@@ -542,8 +542,13 @@ bool isIntType(const QString &type)
|
||||
<< QLatin1String("long") << QLatin1String("bool")
|
||||
<< QLatin1String("signed char") << QLatin1String("unsigned")
|
||||
<< QLatin1String("unsigned char") << QLatin1String("unsigned long")
|
||||
<< QLatin1String("long long") << QLatin1String("unsigned long long");
|
||||
return type.endsWith(QLatin1String(" int")) || types.contains(type);
|
||||
<< QLatin1String("long long") << QLatin1String("unsigned long long")
|
||||
<< QLatin1String("qint16") << QLatin1String("quint16")
|
||||
<< QLatin1String("qint32") << QLatin1String("quint32")
|
||||
<< QLatin1String("qint64") << QLatin1String("quint64");
|
||||
return type.endsWith(QLatin1String(" int"))
|
||||
|| type.endsWith(QLatin1String(" int64"))
|
||||
|| types.contains(type);
|
||||
}
|
||||
|
||||
bool isSymbianIntType(const QString &type)
|
||||
|
||||
@@ -210,36 +210,40 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
|
||||
QStringList alternativeFormats =
|
||||
model()->data(mi0, TypeFormatListRole).toStringList();
|
||||
int typeFormat =
|
||||
model()->data(mi0, TypeFormatRole).toInt();
|
||||
int individualFormat =
|
||||
model()->data(mi0, IndividualFormatRole).toInt();
|
||||
const int typeFormat = qMax(int(DecimalFormat), model()->data(mi0, TypeFormatRole).toInt());
|
||||
const int individualFormat = model()->data(mi0, IndividualFormatRole).toInt();
|
||||
const int effectiveIndividualFormat = individualFormat == -1 ? typeFormat : individualFormat;
|
||||
|
||||
QMenu typeFormatMenu;
|
||||
QMenu individualFormatMenu;
|
||||
QList<QAction *> typeFormatActions;
|
||||
QList<QAction *> individualFormatActions;
|
||||
QAction *clearIndividualFormatAction = 0;
|
||||
if (idx.isValid()) {
|
||||
typeFormatMenu.setTitle(tr("Change format for type '%1'").arg(type));
|
||||
individualFormatMenu.setTitle(tr("Change format for expression '%1'").arg(exp));
|
||||
for (int i = 0; i != alternativeFormats.size(); ++i) {
|
||||
const QString format = alternativeFormats.at(i);
|
||||
QAction *act = new QAction(format, &typeFormatMenu);
|
||||
act->setCheckable(true);
|
||||
if (i == typeFormat)
|
||||
act->setChecked(true);
|
||||
typeFormatMenu.addAction(act);
|
||||
typeFormatActions.append(act);
|
||||
act = new QAction(format, &individualFormatMenu);
|
||||
act->setCheckable(true);
|
||||
if (i == individualFormat)
|
||||
act->setChecked(true);
|
||||
individualFormatMenu.addAction(act);
|
||||
individualFormatActions.append(act);
|
||||
}
|
||||
if (alternativeFormats.isEmpty()) {
|
||||
typeFormatMenu.setEnabled(false);
|
||||
individualFormatMenu.setEnabled(false);
|
||||
} else {
|
||||
clearIndividualFormatAction = individualFormatMenu.addAction(tr("Clear"));
|
||||
clearIndividualFormatAction->setEnabled(individualFormat != -1);
|
||||
individualFormatMenu.addSeparator();
|
||||
for (int i = 0; i != alternativeFormats.size(); ++i) {
|
||||
const QString format = alternativeFormats.at(i);
|
||||
QAction *act = new QAction(format, &typeFormatMenu);
|
||||
act->setCheckable(true);
|
||||
if (i == typeFormat)
|
||||
act->setChecked(true);
|
||||
typeFormatMenu.addAction(act);
|
||||
typeFormatActions.append(act);
|
||||
act = new QAction(format, &individualFormatMenu);
|
||||
act->setCheckable(true);
|
||||
if (i == effectiveIndividualFormat)
|
||||
act->setChecked(true);
|
||||
individualFormatMenu.addAction(act);
|
||||
individualFormatActions.append(act);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
typeFormatMenu.setTitle(tr("Change format for type"));
|
||||
@@ -318,6 +322,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
m_grabbing = true;
|
||||
} else if (act == actClearCodeModelSnapshot) {
|
||||
m_manager->clearCppCodeModelSnapshot();
|
||||
} else if (clearIndividualFormatAction && act == clearIndividualFormatAction) {
|
||||
model()->setData(mi1, -1, IndividualFormatRole);
|
||||
} else {
|
||||
for (int i = 0; i != alternativeFormats.size(); ++i) {
|
||||
if (act == typeFormatActions.at(i))
|
||||
|
||||
@@ -129,7 +129,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
|
||||
m_ui->s60SDKPath->setExpectedKind(Utils::PathChooser::Directory);
|
||||
m_ui->s60SDKPath->setPromptDialogTitle(tr("Select S60 SDK Root"));
|
||||
m_ui->gccePath->setExpectedKind(Utils::PathChooser::Directory);
|
||||
m_ui->gccePath->setPromptDialogTitle(tr("Select the CSL Arm Toolchain (GCCE) Directory"));
|
||||
m_ui->gccePath->setPromptDialogTitle(tr("Select the CSL ARM Toolchain (GCCE) Directory"));
|
||||
|
||||
m_ui->addButton->setIcon(QIcon(Core::Constants::ICON_PLUS));
|
||||
m_ui->delButton->setIcon(QIcon(Core::Constants::ICON_MINUS));
|
||||
|
||||
@@ -2027,6 +2027,9 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
|
||||
d->m_ifdefedOutFormat.background());
|
||||
}
|
||||
|
||||
// Set a brush origin so that the WaveUnderline knows where the wave started
|
||||
painter.setBrushOrigin(offset);
|
||||
|
||||
// // keep right margin clean from full-width selection
|
||||
// int maxX = offset.x() + qMax((qreal)viewportRect.width(), documentLayout->documentSize().width())
|
||||
// - doc->documentMargin();
|
||||
|
||||
@@ -62,4 +62,3 @@ lib/pkgconfig/QtWebKit.pc
|
||||
lib/pkgconfig/QtXmlPatterns.pc
|
||||
lib/pkgconfig/QtXml.pc
|
||||
mkspecs/qconfig.pri
|
||||
.qmake.cache
|
||||
|
||||
@@ -44,3 +44,4 @@ lib/QtUiToolsd.prl
|
||||
lib/QtWebKitd.prl
|
||||
lib/QtXmlPatternsd.prl
|
||||
lib/QtXmld.prl
|
||||
.qmake.cache
|
||||
|
||||
Reference in New Issue
Block a user