settings seem to work, wow
This commit is contained in:
parent
f97847b949
commit
be3d8b0e77
11
qml/main.qml
11
qml/main.qml
@ -2,7 +2,7 @@ import QtQuick
|
|||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtCore
|
||||||
|
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
@ -27,18 +27,25 @@ ApplicationWindow {
|
|||||||
|
|
||||||
Welcome {
|
Welcome {
|
||||||
id: welcome
|
id: welcome
|
||||||
|
serverAddress: settings.serverAddress
|
||||||
onPickServer: function (address) {
|
onPickServer: function (address) {
|
||||||
pick.address = address;
|
pick.address = address;
|
||||||
stack.push(pick)
|
stack.push(pick)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Settings {
|
||||||
|
id: settings
|
||||||
|
|
||||||
|
property string serverAddress
|
||||||
|
}
|
||||||
|
|
||||||
ServerPick {
|
ServerPick {
|
||||||
visible: false
|
visible: false
|
||||||
id: pick
|
id: pick
|
||||||
onBack: stack.pop()
|
onBack: stack.pop()
|
||||||
onSuccess: function (address) {
|
onSuccess: function (address) {
|
||||||
welcome.serverAddress = address;
|
settings.serverAddress = address;
|
||||||
stack.pop();
|
stack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
7
root.cpp
7
root.cpp
@ -9,6 +9,13 @@ Root::Root(const QUrl& root, int& argc, char* argv[]) :
|
|||||||
{
|
{
|
||||||
std::cout << "Starting Magpie..." << std::endl;
|
std::cout << "Starting Magpie..." << std::endl;
|
||||||
|
|
||||||
|
setOrganizationName("macaw.me");
|
||||||
|
setOrganizationDomain("macaw.me");
|
||||||
|
setApplicationName("magpie");
|
||||||
|
setApplicationDisplayName("Magpie");
|
||||||
|
setApplicationVersion("0.0.1");
|
||||||
|
setDesktopFileName("magpie");
|
||||||
|
|
||||||
connect(&engine, &QQmlApplicationEngine::objectCreated,
|
connect(&engine, &QQmlApplicationEngine::objectCreated,
|
||||||
this, &Root::onObjectCreated,
|
this, &Root::onObjectCreated,
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
|
Loading…
Reference in New Issue
Block a user