Merge remote-tracking branch 'origin/3.4'

This commit is contained in:
Eike Ziller
2015-03-31 09:09:32 +02:00
64 changed files with 500 additions and 438 deletions

5
dist/changes-3.4.0 vendored
View File

@@ -11,6 +11,7 @@ General
* Added option to change environment for running external tools (QTCREATORBUG-4995)
* Improved performance of output panes
* Fixed that wizard windows were missing in Window menu (QTCREATORBUG-13766)
* Fixed that editing external tools was removing their shortcut (QTCREATORBUG-8108)
Editing
* Switched to a QMimeDatabase based MIME database implementation
@@ -90,6 +91,7 @@ Analyzer
QML Profiler
* Made it possible to search through event notes (QTCREATORBUG-13417)
* Made it possible to horizontally resize details windows (QTCREATORBUG-14054)
C++ Support
* Added support for binary literals (n3472)
@@ -107,6 +109,8 @@ C++ Support
* Fixed that Assign to Local Variable refactoring action was not working with chained
function calls (QTCREATORBUG-10355)
* Fixed several issues with completion and iterators (QTCREATORBUG-13799)
* Fixed resolution of nested types in member functions (QTCREATORBUG-13978)
* Fixed parsing of function-like macros with comments (QTCREATORBUG-9535)
QML Support
* Fixed crash on closing one of multiple outline views (QTCREATORBUG-13614)
@@ -148,6 +152,7 @@ Platform Specific
Windows
OS X
* Fixed that importing builds of qmake projects was duplicating kits (QTCREATORBUG-13947)
Linux
* Added support to retrieve application output from journald.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -32,9 +32,8 @@
need a fake Qt installation.
The bare metal device type accepts custom GDB commands that you specify in
the device options.
\image creator-baremetal-device.png "Bare Metal Device options"
the device options. You can specify the commands to execute by default or
the commands to execute when connecting to OpenOCD or ST-LINK Utility.
To connect bare metal devices:
@@ -45,29 +44,73 @@
\li Restart \QC to be able to use the plugin.
\li Select \uicontrol Tools > \uicontrol Options >
\uicontrol {Bare Metal} > \uicontrol Add > \uicontrol Default,
\uicontrol OpenCD, or \uicontrol {ST-LINK Utility} to specify
connections to GDB servers or hardware debuggers:
\image creator-baremetal-device.png "Bare Metal options"
\list 1
\li In the \uicontrol {Startup mode} field, select the mode to
start the GDB server or debugger in. The available modes
depend on the server or debugger.
\li In the \uicontrol Host field, select the host name and port
number to connect to the GDB server or hardware debugger.
\li In the \uicontrol {Init commands} field, enter the commands
to execute when initializing the connection.
\li In the \uicontrol {Reset commands} field, enter the commands
to execute when resetting the connection.
\li Select \uicontrol Apply to add the GDB server or debugger.
\endlist
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Devices > \uicontrol Add >
\uicontrol {Bare Metal Device} > \uicontrol {Start Wizard}.
\uicontrol {Bare Metal Device} > \uicontrol {Start Wizard}:
\li In the \uicontrol {GDB host} and \uicontrol {GDB port} fields, specify the host
name and port number to access the GDB server or hardware debugger.
\list 1
\li In the \uicontrol {GDB commands} fields, specify custom commands for the
GDB server or hardware debugger.
\li In the \uicontrol {GDB server provider} field, select a
GDB server or hardware debugger.
\li To specify build settings:
\li Select \uicontrol Apply to add the device.
\list 1
\endlist
\li Open a project for an application you want to develop for the
device.
\li Select \uicontrol Tools > \uicontrol Options >
\uicontrol {Build & Run} > \uicontrol Kits > \uicontrol Add to add a
kit for building and running applications on bare metal devices:
\li Select \uicontrol Projects > \uicontrol {Build & Run} > \uicontrol {Add Kit} to
add a kit for building and running applications on bare metal
devices.
\image creator-baremetal-kits.png "Bare Metal Device kits"
\image creator-baremetal-kits.png "Bare Metal Device kits"
\list 1
\endlist
\li In the \uicontrol Name field, specify a name for the kit.
\li In the \uicontrol {Device type} field, select
\uicontrol {Bare Metal Device}.
\li In the \uicontrol Device field, select the bare metal device
for the kit.
\li Select \uicontrol Apply to add the kit.
\endlist
\li Open a project for an application you want to develop for the
device.
\li Select \uicontrol Projects > \uicontrol {Build & Run} >
\uicontrol {Add Kit}, and then select the kit for building and
running the application on the bare metal device specified in the
kit.
\image creator-baremetal-kit-for-project.png "Adding a bare metal kit for a project"
\li Select \uicontrol Run to specify run settings.

View File

