forked from quickshell/quickshell
debug: add lint for zero sized items
This commit is contained in:
parent
66b494d760
commit
6ceee06884
7 changed files with 109 additions and 0 deletions
|
@ -22,6 +22,8 @@ target_link_libraries(quickshell-window PRIVATE
|
|||
Qt::Core Qt::Gui Qt::Quick Qt6::QuickPrivate
|
||||
)
|
||||
|
||||
qs_add_link_dependencies(quickshell-window quickshell-debug)
|
||||
|
||||
target_link_libraries(quickshell-window-init PRIVATE Qt::Qml)
|
||||
|
||||
qs_module_pch(quickshell-window SET large)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "../core/qmlscreen.hpp"
|
||||
#include "../core/region.hpp"
|
||||
#include "../core/reload.hpp"
|
||||
#include "../debug/lint.hpp"
|
||||
#include "windowinterface.hpp"
|
||||
|
||||
ProxyWindowBase::ProxyWindowBase(QObject* parent)
|
||||
|
@ -214,6 +215,11 @@ void ProxyWindowBase::polishItems() {
|
|||
// This hack manually polishes the item tree right before showing the window so it will
|
||||
// always be created with the correct size.
|
||||
QQuickWindowPrivate::get(this->window)->polishItems();
|
||||
|
||||
if (!this->ranLints) {
|
||||
qs::debug::lintItemTree(this->mContentItem);
|
||||
this->ranLints = true;
|
||||
}
|
||||
}
|
||||
|
||||
qint32 ProxyWindowBase::x() const {
|
||||
|
|
|
@ -130,6 +130,7 @@ protected:
|
|||
QQuickWindow* window = nullptr;
|
||||
QQuickItem* mContentItem = nullptr;
|
||||
bool reloadComplete = false;
|
||||
bool ranLints = false;
|
||||
|
||||
private:
|
||||
void polishItems();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue