Capitalize project name in QML
This commit is contained in:
		
							parent
							
								
									a17a03aaef
								
							
						
					
					
						commit
						b6632aa74b
					
				
					 4 changed files with 9 additions and 15 deletions
				
			
		| 
						 | 
					@ -1,2 +1,2 @@
 | 
				
			||||||
let name () = "oboy"
 | 
					let name () = "OBoy"
 | 
				
			||||||
let version () = "1.0a"
 | 
					let version () = "1.0a"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,9 +4,7 @@ import com.oboy.oboy 1.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Window {
 | 
					Window {
 | 
				
			||||||
    title: "About"
 | 
					    title: "About"
 | 
				
			||||||
    // A background map is 32 x 32 tiles.
 | 
					    width: 256
 | 
				
			||||||
    // Each tile is 8 x 8 pixels.
 | 
					 | 
				
			||||||
    width: 128
 | 
					 | 
				
			||||||
    height: 128
 | 
					    height: 128
 | 
				
			||||||
    maximumWidth: width
 | 
					    maximumWidth: width
 | 
				
			||||||
    minimumWidth: width
 | 
					    minimumWidth: width
 | 
				
			||||||
| 
						 | 
					@ -20,10 +18,12 @@ Window {
 | 
				
			||||||
    Text {
 | 
					    Text {
 | 
				
			||||||
        id: name
 | 
					        id: name
 | 
				
			||||||
        text: oboy.name
 | 
					        text: oboy.name
 | 
				
			||||||
 | 
					        anchors.horizontalCenter: parent.horizontalCenter
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    Text {
 | 
					    Text {
 | 
				
			||||||
        id: version
 | 
					        id: version
 | 
				
			||||||
        text: oboy.version
 | 
					        text: oboy.version
 | 
				
			||||||
 | 
					        anchors.horizontalCenter: parent.horizontalCenter
 | 
				
			||||||
        anchors.top: name.bottom
 | 
					        anchors.top: name.bottom
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
cmake_minimum_required(VERSION 3.1)
 | 
					cmake_minimum_required(VERSION 3.1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
project(oboy LANGUAGES CXX)
 | 
					project(OBoy LANGUAGES CXX)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
 | 
					set(CMAKE_INCLUDE_CURRENT_DIR ON)
 | 
				
			||||||
set(CMAKE_AUTOMOC ON)
 | 
					set(CMAKE_AUTOMOC ON)
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,7 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONF
 | 
				
			||||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick)
 | 
					target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# OCaml
 | 
					# OCaml
 | 
				
			||||||
set(OCAML_ROOT "/usr/lib/ocaml")
 | 
					set(OCAML_ROOTS "/usr/lib/ocaml" ${CMAKE_SOURCE_DIR}/../../_opam/lib/ocaml)
 | 
				
			||||||
target_include_directories(${PROJECT_NAME} PRIVATE ${OCAML_ROOT})
 | 
					target_include_directories(${PROJECT_NAME} PRIVATE ${OCAML_ROOTS})
 | 
				
			||||||
target_link_directories(${PROJECT_NAME} PRIVATE ${OCAML_ROOT} ${CMAKE_SOURCE_DIR}/../../_build)
 | 
					target_link_directories(${PROJECT_NAME} PRIVATE ${OCAML_ROOTS} ${CMAKE_SOURCE_DIR}/../../_build)
 | 
				
			||||||
target_link_libraries(${PROJECT_NAME} PRIVATE oboycore m dl asmrun)
 | 
					target_link_libraries(${PROJECT_NAME} PRIVATE oboycore m dl asmrun)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,13 +16,7 @@ int main(int argc, char *argv[])
 | 
				
			||||||
    qmlRegisterType<OBoy>("com.oboy.oboy", 1, 0, "OBoy");
 | 
					    qmlRegisterType<OBoy>("com.oboy.oboy", 1, 0, "OBoy");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QQmlApplicationEngine engine;
 | 
					    QQmlApplicationEngine engine;
 | 
				
			||||||
    const QUrl url(QStringLiteral("qrc:/main.qml"));
 | 
					    engine.load(QUrl(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);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    caml_main(argv);
 | 
					    caml_main(argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue