forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.2'
Change-Id: I9006dd493707ae626ae3502541599c8789e1aab0
This commit is contained in:
@@ -32,15 +32,15 @@
|
|||||||
|
|
||||||
\title Connecting Android Devices
|
\title Connecting Android Devices
|
||||||
|
|
||||||
You can connect Android devices to the development PC to build, run, debug,
|
You can connect Android devices to the development PC to run, debug,
|
||||||
and analyze applications on them from \QC.
|
and analyze applications built for them from \QC.
|
||||||
|
|
||||||
If you have a tool chain for building applications for Android devices
|
If you have a tool chain for building applications for Android devices
|
||||||
installed on the development PC, you can add it to \QC. You can then add a
|
installed on the development PC, you can add it to \QC. You can then add a
|
||||||
\l{glossary-buildandrun-kit}{kit}
|
\l{glossary-buildandrun-kit}{kit}
|
||||||
with the Android device type, the tool chain, and the Qt version for Android,
|
with the Android device type, the tool chain, and the Qt version for Android,
|
||||||
to build and run applications on Android devices. You can also allow \QC to
|
to build applications for and run them on Android devices. You can also
|
||||||
automatically configure the kit.
|
allow \QC to automatically configure the kit.
|
||||||
|
|
||||||
The Android Debug Bridge (adb) command line tool is integrated to \QC to
|
The Android Debug Bridge (adb) command line tool is integrated to \QC to
|
||||||
enable you to deploy applications to connected Android devices, to run
|
enable you to deploy applications to connected Android devices, to run
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
\li Select \uicontrol Tools > \uicontrol Options >
|
\li Select \uicontrol Tools > \uicontrol Options >
|
||||||
\uicontrol {Build & Run} > \uicontrol Kits > \uicontrol Add to add a
|
\uicontrol {Build & Run} > \uicontrol Kits > \uicontrol Add to add a
|
||||||
kit for building and running applications on bare metal devices:
|
kit for building applications and running them on bare metal devices:
|
||||||
|
|
||||||
\image creator-baremetal-kits.png "Bare Metal Device kits"
|
\image creator-baremetal-kits.png "Bare Metal Device kits"
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
device.
|
device.
|
||||||
|
|
||||||
\li Select \uicontrol Projects > \uicontrol {Build & Run}, and then
|
\li Select \uicontrol Projects > \uicontrol {Build & Run}, and then
|
||||||
select the kit for building and running the application on the bare
|
select the kit for building the application and running it on the bare
|
||||||
metal device specified in the kit.
|
metal device specified in the kit.
|
||||||
|
|
||||||
\image creator-baremetal-kit-for-project.png "Adding a bare metal kit for a project"
|
\image creator-baremetal-kit-for-project.png "Adding a bare metal kit for a project"
|
||||||
|
|||||||
@@ -33,12 +33,12 @@
|
|||||||
\title Connecting iOS Devices
|
\title Connecting iOS Devices
|
||||||
|
|
||||||
You can connect iOS devices to a Mac computer with a USB cable to
|
You can connect iOS devices to a Mac computer with a USB cable to
|
||||||
build and run applications on them from \QC.
|
run applications built for them from \QC.
|
||||||
|
|
||||||
To be able to use \QC on \macos, you must install Xcode, and therefore,
|
To be able to use \QC on \macos, you must install Xcode, and therefore,
|
||||||
you already have the tool chain for building applications for iOS. \QC
|
you already have the tool chain for building applications for iOS. \QC
|
||||||
automatically detects the tool chain and creates the necessary
|
automatically detects the tool chain and creates the necessary
|
||||||
\l{glossary-buildandrun-kit}{kits} for building and running applications on
|
\l{glossary-buildandrun-kit}{kits} to build applications for and run them on
|
||||||
configured iOS devices.
|
configured iOS devices.
|
||||||
|
|
||||||
You only need Qt libraries that are built for iOS. You can install them as
|
You only need Qt libraries that are built for iOS. You can install them as
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
device.
|
device.
|
||||||
|
|
||||||
\li Select \uicontrol Projects > \uicontrol {Build & Run} to select
|
\li Select \uicontrol Projects > \uicontrol {Build & Run} to select
|
||||||
the kit for building and running applications on iOS.
|
the kit for building applications for and running them on iOS.
|
||||||
|
|
||||||
\image qtcreator-ios-add-kit.png "Build & Run Settings"
|
\image qtcreator-ios-add-kit.png "Build & Run Settings"
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
\section1 Running on Embedded Linux Devices
|
\section1 Running on Embedded Linux Devices
|
||||||
|
|
||||||
To build and run the application for a device:
|
To build the application and run it on a device:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
|
|||||||
@@ -32,14 +32,14 @@
|
|||||||
|
|
||||||
\title Connecting Embedded Linux Devices
|
\title Connecting Embedded Linux Devices
|
||||||
|
|
||||||
You can connect embedded Linux devices to the development PC to build, run,
|
You can connect embedded Linux devices to the development PC to run,
|
||||||
debug, and analyze applications on them from \QC.
|
debug, and analyze applications built for them from \QC.
|
||||||
|
|
||||||
If you have a tool chain for building applications for embedded Linux
|
If you have a tool chain for building applications for embedded Linux
|
||||||
devices installed on the development PC, you can add
|
devices installed on the development PC, you can add
|
||||||
it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit}
|
it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit}
|
||||||
with \uicontrol {Embedded Linux} device type to
|
with \uicontrol {Embedded Linux} device type to
|
||||||
build and run applications on embedded Linux devices.
|
build applications for and run them on embedded Linux devices.
|
||||||
|
|
||||||
To be able to run and debug applications on embedded Linux devices, you must
|
To be able to run and debug applications on embedded Linux devices, you must
|
||||||
add devices and select them in the \QC \l{glossary-buildandrun-kit}{kit}.
|
add devices and select them in the \QC \l{glossary-buildandrun-kit}{kit}.
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
\li Project
|
\li Project
|
||||||
\target glossary-project
|
\target glossary-project
|
||||||
\li Groups together a set of source files, forms, and resource files
|
\li Groups together a set of source files, forms, and resource files
|
||||||
that you can build, deploy, and run for different desktop,
|
that you can build for, as well as deploy and run on different desktop,
|
||||||
embedded, and mobile device platforms, as
|
embedded, and mobile device platforms, as
|
||||||
specified by a \e {build configuration}, \e {deploy
|
specified by a \e {build configuration}, \e {deploy
|
||||||
configuration}, and \e {run configuration}.
|
configuration}, and \e {run configuration}.
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
|
|
||||||
\title Connecting Mobile Devices
|
\title Connecting Mobile Devices
|
||||||
|
|
||||||
You can connect mobile devices to the development PC to build, run, debug,
|
You can connect mobile devices to the development PC to run, debug,
|
||||||
and analyze applications on them from \QC. When you install Qt for a
|
and analyze applications built for them from \QC. When you install Qt for a
|
||||||
target platform, such as Android or QNX, the build and run settings for the
|
target platform, such as Android or QNX, the build and run settings for the
|
||||||
development targets might be set up automatically in \QC.
|
development targets might be set up automatically in \QC.
|
||||||
|
|
||||||
|
|||||||
@@ -92,9 +92,9 @@
|
|||||||
projects as \e {generic projects} and fully control the steps
|
projects as \e {generic projects} and fully control the steps
|
||||||
and commands used to build the project.
|
and commands used to build the project.
|
||||||
|
|
||||||
\QC provides support for building, running, and deploying Qt
|
\QC provides support for running and deploying Qt applications
|
||||||
applications for desktop environment as well as embedded and
|
built for the desktop environment as well as embedded and
|
||||||
mobile devices. \l{glossary-buildandrun-kit}{Kits}, build,
|
mobile devices. \l{glossary-buildandrun-kit}{Kits}, build,
|
||||||
run, and deployment settings allow you to quickly switch between
|
run, and deployment settings allow you to quickly switch between
|
||||||
different setups and target platforms.
|
different setups and target platforms.
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
\image creator_buildingrunning.png
|
\image creator_buildingrunning.png
|
||||||
|
|
||||||
\QC provides support for building, running, and deploying Qt applications
|
\QC provides support for running and deploying Qt applications built
|
||||||
for different target platforms, or using different compilers, debuggers, or
|
for different target platforms, or using different compilers, debuggers, or
|
||||||
Qt versions.
|
Qt versions.
|
||||||
\l{glossary-buildandrun-kit}{Kits} define the tools,
|
\l{glossary-buildandrun-kit}{Kits} define the tools,
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
Qt is supported on a variety of 32-bit and 64-bit platforms, and can
|
Qt is supported on a variety of 32-bit and 64-bit platforms, and can
|
||||||
usually be built on each platform with GCC, a vendor-supplied compiler, or
|
usually be built on each platform with GCC, a vendor-supplied compiler, or
|
||||||
a third party compiler. In \QC, a \l{glossary-buildandrun-kit}{kit}
|
a third party compiler. In \QC, a \l{glossary-buildandrun-kit}{kit}
|
||||||
specifies the compiler and other necessary tools for building and running an
|
specifies the compiler and other necessary tools for building an application
|
||||||
application on a particular platform.
|
for and running it on a particular platform.
|
||||||
|
|
||||||
\QC automatically detects the compilers that are registered by your system
|
\QC automatically detects the compilers that are registered by your system
|
||||||
or by an installer. You can add compilers to build applications by using other
|
or by an installer. You can add compilers to build applications by using other
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
\section1 Setting up the Development Environment
|
\section1 Setting up the Development Environment
|
||||||
|
|
||||||
To be able to build and run the application on a mobile device, you must
|
To be able to build the application for and run it on a mobile device, you must
|
||||||
set up the development environment for the device platform and configure a
|
set up the development environment for the device platform and configure a
|
||||||
connection between \QC and the mobile device.
|
connection between \QC and the mobile device.
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
device.
|
device.
|
||||||
|
|
||||||
\li Select \uicontrol Projects > \uicontrol {Build & Run} to
|
\li Select \uicontrol Projects > \uicontrol {Build & Run} to
|
||||||
enable a kit for building and running applications on Windows
|
enable a kit for building applications and running them on Windows
|
||||||
Runtime devices (the local computer, for now), Windows Phones,
|
Runtime devices (the local computer, for now), Windows Phones,
|
||||||
or the Windows Phone emulator.
|
or the Windows Phone emulator.
|
||||||
|
|
||||||
|
|||||||
@@ -41,11 +41,12 @@ while (my $line = <STDIN> ) {
|
|||||||
chomp($line);
|
chomp($line);
|
||||||
# --- extract file name based matching:
|
# --- extract file name based matching:
|
||||||
# file.cpp:214:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
|
# file.cpp:214:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
|
||||||
if ($line =~ /^([^:]+):(\d+):\d*:? warning: (.*)$/) {
|
if ($line =~ /^([^:]+):(\d+):\d*:? (warning|error): (.*)$/) {
|
||||||
my $fileName = $1;
|
my $fileName = $1;
|
||||||
my $lineNumber = $2;
|
my $lineNumber = $2;
|
||||||
my $text = $3;
|
my $type = $3 eq 'warning' ? 'warn' : 'err';
|
||||||
|
my $text = $4;
|
||||||
$fileName =~ s|\\|/|g;
|
$fileName =~ s|\\|/|g;
|
||||||
print $fileName, "\t", $lineNumber, "\twarn\t", $text,"\n";
|
print $fileName, "\t", $lineNumber, "\t", $type, "\t", $text,"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ def qdump__QDateTime(d, value):
|
|||||||
spec = (status & 0x30) >> 4
|
spec = (status & 0x30) >> 4
|
||||||
isValid = True
|
isValid = True
|
||||||
|
|
||||||
d.putValue('%s/%s/%s/%s/%s' % (msecs, spec, offsetFromUtc, timeZone, status),
|
d.putValue('%s/%s/%s/%s/%s/%s' % (msecs, spec, offsetFromUtc, timeZone, status, tiVersion),
|
||||||
'datetimeinternal')
|
'datetimeinternal')
|
||||||
else:
|
else:
|
||||||
if d.isWindowsTarget():
|
if d.isWindowsTarget():
|
||||||
@@ -344,7 +344,7 @@ def qdump__QDateTime(d, value):
|
|||||||
else:
|
else:
|
||||||
idBase = tzp + 2 * d.ptrSize() # [QSharedData] + [vptr]
|
idBase = tzp + 2 * d.ptrSize() # [QSharedData] + [vptr]
|
||||||
elided, tz = d.encodeByteArrayHelper(d.extractPointer(idBase), limit=100)
|
elided, tz = d.encodeByteArrayHelper(d.extractPointer(idBase), limit=100)
|
||||||
d.putValue('%s/%s/%s/%s/%s' % (msecs, spec, offset, tz, status),
|
d.putValue('%s/%s/%s/%s/%s/%s' % (msecs, spec, offset, tz, status, 0),
|
||||||
'datetimeinternal')
|
'datetimeinternal')
|
||||||
else:
|
else:
|
||||||
# This relies on the Qt4/Qt5 internal structure layout:
|
# This relies on the Qt4/Qt5 internal structure layout:
|
||||||
|
|||||||
@@ -230,6 +230,32 @@ static bool symbolIdentical(Symbol *s1, Symbol *s2)
|
|||||||
return QByteArray(s1->fileName()) == QByteArray(s2->fileName());
|
return QByteArray(s1->fileName()) == QByteArray(s2->fileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const Name *toName(const QList<const Name *> &names, Control *control)
|
||||||
|
{
|
||||||
|
const Name *n = 0;
|
||||||
|
for (int i = names.size() - 1; i >= 0; --i) {
|
||||||
|
if (! n)
|
||||||
|
n = names.at(i);
|
||||||
|
else
|
||||||
|
n = control->qualifiedNameId(names.at(i), n);
|
||||||
|
}
|
||||||
|
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool isInlineNamespace(ClassOrNamespace *con, const Name *name)
|
||||||
|
{
|
||||||
|
const QList<LookupItem> items = con->find(name);
|
||||||
|
if (!items.isEmpty()) {
|
||||||
|
if (const Symbol *declaration = items.first().declaration() ) {
|
||||||
|
if (const Namespace *ns = declaration->asNamespace())
|
||||||
|
return ns->isInline();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const Name *LookupContext::minimalName(Symbol *symbol, ClassOrNamespace *target, Control *control)
|
const Name *LookupContext::minimalName(Symbol *symbol, ClassOrNamespace *target, Control *control)
|
||||||
{
|
{
|
||||||
const Name *n = 0;
|
const Name *n = 0;
|
||||||
@@ -245,8 +271,17 @@ const Name *LookupContext::minimalName(Symbol *symbol, ClassOrNamespace *target,
|
|||||||
if (target) {
|
if (target) {
|
||||||
const QList<LookupItem> tresults = target->lookup(n);
|
const QList<LookupItem> tresults = target->lookup(n);
|
||||||
foreach (const LookupItem &tr, tresults) {
|
foreach (const LookupItem &tr, tresults) {
|
||||||
if (symbolIdentical(tr.declaration(), symbol))
|
if (symbolIdentical(tr.declaration(), symbol)) {
|
||||||
return n;
|
// eliminate inline namespaces
|
||||||
|
QList<const Name *> minimal = names.mid(i);
|
||||||
|
for (int i = minimal.size() - 2; i >= 0; --i) {
|
||||||
|
const Name *candidate = toName(minimal.mid(0, i + 1), control);
|
||||||
|
if (isInlineNamespace(target, candidate))
|
||||||
|
minimal.removeAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
return toName(minimal, control);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -902,6 +902,20 @@ std::string QtInfo::prependModuleAndNameSpace(const std::string &type,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int QtInfo::qtTypeInfoVersion(const SymbolGroupValueContext &ctx)
|
||||||
|
{
|
||||||
|
const QtInfo qtInfo = QtInfo::get(ctx);
|
||||||
|
const std::string &hookDataSymbolName = qtInfo.prependQtCoreModule("qtHookData");
|
||||||
|
ULONG64 offset = 0;
|
||||||
|
if (FAILED(ctx.symbols->GetOffsetByName(hookDataSymbolName.c_str(), &offset)))
|
||||||
|
return 0;
|
||||||
|
ULONG64 hookVer = SymbolGroupValue::readPointerValue(ctx.dataspaces, offset);
|
||||||
|
if (hookVer < 3)
|
||||||
|
return 0;
|
||||||
|
offset += 6 * SymbolGroupValue::pointerSize();
|
||||||
|
return static_cast<int>(SymbolGroupValue::readPointerValue(ctx.dataspaces, offset));
|
||||||
|
}
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &os, const QtInfo &i)
|
std::ostream &operator<<(std::ostream &os, const QtInfo &i)
|
||||||
{
|
{
|
||||||
os << "Qt Info: Version: " << i.version << " Modules '"
|
os << "Qt Info: Version: " << i.version << " Modules '"
|
||||||
@@ -2404,33 +2418,59 @@ static bool dumpQDateTime(const SymbolGroupValue &v, std::wostream &str, std::st
|
|||||||
{
|
{
|
||||||
// QDate is 64bit starting from Qt 5 which is always aligned 64bit.
|
// QDate is 64bit starting from Qt 5 which is always aligned 64bit.
|
||||||
if (QtInfo::get(v.context()).version == 5) {
|
if (QtInfo::get(v.context()).version == 5) {
|
||||||
// the dumper on the creator side expects msecs/spec/offset/tz/status
|
// the dumper on the creator side expects msecs/spec/offset/tz/status/type info version
|
||||||
const char separator = '/';
|
const char separator = '/';
|
||||||
const ULONG64 msecsAddr = addressOfQPrivateMember(v, QPDM_None, 0);
|
LONG64 msecs = 0;
|
||||||
if (!msecsAddr)
|
int spec = 0;
|
||||||
return false;
|
int offset = 0;
|
||||||
|
std::wstring timeZoneString;
|
||||||
|
int status = 0;
|
||||||
|
int tiVersion = QtInfo::qtTypeInfoVersion(v.context());
|
||||||
|
if (tiVersion > 10) {
|
||||||
|
const ULONG64 data = SymbolGroupValue::readUnsignedValue(
|
||||||
|
v.context().dataspaces, v.address(), 8, 0);
|
||||||
|
status = data & 0xFF;
|
||||||
|
ULONG64 timeZone = 0;
|
||||||
|
if (status & 0x01) {
|
||||||
|
msecs = data >> 8;
|
||||||
|
spec = (status & 0x30) >> 4;
|
||||||
|
} else {
|
||||||
|
ULONG64 addr = SymbolGroupValue::readPointerValue(v.context().dataspaces, v.address());
|
||||||
|
msecs = SymbolGroupValue::readSignedValue(v.context().dataspaces, addr, 8, 0);
|
||||||
|
|
||||||
int addrOffset = 8 /*QSharedData + padded*/;
|
addr += 8 /*int64*/;
|
||||||
const LONG64 msecs = SymbolGroupValue::readSignedValue(
|
status = SymbolGroupValue::readIntValue(v.context().dataspaces, addr);
|
||||||
v.context().dataspaces, msecsAddr + addrOffset, 8, 0);
|
|
||||||
|
|
||||||
addrOffset += 8 /*int64*/;
|
addr += SymbolGroupValue::intSize();
|
||||||
const int spec = SymbolGroupValue::readIntValue(
|
offset = SymbolGroupValue::readIntValue(v.context().dataspaces, addr);
|
||||||
v.context().dataspaces, msecsAddr + addrOffset);
|
|
||||||
|
|
||||||
addrOffset += SymbolGroupValue::sizeOf("Qt::TimeSpec");
|
addr += 2 * SymbolGroupValue::intSize();
|
||||||
const int offset = SymbolGroupValue::readIntValue(
|
timeZone = SymbolGroupValue::readPointerValue(v.context().dataspaces, addr);
|
||||||
v.context().dataspaces, msecsAddr + addrOffset);
|
}
|
||||||
|
timeZoneString = std::to_wstring(timeZone);
|
||||||
|
} else {
|
||||||
|
const ULONG64 msecsAddr = addressOfQPrivateMember(v, QPDM_None, 0);
|
||||||
|
if (!msecsAddr)
|
||||||
|
return false;
|
||||||
|
|
||||||
addrOffset += SymbolGroupValue::intSize();
|
int addrOffset = 8 /*QSharedData + padded*/;
|
||||||
std::wostringstream timeZoneStream;
|
msecs = SymbolGroupValue::readSignedValue(
|
||||||
dumpQTimeZoneFromQPrivateClass(v, QPDM_None, addrOffset, timeZoneStream, 0);
|
v.context().dataspaces, msecsAddr + addrOffset, 8, 0);
|
||||||
const std::wstring &timeZoneString = timeZoneStream.str();
|
|
||||||
|
|
||||||
addrOffset += SymbolGroupValue::sizeOf("QTimeZone");
|
addrOffset += 8 /*int64*/;
|
||||||
const int status = SymbolGroupValue::readIntValue(
|
spec = SymbolGroupValue::readIntValue(v.context().dataspaces, msecsAddr + addrOffset);
|
||||||
v.context().dataspaces, msecsAddr + addrOffset);
|
|
||||||
|
|
||||||
|
addrOffset += SymbolGroupValue::sizeOf("Qt::TimeSpec");
|
||||||
|
offset = SymbolGroupValue::readIntValue(v.context().dataspaces, msecsAddr + addrOffset);
|
||||||
|
|
||||||
|
addrOffset += SymbolGroupValue::intSize();
|
||||||
|
std::wostringstream timeZoneStream;
|
||||||
|
dumpQTimeZoneFromQPrivateClass(v, QPDM_None, addrOffset, timeZoneStream, 0);
|
||||||
|
timeZoneString = timeZoneStream.str();
|
||||||
|
|
||||||
|
addrOffset += SymbolGroupValue::sizeOf("QTimeZone");
|
||||||
|
status = SymbolGroupValue::readIntValue(v.context().dataspaces, msecsAddr + addrOffset);
|
||||||
|
}
|
||||||
enum StatusFlag {
|
enum StatusFlag {
|
||||||
ValidDate = 0x04,
|
ValidDate = 0x04,
|
||||||
ValidTime = 0x08,
|
ValidTime = 0x08,
|
||||||
@@ -2440,12 +2480,12 @@ static bool dumpQDateTime(const SymbolGroupValue &v, std::wostream &str, std::st
|
|||||||
str << L"(invalid)";
|
str << L"(invalid)";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
str << msecs << separator
|
str << msecs << separator
|
||||||
<< spec << separator
|
<< spec << separator
|
||||||
<< offset << separator
|
<< offset << separator
|
||||||
<< timeZoneString << separator
|
<< timeZoneString << separator
|
||||||
<< status;
|
<< status << separator
|
||||||
|
<< tiVersion;
|
||||||
|
|
||||||
if (encoding)
|
if (encoding)
|
||||||
*encoding = "datetimeinternal";
|
*encoding = "datetimeinternal";
|
||||||
|
|||||||
@@ -230,6 +230,8 @@ struct QtInfo
|
|||||||
const std::string &module,
|
const std::string &module,
|
||||||
const std::string &nameSpace);
|
const std::string &nameSpace);
|
||||||
|
|
||||||
|
static int qtTypeInfoVersion(const SymbolGroupValueContext &ctx);
|
||||||
|
|
||||||
std::string moduleName(Module m) const;
|
std::string moduleName(Module m) const;
|
||||||
|
|
||||||
int version = 0;
|
int version = 0;
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ const QLatin1String UninstallPreviousPackageKey("UninstallPreviousPackage");
|
|||||||
const QLatin1String InstallFailedInconsistentCertificatesString("INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES");
|
const QLatin1String InstallFailedInconsistentCertificatesString("INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES");
|
||||||
const QLatin1String InstallFailedUpdateIncompatible("INSTALL_FAILED_UPDATE_INCOMPATIBLE");
|
const QLatin1String InstallFailedUpdateIncompatible("INSTALL_FAILED_UPDATE_INCOMPATIBLE");
|
||||||
const QLatin1String InstallFailedPermissionModelDowngrade("INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE");
|
const QLatin1String InstallFailedPermissionModelDowngrade("INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE");
|
||||||
|
const QLatin1String InstallFailedVersionDowngrade("INSTALL_FAILED_VERSION_DOWNGRADE");
|
||||||
const Core::Id AndroidDeployQtStep::Id("Qt4ProjectManager.AndroidDeployQtStep");
|
const Core::Id AndroidDeployQtStep::Id("Qt4ProjectManager.AndroidDeployQtStep");
|
||||||
|
|
||||||
//////////////////
|
//////////////////
|
||||||
@@ -389,6 +390,9 @@ void AndroidDeployQtStep::slotAskForUninstall(DeployErrorCode errorCode)
|
|||||||
case UpdateIncompatible:
|
case UpdateIncompatible:
|
||||||
uninstallMsg += InstallFailedUpdateIncompatible+"\n";
|
uninstallMsg += InstallFailedUpdateIncompatible+"\n";
|
||||||
break;
|
break;
|
||||||
|
case VersionDowngrade:
|
||||||
|
uninstallMsg += InstallFailedVersionDowngrade+"\n";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -517,6 +521,8 @@ AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::parseDeployErrors(QStr
|
|||||||
errorCode |= UpdateIncompatible;
|
errorCode |= UpdateIncompatible;
|
||||||
if (deployOutputLine.contains(InstallFailedPermissionModelDowngrade))
|
if (deployOutputLine.contains(InstallFailedPermissionModelDowngrade))
|
||||||
errorCode |= PermissionModelDowngrade;
|
errorCode |= PermissionModelDowngrade;
|
||||||
|
if (deployOutputLine.contains(InstallFailedVersionDowngrade))
|
||||||
|
errorCode |= VersionDowngrade;
|
||||||
|
|
||||||
return errorCode;
|
return errorCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ class AndroidDeployQtStep : public ProjectExplorer::BuildStep
|
|||||||
InconsistentCertificates = 0x0001,
|
InconsistentCertificates = 0x0001,
|
||||||
UpdateIncompatible = 0x0002,
|
UpdateIncompatible = 0x0002,
|
||||||
PermissionModelDowngrade = 0x0004,
|
PermissionModelDowngrade = 0x0004,
|
||||||
Failure = 0x0008
|
VersionDowngrade = 0x0008,
|
||||||
|
Failure = 0x0010
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -171,7 +171,10 @@ void BareMetalDebugSupport::startExecution()
|
|||||||
|
|
||||||
StandardRunnable r;
|
StandardRunnable r;
|
||||||
r.executable = p->executable();
|
r.executable = p->executable();
|
||||||
r.commandLineArguments = Utils::QtcProcess::joinArgs(p->arguments(), Utils::OsTypeLinux);
|
// We need to wrap the command arguments depending on a host OS,
|
||||||
|
// as the bare metal's GDB servers are launched on a host,
|
||||||
|
// but not on a target.
|
||||||
|
r.commandLineArguments = Utils::QtcProcess::joinArgs(p->arguments(), Utils::HostOsInfo::hostOs());
|
||||||
m_appRunner->start(dev, r);
|
m_appRunner->start(dev, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -967,7 +967,6 @@ public:
|
|||||||
|
|
||||||
void updateUiForProject(ProjectExplorer::Project *project);
|
void updateUiForProject(ProjectExplorer::Project *project);
|
||||||
void updateUiForTarget(ProjectExplorer::Target *target);
|
void updateUiForTarget(ProjectExplorer::Target *target);
|
||||||
void updateUiForRunConfiguration(ProjectExplorer::RunConfiguration *rc);
|
|
||||||
void updateActiveLanguages();
|
void updateActiveLanguages();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -3324,12 +3323,11 @@ void DebuggerPluginPrivate::updateUiForProject(Project *project)
|
|||||||
}
|
}
|
||||||
m_previousProject = project;
|
m_previousProject = project;
|
||||||
if (!project) {
|
if (!project) {
|
||||||
updateUiForTarget(0);
|
updateUiForTarget(nullptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
connect(project, &Project::activeTargetChanged,
|
connect(project, &Project::activeTargetChanged,
|
||||||
this, &DebuggerPluginPrivate::updateUiForTarget,
|
this, &DebuggerPluginPrivate::updateUiForTarget);
|
||||||
Qt::QueuedConnection);
|
|
||||||
updateUiForTarget(project->activeTarget());
|
updateUiForTarget(project->activeTarget());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3337,35 +3335,19 @@ void DebuggerPluginPrivate::updateUiForTarget(Target *target)
|
|||||||
{
|
{
|
||||||
if (m_previousTarget) {
|
if (m_previousTarget) {
|
||||||
disconnect(m_previousTarget.data(), &Target::activeRunConfigurationChanged,
|
disconnect(m_previousTarget.data(), &Target::activeRunConfigurationChanged,
|
||||||
this, &DebuggerPluginPrivate::updateUiForRunConfiguration);
|
this, &DebuggerPluginPrivate::updateActiveLanguages);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_previousTarget = target;
|
m_previousTarget = target;
|
||||||
|
|
||||||
if (!target) {
|
if (!target) {
|
||||||
updateUiForRunConfiguration(0);
|
updateActiveLanguages();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(target, &Target::activeRunConfigurationChanged,
|
connect(target, &Target::activeRunConfigurationChanged,
|
||||||
this, &DebuggerPluginPrivate::updateUiForRunConfiguration,
|
this, &DebuggerPluginPrivate::updateActiveLanguages);
|
||||||
Qt::QueuedConnection);
|
|
||||||
updateUiForRunConfiguration(target->activeRunConfiguration());
|
|
||||||
}
|
|
||||||
|
|
||||||
// updates default debug language settings per run config.
|
|
||||||
void DebuggerPluginPrivate::updateUiForRunConfiguration(RunConfiguration *rc)
|
|
||||||
{
|
|
||||||
// if (m_previousRunConfiguration)
|
|
||||||
// disconnect(m_previousRunConfiguration, &RunConfiguration::requestRunActionsUpdate,
|
|
||||||
// this, &DebuggerPluginPrivate::updateActiveLanguages);
|
|
||||||
// m_previousRunConfiguration = rc;
|
|
||||||
Q_UNUSED(rc); // FIXME
|
|
||||||
updateActiveLanguages();
|
updateActiveLanguages();
|
||||||
// if (m_previousRunConfiguration)
|
|
||||||
// connect(m_previousRunConfiguration, &RunConfiguration::requestRunActionsUpdate,
|
|
||||||
// this, &DebuggerPluginPrivate::updateActiveLanguages,
|
|
||||||
// Qt::QueuedConnection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerPluginPrivate::updateActiveLanguages()
|
void DebuggerPluginPrivate::updateActiveLanguages()
|
||||||
|
|||||||
@@ -512,7 +512,7 @@ static QTime timeFromData(int ms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stolen and adapted from qdatetime.cpp
|
// Stolen and adapted from qdatetime.cpp
|
||||||
static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time)
|
static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time, int tiVersion)
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
SECS_PER_DAY = 86400,
|
SECS_PER_DAY = 86400,
|
||||||
@@ -554,8 +554,8 @@ static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time)
|
|||||||
ds = msecs;
|
ds = msecs;
|
||||||
}
|
}
|
||||||
|
|
||||||
*date = (status & NullDate) ? QDate() : QDate::fromJulianDay(jd);
|
*date = ((status & NullDate) && tiVersion < 14) ? QDate() : QDate::fromJulianDay(jd);
|
||||||
*time = (status & NullTime) ? QTime() : QTime::fromMSecsSinceStartOfDay(ds);
|
*time = ((status & NullTime) && tiVersion < 14) ? QTime() : QTime::fromMSecsSinceStartOfDay(ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString decodeData(const QString &ba, const QString &encoding)
|
QString decodeData(const QString &ba, const QString &encoding)
|
||||||
@@ -671,6 +671,7 @@ QString decodeData(const QString &ba, const QString &encoding)
|
|||||||
int p1 = ba.indexOf('/', p0 + 1);
|
int p1 = ba.indexOf('/', p0 + 1);
|
||||||
int p2 = ba.indexOf('/', p1 + 1);
|
int p2 = ba.indexOf('/', p1 + 1);
|
||||||
int p3 = ba.indexOf('/', p2 + 1);
|
int p3 = ba.indexOf('/', p2 + 1);
|
||||||
|
int p4 = ba.indexOf('/', p3 + 1);
|
||||||
|
|
||||||
qint64 msecs = ba.left(p0).toLongLong();
|
qint64 msecs = ba.left(p0).toLongLong();
|
||||||
++p0;
|
++p0;
|
||||||
@@ -680,11 +681,13 @@ QString decodeData(const QString &ba, const QString &encoding)
|
|||||||
++p2;
|
++p2;
|
||||||
QByteArray timeZoneId = QByteArray::fromHex(ba.mid(p2, p3 - p2).toUtf8());
|
QByteArray timeZoneId = QByteArray::fromHex(ba.mid(p2, p3 - p2).toUtf8());
|
||||||
++p3;
|
++p3;
|
||||||
int status = ba.mid(p3).toInt();
|
int status = ba.mid(p3, p4 - p3).toInt();
|
||||||
|
++p4;
|
||||||
|
int tiVersion = ba.mid(p4).toInt();
|
||||||
|
|
||||||
QDate date;
|
QDate date;
|
||||||
QTime time;
|
QTime time;
|
||||||
getDateTime(msecs, status, &date, &time);
|
getDateTime(msecs, status, &date, &time, tiVersion);
|
||||||
|
|
||||||
QDateTime dateTime;
|
QDateTime dateTime;
|
||||||
if (spec == Qt::OffsetFromUTC) {
|
if (spec == Qt::OffsetFromUTC) {
|
||||||
|
|||||||
@@ -1579,7 +1579,8 @@ void ProjectExplorerPluginPrivate::savePersistentSettings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSettings *s = ICore::settings();
|
QSettings *s = ICore::settings();
|
||||||
s->setValue(QLatin1String("ProjectExplorer/StartupSession"), SessionManager::activeSession());
|
if (!SessionManager::isDefaultVirgin())
|
||||||
|
s->setValue(QLatin1String("ProjectExplorer/StartupSession"), SessionManager::activeSession());
|
||||||
s->remove(QLatin1String("ProjectExplorer/RecentProjects/Files"));
|
s->remove(QLatin1String("ProjectExplorer/RecentProjects/Files"));
|
||||||
|
|
||||||
QStringList fileNames;
|
QStringList fileNames;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#include <cplusplus/Literals.h>
|
#include <cplusplus/Literals.h>
|
||||||
#include <cplusplus/LookupContext.h>
|
#include <cplusplus/LookupContext.h>
|
||||||
#include <cplusplus/Name.h>
|
#include <cplusplus/Name.h>
|
||||||
|
#include <cplusplus/NamePrettyPrinter.h>
|
||||||
#include <cplusplus/Overview.h>
|
#include <cplusplus/Overview.h>
|
||||||
#include <cplusplus/ResolveExpression.h>
|
#include <cplusplus/ResolveExpression.h>
|
||||||
#include <cplusplus/Symbols.h>
|
#include <cplusplus/Symbols.h>
|
||||||
@@ -99,6 +100,9 @@ private slots:
|
|||||||
void templates_3();
|
void templates_3();
|
||||||
void templates_4();
|
void templates_4();
|
||||||
void templates_5();
|
void templates_5();
|
||||||
|
|
||||||
|
void minimalname_data();
|
||||||
|
void minimalname();
|
||||||
};
|
};
|
||||||
|
|
||||||
void tst_Lookup::base_class_defined_1()
|
void tst_Lookup::base_class_defined_1()
|
||||||
@@ -631,5 +635,47 @@ void tst_Lookup::templates_5()
|
|||||||
QVERIFY(doc->diagnosticMessages().isEmpty());
|
QVERIFY(doc->diagnosticMessages().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_Lookup::minimalname_data()
|
||||||
|
{
|
||||||
|
QTest::addColumn<QByteArray>("source");
|
||||||
|
QTest::addColumn<int>("index");
|
||||||
|
|
||||||
|
QTest::newRow("inlineNamespace1")
|
||||||
|
<< QByteArray("namespace std { inline namespace __cxx11 { class string{}; } }\n")
|
||||||
|
<< 0;
|
||||||
|
|
||||||
|
// This case is extracted from libstdc++ 5.4.0.
|
||||||
|
// The inline namespace is re-opened as non-inline, which is not standard
|
||||||
|
// compliant. However, gcc does this and clang only issues a warning.
|
||||||
|
QTest::newRow("inlineNamespace2")
|
||||||
|
<< QByteArray("namespace std { inline namespace __cxx11 {} }\n"
|
||||||
|
"namespace std { namespace __cxx11 { class string{}; } }\n")
|
||||||
|
<< 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void tst_Lookup::minimalname()
|
||||||
|
{
|
||||||
|
QFETCH(QByteArray, source);
|
||||||
|
QFETCH(int, index);
|
||||||
|
|
||||||
|
Document::Ptr doc = Document::create("minimalname");
|
||||||
|
doc->setUtf8Source(source);
|
||||||
|
doc->parse();
|
||||||
|
doc->check();
|
||||||
|
|
||||||
|
Snapshot snapshot;
|
||||||
|
snapshot.insert(doc);
|
||||||
|
LookupContext ctx(doc, snapshot);
|
||||||
|
Control control;
|
||||||
|
Symbol *symbol = doc->globalSymbolAt(unsigned(index))
|
||||||
|
->asNamespace()->memberAt(0)->asNamespace()->memberAt(0);
|
||||||
|
|
||||||
|
const Name *minimalName = LookupContext::minimalName(symbol, ctx.globalNamespace(), &control);
|
||||||
|
|
||||||
|
Overview oo;
|
||||||
|
const QString minimalNameAsString = NamePrettyPrinter(&oo)(minimalName);
|
||||||
|
QCOMPARE(minimalNameAsString, QString::fromUtf8("std::string"));
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_APPLESS_MAIN(tst_Lookup)
|
QTEST_APPLESS_MAIN(tst_Lookup)
|
||||||
#include "tst_lookup.moc"
|
#include "tst_lookup.moc"
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
|
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
gdb.file = gdb.pro
|
# Avoid race condition when compiling with multiple jobs or moc_predefs.h might get used and
|
||||||
simplifytypes.file = simplifytypes.pro
|
# overridden at the same time as the sub projects are using the same build directory.
|
||||||
|
# Correct would be to completely rearrange these sub projects into sub directories, using the
|
||||||
|
# quick fix instead.
|
||||||
|
CONFIG += ordered
|
||||||
|
|
||||||
# avoid race condition when compiling with multiple jobs
|
SUBDIRS += gdb.pro
|
||||||
dumpers.depends = gdb simplifytypes
|
SUBDIRS += simplifytypes.pro
|
||||||
dumpers.file = dumpers.pro
|
SUBDIRS += dumpers.pro
|
||||||
|
|
||||||
SUBDIRS += gdb
|
|
||||||
SUBDIRS += simplifytypes
|
|
||||||
SUBDIRS += dumpers
|
|
||||||
SUBDIRS += namedemangler.pro
|
SUBDIRS += namedemangler.pro
|
||||||
SUBDIRS += disassembler.pro
|
SUBDIRS += disassembler.pro
|
||||||
SUBDIRS += offsets.pro
|
SUBDIRS += offsets.pro
|
||||||
|
|||||||
@@ -1933,8 +1933,8 @@ void tst_Dumpers::dumper_data()
|
|||||||
+ CheckType("t1.(SystemLocale)", "@QString") % Optional()
|
+ CheckType("t1.(SystemLocale)", "@QString") % Optional()
|
||||||
|
|
||||||
+ Check("dt0", "(invalid)", "@QDateTime")
|
+ Check("dt0", "(invalid)", "@QDateTime")
|
||||||
//+ Check("dt1", Value4("Tue Jan 1 13:15:32 1980"), "@QDateTime")
|
+ Check("dt1", Value4("Tue Jan 1 13:15:32 1980"), "@QDateTime")
|
||||||
//+ Check("dt1", Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime")
|
+ Check("dt1", Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime")
|
||||||
+ Check("dt1.(ISO)",
|
+ Check("dt1.(ISO)",
|
||||||
"\"1980-01-01T13:15:32Z\"", "@QString") % Optional()
|
"\"1980-01-01T13:15:32Z\"", "@QString") % Optional()
|
||||||
+ CheckType("dt1.(Locale)", "@QString") % Optional()
|
+ CheckType("dt1.(Locale)", "@QString") % Optional()
|
||||||
|
|||||||
@@ -386,8 +386,11 @@ def openDocument(treeElement):
|
|||||||
expected = str(item.text).split("/")[-1]
|
expected = str(item.text).split("/")[-1]
|
||||||
if waitFor("expected in str(mainWindow.windowTitle)", 5000):
|
if waitFor("expected in str(mainWindow.windowTitle)", 5000):
|
||||||
return True
|
return True
|
||||||
|
test.log("Expected file (%s) was not being opened in openDocument()" % expected)
|
||||||
return False
|
return False
|
||||||
except:
|
except:
|
||||||
|
t,v = sys.exc_info()[:2]
|
||||||
|
test.log("An exception occurred in openDocument(): %s(%s)" % (str(t), str(v)))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def earlyExit(details="No additional information"):
|
def earlyExit(details="No additional information"):
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ def checkWelcomePage(sessionName, isCurrent=False):
|
|||||||
|
|
||||||
def checkNavigator(expectedRows, message):
|
def checkNavigator(expectedRows, message):
|
||||||
navigatorModel = waitForObject(":Qt Creator_Utils::NavigationTreeView").model()
|
navigatorModel = waitForObject(":Qt Creator_Utils::NavigationTreeView").model()
|
||||||
|
waitFor("expectedRows == len(__iterateChildren__(navigatorModel, QModelIndex()))", 1000)
|
||||||
test.compare(expectedRows, len(__iterateChildren__(navigatorModel, QModelIndex())), message)
|
test.compare(expectedRows, len(__iterateChildren__(navigatorModel, QModelIndex())), message)
|
||||||
|
|
||||||
def checkOpenDocuments(expectedRows, message):
|
def checkOpenDocuments(expectedRows, message):
|
||||||
|
|||||||
Reference in New Issue
Block a user