Commit 09e0c489 authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/2.5'

parents e6ea2db6 117e4684
......@@ -9,7 +9,7 @@
for i in "$@" ; do
if test -f "$i" && test -s "$i" ; then
if head -n 35 "$1" | grep "qt-info@nokia.com" > /dev/null 2>&1 ; then
if head -n 35 "$1" | grep "info@qt.nokia.com" > /dev/null 2>&1 ; then
echo "$i: OLD EMAIL IN USE!"
elif head -n 35 "$i" | grep Copyright > /dev/null 2>&1 ; then
if head -n 35 "$i" | grep "GNU Lesser General Public License" > /dev/null 2>&1 &&
......
......@@ -89,20 +89,29 @@ def hasInferiorThreadList():
except:
return False
def hasVTable(type):
fields = type.fields()
if len(fields) == 0:
return False
if fields[0].is_base_class:
return hasVTable(fields[0].type)
return str(fields[0].type) == "int (**)(void)"
def dynamicTypeName(value):
#vtbl = str(parseAndEvaluate("{int(*)(int)}%s" % long(value.address)))
try:
# Fails on 7.1 due to the missing to_string.
vtbl = gdb.execute("info symbol {int*}%s" % long(value.address),
to_string = True)
pos1 = vtbl.find("vtable ")
if pos1 != -1:
pos1 += 11
pos2 = vtbl.find(" +", pos1)
if pos2 != -1:
return vtbl[pos1 : pos2]
except:
pass
if hasVTable(value.type):
#vtbl = str(parseAndEvaluate("{int(*)(int)}%s" % long(value.address)))
try:
# Fails on 7.1 due to the missing to_string.
vtbl = gdb.execute("info symbol {int*}%s" % long(value.address),
to_string = True)
pos1 = vtbl.find("vtable ")
if pos1 != -1:
pos1 += 11
pos2 = vtbl.find(" +", pos1)
if pos2 != -1:
return vtbl[pos1 : pos2]
except:
pass
return str(value.type)
def upcast(value):
......@@ -1541,7 +1550,7 @@ class Dumper:
self.putAddress(value.address)
return
if format == -1 and innerTypeName == "char":
if format == None and innerTypeName == "char":
# Use Latin1 as default for char *.
self.putAddress(value.address)
self.putType(typeName)
......
......@@ -1795,16 +1795,19 @@ def qdump__std__map(d, value):
if d.isExpanded():
keyType = templateArgument(value.type, 0)
valueType = templateArgument(value.type, 1)
# Does not work on gcc 4.4, the allocator type (fourth template
# argument) seems not to be available.
# pairType = templateArgument(templateArgument(value.type, 3), 0)
# So use this as workaround:
pairType = templateArgument(impl.type, 1)
try:
# Does not work on gcc 4.4, the allocator type (fourth template
# argument) seems not to be available.
pairType = templateArgument(templateArgument(value.type, 3), 0)
pairPointer = pairType.pointer()
except:
# So use this as workaround:
pairType = templateArgument(impl.type, 1)
pairPointer = pairType.pointer()
isCompact = mapCompact(d.currentItemFormat(), keyType, valueType)
innerType = pairType
if isCompact:
innerType = valueType
pairPointer = pairType.pointer()
node = impl["_M_header"]["_M_left"]
childType = innerType
if size == 0:
......
......@@ -124,7 +124,7 @@ Rectangle {
color: "#535353"
text: qsTr("Recent Projects")
anchors.left: sessionsTitle.right
anchors.leftMargin: 160
anchors.leftMargin: 280
font.bold: true
font.family: "Helvetica"
font.pixelSize: 16
......
......@@ -38,9 +38,18 @@ QtObject {
property alias standstandardDescription: standardDescriptionText.font
property alias italicDescription: italicDescriptionText.font
property alias boldDescription: boldText.font
property alias smallPath: smallPathText.font
property list<Item> texts: [
Text {
id: smallPathText
visible: false
font.pixelSize: 12
font.family: "Helvetica"
},
Text {
id: linkText
......
......@@ -62,12 +62,29 @@ Item {
Text {
id: pathText
y: 18
color: "#8b8b8b"
color: "#6b6b6b"
anchors.right: parent.right
anchors.rightMargin: 12
anchors.left: parent.left
anchors.leftMargin: 8
font: fonts.italicDescription
font: fonts.smallPath
elide: Text.ElideRight
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
toolTip.show();
}
onExited: {
toolTip.hide()
}
}
ToolTip {
x: 10
y: 20
id: toolTip
text: pathText.text
}
}
}
......@@ -32,26 +32,226 @@
import QtQuick 1.1
Row {
spacing: 4
property alias name: sessionText.text
Item {
x: 5
id: delegate
property bool expanded: false
height: column.height
property alias name: text.text
property alias hovered: sessionText.hovered
CustomFonts {
id: fonts
}
Column {
id: column
spacing: 4
Row {
id: row1
height: text.height + 8
spacing: 4
Image {
anchors.verticalCenter: text.verticalCenter
source: "images/bullet.png"
}
LinkedText {
id: text
onClicked: {
projectWelcomePage.requestSession(sessionName);
}
width: delegate.ListView.view.width - 80
elide: Text.ElideRight
Rectangle {
z: -4
color: "#f9f9f9"
anchors.fill: parent
anchors.rightMargin: - delegate.ListView.view.width + text.width + 32
anchors.topMargin: -4
anchors.bottomMargin: -4
opacity: iArea.hovered || text.hovered || area2.hovered ? 1: 0.1
MouseArea {
acceptedButtons: Qt.RightButton
id: area2
hoverEnabled: true
anchors.fill: parent
property bool hovered: false
onEntered: {
area2.hovered = true
}
onExited: {
area2.hovered = false
}
onClicked: {
delegate.expanded = !delegate.expanded;
delegate.ListView.view.positionViewAtIndex(index, ListView.Contain);
area2.hovered = false
}
}
}
}
}
Item {
z: -1
property int margin: 6
height: innerColumn.height + margin * 2
width: delegate.ListView.view.width - 8 - margin * 2
opacity: delegate.expanded ? 1 : 0
Behavior on opacity {
ParallelAnimation {
PauseAnimation { duration: delegate.expanded ? 100 : 0; }
PropertyAnimation { duration: 100; }
}
}
signal clicked
Column {
x: parent.margin + 8
//y: parent.margin
id: innerColumn
spacing: 12
id: root
Repeater {
model: projectsPath
delegate: Column {
Text {
text: projectsName[index]
font: fonts.boldDescription
}
Text {
text: modelData
font: fonts.smallPath
elide: Text.ElideMiddle
color: "#6b6b6b"
width: delegate.ListView.view.width - 40
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
toolTip.show();
}
onExited: {
toolTip.hide()
}
Image {
source: "images/bullet.png"
anchors.verticalCenter: sessionText.verticalCenter
}
ToolTip {
x: 10
y: 20
id: toolTip
text: modelData
}
}
}
}
Row {
x: 16
spacing: 24
LinkedText {
text: qsTr("Clone")
onClicked: {
root.model.cloneSession(sessionName);
}
}
LinkedText {
text: qsTr("Delete")
onClicked: {
root.model.deleteSession(sessionName);
}
}
LinkedText {
text: qsTr("Rename")
onClicked: {
root.model.renameSession(sessionName);
}
}
}
}
Rectangle {
color: "#f1f1f1"
radius: 4
anchors.fill: parent
anchors.topMargin: -8
anchors.bottomMargin: -2
anchors.leftMargin: 6
anchors.rightMargin: 6
z: -1
}
}
}
LinkedText {
id: sessionText
onClicked: {
projectWelcomePage.requestSession(sessionName);
root.clicked();
Item {
x: delegate.ListView.view.width - 65
width: 38
height: 20
Item {
id: collapseButton
opacity: text.hovered || area2.hovered || iArea.hovered || delegate.expanded ? 1 : 0
property color color: iArea.hovered ? "#E9E9E9" : "#f1f1f1"
anchors.fill: parent
Image {
x: 4
source: "images/info.png"
}
Image {
x: 20
source: delegate.expanded ? "images/arrow_up.png" : "images/arrow_down.png"
}
Rectangle {
color: collapseButton.color
z: -1
radius: 6
anchors.fill: parent
anchors.topMargin: -3
anchors.bottomMargin: 6
anchors.leftMargin: -1
anchors.rightMargin: -1
visible: iArea.hovered || delegate.expanded
}
Rectangle {
color: collapseButton.color
z: -1
anchors.fill: parent
anchors.topMargin: 6
anchors.bottomMargin: delegate.expanded ? -2 : 2
anchors.leftMargin: -1
anchors.rightMargin: -1
visible: iArea.hovered || delegate.expanded
}
}
MouseArea {
id: iArea
anchors.margins: -2
anchors.fill: parent
hoverEnabled: true
property bool hovered: false
onClicked: {
delegate.expanded = !delegate.expanded;
delegate.ListView.view.positionViewAtIndex(index, ListView.Contain);
}
onEntered: {
iArea.hovered = true
}
onExited: {
iArea.hovered = false
}
}
}
}
......@@ -35,58 +35,27 @@ import qtcomponents 1.0
Item {
property alias model: root.model
height: Math.min(root.count * root.delegateHeight, 276)
property int topMargin: 6
height: Math.min(root.contentHeight + topMargin, parent.height - 260)
ListView {
id: root
anchors.fill: parent
anchors.topMargin: topMargin
snapMode: ListView.SnapToItem
property int delegateHeight: currentItem.height + spacing
//property int delegateHeight: 22
clip: true
interactive: false
spacing: 4
cacheBuffer: 800 //We need a big cache to avoid artefacts caused by delegate recreation
clip: true
property bool delayedHide: false
Behavior on delayedHide {
PropertyAnimation { duration: 200; }
}
onDelayedHideChanged: {
panel.opacity = 0;
}
delegate: SessionItem {
id: item
property bool activate: hovered
Behavior on activate {
PropertyAnimation { duration: 50 }
}
onActivateChanged: {
if (activate) {
panel.y = item.y + 20 - root.contentY;
panel.opacity = 1;
panel.projectsPathList = projectsPath;
panel.projectsDisplayList = projectsName
panel.currentSession = sessionName;
} else {
if (!panel.hovered)
panel.opacity = 0
}
}
onClicked: {
root.delayedHide = !root.delayedHide
}
function fullSessionName()
{
var newSessionName = sessionName
......@@ -120,219 +89,12 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
singleStep: root.delegateHeight
anchors.topMargin: styleitem.style == "mac" ? 1 : 0
anchors.topMargin: styleitem.style === "mac" ? 1 : 0
onValueChanged: root.contentY = Math.round(value / root.delegateHeight) * root.delegateHeight
anchors.rightMargin: styleitem.frameoffset
anchors.bottomMargin: styleitem.frameoffset
value: root.contentY
}
}
Rectangle {
CustomFonts {
id: fonts
}
id: panel
border.width: 1
smooth: true
opacity: 0
property int margin: 12
width: panelColumn.width + margin * 2
height: panelColumn.height + margin * 2
property bool hovered: false
property variant projectsPathList
property variant projectsDisplayList
property string currentSession
onHoveredChanged: {
if (panel.hovered)
panel.opacity = 1;
else
panel.opacity = 0;
}
MouseArea {
anchors.topMargin: 0
anchors.fill: parent
id: panelMouseArea
hoverEnabled: true
onEntered: {
panel.hovered = true
}
onExited: {
panel.hovered = false
}
}
Column {
x: panel.margin
y: panel.margin
id: panelColumn
spacing: 8
Repeater {
model: panel.projectsPathList
delegate: Row {
spacing: 6
Text {
text: panel.projectsDisplayList[index]
font: fonts.boldDescription
}
Text {
text: modelData
font: fonts.linkFont
}
}
}
Row {
x: -2
spacing: 2
id: add
Item {
//place hold for an icon
width: 16
height: 16
MouseArea {
id: exitMouseArea
anchors.fill: parent
hoverEnabled: true
onEntered: {
panel.hovered = true
}
onExited: {
panel.hovered = false
}
onClicked: {
//Will be uncommented once we have an icon
//model.cloneSession(panel.currentSession);
}
}
}
LinkedText {
text: qsTr("Clone this session")
onEntered: {
panel.hovered = true
}
onExited: {
panel.hovered = false
}
onClicked: {
panel.opacity = 0;
model.cloneSession(panel.currentSession);
}
}
}
Row {
x: -2
spacing: 2
id: clear
Item {
//place holder for an icon
width: 16
height: 16
MouseArea {
id: clearMouseArea
anchors.fill: parent
hoverEnabled: true
onEntered: {
panel.hovered = true
}
onExited: {
panel.hovered = false
}
onClicked: {
//Will be uncommented once we have an icon