forked from quickshell/quickshell
		
	build: slightly improve qmltype generation
qmlls still sucks too much for this to be very useful
This commit is contained in:
		
							parent
							
								
									6966fc025c
								
							
						
					
					
						commit
						73fd022b1e
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -54,6 +54,7 @@ endif()
 | 
				
			||||||
find_package(Qt6 REQUIRED COMPONENTS ${QT_FPDEPS})
 | 
					find_package(Qt6 REQUIRED COMPONENTS ${QT_FPDEPS})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
qt_standard_project_setup(REQUIRES 6.6)
 | 
					qt_standard_project_setup(REQUIRES 6.6)
 | 
				
			||||||
 | 
					set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml_modules)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
add_subdirectory(src/core)
 | 
					add_subdirectory(src/core)
 | 
				
			||||||
add_subdirectory(src/io)
 | 
					add_subdirectory(src/io)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <qqmlintegration.h>
 | 
				
			||||||
#include <qtmetamacros.h>
 | 
					#include <qtmetamacros.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "doc.hpp"
 | 
					#include "doc.hpp"
 | 
				
			||||||
| 
						 | 
					@ -11,6 +12,7 @@ class Anchors {
 | 
				
			||||||
	Q_PROPERTY(bool right MEMBER mRight);
 | 
						Q_PROPERTY(bool right MEMBER mRight);
 | 
				
			||||||
	Q_PROPERTY(bool top MEMBER mTop);
 | 
						Q_PROPERTY(bool top MEMBER mTop);
 | 
				
			||||||
	Q_PROPERTY(bool bottom MEMBER mBottom);
 | 
						Q_PROPERTY(bool bottom MEMBER mBottom);
 | 
				
			||||||
 | 
						QML_VALUE_TYPE(anchors);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
	[[nodiscard]] bool horizontalConstraint() const noexcept { return this->mLeft && this->mRight; }
 | 
						[[nodiscard]] bool horizontalConstraint() const noexcept { return this->mLeft && this->mRight; }
 | 
				
			||||||
| 
						 | 
					@ -37,6 +39,7 @@ class Margins {
 | 
				
			||||||
	Q_PROPERTY(qint32 right MEMBER mRight);
 | 
						Q_PROPERTY(qint32 right MEMBER mRight);
 | 
				
			||||||
	Q_PROPERTY(qint32 top MEMBER mTop);
 | 
						Q_PROPERTY(qint32 top MEMBER mTop);
 | 
				
			||||||
	Q_PROPERTY(qint32 bottom MEMBER mBottom);
 | 
						Q_PROPERTY(qint32 bottom MEMBER mBottom);
 | 
				
			||||||
 | 
						QML_VALUE_TYPE(margins);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
	[[nodiscard]] bool operator==(const Margins& other) const noexcept {
 | 
						[[nodiscard]] bool operator==(const Margins& other) const noexcept {
 | 
				
			||||||
| 
						 | 
					@ -94,7 +97,6 @@ Q_ENUM_NS(Enum);
 | 
				
			||||||
/// }
 | 
					/// }
 | 
				
			||||||
/// ```
 | 
					/// ```
 | 
				
			||||||
class PanelWindowInterface: public WindowInterface {
 | 
					class PanelWindowInterface: public WindowInterface {
 | 
				
			||||||
	QSDOC_NAMED_ELEMENT(PanelWindow);
 | 
					 | 
				
			||||||
	// clang-format off
 | 
						// clang-format off
 | 
				
			||||||
	Q_OBJECT;
 | 
						Q_OBJECT;
 | 
				
			||||||
	/// Anchors attach a shell window to the sides of the screen.
 | 
						/// Anchors attach a shell window to the sides of the screen.
 | 
				
			||||||
| 
						 | 
					@ -116,6 +118,7 @@ class PanelWindowInterface: public WindowInterface {
 | 
				
			||||||
	/// Defaults to `ExclusionMode.Auto`.
 | 
						/// Defaults to `ExclusionMode.Auto`.
 | 
				
			||||||
	Q_PROPERTY(ExclusionMode::Enum exclusionMode READ exclusionMode WRITE setExclusionMode NOTIFY exclusionModeChanged);
 | 
						Q_PROPERTY(ExclusionMode::Enum exclusionMode READ exclusionMode WRITE setExclusionMode NOTIFY exclusionModeChanged);
 | 
				
			||||||
	// clang-format on
 | 
						// clang-format on
 | 
				
			||||||
 | 
						QSDOC_NAMED_ELEMENT(PanelWindow);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
	explicit PanelWindowInterface(QObject* parent = nullptr): WindowInterface(parent) {}
 | 
						explicit PanelWindowInterface(QObject* parent = nullptr): WindowInterface(parent) {}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue