Skip to content

Commit a04025b

Browse files
committed
Merge pull request #1 from Iktwo/fix/refactoring
Fix/refactoring
2 parents 97e5a53 + a3d56dc commit a04025b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

app/SQLiteEditor/qml/main.qml

-3
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,4 @@ Views.AppWindow {
355355
font.family: "Courier"
356356
}
357357
}
358-
359-
360-
361358
}

app/SQLiteEditor/qml/views/AppWindow.qml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import QtQuick 2.3
22
import QtQuick.Controls 1.2
33
import QtQuick.Dialogs 1.0
4+
import Qt.labs.settings 1.0
45

56
ApplicationWindow {
67
id: root
@@ -21,11 +22,15 @@ ApplicationWindow {
2122
radius: theme.windowRadius
2223
}
2324

25+
Settings {
26+
property alias url: root.activeDatabase
27+
}
28+
2429
property alias fileDialog : _FileDialog
2530
FileDialog {
2631
id: _FileDialog
2732
title: "Please choose a file"
28-
nameFilters: [ "SQLite3 Databases (*.db *.sqlite3 *.sqlite)", "All files (*)" ]
33+
nameFilters: [ "SQLite3 Databases (*.db *.sqlite3 *.sqlite *.sql3)", "All files (*)" ]
2934
onAccepted: {
3035
activeDatabase = fileUrl
3136
}
@@ -36,8 +41,9 @@ ApplicationWindow {
3641
title: qsTr("File")
3742
MenuItem {
3843
text: qsTr("&Open")
44+
shortcut: StandardKey.Open
3945
onTriggered: {
40-
46+
fileDialog.open()
4147
}
4248
}
4349
MenuItem {

0 commit comments

Comments
 (0)