@@ -29,6 +29,10 @@
For more information about Qbs, see
the \l{http://doc.qt.io/qbs/index.html}{Qbs Manual}.
The application is built using the default Qbs profile that is associated
with the build and run kit. \QC automatically creates a Qbs profile for each
kit. You can edit the build profiles by adding new keys and values.
\section1 Building Qbs
If you build \QC yourself from the \QC Git repository, you also need to
@@ -147,4 +151,28 @@
(\uicontrol Run) button to deploy and run the application.
\endlist
\section1 Editing Build Profiles
\image qtcreator-options-qbs.png
To add keys and values to a build profile that is associated with a build
and run kit:
\list 1
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Qbs.
\li In the \uicontrol Kit field, select a build and run kit.
\li Select \uicontrol Edit to edit the profile associated with the kit.
\li Select \uicontrol Add to add keys and values to the profile.
Spefify keys as: \c <module_name>.<property_name>. Specify the
values as JSON literals.
\endlist
For a list of available keys and values, see the
\l{http://doc.qt.io/qbs/list-of-modules.html}{List of Modules} in the
Qbs Manual.
*/

View File

@@ -68,7 +68,7 @@ def readLiteral(d, value):
return "<unsupported>"
def dumpLiteral(d, value):
d.putValue('"' + readLiteral(d, value) + '"')
d.putValue(d.hexencode(readLiteral(d, value)), Hex2EncodedLatin1)
def qdump__Core__Id(d, value):
try:
@@ -131,6 +131,10 @@ def qdump__CPlusPlus__TemplateNameId(d, value):
d.putBetterType(value.type)
d.putPlainChildren(value)
def qdump__CPlusPlus__QualifiedNameId(d, value):
dumpLiteral(d, value)
d.putPlainChildren(value)
def qdump__CPlusPlus__Literal(d, value):
dumpLiteral(d, value)
d.putPlainChildren(value)

View File

@@ -158,7 +158,7 @@ if hasSubprocess and hasPlot:
s("pyplot.figure(%s)" % matplotFigure[iname])
s("pyplot.suptitle('%s')" % iname)
s("data = %s" % data)
s("pyplot.plot([i for i in range(len(data))], data, 'b.')")
s("pyplot.plot([i for i in range(len(data))], data, 'b.-')")
time.sleep(0.2)
s("pyplot.draw()")
matplotProc.stdin.flush()
@@ -1650,6 +1650,16 @@ class DumperBase:
pass
return False, 0, 1, 1, exp
def putNumChild(self, numchild):
if numchild != self.currentChildNumChild:
self.put('numchild="%s",' % numchild)
def handleWatches(self, args):
for watcher in args.get("watchers", []):
iname = watcher['iname']
exp = self.hexdecode(watcher['exp'])
self.handleWatch(exp, exp, iname)
def handleWatch(self, origexp, exp, iname):
exp = str(exp).strip()
escapedExp = self.hexencode(exp)

View File

@@ -246,7 +246,6 @@ class Dumper(DumperBase):
# dumpers causing loading of shared objects etc).
self.currentQtNamespaceGuess = None
self.varList = args.get("vars", [])
self.resultVarName = args.get("resultvarname", "")
self.expandedINames = set(args.get("expanded", []))
self.stringCutOff = int(args.get("stringcutoff", 10000))
@@ -264,17 +263,8 @@ class Dumper(DumperBase):
self.partialUpdate = int(args.get("partial", "0"))
self.fallbackQtVersion = 0x50200
#warn("NAMESPACE: '%s'" % self.qtNamespace())
#warn("VARIABLES: %s" % self.varList)
#warn("EXPANDED INAMES: %s" % self.expandedINames)
#warn("WATCHERS: %s" % self.watchers)
#warn("PARTIAL: %s" % self.partialUpdate)
def handleWatches(self):
with OutputSafer(self):
for watcher in self.watchers:
iname = watcher['iname']
exp = self.hexdecode(watcher['exp'])
self.handleWatch(exp, exp, iname)
def listOfLocals(self):
frame = gdb.selected_frame()
@@ -360,6 +350,9 @@ class Dumper(DumperBase):
def showData(self, args):
self.prepare(args)
partialVariable = args.get("partialVariable", "")
isPartial = len(partialVariable) > 0
#
# Locals
#
@@ -368,12 +361,9 @@ class Dumper(DumperBase):
if self.qmlcontext:
locals = self.extractQmlVariables(self.qmlcontext)
elif self.partialUpdate and len(self.varList) == 1:
#warn("PARTIAL: %s" % self.varList)
parts = self.varList[0].split('.')
#warn("PARTIAL PARTS: %s" % parts)
elif isPartial:
parts = partialVariable.split('.')
name = parts[1]
#warn("PARTIAL VAR: %s" % name)
item = self.LocalItem()
item.iname = parts[0] + '.' + name
item.name = name
@@ -389,7 +379,6 @@ class Dumper(DumperBase):
except:
item.value = "<no value>"
locals = [item]
#warn("PARTIAL LOCALS: %s" % locals)
else:
locals = self.listOfLocals()
@@ -419,9 +408,8 @@ class Dumper(DumperBase):
self.put('name="%s",' % item.name)
self.putItem(value)
self.handleWatches()
#print('data=[' + locals + sep + self.watchers + ']\n')
with OutputSafer(self):
self.handleWatches(args)
self.output.append('],typeinfo=[')
for name in self.typesToReport.keys():
@@ -439,6 +427,9 @@ class Dumper(DumperBase):
if self.qtNamespaceToReport:
self.output.append(',qtnamespace="%s"' % self.qtNamespaceToReport)
self.qtNamespaceToReport = None
self.output.append(',partial="%d"' % isPartial)
print(''.join(self.output))
def enterSubItem(self, item):
@@ -823,11 +814,6 @@ class Dumper(DumperBase):
except:
pass
def putNumChild(self, numchild):
#warn("NUM CHILD: '%s' '%s'" % (numchild, self.currentChildNumChild))
if numchild != self.currentChildNumChild:
self.put('numchild="%s",' % numchild)
def putSimpleValue(self, value, encoding = None, priority = 0):
self.putValue(value, encoding, priority)

View File

@@ -211,7 +211,7 @@ class Dumper(DumperBase):
self.currentMaxNumChild = None
self.currentPrintsAddress = None
self.currentChildType = None
self.currentChildNumChild = None
self.currentChildNumChild = -1
self.currentWatchers = {}
self.executable_ = None
@@ -509,13 +509,16 @@ class Dumper(DumperBase):
return int(value.GetLoadAddress())
def extractInt(self, address):
return int(self.createValue(address, self.intType()))
error = SBError()
return int(self.process.ReadUnsignedFromMemory(address, 4, error))
def extractInt64(self, address):
return int(self.createValue(address, self.int64Type()))
error = SBError()
return int(self.process.ReadUnsignedFromMemory(address, 8, error))
def extractByte(self, address):
return int(self.createValue(address, self.charType())) & 0xFF
error = SBError()
return int(self.process.ReadUnsignedFromMemory(address, 1, error) & 0xFF)
def handleCommand(self, command):
result = lldb.SBCommandReturnObject()
@@ -535,11 +538,6 @@ class Dumper(DumperBase):
return True
return self.isKnownMovableType(self.stripNamespaceFromType(type.GetName()))
def putNumChild(self, numchild):
#self.warn("NUM CHILD: '%s' '%s'" % (numchild, self.currentChildNumChild))
#if numchild != self.currentChildNumChild:
self.put('numchild="%s",' % numchild)
def putPointerValue(self, value):
# Use a lower priority
if value is None:
@@ -1138,18 +1136,26 @@ class Dumper(DumperBase):
self.reportVariablesHelper(args)
sys.stdout.write("@\n")
def reportVariablesHelper(self, _ = None):
def reportVariablesHelper(self, args = None):
frame = self.currentFrame()
if frame is None:
return
partialVariable = args.get("partialVariable", "")
isPartial = len(partialVariable) > 0
self.currentIName = 'local'
self.put('data=[')
self.put('all={data=[')
self.anonNumber = 0
shadowed = {}
ids = {} # Filter out duplicates entries at the same address.
values = list(frame.GetVariables(True, True, False, False))
values.reverse() # To get shadowed vars numbered backwards.
if isPartial:
values = [frame.FindVariable(partialVariable)]
else:
values = list(frame.GetVariables(True, True, False, False))
values.reverse() # To get shadowed vars numbered backwards.
for value in values:
if not value.IsValid():
continue
@@ -1198,16 +1204,9 @@ class Dumper(DumperBase):
self.putEmptyValue()
self.putNumChild(0)
# 'watchers':[{'id':'watch.0','exp':'23'},...]
#if not self.dummyValue is None:
for watcher in self.currentWatchers:
iname = watcher['iname']
# could be 'watch.0' or 'tooltip.deadbead'
(base, component) = iname.split('.')
exp = self.hexdecode(watcher['exp'])
self.handleWatch(exp, exp, iname)
self.handleWatches(args)
self.put(']')
self.put('],partial="%d"}' % isPartial)
def reportData(self, _ = None):
if self.process is None:

View File

@@ -53,6 +53,8 @@ MenuBarEmptyAreaBackgroundColor=shadowBackground
MenuBarItemBackgroundColor=shadowBackground
MenuBarItemTextColorDisabled=textDisabled
MenuBarItemTextColorNormal=text
MenuItemTextColorDisabled=textDisabled
MenuItemTextColorNormal=text
MiniProjectTargetSelectorBackgroundColor=shadowBackground
MiniProjectTargetSelectorBorderColor=shadowBackground
MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground
@@ -70,6 +72,8 @@ SplitterColor=ffb0b0b0
TextColorDisabled=textDisabled
TextColorError=ffff4040
TextColorHighlight=ffff0000
TextColorLink=ff007af4
TextColorLinkVisited=ffa57aff
TextColorNormal=text
TodoItemTextColor=ff000000
ToggleButtonBackgroundColor=shadowBackground
@@ -77,24 +81,19 @@ ToolBarBackgroundColor=shadowBackground
TreeViewArrowColorNormal=hoverBackground
TreeViewArrowColorSelected=text
OutputFormatter_DebugTextColor=text
OutputFormatter_ErrorMessageTextColor=error
OutputFormatter_NormalMessageTextColor=text
OutputFormatter_StdErrTextColor=error
OutputFormatter_StdOutTextColor=text
OutputPanes_DebugTextColor=text
OutputPanes_ErrorMessageTextColor=ffff6c6c
OutputPanes_MessageOutput=ff008787
OutputPanes_NormalMessageTextColor=text
OutputPanes_StdErrTextColor=error
OutputPanes_StdOutTextColor=text
OutputPanes_WarningMessageTextColor=fff3c300
OutputPaneButtonFlashColor=error
OutputPaneToggleButtonTextColorChecked=text
OutputPaneToggleButtonTextColorUnchecked=text
QtOutputFormatter_LinkTextColor=ff0000ff
CompileOutput_ErrorOutput=ffff6c6c
CompileOutput_MessageOutput=ff008787
CompileOutput_ErrorMessageOutput=ffff6c6c
Debugger_LogWindow_LogInput=ff00acac
Debugger_LogWindow_LogStatus=ff00875a
Debugger_LogWindow_LogWarning=fff3c300
Debugger_LogWindow_LogError=ffff6c6c
Debugger_LogWindow_LogTime=ffbf0303
Debugger_WatchItem_ValueNormal=text

View File

@@ -47,6 +47,8 @@ MenuBarEmptyAreaBackgroundColor=ffff0000
MenuBarItemBackgroundColor=ffff0000
MenuBarItemTextColorDisabled=ffa0a0a4
MenuBarItemTextColorNormal=ff000000
MenuItemTextColorDisabled=style
MenuItemTextColorNormal=style
MiniProjectTargetSelectorBackgroundColor=ffa0a0a0
MiniProjectTargetSelectorBorderColor=ff000000
MiniProjectTargetSelectorSummaryBackgroundColor=ff464646
@@ -64,6 +66,8 @@ SplitterColor=ff151515
TextColorDisabled=ff000000
TextColorError=ffff0000
TextColorHighlight=ffa0a0a4
TextColorLink=ff0057ae
TextColorLinkVisited=ff644a9b
TextColorNormal=ff000000
TodoItemTextColor=ff000000
ToggleButtonBackgroundColor=ffff0000
@@ -71,24 +75,19 @@ ToolBarBackgroundColor=ffff0000
TreeViewArrowColorNormal=ffff0000
TreeViewArrowColorSelected=ffff0000
OutputFormatter_DebugTextColor=ffaa00aa
OutputFormatter_ErrorMessageTextColor=ffaa0000
OutputFormatter_NormalMessageTextColor=ff0000aa
OutputFormatter_StdErrTextColor=ffaa0000
OutputFormatter_StdOutTextColor=ff000000
OutputPanes_DebugTextColor=ffaa00aa
OutputPanes_ErrorMessageTextColor=ffaa0000
OutputPanes_MessageOutput=ff0000aa
OutputPanes_NormalMessageTextColor=ff0000aa
OutputPanes_StdErrTextColor=ffaa0000
OutputPanes_StdOutTextColor=ff000000
OutputPanes_WarningMessageTextColor=ff808000
OutputPaneButtonFlashColor=ffff0000
OutputPaneToggleButtonTextColorChecked=ffffffff
OutputPaneToggleButtonTextColorUnchecked=ff000000
QtOutputFormatter_LinkTextColor=ff0000aa
CompileOutput_ErrorOutput=ffaa0000
CompileOutput_MessageOutput=ff0000aa
CompileOutput_ErrorMessageOutput=ffaa0000
Debugger_LogWindow_LogInput=ff0000ff
Debugger_LogWindow_LogStatus=ff008000
Debugger_LogWindow_LogWarning=ff808000
Debugger_LogWindow_LogError=ffff0000
Debugger_LogWindow_LogTime=ff800000
Debugger_WatchItem_ValueNormal=ff000000

View File

@@ -1155,10 +1155,17 @@ int SymbolGroupNode::dumpNode(std::ostream &str,
encoding = DumpEncodingMillisecondsSinceMidnight;
break;
case KT_QDateTime:
if (!value.compare(L"(invalid)"))
break;
encoding = QtInfo::get(ctx).version < 5
? DumpEncodingJulianDateAndMillisecondsSinceMidnight
: DumpEncodingMillisecondsSinceEpoch;
break;
case KT_QTimeZone: // Based on a QByteArray dumper
case KT_QByteArray:
if (QtInfo::get(ctx).version > 4)
encoding = DumpEncodingHex_Latin1_WithQuotes;
break;
}
if (encoding) {
str << ",valueencoded=\"" << encoding << "\",value=\"" << gdbmiWStringFormat(value) <<'"';

View File

@@ -1728,6 +1728,8 @@ static inline bool dumpQByteArray(const SymbolGroupValue &v, std::wostream &str,
}
// Qt 5: Data start at offset past the 'd' of type QByteArrayData.
wchar_t oldFill = str.fill(wchar_t('0'));
str << std::hex;
char *memory;
unsigned fullSize;
unsigned size;
@@ -1735,26 +1737,20 @@ static inline bool dumpQByteArray(const SymbolGroupValue &v, std::wostream &str,
if (!readQt5StringData(dV, qtInfo, false, 0, maxStringSize, &fullSize, &size, &memory))
return false;
if (size) {
// Emulate CDB's behavior of replacing unprintable characters
// by dots.
std::wstring display;
display.reserve(size);
char *memEnd = memory + size;
for (char *p = memory; p < memEnd; p++) {
const char c = *p;
display.push_back(c >= 0 && isprint(c) ? wchar_t(c) : L'.');
const unsigned char c = *p;
str << std::setw(2) << c;
}
str << "\"" << display;
if (fullSize > size)
str << L"...";
str << L'"';
} else {
str << L"\"\"";
str << L"2e2e2e"; // ...
}
if (memoryHandle)
*memoryHandle = new MemoryHandle(reinterpret_cast<unsigned char *>(memory), size);
else
delete [] memory;
str << std::dec;
str.fill(oldFill);
return true;
}
@@ -2224,18 +2220,16 @@ static bool dumpQDateTime(const SymbolGroupValue &v, std::wostream &str)
ValidTime = 0x08,
ValidDateTime = 0x10
};
if (!(status & ValidDateTime || ((status & ValidDate) && (status & ValidTime))))
if (!(status & ValidDateTime || ((status & ValidDate) && (status & ValidTime)))) {
str << L"(invalid)";
return true;
}
str << msecs << separator
<< spec << separator
<< offset << separator
<< std::hex;
if (timeZoneString.length() > 2) {
for (unsigned i = 1; i < timeZoneString.length() - 1; ++i) // remove '"'
str << (int)timeZoneString.at(i);
}
str << std::dec << separator << status;
<< timeZoneString << separator
<< status;
return true;
}

View File

@@ -63,10 +63,8 @@ void CompletingLineEdit::keyPressEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Down && !e->modifiers()) {
if (QCompleter *comp = completer()) {
if (text().isEmpty() && !comp->popup()->isVisible()) {
comp->setCompletionPrefix(QString());
if (!comp->popup()->isVisible())
comp->complete();
}
}
}
return QLineEdit::keyPressEvent(e);

View File

@@ -174,6 +174,7 @@ HistoryCompleter::HistoryCompleter(const QString &historyKey, QObject *parent)
{
QTC_ASSERT(!historyKey.isEmpty(), return);
QTC_ASSERT(theSettings, return);
setCompletionMode(QCompleter::UnfilteredPopupCompletion);
d->historyKey = QLatin1String("CompleterHistory/") + historyKey;
d->list = theSettings->value(d->historyKey).toStringList();

View File

@@ -142,24 +142,24 @@ void OutputFormatter::initFormats()
// NormalMessageFormat
d->formats[NormalMessageFormat].setFont(boldFont);
d->formats[NormalMessageFormat].setForeground(theme->color(Theme::OutputFormatter_NormalMessageTextColor));
d->formats[NormalMessageFormat].setForeground(theme->color(Theme::OutputPanes_NormalMessageTextColor));
// ErrorMessageFormat
d->formats[ErrorMessageFormat].setFont(boldFont);
d->formats[ErrorMessageFormat].setForeground(theme->color(Theme::OutputFormatter_ErrorMessageTextColor));
d->formats[ErrorMessageFormat].setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
// StdOutFormat
d->formats[StdOutFormat].setFont(d->font);
d->formats[StdOutFormat].setForeground(theme->color(Theme::OutputFormatter_StdOutTextColor));
d->formats[StdOutFormat].setForeground(theme->color(Theme::OutputPanes_StdOutTextColor));
d->formats[StdOutFormatSameLine] = d->formats[StdOutFormat];
// StdErrFormat
d->formats[StdErrFormat].setFont(d->font);
d->formats[StdErrFormat].setForeground(theme->color(Theme::OutputFormatter_StdErrTextColor));
d->formats[StdErrFormat].setForeground(theme->color(Theme::OutputPanes_StdErrTextColor));
d->formats[StdErrFormatSameLine] = d->formats[StdErrFormat];
d->formats[DebugFormat].setFont(d->font);
d->formats[DebugFormat].setForeground(theme->color(Theme::OutputFormatter_DebugTextColor));
d->formats[DebugFormat].setForeground(theme->color(Theme::OutputPanes_DebugTextColor));
}
void OutputFormatter::handleLink(const QString &href)

View File

@@ -113,6 +113,8 @@ QPair<QColor, QString> Theme::readNamedColor(const QString &color) const
{
if (d->palette.contains(color))
return qMakePair(d->palette[color], color);
if (color == QLatin1String("style"))
return qMakePair(QColor(), QString());
bool ok = true;
const QRgb rgba = color.toLongLong(&ok, 16);
@@ -362,6 +364,8 @@ QPalette Theme::palette() const
pal.setColor(QPalette::Dark, color(Theme::BackgroundColorDark));
pal.setColor(QPalette::HighlightedText, Qt::white);
pal.setColor(QPalette::ToolTipText, color(Theme::TextColorNormal));
pal.setColor(QPalette::Link, color(Theme::TextColorLink));
pal.setColor(QPalette::LinkVisited, color(Theme::TextColorLinkVisited));
return pal;
}

View File

@@ -98,6 +98,8 @@ public:
MenuBarItemBackgroundColor,
MenuBarItemTextColorDisabled,
MenuBarItemTextColorNormal,
MenuItemTextColorDisabled,
MenuItemTextColorNormal,
MiniProjectTargetSelectorBackgroundColor,
MiniProjectTargetSelectorBorderColor,
MiniProjectTargetSelectorSummaryBackgroundColor,
@@ -118,6 +120,8 @@ public:
TextColorDisabled,
TextColorError,
TextColorHighlight,
TextColorLink,
TextColorLinkVisited,
TextColorNormal,
TodoItemTextColor,
ToggleButtonBackgroundColor,
@@ -125,26 +129,20 @@ public:
TreeViewArrowColorNormal,
TreeViewArrowColorSelected,
OutputFormatter_NormalMessageTextColor,
OutputFormatter_ErrorMessageTextColor,
OutputFormatter_StdOutTextColor,
OutputFormatter_StdErrTextColor,
OutputFormatter_DebugTextColor,
/* Output panes */
QtOutputFormatter_LinkTextColor,
/* Compile Output Pane */
CompileOutput_ErrorOutput,
CompileOutput_MessageOutput,
CompileOutput_ErrorMessageOutput,
OutputPanes_DebugTextColor,
OutputPanes_ErrorMessageTextColor,
OutputPanes_MessageOutput,
OutputPanes_NormalMessageTextColor,
OutputPanes_StdErrTextColor,
OutputPanes_StdOutTextColor,
OutputPanes_WarningMessageTextColor,
/* Debugger Log Window */
Debugger_LogWindow_LogInput,
Debugger_LogWindow_LogStatus,
Debugger_LogWindow_LogWarning,
Debugger_LogWindow_LogError,
Debugger_LogWindow_LogTime,
/* Debugger Watch Item */

View File

@@ -37,9 +37,8 @@ SearchResultTreeItem::SearchResultTreeItem(const SearchResultItem &item,
SearchResultTreeItem *parent)
: item(item),
m_parent(parent),
m_isUserCheckable(false),
m_isGenerated(false),
m_checkState(Qt::Unchecked)
m_checkState(Qt::Checked)
{
}
@@ -53,16 +52,6 @@ bool SearchResultTreeItem::isLeaf() const
return childrenCount() == 0 && parent() != 0;
}
bool SearchResultTreeItem::isUserCheckable() const
{
return m_isUserCheckable;
}
void SearchResultTreeItem::setIsUserCheckable(bool isUserCheckable)
{
m_isUserCheckable = isUserCheckable;
}
Qt::CheckState SearchResultTreeItem::checkState() const
{
return m_checkState;
@@ -130,10 +119,6 @@ void SearchResultTreeItem::insertChild(int index, SearchResultTreeItem *child)
void SearchResultTreeItem::insertChild(int index, const SearchResultItem &item)
{
SearchResultTreeItem *child = new SearchResultTreeItem(item, this);
if (isUserCheckable()) {
child->setIsUserCheckable(true);
child->setCheckState(Qt::Checked);
}
insertChild(index, child);
}

View File

@@ -58,9 +58,6 @@ public:
int rowOfItem() const;
void clearChildren();
bool isUserCheckable() const;
void setIsUserCheckable(bool isUserCheckable);
Qt::CheckState checkState() const;
void setCheckState(Qt::CheckState checkState);
@@ -72,7 +69,6 @@ public:
private:
SearchResultTreeItem *m_parent;
QList<SearchResultTreeItem *> m_children;
bool m_isUserCheckable;
bool m_isGenerated;
Qt::CheckState m_checkState;
};

View File

@@ -57,7 +57,9 @@ SearchResultTreeModel::~SearchResultTreeModel()
void SearchResultTreeModel::setShowReplaceUI(bool show)
{
beginResetModel();
m_showReplaceUI = show;
endResetModel();
}
void SearchResultTreeModel::setTextEditorFont(const QFont &font, const SearchResultColor &color)
@@ -73,10 +75,8 @@ Qt::ItemFlags SearchResultTreeModel::flags(const QModelIndex &idx) const
Qt::ItemFlags flags = QAbstractItemModel::flags(idx);
if (idx.isValid()) {
if (const SearchResultTreeItem *item = treeItemAtIndex(idx)) {
if (item->isUserCheckable())
flags |= Qt::ItemIsUserCheckable;
}
if (m_showReplaceUI)
flags |= Qt::ItemIsUserCheckable;
}
return flags;
@@ -189,28 +189,24 @@ bool SearchResultTreeModel::setCheckState(const QModelIndex &idx, Qt::CheckState
SearchResultTreeItem *currentItem = item;
QModelIndex currentIndex = idx;
while (SearchResultTreeItem *parent = currentItem->parent()) {
if (parent->isUserCheckable()) {
bool hasChecked = false;
bool hasUnchecked = false;
for (int i = 0; i < parent->childrenCount(); ++i) {
SearchResultTreeItem *child = parent->childAt(i);
if (!child->isUserCheckable())
continue;
if (child->checkState() == Qt::Checked)
hasChecked = true;
else if (child->checkState() == Qt::Unchecked)
hasUnchecked = true;
else if (child->checkState() == Qt::PartiallyChecked)
hasChecked = hasUnchecked = true;
}
if (hasChecked && hasUnchecked)
parent->setCheckState(Qt::PartiallyChecked);
else if (hasChecked)
parent->setCheckState(Qt::Checked);
else
parent->setCheckState(Qt::Unchecked);
emit dataChanged(idx.parent(), idx.parent());
bool hasChecked = false;
bool hasUnchecked = false;
for (int i = 0; i < parent->childrenCount(); ++i) {
SearchResultTreeItem *child = parent->childAt(i);
if (child->checkState() == Qt::Checked)
hasChecked = true;
else if (child->checkState() == Qt::Unchecked)
hasUnchecked = true;
else if (child->checkState() == Qt::PartiallyChecked)
hasChecked = hasUnchecked = true;
}
if (hasChecked && hasUnchecked)
parent->setCheckState(Qt::PartiallyChecked);
else if (hasChecked)
parent->setCheckState(Qt::Checked);
else
parent->setCheckState(Qt::Unchecked);
emit dataChanged(idx.parent(), idx.parent());
currentItem = parent;
currentIndex = idx.parent();
}
@@ -234,8 +230,7 @@ QVariant SearchResultTreeModel::data(const SearchResultTreeItem *row, int role)
switch (role)
{
case Qt::CheckStateRole:
if (row->isUserCheckable())
result = row->checkState();
result = row->checkState();
break;
case Qt::ToolTipRole:
result = row->item.text.trimmed();
@@ -315,10 +310,8 @@ QSet<SearchResultTreeItem *> SearchResultTreeModel::addPath(const QStringList &p
item.path = currentPath;
item.text = part;
partItem = new SearchResultTreeItem(item, currentItem);
if (m_showReplaceUI) {
partItem->setIsUserCheckable(true);
if (m_showReplaceUI)
partItem->setCheckState(Qt::Checked);
}
partItem->setGenerated(true);
beginInsertRows(currentItemIndex, insertionIndex, insertionIndex);
currentItem->insertChild(insertionIndex, partItem);

View File

@@ -87,7 +87,8 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) :
m_count(0),
m_preserveCaseSupported(true),
m_isShowingReplaceUI(false),
m_searchAgainSupported(false)
m_searchAgainSupported(false),
m_replaceSupported(false)
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
@@ -206,7 +207,7 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) :
topReplaceLayout->addWidget(m_replaceButton);
topReplaceLayout->addWidget(m_preserveCaseCheck);
topReplaceLayout->addStretch(2);
setShowReplaceUI(false);
setShowReplaceUI(m_replaceSupported);
setSupportPreserveCase(true);
connect(m_searchResultTreeView, SIGNAL(jumpToSearchResult(SearchResultItem)),
@@ -262,7 +263,8 @@ void SearchResultWidget::addResults(const QList<SearchResultItem> &items, Search
m_replaceTextEdit->setEnabled(true);
// We didn't have an item before, set the focus to the search widget or replace text edit
if (m_isShowingReplaceUI) {
setShowReplaceUI(m_replaceSupported);
if (m_replaceSupported) {
m_replaceTextEdit->setFocus();
m_replaceTextEdit->selectAll();
} else {
@@ -294,13 +296,10 @@ int SearchResultWidget::count() const
return m_count;
}
QString SearchResultWidget::dontAskAgainGroup() const
{
return m_dontAskAgainGroup;
}
void SearchResultWidget::setDontAskAgainGroup(const QString &group)
void SearchResultWidget::setSupportsReplace(bool replaceSupported, const QString &group)
{
m_replaceSupported = replaceSupported;
setShowReplaceUI(replaceSupported);
m_dontAskAgainGroup = group;
}
@@ -475,6 +474,7 @@ void SearchResultWidget::handleReplaceButton()
// by pressing return in replace line edit
if (m_replaceButton->isEnabled()) {
m_infoBar.clear();
setShowReplaceUI(false);
emit replaceButtonClicked(m_replaceTextEdit->text(), checkedItems(),
m_preserveCaseSupported && m_preserveCaseCheck->isChecked());
}

View File

@@ -66,13 +66,11 @@ public:
int count() const;
QString dontAskAgainGroup() const;
void setDontAskAgainGroup(const QString &group);
void setSupportsReplace(bool replaceSupported, const QString &group);
void setTextToReplace(const QString &textToReplace);
QString textToReplace() const;
void setSupportPreserveCase(bool enabled);
void setShowReplaceUI(bool visible);
bool hasFocusInternally() const;
void setFocusInternally();
@@ -118,6 +116,7 @@ private slots:
void searchAgain();
private:
void setShowReplaceUI(bool visible);
void continueAfterSizeWarning();
void cancelAfterSizeWarning();
@@ -127,23 +126,24 @@ private:
SearchResultTreeView *m_searchResultTreeView;
int m_count;
QString m_dontAskAgainGroup;
bool m_preserveCaseSupported;
QFrame *m_messageWidget;
InfoBar m_infoBar;
InfoBarDisplay m_infoBarDisplay;
bool m_isShowingReplaceUI;
QWidget *m_topReplaceWidget;
QLabel *m_replaceLabel;
QLineEdit *m_replaceTextEdit;
QToolButton *m_replaceButton;
QToolButton *m_searchAgainButton;
QCheckBox *m_preserveCaseCheck;
bool m_searchAgainSupported;
QWidget *m_descriptionContainer;
QLabel *m_label;
QLabel *m_searchTerm;
QToolButton *m_cancelButton;
QLabel *m_matchesFoundLabel;
bool m_preserveCaseSupported;
bool m_isShowingReplaceUI;
bool m_searchAgainSupported;
bool m_replaceSupported;
};
} // Internal

View File

@@ -400,11 +400,10 @@ SearchResult *SearchResultWindow::startNewSearch(const QString &label,
widget->setTextEditorFont(d->m_font, d->m_color);
widget->setTabWidth(d->m_tabWidth);
widget->setSupportPreserveCase(preserveCaseMode == PreserveCaseEnabled);
widget->setShowReplaceUI(searchOrSearchAndReplace != SearchOnly);
bool supportsReplace = searchOrSearchAndReplace != SearchOnly;
widget->setSupportsReplace(supportsReplace, supportsReplace ? cfgGroup : QString());
widget->setAutoExpandResults(d->m_expandCollapseAction->isChecked());
widget->setInfo(label, toolTip, searchTerm);
if (searchOrSearchAndReplace == SearchAndReplace)
widget->setDontAskAgainGroup(cfgGroup);
auto result = new SearchResult(widget);
d->m_searchResults.prepend(result);
d->m_recentSearchesBox->insertItem(1, tr("%1 %2").arg(label, searchTerm));

View File

@@ -978,6 +978,12 @@ void MainWindow::writeSettings()
if (!(m_overrideColor.isValid() && StyleHelper::baseColor() == m_overrideColor))
settings->setValue(QLatin1String(colorKey), StyleHelper::requestedBaseColor());
// On OS X applications usually do not restore their full screen state.
// To be able to restore the correct non-full screen geometry, we have to put
// the window out of full screen before saving the geometry.
// Works around QTBUG-45241
if (Utils::HostOsInfo::isMacHost() && isFullScreen())
setWindowState(windowState() & ~Qt::WindowFullScreen);
settings->setValue(QLatin1String(windowGeometryKey), saveGeometry());
settings->setValue(QLatin1String(windowStateKey), saveState());
settings->setValue(QLatin1String(modeSelectorVisibleKey), ModeManager::isModeSelectorVisible());

View File

@@ -359,7 +359,7 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const
ret = true;
break;
case QStyle::SH_EtchDisabledText:
if (panelWidget(widget))
if (panelWidget(widget) || qobject_cast<const QMenu *> (widget) )
ret = false;
break;
case QStyle::SH_ItemView_ArrowKeysNavigateIntoChildren:
@@ -614,7 +614,7 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *option,
QPainter *painter, const QWidget *widget) const
{
if (!panelWidget(widget))
if (!panelWidget(widget) && !qobject_cast<const QMenu *>(widget))
return QProxyStyle::drawControl(element, option, painter, widget);
switch (element) {
@@ -645,6 +645,25 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
}
break;
case CE_MenuItem:
painter->save();
if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
const bool enabled = mbi->state & State_Enabled;
QStyleOptionMenuItem item = *mbi;
item.rect = mbi->rect;
const QColor color = creatorTheme()->color(enabled
? Theme::MenuItemTextColorNormal
: Theme::MenuItemTextColorDisabled);
if (color.isValid()) {
QPalette pal = mbi->palette;
pal.setBrush(QPalette::Text, color);
item.palette = pal;
}
QProxyStyle::drawControl(element, &item, painter, widget);
}
painter->restore();
break;
case CE_MenuBarItem:
painter->save();
if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {

View File

@@ -40,8 +40,10 @@
#include "breakhandler.h"
#include "disassembleragent.h"
#include "logwindow.h"
#include "memoryagent.h"
#include "moduleshandler.h"
#include "gdb/gdbengine.h" // REMOVE
#include "registerhandler.h"
#include "sourcefileshandler.h"
#include "stackhandler.h"
@@ -153,6 +155,12 @@ enum RemoteSetupState { RemoteSetupNone, RemoteSetupRequested,
RemoteSetupSucceeded, RemoteSetupFailed,
RemoteSetupCancelled };
struct TypeInfo
{
TypeInfo(uint s = 0) : size(s) {}
uint size;
};
class DebuggerEnginePrivate : public QObject
{
Q_OBJECT
@@ -323,6 +331,8 @@ public:
bool m_isStateDebugging;
Utils::FileInProjectFinder m_fileFinder;
QHash<QByteArray, TypeInfo> m_typeInfoCache;
QByteArray m_qtNamespace;
};
@@ -1514,7 +1524,12 @@ bool DebuggerEngine::isSynchronous() const
QByteArray DebuggerEngine::qtNamespace() const
{
return QByteArray();
return d->m_qtNamespace;
}
void DebuggerEngine::setQtNamespace(const QByteArray &ns)
{
d->m_qtNamespace = ns;
}
void DebuggerEngine::createSnapshot()
@@ -1908,6 +1923,59 @@ void DebuggerEngine::validateExecutable(DebuggerStartParameters *sp)
}
}
void DebuggerEngine::updateLocalsView(const GdbMi &all)
{
WatchHandler *handler = watchHandler();
const bool partial = all["partial"].toInt();
const GdbMi typeInfo = all["typeinfo"];
if (typeInfo.type() == GdbMi::List) {
foreach (const GdbMi &s, typeInfo.children()) {
const GdbMi name = s["name"];
const GdbMi size = s["size"];
if (name.isValid() && size.isValid())
d->m_typeInfoCache.insert(QByteArray::fromHex(name.data()),
TypeInfo(size.data().toUInt()));
}
}
QSet<QByteArray> toDelete;
if (!partial) {
foreach (WatchItem *item, handler->model()->treeLevelItems<WatchItem *>(2))
toDelete.insert(item->iname);
}
GdbMi data = all["data"];
foreach (const GdbMi &child, data.children()) {
WatchItem *item = new WatchItem(child);
const TypeInfo ti = d->m_typeInfoCache.value(item->type);
if (ti.size)
item->size = ti.size;
handler->insertItem(item);
toDelete.remove(item->iname);
}
GdbMi ns = all["qtnamespace"];
if (ns.isValid()) {
setQtNamespace(ns.data());
showMessage(_("FOUND NAMESPACED QT: " + ns.data()));
}
handler->purgeOutdatedItems(toDelete);
static int count = 0;
showMessage(_("<Rebuild Watchmodel %1 @ %2 >")
.arg(++count).arg(LogWindow::logTimeStamp()), LogMiscInput);
showStatusMessage(GdbEngine::tr("Finished retrieving data"), 400); // FIXME: String
DebuggerToolTipManager::updateEngine(this);
if (!partial)
emit stackFrameCompleted();
}
} // namespace Internal
} // namespace Debugger

View File

@@ -60,6 +60,7 @@ namespace Internal {
class DebuggerEnginePrivate;
class DebuggerPluginPrivate;
class DisassemblerAgent;
class GdbMi;
class MemoryAgent;
class WatchData;
class WatchItem;
@@ -185,6 +186,7 @@ public:
virtual bool isSynchronous() const;
virtual QByteArray qtNamespace() const;
void setQtNamespace(const QByteArray &ns);
virtual void createSnapshot();
virtual void updateAll();
@@ -374,6 +376,8 @@ protected:
virtual void slaveEngineStateChanged(DebuggerEngine *engine,
DebuggerState state);
void updateLocalsView(const GdbMi &all);
private:
// Wrapper engine needs access to state of its subengines.
friend class QmlCppEngine;

View File

@@ -1947,7 +1947,6 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
QTC_ASSERT(!engine->isSlaveEngine(), return);
m_threadBox->setCurrentIndex(engine->threadsHandler()->currentThreadIndex());
engine->watchHandler()->updateWatchersWindow();
const DebuggerState state = engine->state();
//showMessage(QString::fromLatin1("PLUGIN SET STATE: ")

View File

@@ -3705,9 +3705,8 @@ bool GdbEngine::setToolTipExpression(const DebuggerToolTipContext &context)
return false;
UpdateParameters params;
params.tryPartial = true;
params.varList = context.iname;
updateLocalsPython(params);
params.partialVariable = context.iname;
doUpdateLocals(params);
return true;
}
@@ -3727,9 +3726,8 @@ void GdbEngine::reloadLocals()
void GdbEngine::updateWatchItem(WatchItem *item)
{
UpdateParameters params;
params.tryPartial = m_pendingBreakpointRequests == 0;
params.varList = item->iname;
updateLocalsPython(params);
params.partialVariable = item->iname;
doUpdateLocals(params);
}
void GdbEngine::handleVarAssign(const DebuggerResponse &)
@@ -3743,7 +3741,7 @@ void GdbEngine::updateLocals()
{
watchHandler()->resetValueCache();
watchHandler()->notifyUpdateStarted();
updateLocalsPython(UpdateParameters());
doUpdateLocals(UpdateParameters());
}
void GdbEngine::assignValueInDebugger(WatchItem *item,
@@ -4696,7 +4694,7 @@ void addGdbOptionPages(QList<IOptionsPage *> *opts)
opts->push_back(new GdbOptionsPage2());
}
void GdbEngine::updateLocalsPython(const UpdateParameters &params)
void GdbEngine::doUpdateLocals(const UpdateParameters &params)
{
m_pendingBreakpointRequests = 0;
@@ -4734,7 +4732,6 @@ void GdbEngine::updateLocalsPython(const UpdateParameters &params)
cmd.arg("autoderef", boolSetting(AutoDerefPointers));
cmd.arg("dyntype", boolSetting(UseDynamicType));
cmd.arg("nativemixed", isNativeMixedActive());
cmd.arg("partial", params.tryPartial);
if (isNativeMixedActive()) {
StackFrame frame = stackHandler()->currentFrame();
@@ -4743,16 +4740,16 @@ void GdbEngine::updateLocalsPython(const UpdateParameters &params)
}
cmd.arg("resultvarname", m_resultVarName);
cmd.arg("vars", params.varList);
cmd.arg("partialVariable", params.partialVariable);
cmd.flags = Discardable;
cmd.callback = [this, params](const DebuggerResponse &r) { handleStackFramePython(r, params.tryPartial); };
cmd.callback = [this, params](const DebuggerResponse &r) { handleStackFramePython(r); };
runCommand(cmd);
cmd.arg("passExceptions", true);
m_lastDebuggableCommand = cmd;
}
void GdbEngine::handleStackFramePython(const DebuggerResponse &response, bool partial)
void GdbEngine::handleStackFramePython(const DebuggerResponse &response)
{
watchHandler()->notifyUpdateFinished();
if (response.resultClass == ResultDone) {
@@ -4767,54 +4764,8 @@ void GdbEngine::handleStackFramePython(const DebuggerResponse &response, bool pa
}
GdbMi all;
all.fromStringMultiple(out);
GdbMi data = all["data"];
GdbMi ns = all["qtnamespace"];
if (ns.isValid()) {
setQtNamespace(ns.data());
showMessage(_("FOUND NAMESPACED QT: " + ns.data()));
}
WatchHandler *handler = watchHandler();
const GdbMi typeInfo = all["typeinfo"];
if (typeInfo.type() == GdbMi::List) {
foreach (const GdbMi &s, typeInfo.children()) {
const GdbMi name = s["name"];
const GdbMi size = s["size"];
if (name.isValid() && size.isValid())
m_typeInfoCache.insert(QByteArray::fromHex(name.data()),
TypeInfo(size.data().toUInt()));
}
}
QSet<QByteArray> toDelete;
if (!partial) {
foreach (WatchItem *item, handler->model()->treeLevelItems<WatchItem *>(2))
toDelete.insert(item->iname);
}
foreach (const GdbMi &child, data.children()) {
WatchItem *item = new WatchItem(child);
const TypeInfo ti = m_typeInfoCache.value(item->type);
if (ti.size)
item->size = ti.size;
handler->insertItem(item);
toDelete.remove(item->iname);
}
handler->purgeOutdatedItems(toDelete);
static int count = 0;
showMessage(_("<Rebuild Watchmodel %1 @ %2 >")
.arg(++count).arg(LogWindow::logTimeStamp()), LogMiscInput);
showStatusMessage(tr("Finished retrieving data"), 400);
DebuggerToolTipManager::updateEngine(this);
if (!partial)
emit stackFrameCompleted();
updateLocalsView(all);
} else {
showMessage(_("DUMPER FAILED: " + response.toString()));

View File

@@ -87,8 +87,6 @@ private: ////////// General Interface //////////
virtual bool acceptsDebuggerCommands() const;
virtual void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
virtual QByteArray qtNamespace() const { return m_qtNamespace; }
virtual void setQtNamespace(const QByteArray &ns) { m_qtNamespace = ns; }
private: ////////// General State //////////
@@ -409,26 +407,16 @@ protected:
void handleCreateFullBacktrace(const DebuggerResponse &response);
void updateLocals();
void updateLocalsPython(const UpdateParameters &parameters);
void handleStackFramePython(const DebuggerResponse &response, bool partial);
void doUpdateLocals(const UpdateParameters &parameters);
void handleStackFramePython(const DebuggerResponse &response);
void setLocals(const QList<GdbMi> &locals);
struct TypeInfo
{
TypeInfo(uint s = 0) : size(s) {}
uint size;
};
QHash<QByteArray, TypeInfo> m_typeInfoCache;
//
// Dumper Management
//
void reloadDebuggingHelpers();
QByteArray m_qtNamespace;
QString m_gdb;
//

View File

@@ -445,9 +445,10 @@ void LldbEngine::handleResponse(const QByteArray &response)
foreach (const GdbMi &item, all.children()) {
const QByteArray name = item.name();
if (name == "data")
refreshLocals(item);
else if (name == "dumpers") {
if (name == "all") {
watchHandler()->notifyUpdateFinished();
updateLocalsView(item);
} else if (name == "dumpers") {
watchHandler()->addDumpers(item);
setupInferiorStage2();
} else if (name == "stack")
@@ -821,8 +822,7 @@ bool LldbEngine::setToolTipExpression(const DebuggerToolTipContext &context)
}
UpdateParameters params;
params.tryPartial = true;
params.varList = context.iname;
params.partialVariable = context.iname;
doUpdateLocals(params);
return true;
@@ -893,7 +893,7 @@ void LldbEngine::doUpdateLocals(UpdateParameters params)
cmd.arg("fancy", boolSetting(UseDebuggingHelpers));
cmd.arg("autoderef", boolSetting(AutoDerefPointers));
cmd.arg("dyntype", boolSetting(UseDynamicType));
cmd.arg("partial", params.tryPartial);
cmd.arg("partialVariable", params.partialVariable);
cmd.beginList("watchers");
@@ -1004,28 +1004,6 @@ void LldbEngine::readLldbStandardOutput()
}
}
void LldbEngine::refreshLocals(const GdbMi &vars)
{
//const bool partial = response.cookie.toBool();
WatchHandler *handler = watchHandler();
handler->resetValueCache();
QSet<QByteArray> toDelete;
foreach (WatchItem *item, handler->model()->treeLevelItems<WatchItem *>(2))
toDelete.insert(item->iname);
foreach (const GdbMi &child, vars.children()) {
WatchItem *item = new WatchItem(child);
handler->insertItem(item);
toDelete.remove(item->iname);
}
handler->purgeOutdatedItems(toDelete);
handler->notifyUpdateFinished();
DebuggerToolTipManager::updateEngine(this);
}
void LldbEngine::refreshStack(const GdbMi &stack)
{
StackHandler *handler = stackHandler();

View File

@@ -151,7 +151,6 @@ private:
void refreshCurrentThread(const GdbMi &data);
void refreshStack(const GdbMi &stack);
void refreshRegisters(const GdbMi &registers);
void refreshLocals(const GdbMi &vars);
void refreshTypeInfo(const GdbMi &typeInfo);
void refreshState(const GdbMi &state);
void refreshLocation(const GdbMi &location);

View File

@@ -88,11 +88,11 @@ private:
setFormat(1, text.size(), format);
break;
case LogWarning:
format.setForeground(theme->color(Theme::Debugger_LogWindow_LogWarning));
format.setForeground(theme->color(Theme::OutputPanes_WarningMessageTextColor));
setFormat(1, text.size(), format);
break;
case LogError:
format.setForeground(theme->color(Theme::Debugger_LogWindow_LogError));
format.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
setFormat(1, text.size(), format);
break;
case LogTime:

View File

@@ -685,6 +685,7 @@ void QmlInspectorAgent::insertObjectInTree(const ObjectReference &object)
m_debuggerEngine->watchHandler()->setCurrentItem(iname);
m_objectToSelect = -1;
}
m_debuggerEngine->watchHandler()->updateWatchersWindow();
}
void QmlInspectorAgent::buildDebugIdHashRecursive(const ObjectReference &ref)

