From be3d8b0e77cb53f3e1100720fbdccf54dae1b0a2 Mon Sep 17 00:00:00 2001 From: blue Date: Tue, 5 Dec 2023 19:17:27 -0300 Subject: [PATCH] settings seem to work, wow --- qml/main.qml | 11 +++++++++-- root.cpp | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/qml/main.qml b/qml/main.qml index 7841a96..52626a0 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -2,7 +2,7 @@ import QtQuick import QtQuick.Window import QtQuick.Controls import QtQuick.Layouts - +import QtCore ApplicationWindow { @@ -27,18 +27,25 @@ ApplicationWindow { Welcome { id: welcome + serverAddress: settings.serverAddress onPickServer: function (address) { pick.address = address; stack.push(pick) } } + Settings { + id: settings + + property string serverAddress + } + ServerPick { visible: false id: pick onBack: stack.pop() onSuccess: function (address) { - welcome.serverAddress = address; + settings.serverAddress = address; stack.pop(); } } diff --git a/root.cpp b/root.cpp index bcb00cb..442b50b 100644 --- a/root.cpp +++ b/root.cpp @@ -9,6 +9,13 @@ Root::Root(const QUrl& root, int& argc, char* argv[]) : { 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, this, &Root::onObjectCreated, Qt::QueuedConnection