fix: thisptr lints for base classes

This commit is contained in:
outfoxxed 2024-02-04 05:01:47 -08:00
parent d76100781f
commit 7a18ce8a55
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 17 additions and 16 deletions

View file

@ -14,7 +14,7 @@
#include "qmlscreen.hpp" #include "qmlscreen.hpp"
void ProxyShellWindow::earlyInit(QObject* old) { void ProxyShellWindow::earlyInit(QObject* old) {
ProxyWindowBase::earlyInit(old); this->ProxyWindowBase::earlyInit(old);
QObject::connect(this->window, &QWindow::screenChanged, this, &ProxyShellWindow::screenChanged); QObject::connect(this->window, &QWindow::screenChanged, this, &ProxyShellWindow::screenChanged);
@ -50,21 +50,21 @@ void ProxyShellWindow::componentComplete() {
this->window->setVisible(this->stagingVisible); this->window->setVisible(this->stagingVisible);
ProxyWindowBase::componentComplete(); this->ProxyWindowBase::componentComplete();
} }
QQuickWindow* ProxyShellWindow::disownWindow() { QQuickWindow* ProxyShellWindow::disownWindow() {
QObject::disconnect(this->shellWindow, nullptr, this, nullptr); QObject::disconnect(this->shellWindow, nullptr, this, nullptr);
return ProxyWindowBase::disownWindow(); return this->ProxyWindowBase::disownWindow();
} }
void ProxyShellWindow::setVisible(bool visible) { void ProxyShellWindow::setVisible(bool visible) {
if (!this->complete) this->stagingVisible = visible; if (!this->complete) this->stagingVisible = visible;
else ProxyWindowBase::setVisible(visible); else this->ProxyWindowBase::setVisible(visible);
} }
bool ProxyShellWindow::isVisible() { bool ProxyShellWindow::isVisible() {
return this->complete ? ProxyWindowBase::isVisible() : this->stagingVisible; return this->complete ? this->ProxyWindowBase::isVisible() : this->stagingVisible;
} }
void ProxyShellWindow::setWidth(qint32 width) { void ProxyShellWindow::setWidth(qint32 width) {
@ -72,11 +72,11 @@ void ProxyShellWindow::setWidth(qint32 width) {
// only update the actual size if not blocked by anchors // only update the actual size if not blocked by anchors
auto anchors = this->anchors(); auto anchors = this->anchors();
if (this->complete && (!anchors.mLeft || !anchors.mRight)) ProxyWindowBase::setWidth(width); if (this->complete && (!anchors.mLeft || !anchors.mRight)) this->ProxyWindowBase::setWidth(width);
} }
qint32 ProxyShellWindow::width() { qint32 ProxyShellWindow::width() {
return this->complete ? ProxyWindowBase::width() : this->requestedWidth; return this->complete ? this->ProxyWindowBase::width() : this->requestedWidth;
} }
void ProxyShellWindow::setHeight(qint32 height) { void ProxyShellWindow::setHeight(qint32 height) {
@ -84,11 +84,12 @@ void ProxyShellWindow::setHeight(qint32 height) {
// only update the actual size if not blocked by anchors // only update the actual size if not blocked by anchors
auto anchors = this->anchors(); auto anchors = this->anchors();
if (this->complete && (!anchors.mTop || !anchors.mBottom)) ProxyWindowBase::setHeight(height); if (this->complete && (!anchors.mTop || !anchors.mBottom))
this->ProxyWindowBase::setHeight(height);
} }
qint32 ProxyShellWindow::height() { qint32 ProxyShellWindow::height() {
return this->complete ? ProxyWindowBase::height() : this->requestedHeight; return this->complete ? this->ProxyWindowBase::height() : this->requestedHeight;
} }
void ProxyShellWindow::setScreen(QtShellScreenInfo* screen) { void ProxyShellWindow::setScreen(QtShellScreenInfo* screen) {
@ -114,8 +115,8 @@ void ProxyShellWindow::setAnchors(Anchors anchors) {
if (anchors.mTop) lsAnchors |= LayerShellQt::Window::AnchorTop; if (anchors.mTop) lsAnchors |= LayerShellQt::Window::AnchorTop;
if (anchors.mBottom) lsAnchors |= LayerShellQt::Window::AnchorBottom; if (anchors.mBottom) lsAnchors |= LayerShellQt::Window::AnchorBottom;
if (!anchors.mLeft || !anchors.mRight) ProxyWindowBase::setWidth(this->requestedWidth); if (!anchors.mLeft || !anchors.mRight) this->ProxyWindowBase::setWidth(this->requestedWidth);
if (!anchors.mTop || !anchors.mBottom) ProxyWindowBase::setHeight(this->requestedHeight); if (!anchors.mTop || !anchors.mBottom) this->ProxyWindowBase::setHeight(this->requestedHeight);
this->shellWindow->setAnchors(lsAnchors); this->shellWindow->setAnchors(lsAnchors);
} }

View file

@ -107,23 +107,23 @@ void ProxyWindowBase::dataRemoveLast(QQmlListProperty<QObject>* prop) {
} }
void ProxyFloatingWindow::earlyInit(QObject* old) { void ProxyFloatingWindow::earlyInit(QObject* old) {
ProxyWindowBase::earlyInit(old); this->ProxyWindowBase::earlyInit(old);
this->geometryLocked = this->window->isVisible(); this->geometryLocked = this->window->isVisible();
} }
void ProxyFloatingWindow::componentComplete() { void ProxyFloatingWindow::componentComplete() {
ProxyWindowBase::componentComplete(); this->ProxyWindowBase::componentComplete();
this->geometryLocked = true; this->geometryLocked = true;
} }
void ProxyFloatingWindow::setWidth(qint32 value) { void ProxyFloatingWindow::setWidth(qint32 value) {
if (!this->geometryLocked) { if (!this->geometryLocked) {
ProxyWindowBase::setWidth(value); this->ProxyWindowBase::setWidth(value);
} }
} }
void ProxyFloatingWindow::setHeight(qint32 value) { void ProxyFloatingWindow::setHeight(qint32 value) {
if (!this->geometryLocked) { if (!this->geometryLocked) {
ProxyWindowBase::setHeight(value); this->ProxyWindowBase::setHeight(value);
} }
} }

View file

@ -57,7 +57,7 @@ void Variants::setVariants(QVariantList variants) {
} }
void Variants::componentComplete() { void Variants::componentComplete() {
Scavenger::componentComplete(); this->Scavenger::componentComplete();
this->updateVariants(); this->updateVariants();
} }