View File

@@ -877,7 +877,8 @@ bool WatchModel::setData(const QModelIndex &idx, const QVariant &value, int role
} else {
m_expandedINames.remove(item->iname);
}
emit columnAdjustmentRequested();
if (item->iname.contains('.'))
emit columnAdjustmentRequested();
break;
case LocalsTypeFormatRole:
@@ -1199,7 +1200,6 @@ void WatchModel::reexpandItems()
void WatchHandler::removeAllData(bool includeInspectData)
{
m_model->reinitialize(includeInspectData);
updateWatchersWindow();
}
void WatchHandler::resetValueCache()

View File

@@ -128,10 +128,9 @@ private:
class UpdateParameters
{
public:
UpdateParameters() { tryPartial = false; }
UpdateParameters() {}
bool tryPartial;
QByteArray varList;
QByteArray partialVariable;
};
class WatchModelBase : public Utils::TreeModel

View File

@@ -197,14 +197,14 @@ void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputForma
textFormat.setFontWeight(QFont::Normal);
break;
case BuildStep::ErrorOutput:
textFormat.setForeground(theme->color(Theme::CompileOutput_ErrorOutput));
textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
textFormat.setFontWeight(QFont::Normal);
break;
case BuildStep::MessageOutput:
textFormat.setForeground(theme->color(Theme::CompileOutput_MessageOutput));
textFormat.setForeground(theme->color(Theme::OutputPanes_MessageOutput));
break;
case BuildStep::ErrorMessageOutput:
textFormat.setForeground(theme->color(Theme::CompileOutput_ErrorMessageOutput));
textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
textFormat.setFontWeight(QFont::Bold);
break;

View File

@@ -439,7 +439,7 @@ CustomWizardPage::CustomWizardPage(const QSharedPointer<CustomWizardContext> &ct
{
m_pathChooser->setHistoryCompleter(QLatin1String("PE.ProjectDir.History"));
addRow(tr("Path:"), m_pathChooser);
connect(m_pathChooser, SIGNAL(validChanged()), this, SIGNAL(completeChanged()));
connect(m_pathChooser, SIGNAL(validChanged(bool)), this, SIGNAL(completeChanged()));
}
QString CustomWizardPage::path() const

View File

@@ -39,6 +39,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtsupportconstants.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
@@ -462,14 +463,14 @@ void QbsGroupNode::updateQbsGroupData(const qbs::GroupData &grp, const QString &
idx->setPathAndLine(Utils::FileName::fromString(grp.location().filePath()),
grp.location().line());
setupFiles(this, grp.allFilePaths(), productPath, updateExisting);
setupFiles(this, grp, grp.allFilePaths(), productPath, updateExisting);
if (updateExisting)
emitNodeUpdated();
}
void QbsGroupNode::setupFiles(ProjectExplorer::FolderNode *root, const QStringList &files,
const QString &productPath, bool updateExisting)
void QbsGroupNode::setupFiles(ProjectExplorer::FolderNode *root, const qbs::GroupData &group,
const QStringList &files, const QString &productPath, bool updateExisting)
{
// Build up a tree of nodes:
FileTreeNode tree;
@@ -487,10 +488,10 @@ void QbsGroupNode::setupFiles(ProjectExplorer::FolderNode *root, const QStringLi
FileTreeNode::reorder(&tree, productPath);
FileTreeNode::simplify(&tree);
setupFolder(root, &tree, productPath, updateExisting);
setupFolder(root, group, &tree, productPath, updateExisting);
}
void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root,
void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root, const qbs::GroupData &group,
const FileTreeNode *fileTree, const QString &baseDir,
bool updateExisting)
{
@@ -531,7 +532,7 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root,
if (updateExisting)
fn->emitNodeUpdated();
} else {
fn = new ProjectExplorer::FileNode(path, ProjectExplorer::UnknownFileType, false);
fn = new ProjectExplorer::FileNode(path, fileType(group, c->path()), false);
filesToAdd.append(fn);
}
continue;
@@ -556,7 +557,7 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root,
fn->setDisplayName(displayNameFromPath(c->path(), baseDir));
}
setupFolder(fn, c, c->path(), updateExisting);
setupFolder(fn, group, c, c->path(), updateExisting);
}
}
root->removeFileNodes(filesToRemove);
@@ -564,6 +565,29 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root,
root->addFileNodes(filesToAdd);
}
ProjectExplorer::FileType QbsGroupNode::fileType(const qbs::GroupData &group,
const QString &filePath)
{
if (!group.isValid())
return ProjectExplorer::UnknownFileType;
const qbs::SourceArtifact artifact = Utils::findOrDefault(group.allSourceArtifacts(),
[filePath](const qbs::SourceArtifact &sa) { return sa.filePath() == filePath; });
QTC_ASSERT(artifact.isValid(), return ProjectExplorer::UnknownFileType);
if (artifact.fileTags().contains(QLatin1String("c"))
|| artifact.fileTags().contains(QLatin1String("cpp"))
|| artifact.fileTags().contains(QLatin1String("objc"))
|| artifact.fileTags().contains(QLatin1String("objcpp"))) {
return ProjectExplorer::SourceType;
}
if (artifact.fileTags().contains(QLatin1String("hpp")))
return ProjectExplorer::HeaderType;
if (artifact.fileTags().contains(QLatin1String("qrc")))
return ProjectExplorer::ResourceType;
if (artifact.fileTags().contains(QLatin1String("ui")))
return ProjectExplorer::FormType;
return ProjectExplorer::UnknownFileType;
}
// --------------------------------------------------------------------
// QbsProductNode:
// --------------------------------------------------------------------
@@ -682,7 +706,7 @@ void QbsProductNode::setQbsProductData(const qbs::Project &project, const qbs::P
foreach (const qbs::GroupData &grp, prd.groups()) {
if (grp.name() == prd.name() && grp.location() == prd.location()) {
// Set implicit product group right onto this node:
QbsGroupNode::setupFiles(this, grp.allFilePaths(), productPath, updateExisting);
QbsGroupNode::setupFiles(this, grp, grp.allFilePaths(), productPath, updateExisting);
continue;
}
QbsGroupNode *gn = findGroupNode(grp.name());
@@ -855,7 +879,8 @@ void QbsRootProjectNode::update()
if (Utils::FileName::fromString(f).isChildOf(base))
projectBuildSystemFiles.append(f);
}
QbsGroupNode::setupFiles(m_buildSystemFiles, projectBuildSystemFiles, base.toString(), false);
QbsGroupNode::setupFiles(m_buildSystemFiles, qbs::GroupData(), projectBuildSystemFiles,
base.toString(), false);
update(m_project->qbsProject(), m_project->qbsProjectData());
}

View File

