From b6632aa74b68db600d30cd0fb1dd2052faaf80c1 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Mon, 13 May 2019 14:02:02 +0200 Subject: [PATCH] Capitalize project name in QML --- src/core/version.ml | 2 +- src/qt/About.qml | 6 +++--- src/qt/CMakeLists.txt | 8 ++++---- src/qt/main.cpp | 8 +------- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/core/version.ml b/src/core/version.ml index c0ad70e..a324c87 100644 --- a/src/core/version.ml +++ b/src/core/version.ml @@ -1,2 +1,2 @@ -let name () = "oboy" +let name () = "OBoy" let version () = "1.0a" diff --git a/src/qt/About.qml b/src/qt/About.qml index 3f9a5f8..93a49d8 100644 --- a/src/qt/About.qml +++ b/src/qt/About.qml @@ -4,9 +4,7 @@ import com.oboy.oboy 1.0 Window { title: "About" - // A background map is 32 x 32 tiles. - // Each tile is 8 x 8 pixels. - width: 128 + width: 256 height: 128 maximumWidth: width minimumWidth: width @@ -20,10 +18,12 @@ Window { Text { id: name text: oboy.name + anchors.horizontalCenter: parent.horizontalCenter } Text { id: version text: oboy.version + anchors.horizontalCenter: parent.horizontalCenter anchors.top: name.bottom } } diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 25702a9..967512b 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.1) -project(oboy LANGUAGES CXX) +project(OBoy LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) @@ -15,7 +15,7 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE $<$,$("com.oboy.oboy", 1, 0, "OBoy"); QQmlApplicationEngine engine; - const QUrl url(QStringLiteral("qrc:/main.qml")); - QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, - &app, [url](QObject *obj, const QUrl &objUrl) { - if (!obj && url == objUrl) - QCoreApplication::exit(-1); - }, Qt::QueuedConnection); - engine.load(url); + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); caml_main(argv);