Skip to content

Commit c8752bc

Browse files
committed
Remove file:// from title
1 parent a04025b commit c8752bc

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

app/SQLiteEditor/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ int main(int argc, char *argv[])
3232
engine.rootContext()->setContextProperty("$", &utility);
3333
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
3434

35-
36-
3735
return app.exec();
3836
}
3937

app/SQLiteEditor/qml/main.qml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Views.AppWindow {
1111
id: superRoot
1212

1313
property QtObject queries : QtObject {
14-
property string tableView : "SELECT * FROM sqlite_master WHERE type = 'table' OR type = 'view' ORDER BY type"
14+
readonly property string tableView : "SELECT * FROM sqlite_master WHERE type = 'table' OR type = 'view' ORDER BY type"
1515
property string fat : "SELECT * FROM Track tra JOIN (SELECT * FROM Album alb JOIN Artist art ON art.ArtistId = alb.ArtistId) albart ON tra.AlbumId = albart.AlbumId"
1616
}
1717

@@ -20,6 +20,7 @@ Views.AppWindow {
2020
databasePath: superRoot.activeDatabase
2121
onResultsReady: {
2222
console.log("ready = " + query)
23+
console.log("results", Object.keys(results))
2324
if(query == queries.tableView)
2425
{
2526
_ListView_Tables.model = results
@@ -39,25 +40,28 @@ Views.AppWindow {
3940
z: theme.z.header
4041
}
4142

42-
4343
Rectangle {
4444
id: _Rectangle_Navigation
45-
width: 72
45+
4646
anchors.top: _Header.bottom
4747
anchors.bottom: parent.bottom
48-
color: theme.asphalt
4948

49+
width: 72
50+
color: theme.asphalt
5051

5152
ListView {
5253
id: _ListView_Navigation
54+
5355
anchors.fill: parent
56+
5457
interactive: false
5558

5659
model: [
5760
{
5861
image : "img/icon-tables.png"
5962
}
6063
]
64+
6165
delegate: Rectangle {
6266
width: ListView.view.width
6367
height: width
@@ -120,9 +124,9 @@ Views.AppWindow {
120124
z: 2
121125
}
122126

123-
124127
ListView {
125128
id: _ListView_Tables
129+
126130
anchors.top: parent.top
127131
anchors.left: parent.left
128132
anchors.right: parent.right

app/SQLiteEditor/qml/views/Header.qml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ import st.app 1.0 as AppStreet
55
Rectangle {
66
anchors.left: parent.left
77
anchors.right: parent.right
8+
89
height: 40
10+
911
gradient: theme.headerGradient
1012
radius: theme.windowRadius
1113

1214
MouseArea {
13-
anchors.fill: parent
1415
property int _x
1516
property int _y
17+
18+
anchors.fill: parent
19+
1620
onPressed: {
1721
_x = mouse.x
1822
_y = mouse.y
@@ -27,20 +31,24 @@ Rectangle {
2731
anchors.verticalCenter: parent.verticalCenter
2832
anchors.left: parent.left
2933
anchors.leftMargin: 10
34+
3035
height: 14
3136
spacing: 8
37+
3238
YosemiteButton {
3339
color: theme.yosemite.exitColor
3440
onClicked: {
3541
Qt.quit()
3642
}
3743
}
44+
3845
YosemiteButton {
3946
color: theme.yosemite.minimizeColor
4047
onClicked: {
4148
superRoot.showMinimized()
4249
}
4350
}
51+
4452
YosemiteButton {
4553
color: theme.yosemite.expandColor
4654
onClicked: {
@@ -51,20 +59,24 @@ Rectangle {
5159

5260
Label {
5361
anchors.centerIn: parent
54-
horizontalAlignment: Text.AlignHCenter
62+
5563
width: 500
64+
65+
horizontalAlignment: Text.AlignHCenter
5666
color: theme.text
5767
styleColor: theme.white
5868
style: Text.Raised
59-
text: [superRoot.title, superRoot.activeDatabase.toString()].filter(Boolean).join(" - ")
69+
text: [superRoot.title, superRoot.activeDatabase.toString().replace("file://", "")].filter(Boolean).join(" - ")
6070
}
6171

6272
Row {
6373
anchors.right: parent.right
6474
anchors.rightMargin: 10
65-
layoutDirection: Qt.RightToLeft
6675
anchors.verticalCenter: parent.verticalCenter
76+
77+
layoutDirection: Qt.RightToLeft
6778
spacing: 10
79+
6880
Button {
6981
height: 30
7082
text: "Open Database"
@@ -141,6 +153,7 @@ Rectangle {
141153
anchors.left: parent.left
142154
anchors.right: parent.right
143155
anchors.bottom: parent.bottom
156+
144157
height: 1
145158
color: theme.headerAccent
146159
}

0 commit comments

Comments
 (0)