@@ -108,12 +108,15 @@ public:
QString productPath() const;
static void setupFiles(FolderNode *root, const QStringList &files,
// group can be invalid
static void setupFiles(FolderNode *root, const qbs::GroupData &group, const QStringList &files,
const QString &productPath, bool updateExisting);
private:
static void setupFolder(ProjectExplorer::FolderNode *folder,
const FileTreeNode *subFileTree, const QString &baseDir, bool updateExisting);
static void setupFolder(ProjectExplorer::FolderNode *folder, const qbs::GroupData &group,
const FileTreeNode *subFileTree, const QString &baseDir, bool updateExisting);
static ProjectExplorer::FileType fileType(const qbs::GroupData &group, const QString &filePath);
qbs::GroupData m_qbsGroupData;
QString m_productPath;

View File

@@ -254,6 +254,25 @@ bool QbsProject::ensureWriteableQbsFile(const QString &file)
return true;
}
qbs::GroupData QbsProject::reRetrieveGroupData(const qbs::ProductData &oldProduct,
const qbs::GroupData &oldGroup)
{
qbs::GroupData newGroup;
foreach (const qbs::ProductData &pd, m_projectData.allProducts()) {
if (uniqueProductName(pd) == uniqueProductName(oldProduct)) {
foreach (const qbs::GroupData &gd, pd.groups()) {
if (gd.location() == oldGroup.location()) {
newGroup = gd;
break;
}
}
break;
}
}
QTC_CHECK(newGroup.isValid());
return newGroup;
}
bool QbsProject::addFilesToProduct(QbsBaseProjectNode *node, const QStringList &filePaths,
const qbs::ProductData &productData, const qbs::GroupData &groupData, QStringList *notAdded)
{
@@ -273,7 +292,8 @@ bool QbsProject::addFilesToProduct(QbsBaseProjectNode *node, const QStringList &
}
if (notAdded->count() != filePaths.count()) {
m_projectData = m_qbsProject.projectData();
QbsGroupNode::setupFiles(node, allPaths, QFileInfo(productFilePath).absolutePath(), true);
QbsGroupNode::setupFiles(node, reRetrieveGroupData(productData, groupData),
allPaths, QFileInfo(productFilePath).absolutePath(), true);
m_rootProjectNode->update();
}
return notAdded->isEmpty();
@@ -300,7 +320,8 @@ bool QbsProject::removeFilesFromProduct(QbsBaseProjectNode *node, const QStringL
}
if (notRemoved->count() != filePaths.count()) {
m_projectData = m_qbsProject.projectData();
QbsGroupNode::setupFiles(node, allPaths, QFileInfo(productFilePath).absolutePath(), true);
QbsGroupNode::setupFiles(node, reRetrieveGroupData(productData, groupData), allPaths,
QFileInfo(productFilePath).absolutePath(), true);
m_rootProjectNode->update();
}
return notRemoved->isEmpty();

View File

@@ -144,6 +144,9 @@ private:
static bool ensureWriteableQbsFile(const QString &file);
qbs::GroupData reRetrieveGroupData(const qbs::ProductData &oldProduct,
const qbs::GroupData &oldGroup);
QbsManager *const m_manager;
const QString m_projectName;
const QString m_fileName;

View File

@@ -647,7 +647,7 @@ NonInternalLibraryDetailsController::NonInternalLibraryDetailsController(
libraryDetailsWidget()->libraryPathChooser->setExpectedKind(Utils::PathChooser::File);
}
connect(libraryDetailsWidget()->libraryPathChooser, SIGNAL(validChanged()),
connect(libraryDetailsWidget()->libraryPathChooser, SIGNAL(validChanged(bool)),
this, SIGNAL(completeChanged()));
connect(libraryDetailsWidget()->libraryPathChooser, SIGNAL(changed(QString)),
this, SLOT(slotLibraryPathChanged()));

View File

@@ -55,11 +55,11 @@ TestWizardPage::TestWizardPage(QWidget *parent) :
this, SLOT(slotClassNameEdited(QString)));
connect(ui->fileLineEdit, SIGNAL(textEdited(QString)), \
this, SLOT(slotFileNameEdited()));
connect(ui->testClassLineEdit, SIGNAL(validChanged()),
connect(ui->testClassLineEdit, SIGNAL(validChanged(bool)),
this, SLOT(slotUpdateValid()));
connect(ui->testSlotLineEdit, SIGNAL(validChanged()),
connect(ui->testSlotLineEdit, SIGNAL(validChanged(bool)),
this, SLOT(slotUpdateValid()));
connect(ui->fileLineEdit, SIGNAL(validChanged()),
connect(ui->fileLineEdit, SIGNAL(validChanged(bool)),
this, SLOT(slotUpdateValid()));
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Details"));

View File

@@ -192,7 +192,7 @@ void QtOutputFormatter::appendLine(QTextCursor &cursor, const LinkResult &lr,
static QTextCharFormat linkFormat(const QTextCharFormat &inputFormat, const QString &href)
{
QTextCharFormat result = inputFormat;
result.setForeground(creatorTheme()->color(Theme::QtOutputFormatter_LinkTextColor));
result.setForeground(creatorTheme()->color(Theme::TextColorLink));
result.setUnderlineStyle(QTextCharFormat::SingleUnderline);
result.setAnchor(true);
result.setAnchorHref(href);

View File

@@ -65,7 +65,7 @@ GenericLinuxDeviceConfigurationWizardSetupPage::GenericLinuxDeviceConfigurationW
connect(d->ui.nameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged()));
connect(d->ui.hostNameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged()));
connect(d->ui.userNameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged()));
connect(d->ui.privateKeyPathChooser, SIGNAL(validChanged()), SIGNAL(completeChanged()));
connect(d->ui.privateKeyPathChooser, SIGNAL(validChanged(bool)), SIGNAL(completeChanged()));
connect(d->ui.passwordButton, SIGNAL(toggled(bool)), SLOT(handleAuthTypeChanged()));
}

View File

@@ -34,6 +34,7 @@
#include <utils/fileutils.h>
#include <utils/outputformatter.h>
#include <utils/theme/theme.h>
#include <QPlainTextEdit>
#include <QTextCharFormat>
@@ -115,13 +116,14 @@ OutputWindowPlainTextEdit::OutputWindowPlainTextEdit(QWidget *parent) :
m_commandFormat(m_defaultFormat),
m_messageFormat(m_defaultFormat)
{
using Utils::Theme;
setReadOnly(true);
setUndoRedoEnabled(false);
setFrameStyle(QFrame::NoFrame);
m_errorFormat.setForeground(Qt::red);
m_warningFormat.setForeground(Qt::darkYellow);
m_errorFormat.setForeground(Utils::creatorTheme()->color(Theme::OutputPanes_ErrorMessageTextColor));
m_warningFormat.setForeground(Utils::creatorTheme()->color(Theme::OutputPanes_WarningMessageTextColor));
m_commandFormat.setFontWeight(QFont::Bold);
m_messageFormat.setForeground(Qt::blue);
m_messageFormat.setForeground(Utils::creatorTheme()->color(Theme::OutputPanes_MessageOutput));
m_formatter = new Utils::OutputFormatter;
m_formatter->setPlainTextEdit(this);
}

View File

@@ -1539,8 +1539,7 @@ void tst_Dumpers::dumper_data()
+ Check("ba0", "ba0", "\"\"", "@QByteArray")
+ Check("ba1", QByteArray("\"Hello\"World")
+ char(0) + char(1) + char(2) + '"', "@QByteArray") % NoCdbEngine
+ Check("ba1", QByteArray("\"Hello\"World...\""), "@QByteArray") % CdbEngine
+ char(0) + char(1) + char(2) + '"', "@QByteArray")
+ Check("ba1.0", "[0]", "72", "char")
+ Check("ba1.11", "[11]", "0", "char")
+ Check("ba1.12", "[12]", "1", "char")

View File

@@ -1,5 +1,2 @@
[%General]
OverrideLanguage=C
[MainWindow]
WindowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x1H\0\0\0}\0\0\x5\xe0\0\0\x3^\0\0\x1P\0\0\0\x9b\0\0\x5\xd8\0\0\x3V\0\0\0\0\0\0)

View File

@@ -142,30 +142,6 @@
</data>
<data>
<variable>Profile.6</variable>
<valuemap type="QVariantMap">
<value type="bool" key="PE.Profile.AutoDetected">false</value>
<value type="QString" key="PE.Profile.AutoDetectionSource"></value>
<valuemap type="QVariantMap" key="PE.Profile.Data">
<value type="QString" key="Android.GdbServer.Information"></value>
<value type="QString" key="Debugger.Information">{2f8a1f59-ddd7-49f0-ae61-1337223f56a3}</value>
<value type="QString" key="PE.Profile.Device">Desktop Device</value>
<value type="QByteArray" key="PE.Profile.DeviceType">Desktop</value>
<valuelist type="QVariantList" key="PE.Profile.Environment"/>
<value type="QString" key="PE.Profile.SysRoot"></value>
<value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Mingw:{2729dd3e-84f5-42e1-aed1-6a27163346ce}</value>
<value type="QString" key="QtPM4.mkSpecInformation"></value>
<value type="int" key="QtSupport.QtInformation">3</value>
</valuemap>
<value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value>
<value type="QString" key="PE.Profile.Id">{9dc9de67-fdc0-4ba6-877a-1463aacd3b3e}</value>
<valuelist type="QVariantList" key="PE.Profile.MutableInfo"/>
<value type="QString" key="PE.Profile.Name">Desktop 480 GCC</value>
<value type="bool" key="PE.Profile.SDK">false</value>
<valuelist type="QVariantList" key="PE.Profile.StickyInfo"/>
</valuemap>
</data>
<data>
<variable>Profile.7</variable>
<valuemap type="QVariantMap">
<value type="bool" key="PE.Profile.AutoDetected">false</value>
<value type="QString" key="PE.Profile.AutoDetectionSource"></value>
@@ -189,7 +165,7 @@
</valuemap>
</data>
<data>
<variable>Profile.8</variable>
<variable>Profile.7</variable>
<valuemap type="QVariantMap">
<value type="bool" key="PE.Profile.AutoDetected">false</value>
<value type="QString" key="PE.Profile.AutoDetectionSource"></value>
@@ -214,7 +190,7 @@
</data>
<data>
<variable>Profile.Count</variable>
<value type="int">9</value>
<value type="int">8</value>
</data>
<data>
<variable>Profile.Default</variable>

View File

@@ -14,16 +14,6 @@
</data>
<data>
<variable>QtVersion.1</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">3</value>
<value type="QString" key="Name">Qt 4.8 for Desktop - MinGW (Qt SDK)</value>
<value type="QString" key="QMakePath">C:/QtSDK/Desktop/Qt/4.8.0/mingw/bin/qmake.exe</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data>
<variable>QtVersion.2</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">8</value>
<value type="QString" key="Name">Qt 4.7.4 for Desktop - MinGW 4.4 (Qt SDK)</value>
@@ -33,7 +23,7 @@
</valuemap>
</data>
<data>
<variable>QtVersion.3</variable>
<variable>QtVersion.2</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">9</value>
<value type="QString" key="Name">Simulator Qt for MinGW 4.4 (Qt SDK)</value>
@@ -43,7 +33,7 @@
</valuemap>
</data>
<data>
<variable>QtVersion.4</variable>
<variable>QtVersion.3</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">15</value>
<value type="QString" key="Name">Harmattan Target (Qt SDK)</value>
@@ -53,7 +43,7 @@
</valuemap>
</data>
<data>
<variable>QtVersion.5</variable>
<variable>QtVersion.4</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">16</value>
<value type="QString" key="Name">Qt for Fremantle PR1.3 Devices (Qt SDK)</value>
@@ -63,7 +53,7 @@
</valuemap>
</data>
<data>
<variable>QtVersion.6</variable>
<variable>QtVersion.5</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">4</value>
<value type="QString" key="Name">Desktop Qt 5.2.1 (msvc2010)</value>
@@ -73,7 +63,7 @@
</valuemap>
</data>
<data>
<variable>QtVersion.7</variable>
<variable>QtVersion.6</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">20</value>
<value type="QString" key="Name">Qt 5.3.1 (msvc2010_opengl)</value>
@@ -83,7 +73,7 @@
</valuemap>
</data>
<data>
<variable>QtVersion.8</variable>
<variable>QtVersion.7</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">22</value>
<value type="QString" key="Name">Qt %{Qt:Version} (mingw491_32)</value>

View File

@@ -32,33 +32,35 @@ import operator
# for easier re-usage (because Python hasn't an enum type)
class Targets:
DESKTOP_474_GCC = 1
DESKTOP_480_GCC = 2
SIMULATOR = 4
MAEMO5 = 8
HARMATTAN = 16
EMBEDDED_LINUX = 32
DESKTOP_480_MSVC2010 = 64
DESKTOP_521_DEFAULT = 128
DESKTOP_531_DEFAULT = 256
DESKTOP_541_GCC = 512
ALL_TARGETS = map(lambda x: 2 ** x , range(9))
(DESKTOP_474_GCC,
DESKTOP_480_DEFAULT,
SIMULATOR,
MAEMO5,
HARMATTAN,
EMBEDDED_LINUX,
DESKTOP_521_DEFAULT,
DESKTOP_531_DEFAULT,
DESKTOP_541_GCC) = ALL_TARGETS
@staticmethod
def desktopTargetClasses():
desktopTargets = (Targets.DESKTOP_474_GCC | Targets.DESKTOP_480_GCC
| Targets.DESKTOP_521_DEFAULT | Targets.DESKTOP_531_DEFAULT)
if platform.system() in ('Windows', 'Microsoft'):
desktopTargets |= Targets.DESKTOP_480_MSVC2010
if platform.system() != 'Darwin':
desktopTargets |= Targets.DESKTOP_541_GCC
desktopTargets = (sum(Targets.ALL_TARGETS) & ~Targets.SIMULATOR & ~Targets.MAEMO5
& ~Targets.HARMATTAN & ~Targets.EMBEDDED_LINUX)
if platform.system() == 'Darwin':
desktopTargets &= ~Targets.DESKTOP_541_GCC
return desktopTargets
@staticmethod
def getStringForTarget(target):
if target == Targets.DESKTOP_474_GCC:
return "Desktop 474 GCC"
if target == Targets.DESKTOP_480_GCC:
return "Desktop 480 GCC"
elif target == Targets.DESKTOP_480_DEFAULT:
if platform.system() in ('Windows', 'Microsoft'):
return "Desktop 480 MSVC2010"
else:
return "Desktop 480 GCC"
elif target == Targets.MAEMO5:
return "Fremantle"
elif target == Targets.SIMULATOR:
@@ -67,8 +69,6 @@ class Targets:
return "Harmattan"
elif target == Targets.EMBEDDED_LINUX:
return "Embedded Linux"
elif target == Targets.DESKTOP_480_MSVC2010:
return "Desktop 480 MSVC2010"
elif target == Targets.DESKTOP_521_DEFAULT:
return "Desktop 521 default"
elif target == Targets.DESKTOP_531_DEFAULT:
@@ -90,10 +90,7 @@ class Targets:
@staticmethod
def intToArray(targets):
available = [Targets.DESKTOP_474_GCC, Targets.DESKTOP_480_GCC, Targets.SIMULATOR, Targets.MAEMO5,
Targets.HARMATTAN, Targets.EMBEDDED_LINUX, Targets.DESKTOP_480_MSVC2010,
Targets.DESKTOP_521_DEFAULT, Targets.DESKTOP_531_DEFAULT, Targets.DESKTOP_541_GCC]
return filter(lambda x: x & targets == x, available)
return filter(lambda x: x & targets, Targets.ALL_TARGETS)
@staticmethod
def arrayToInt(targetArr):

View File

@@ -69,7 +69,7 @@ def __handleCmakeWizardPage__():
generatorCombo = waitForObject(":Generator:_QComboBox")
generatorText = "Unix Generator (Desktop 480 GCC)"
if platform.system() in ('Windows', 'Microsoft'):
generatorText = "MinGW Generator (Desktop 480 GCC)"
generatorText = "NMake Generator (Desktop 480 MSVC2010)"
index = generatorCombo.findText(generatorText)
if index == -1:
test.warning("No matching CMake generator for found.")
@@ -389,14 +389,11 @@ def __chooseTargets__(targets=Targets.DESKTOP_474_GCC, availableTargets=None):
available = availableTargets
else:
# following targets depend on the build environment - added for further/later tests
available = [Targets.DESKTOP_474_GCC, Targets.DESKTOP_480_GCC, Targets.DESKTOP_521_DEFAULT,
Targets.DESKTOP_531_DEFAULT, Targets.MAEMO5, Targets.EMBEDDED_LINUX,
Targets.SIMULATOR, Targets.HARMATTAN]
available = Targets.ALL_TARGETS
if platform.system() in ('Windows', 'Microsoft'):
available.remove(Targets.EMBEDDED_LINUX)
available.append(Targets.DESKTOP_480_MSVC2010)
if platform.system() != 'Darwin':
available.append(Targets.DESKTOP_541_GCC)
elif platform.system() == 'Darwin':
available.remove(Targets.DESKTOP_541_GCC)
for target in filter(lambda x: x in available,
(Targets.MAEMO5, Targets.HARMATTAN)):
available.remove(target)
@@ -621,11 +618,9 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False):
if 'Desktop' in supports:
if version == None or version < "5.0":
result.append(Targets.DESKTOP_474_GCC)
result.append(Targets.DESKTOP_480_GCC)
result.append(Targets.DESKTOP_480_DEFAULT)
if platform.system() in ("Linux", "Darwin"):
result.append(Targets.EMBEDDED_LINUX)
elif platform.system() in ('Windows', 'Microsoft'):
result.append(Targets.DESKTOP_480_MSVC2010)
result.extend([Targets.DESKTOP_521_DEFAULT, Targets.DESKTOP_531_DEFAULT])
if platform.system() != 'Darwin':
result.append(Targets.DESKTOP_541_GCC)
@@ -637,12 +632,10 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False):
result.append(Targets.SIMULATOR)
elif 'Platform independent' in text:
# MAEMO5 and HARMATTAN could be wrong here - depends on having Madde plugin enabled or not
result = [Targets.DESKTOP_474_GCC, Targets.DESKTOP_480_GCC, Targets.DESKTOP_521_DEFAULT,
Targets.DESKTOP_531_DEFAULT, Targets.MAEMO5, Targets.SIMULATOR, Targets.HARMATTAN]
if platform.system() in ('Windows', 'Microsoft'):
result.append(Targets.DESKTOP_480_MSVC2010)
if platform.system() != 'Darwin':
result.append(Targets.DESKTOP_541_GCC)
result = Targets.ALL_TARGETS
result.remove(Targets.EMBEDDED_LINUX)
if platform.system() == 'Darwin':
result.remove(Targets.DESKTOP_541_GCC)
else:
test.warning("Returning None (__getSupportedPlatforms__())",
"Parsed text: '%s'" % text)

View File

@@ -83,7 +83,7 @@ def main():
if not startedWithoutPluginError():
return
# open example project
openQmakeProject(examplePath, Targets.DESKTOP_480_GCC)
openQmakeProject(examplePath, Targets.DESKTOP_480_DEFAULT)
# open qml file
openDocument("propertyanimation.QML.qml.color-animation\\.qml")
# get editor

View File

@@ -41,7 +41,7 @@ def main():
# add docs to have the correct tool tips
addHelpDocumentation([os.path.join(sdkPath, "Documentation", "qt.qch")])
templateDir = prepareTemplate(sourceExample)
openQmakeProject(os.path.join(templateDir,proFile), Targets.DESKTOP_480_GCC)
openQmakeProject(os.path.join(templateDir, proFile), Targets.DESKTOP_480_DEFAULT)
openDocument("focus.QML.qml.focus\\.qml")
testRenameId()
testFindUsages()

View File

@@ -47,10 +47,7 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
suitableKits = Targets.DESKTOP_480_GCC
if platform.system() in ('Windows', 'Microsoft'):
suitableKits |= Targets.DESKTOP_480_MSVC2010
checkedTargets = openQmakeProject(SpeedCrunchPath, suitableKits)
checkedTargets = openQmakeProject(SpeedCrunchPath, Targets.DESKTOP_480_DEFAULT)
progressBarWait(30000)
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
@@ -65,9 +62,8 @@ def main():
test.fatal("Build configuration %s is selected instead of %s" % (buildConfig, config))
continue
test.log("Testing build configuration: " + config)
if not JIRA.isBugStillOpen(13700):
invokeMenuItem("Build", "Run qmake")
waitForCompile()
invokeMenuItem("Build", "Run qmake")
waitForCompile()
invokeMenuItem("Build", "Rebuild All")
waitForCompile(300000)
checkCompile()

View File

@@ -40,7 +40,7 @@ def main():
if not startedWithoutPluginError():
return
openQmakeProject(pathSpeedcrunch, Targets.DESKTOP_480_GCC)
openQmakeProject(pathSpeedcrunch, Targets.DESKTOP_480_DEFAULT)
# Wait for parsing to complete
progressBarWait(30000)
openQmakeProject(pathCreator, Targets.DESKTOP_531_DEFAULT)

View File

@@ -45,7 +45,7 @@ def main():
if canTestEmbeddedQtQuick():
checkWelcomePage(sessionName, True)
for project in projects:
openQmakeProject(project, Targets.DESKTOP_480_GCC)
openQmakeProject(project, Targets.DESKTOP_480_DEFAULT)
progressBarWait(20000)
checkNavigator(68, "Verifying whether all projects have been opened.")
openDocument("propertyanimation.QML.qml.color-animation\\.qml")

View File

@@ -43,7 +43,7 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
openQmakeProject(os.path.join(templateDir, proFile), Targets.DESKTOP_480_GCC)
openQmakeProject(os.path.join(templateDir, proFile), Targets.DESKTOP_480_DEFAULT)
qmlFiles = ["focus.QML.qml.focus\\.qml", "focus.QML.qml.Core.ListMenu\\.qml"]
checkOutlineFor(qmlFiles)
testModify()

View File

@@ -34,7 +34,7 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
for targ, qVer in [[Targets.DESKTOP_480_GCC, "1.1"], [Targets.DESKTOP_521_DEFAULT, "2.1"],
for targ, qVer in [[Targets.DESKTOP_480_DEFAULT, "1.1"], [Targets.DESKTOP_521_DEFAULT, "2.1"],
[Targets.DESKTOP_521_DEFAULT, "2.2"], [Targets.DESKTOP_531_DEFAULT, "2.3"],
[Targets.DESKTOP_521_DEFAULT, "Controls 1.0"], [Targets.DESKTOP_521_DEFAULT, "Controls 1.1"],
[Targets.DESKTOP_531_DEFAULT, "Controls 1.2"]]:

View File

@@ -34,7 +34,7 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
for targ, quickVer in [[Targets.DESKTOP_480_GCC, 1], [Targets.DESKTOP_521_DEFAULT, 2],
for targ, quickVer in [[Targets.DESKTOP_480_DEFAULT, 1], [Targets.DESKTOP_521_DEFAULT, 2],
[Targets.DESKTOP_531_DEFAULT, 2]]:
# using a temporary directory won't mess up a potentially existing
createNewQmlExtension(tempDir(), targ, quickVer)