diff --git a/.clang-format b/.clang-format index 610ee65..8ec602a 100644 --- a/.clang-format +++ b/.clang-format @@ -1,6 +1,6 @@ AlignArrayOfStructures: None AlignAfterOpenBracket: BlockIndent -AllowShortBlocksOnASingleLine: Always +AllowShortBlocksOnASingleLine: Empty AllowShortCaseLabelsOnASingleLine: true AllowShortEnumsOnASingleLine: true AllowShortFunctionsOnASingleLine: All diff --git a/flake.lock b/flake.lock index 6971438..7470161 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1758690382, - "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=", + "lastModified": 1762977756, + "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e643668fd71b949c53f8626614b21ff71a07379d", + "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", "type": "github" }, "original": { diff --git a/src/core/iconprovider.cpp b/src/core/iconprovider.cpp index 99b423e..383f7e1 100644 --- a/src/core/iconprovider.cpp +++ b/src/core/iconprovider.cpp @@ -22,8 +22,8 @@ class PixmapCacheIconEngine: public QIconEngine { QIcon::Mode /*unused*/, QIcon::State /*unused*/ ) override { - qFatal( - ) << "Unexpected icon paint request bypassed pixmap method. Please report this as a bug."; + qFatal() + << "Unexpected icon paint request bypassed pixmap method. Please report this as a bug."; } QPixmap pixmap(const QSize& size, QIcon::Mode /*unused*/, QIcon::State /*unused*/) override { diff --git a/src/core/logging.cpp b/src/core/logging.cpp index 3e3abca..5c809f6 100644 --- a/src/core/logging.cpp +++ b/src/core/logging.cpp @@ -361,7 +361,8 @@ void ThreadLogging::initFs() { auto* runDir = QsPaths::instance()->instanceRunDir(); if (!runDir) { - qCCritical(logLogging + qCCritical( + logLogging ) << "Could not start filesystem logging as the runtime directory could not be created."; return; } @@ -372,7 +373,8 @@ void ThreadLogging::initFs() { auto* detailedFile = new QFile(detailedPath); if (!file->open(QFile::ReadWrite | QFile::Truncate)) { - qCCritical(logLogging + qCCritical( + logLogging ) << "Could not start filesystem logger as the log file could not be created:" << path; delete file; @@ -383,7 +385,8 @@ void ThreadLogging::initFs() { // buffered by WriteBuffer if (!detailedFile->open(QFile::ReadWrite | QFile::Truncate | QFile::Unbuffered)) { - qCCritical(logLogging + qCCritical( + logLogging ) << "Could not start detailed filesystem logger as the log file could not be created:" << detailedPath; delete detailedFile; diff --git a/src/core/model.cpp b/src/core/model.cpp index c2b5d78..ddb616a 100644 --- a/src/core/model.cpp +++ b/src/core/model.cpp @@ -1,7 +1,7 @@ #include "model.hpp" -#include #include +#include #include QHash UntypedObjectModel::roleNames() const { diff --git a/src/core/paths.cpp b/src/core/paths.cpp index 70e1bd1..55beb87 100644 --- a/src/core/paths.cpp +++ b/src/core/paths.cpp @@ -175,7 +175,8 @@ void QsPaths::linkRunDir() { auto* shellDir = this->shellRunDir(); if (!shellDir) { - qCCritical(logPaths + qCCritical( + logPaths ) << "Could not create by-id symlink as the shell runtime path could not be created."; } else { auto shellPath = shellDir->filePath(runDir->dirName()); @@ -378,7 +379,8 @@ void QsPaths::createLock() { qCDebug(logPaths) << "Created instance lock at" << path; } } else { - qCCritical(logPaths + qCCritical( + logPaths ) << "Could not create instance lock, as the instance runtime directory could not be created."; } } diff --git a/src/core/scan.cpp b/src/core/scan.cpp index d9606bc..9a7ee7e 100644 --- a/src/core/scan.cpp +++ b/src/core/scan.cpp @@ -38,7 +38,8 @@ void QmlScanner::scanDir(const QDir& dir) { for (auto& name: dir.entryList(QDir::Files | QDir::NoDotAndDotDot)) { if (name == "qmldir") { - qCDebug(logQmlScanner + qCDebug( + logQmlScanner ) << "Found qmldir file, qmldir synthesization will be disabled for directory" << path; seenQmldir = true; diff --git a/src/core/scriptmodel.cpp b/src/core/scriptmodel.cpp index a8271e7..5407e2b 100644 --- a/src/core/scriptmodel.cpp +++ b/src/core/scriptmodel.cpp @@ -72,8 +72,8 @@ void ScriptModel::updateValuesUnique(const QVariantList& newValues) { do { ++iter; } while (iter != this->mValues.end() - && std::find_if(newIter, newValues.end(), eqPredicate(*iter)) == newValues.end() - ); + && std::find_if(newIter, newValues.end(), eqPredicate(*iter)) + == newValues.end()); auto index = static_cast(std::distance(this->mValues.begin(), iter)); auto startIndex = static_cast(std::distance(this->mValues.begin(), startIter)); diff --git a/src/crash/handler.cpp b/src/crash/handler.cpp index 43a9792..0baa8e6 100644 --- a/src/crash/handler.cpp +++ b/src/crash/handler.cpp @@ -55,7 +55,8 @@ void CrashHandler::init() { this->d->minidumpFd = memfd_create("quickshell:minidump", MFD_CLOEXEC); if (this->d->minidumpFd == -1) { - qCCritical(logCrashHandler + qCCritical( + logCrashHandler ) << "Failed to allocate minidump memfd, minidumps will be saved in the working directory."; createHandler(MinidumpDescriptor(".")); } else { @@ -71,7 +72,8 @@ void CrashHandler::setRelaunchInfo(const RelaunchInfo& info) { this->d->infoFd = memfd_create("quickshell:instance_info", MFD_CLOEXEC); if (this->d->infoFd == -1) { - qCCritical(logCrashHandler + qCCritical( + logCrashHandler ) << "Failed to allocate instance info memfd, crash recovery will not work."; return; } @@ -79,7 +81,8 @@ void CrashHandler::setRelaunchInfo(const RelaunchInfo& info) { QFile file; if (!file.open(this->d->infoFd, QFile::ReadWrite)) { - qCCritical(logCrashHandler + qCCritical( + logCrashHandler ) << "Failed to open instance info memfd, crash recovery will not work."; } diff --git a/src/crash/interface.cpp b/src/crash/interface.cpp index c633440..326216a 100644 --- a/src/crash/interface.cpp +++ b/src/crash/interface.cpp @@ -66,7 +66,8 @@ CrashReporterGui::CrashReporterGui(QString reportFolder, int pid) mainLayout->addSpacing(textHeight); if (qtVersionMatches) { - mainLayout->addWidget(new QLabel("Please open a bug report for this issue via github or email.") + mainLayout->addWidget( + new QLabel("Please open a bug report for this issue via github or email.") ); } else { mainLayout->addWidget(new QLabel( diff --git a/src/dbus/properties.cpp b/src/dbus/properties.cpp index d0f65d9..2c478ef 100644 --- a/src/dbus/properties.cpp +++ b/src/dbus/properties.cpp @@ -214,8 +214,10 @@ void DBusPropertyGroup::updatePropertySet(const QVariantMap& properties, bool co } } -void DBusPropertyGroup::tryUpdateProperty(DBusPropertyCore* property, const QVariant& variant) - const { +void DBusPropertyGroup::tryUpdateProperty( + DBusPropertyCore* property, + const QVariant& variant +) const { property->mExists = true; auto error = property->store(variant); diff --git a/src/ipc/ipc.cpp b/src/ipc/ipc.cpp index bf66801..0196359 100644 --- a/src/ipc/ipc.cpp +++ b/src/ipc/ipc.cpp @@ -36,7 +36,8 @@ void IpcServer::start() { auto path = run->filePath("ipc.sock"); new IpcServer(path); } else { - qCCritical(logIpc + qCCritical( + logIpc ) << "Could not start IPC server as the instance runtime path could not be created."; } } diff --git a/src/launch/command.cpp b/src/launch/command.cpp index 81a9243..3a7a4b1 100644 --- a/src/launch/command.cpp +++ b/src/launch/command.cpp @@ -90,9 +90,9 @@ int locateConfigFile(CommandState& cmd, QString& path) { } if (!manifestPath.isEmpty()) { - qWarning( - ) << "Config manifests (manifest.conf) are deprecated and will be removed in a future " - "release."; + qWarning() + << "Config manifests (manifest.conf) are deprecated and will be removed in a future " + "release."; qWarning() << "Consider using symlinks to a subfolder of quickshell's XDG config dirs."; auto file = QFile(manifestPath); @@ -130,7 +130,8 @@ int locateConfigFile(CommandState& cmd, QString& path) { if (path.isEmpty()) { if (name == "default") { - qCCritical(logBare + qCCritical( + logBare ) << "Could not find \"default\" config directory or shell.qml in any valid config path."; } else { qCCritical(logBare) << "Could not find" << name diff --git a/src/launch/parsecommand.cpp b/src/launch/parsecommand.cpp index c12d9b9..0776f58 100644 --- a/src/launch/parsecommand.cpp +++ b/src/launch/parsecommand.cpp @@ -43,9 +43,11 @@ int parseCommand(int argc, char** argv, CommandState& state) { ->excludes(path); group->add_option("-m,--manifest", state.config.manifest) - ->description("[DEPRECATED] Path to a quickshell manifest.\n" - "If a manifest is specified, configs named by -c will point to its entries.\n" - "Defaults to $XDG_CONFIG_HOME/quickshell/manifest.conf") + ->description( + "[DEPRECATED] Path to a quickshell manifest.\n" + "If a manifest is specified, configs named by -c will point to its entries.\n" + "Defaults to $XDG_CONFIG_HOME/quickshell/manifest.conf" + ) ->envname("QS_MANIFEST") ->excludes(path); @@ -54,8 +56,10 @@ int parseCommand(int argc, char** argv, CommandState& state) { ->description("Operate on the most recently launched instance instead of the oldest"); group->add_flag("--any-display", state.config.anyDisplay) - ->description("If passed, instances will not be filtered by the display connection they " - "were launched on."); + ->description( + "If passed, instances will not be filtered by the display connection they " + "were launched on." + ); } return group; @@ -79,9 +83,11 @@ int parseCommand(int argc, char** argv, CommandState& state) { auto* group = noGroup ? cmd : cmd->add_option_group(noDisplay ? "" : "Logging"); group->add_flag("--no-color", state.log.noColor) - ->description("Disables colored logging.\n" - "Colored logging can also be disabled by specifying a non empty value " - "for the NO_COLOR environment variable."); + ->description( + "Disables colored logging.\n" + "Colored logging can also be disabled by specifying a non empty value " + "for the NO_COLOR environment variable." + ); group->add_flag("--log-times", state.log.timestamp) ->description("Log timestamps with each message."); @@ -90,9 +96,11 @@ int parseCommand(int argc, char** argv, CommandState& state) { ->description("Log rules to apply, in the format of QT_LOGGING_RULES."); group->add_flag("-v,--verbose", [&](size_t count) { state.log.verbosity = count; }) - ->description("Increases log verbosity.\n" - "-v will show INFO level internal logs.\n" - "-vv will show DEBUG level internal logs."); + ->description( + "Increases log verbosity.\n" + "-v will show INFO level internal logs.\n" + "-vv will show DEBUG level internal logs." + ); auto* hgroup = cmd->add_option_group(""); hgroup->add_flag("--no-detailed-logs", state.log.sparse); @@ -102,9 +110,11 @@ int parseCommand(int argc, char** argv, CommandState& state) { auto* group = cmd->add_option_group("Instance Selection"); group->add_option("-i,--id", state.instance.id) - ->description("The instance id to operate on.\n" - "You may also use a substring the id as long as it is unique, " - "for example \"abc\" will select \"abcdefg\"."); + ->description( + "The instance id to operate on.\n" + "You may also use a substring the id as long as it is unique, " + "for example \"abc\" will select \"abcdefg\"." + ); group->add_option("--pid", state.instance.pid) ->description("The process id of the instance to operate on."); @@ -161,9 +171,11 @@ int parseCommand(int argc, char** argv, CommandState& state) { auto* sub = cli->add_subcommand("list", "List running quickshell instances."); auto* all = sub->add_flag("-a,--all", state.instance.all) - ->description("List all instances.\n" - "If unspecified, only instances of" - "the selected config will be listed."); + ->description( + "List all instances.\n" + "If unspecified, only instances of" + "the selected config will be listed." + ); sub->add_flag("-j,--json", state.output.json, "Output the list as a json."); @@ -239,8 +251,10 @@ int parseCommand(int argc, char** argv, CommandState& state) { ->allow_extra_args(); sub->add_flag("-s,--show", state.ipc.showOld) - ->description("Print information about a function or target if given, or all available " - "targets if not."); + ->description( + "Print information about a function or target if given, or all available " + "targets if not." + ); auto* instance = addInstanceSelection(sub); addConfigSelection(sub, true)->excludes(instance); diff --git a/src/services/greetd/connection.cpp b/src/services/greetd/connection.cpp index cb237a0..7130870 100644 --- a/src/services/greetd/connection.cpp +++ b/src/services/greetd/connection.cpp @@ -199,7 +199,8 @@ void GreetdConnection::onSocketReady() { // Special case this error in case a session was already running. // This cancels and restarts the session. if (errorType == "error" && desc == "a session is already being configured") { - qCDebug(logGreetd + qCDebug( + logGreetd ) << "A session was already in progress, cancelling it and starting a new one."; this->setActive(false); this->setActive(true); diff --git a/src/services/notifications/server.cpp b/src/services/notifications/server.cpp index 3f2469d..d2b55d0 100644 --- a/src/services/notifications/server.cpp +++ b/src/services/notifications/server.cpp @@ -117,10 +117,12 @@ void NotificationServer::tryRegister() { if (success) { qCInfo(logNotifications) << "Registered notification server with dbus."; } else { - qCWarning(logNotifications + qCWarning( + logNotifications ) << "Could not register notification server at org.freedesktop.Notifications, presumably " "because one is already registered."; - qCWarning(logNotifications + qCWarning( + logNotifications ) << "Registration will be attempted again if the active service is unregistered."; } } diff --git a/src/services/pipewire/defaults.cpp b/src/services/pipewire/defaults.cpp index b3d8bfc..88a1dc1 100644 --- a/src/services/pipewire/defaults.cpp +++ b/src/services/pipewire/defaults.cpp @@ -201,7 +201,8 @@ bool PwDefaultTracker::setConfiguredDefault(const char* key, const QString& valu } if (!meta->hasSetPermission()) { - qCCritical(logDefaults + qCCritical( + logDefaults ) << "Cannot set default node as write+execute permissions are missing for" << meta; return false; diff --git a/src/services/pipewire/node.cpp b/src/services/pipewire/node.cpp index 1eceab9..d454a46 100644 --- a/src/services/pipewire/node.cpp +++ b/src/services/pipewire/node.cpp @@ -172,7 +172,8 @@ void PwNode::initProps(const spa_dict* props) { this->device = this->registry->devices.value(id); if (this->device == nullptr) { - qCCritical(logNode + qCCritical( + logNode ) << this << "has a device.id property that does not corrospond to a device object. Id:" << id; } @@ -212,7 +213,8 @@ void PwNode::onInfo(void* data, const pw_node_info* info) { auto id = QString::fromUtf8(routeDevice).toInt(&ok); if (!ok) { - qCCritical(logNode + qCCritical( + logNode ) << self << "has a card.profile.device property but the value is not an integer. Value:" << id; } diff --git a/src/services/polkit/agentimpl.cpp b/src/services/polkit/agentimpl.cpp index a11882d..85c62b7 100644 --- a/src/services/polkit/agentimpl.cpp +++ b/src/services/polkit/agentimpl.cpp @@ -143,7 +143,8 @@ void PolkitAgentImpl::activateAuthenticationRequest() { if (obj) identities.append(obj); } if (identities.isEmpty()) { - qCWarning(logPolkit + qCWarning( + logPolkit ) << "no supported identities available for authentication request, cancelling."; req->cancel("Error requesting authentication: no supported identities available."); delete req; diff --git a/src/services/upower/device.cpp b/src/services/upower/device.cpp index adf5923..63382ad 100644 --- a/src/services/upower/device.cpp +++ b/src/services/upower/device.cpp @@ -126,8 +126,8 @@ DBusDataTransform::fromWire(quint32 wire) { ); } -DBusResult DBusDataTransform::fromWire(quint32 wire -) { +DBusResult +DBusDataTransform::fromWire(quint32 wire) { if (wire >= UPowerDeviceType::Unknown && wire <= UPowerDeviceType::BluetoothGeneric) { return DBusResult(static_cast(wire)); } diff --git a/src/services/upower/powerprofiles.cpp b/src/services/upower/powerprofiles.cpp index 43615ae..8fa91cc 100644 --- a/src/services/upower/powerprofiles.cpp +++ b/src/services/upower/powerprofiles.cpp @@ -66,7 +66,8 @@ PowerProfiles::PowerProfiles() { auto bus = QDBusConnection::systemBus(); if (!bus.isConnected()) { - qCWarning(logPowerProfiles + qCWarning( + logPowerProfiles ) << "Could not connect to DBus. PowerProfiles services will not work."; } @@ -79,7 +80,8 @@ PowerProfiles::PowerProfiles() { ); if (!this->service->isValid()) { - qCDebug(logPowerProfiles + qCDebug( + logPowerProfiles ) << "PowerProfilesDaemon is not currently running, attempting to start it."; dbus::tryLaunchService(this, bus, "org.freedesktop.UPower.PowerProfiles", [this](bool success) { @@ -103,13 +105,15 @@ void PowerProfiles::init() { void PowerProfiles::setProfile(PowerProfile::Enum profile) { if (!this->properties.isConnected()) { - qCCritical(logPowerProfiles + qCCritical( + logPowerProfiles ) << "Cannot set power profile: power-profiles-daemon not accessible or not running"; return; } if (profile == PowerProfile::Performance && !this->bHasPerformanceProfile) { - qCCritical(logPowerProfiles + qCCritical( + logPowerProfiles ) << "Cannot request performance profile as it is not present for this device."; return; } else if (profile < PowerProfile::PowerSaver || profile > PowerProfile::Performance) { @@ -135,8 +139,9 @@ PowerProfilesQml::PowerProfilesQml(QObject* parent): QObject(parent) { return instance->bHasPerformanceProfile.value(); }); - this->bDegradationReason.setBinding([instance]() { return instance->bDegradationReason.value(); } - ); + this->bDegradationReason.setBinding([instance]() { + return instance->bDegradationReason.value(); + }); this->bHolds.setBinding([instance]() { return instance->bHolds.value(); }); } diff --git a/src/wayland/buffer/dmabuf.cpp b/src/wayland/buffer/dmabuf.cpp index b33e118..a5f219e 100644 --- a/src/wayland/buffer/dmabuf.cpp +++ b/src/wayland/buffer/dmabuf.cpp @@ -414,7 +414,8 @@ WlBuffer* LinuxDmabufManager::createDmabuf( if (modifiers.modifiers.isEmpty()) { if (!modifiers.implicit) { - qCritical(logDmabuf + qCritical( + logDmabuf ) << "Failed to create gbm_bo: format supports no implicit OR explicit modifiers."; return nullptr; } diff --git a/src/wayland/hyprland/surface/qml.cpp b/src/wayland/hyprland/surface/qml.cpp index b00ee33..c4f7d67 100644 --- a/src/wayland/hyprland/surface/qml.cpp +++ b/src/wayland/hyprland/surface/qml.cpp @@ -65,7 +65,8 @@ void HyprlandWindow::setOpacity(qreal opacity) { if (opacity == this->mOpacity) return; if (opacity < 0.0 || opacity > 1.0) { - qmlWarning(this + qmlWarning( + this ) << "Cannot set HyprlandWindow.opacity to a value larger than 1.0 or smaller than 0.0"; return; } diff --git a/src/wayland/screencopy/wlr_screencopy/wlr_screencopy.cpp b/src/wayland/screencopy/wlr_screencopy/wlr_screencopy.cpp index 43a2543..927da8d 100644 --- a/src/wayland/screencopy/wlr_screencopy/wlr_screencopy.cpp +++ b/src/wayland/screencopy/wlr_screencopy/wlr_screencopy.cpp @@ -165,7 +165,8 @@ WlrScreencopyContext::OutputTransformQuery::~OutputTransformQuery() { if (this->isInitialized()) this->release(); } -void WlrScreencopyContext::OutputTransformQuery::setScreen(QtWaylandClient::QWaylandScreen* screen +void WlrScreencopyContext::OutputTransformQuery::setScreen( + QtWaylandClient::QWaylandScreen* screen ) { // cursed hack class QWaylandScreenReflector: public QtWaylandClient::QWaylandScreen { diff --git a/src/wayland/session_lock.cpp b/src/wayland/session_lock.cpp index 0ecf9ec..d5a3e53 100644 --- a/src/wayland/session_lock.cpp +++ b/src/wayland/session_lock.cpp @@ -79,8 +79,8 @@ void WlSessionLock::updateSurfaces(bool show, WlSessionLock* old) { auto* instance = qobject_cast(instanceObj); if (instance == nullptr) { - qWarning( - ) << "WlSessionLock.surface does not create a WlSessionLockSurface. Aborting lock."; + qWarning() + << "WlSessionLock.surface does not create a WlSessionLockSurface. Aborting lock."; if (instanceObj != nullptr) instanceObj->deleteLater(); this->unlock(); return; diff --git a/src/wayland/session_lock/shell_integration.hpp b/src/wayland/session_lock/shell_integration.hpp index d6f9175..b2e2891 100644 --- a/src/wayland/session_lock/shell_integration.hpp +++ b/src/wayland/session_lock/shell_integration.hpp @@ -8,6 +8,6 @@ class QSWaylandSessionLockIntegration: public QtWaylandClient::QWaylandShellIntegration { public: bool initialize(QtWaylandClient::QWaylandDisplay* /* display */) override { return true; } - QtWaylandClient::QWaylandShellSurface* createShellSurface(QtWaylandClient::QWaylandWindow* window - ) override; + QtWaylandClient::QWaylandShellSurface* + createShellSurface(QtWaylandClient::QWaylandWindow* window) override; }; diff --git a/src/wayland/toplevel_management/manager.hpp b/src/wayland/toplevel_management/manager.hpp index 4b906a5..83e3e09 100644 --- a/src/wayland/toplevel_management/manager.hpp +++ b/src/wayland/toplevel_management/manager.hpp @@ -33,8 +33,8 @@ signals: protected: explicit ToplevelManager(); - void zwlr_foreign_toplevel_manager_v1_toplevel(::zwlr_foreign_toplevel_handle_v1* toplevel - ) override; + void + zwlr_foreign_toplevel_manager_v1_toplevel(::zwlr_foreign_toplevel_handle_v1* toplevel) override; private slots: void onToplevelReady(); diff --git a/src/wayland/wlr_layershell/shell_integration.hpp b/src/wayland/wlr_layershell/shell_integration.hpp index e92b7c6..93cda01 100644 --- a/src/wayland/wlr_layershell/shell_integration.hpp +++ b/src/wayland/wlr_layershell/shell_integration.hpp @@ -15,8 +15,8 @@ public: ~LayerShellIntegration() override; Q_DISABLE_COPY_MOVE(LayerShellIntegration); - QtWaylandClient::QWaylandShellSurface* createShellSurface(QtWaylandClient::QWaylandWindow* window - ) override; + QtWaylandClient::QWaylandShellSurface* + createShellSurface(QtWaylandClient::QWaylandWindow* window) override; }; } // namespace qs::wayland::layershell diff --git a/src/wayland/wlr_layershell/surface.cpp b/src/wayland/wlr_layershell/surface.cpp index 26d7558..3c71ff9 100644 --- a/src/wayland/wlr_layershell/surface.cpp +++ b/src/wayland/wlr_layershell/surface.cpp @@ -30,8 +30,8 @@ namespace qs::wayland::layershell { namespace { -[[nodiscard]] QtWayland::zwlr_layer_shell_v1::layer toWaylandLayer(const WlrLayer::Enum& layer -) noexcept { +[[nodiscard]] QtWayland::zwlr_layer_shell_v1::layer +toWaylandLayer(const WlrLayer::Enum& layer) noexcept { switch (layer) { case WlrLayer::Background: return QtWayland::zwlr_layer_shell_v1::layer_background; case WlrLayer::Bottom: return QtWayland::zwlr_layer_shell_v1::layer_bottom; @@ -42,8 +42,8 @@ namespace { return QtWayland::zwlr_layer_shell_v1::layer_top; } -[[nodiscard]] QtWayland::zwlr_layer_surface_v1::anchor toWaylandAnchors(const Anchors& anchors -) noexcept { +[[nodiscard]] QtWayland::zwlr_layer_surface_v1::anchor +toWaylandAnchors(const Anchors& anchors) noexcept { quint32 wl = 0; if (anchors.mLeft) wl |= QtWayland::zwlr_layer_surface_v1::anchor_left; if (anchors.mRight) wl |= QtWayland::zwlr_layer_surface_v1::anchor_right; @@ -146,8 +146,8 @@ LayerSurface::LayerSurface(LayerShellIntegration* shell, QtWaylandClient::QWayla if (waylandScreen != nullptr) { output = waylandScreen->output(); } else { - qWarning( - ) << "Layershell screen does not corrospond to a real screen. Letting the compositor pick."; + qWarning() + << "Layershell screen does not corrospond to a real screen. Letting the compositor pick."; } } diff --git a/src/widgets/marginwrapper.cpp b/src/widgets/marginwrapper.cpp index 9960bba..b7d410c 100644 --- a/src/widgets/marginwrapper.cpp +++ b/src/widgets/marginwrapper.cpp @@ -12,8 +12,8 @@ namespace qs::widgets { MarginWrapperManager::MarginWrapperManager(QObject* parent): WrapperManager(parent) { this->bTopMargin.setBinding([this] { return this->bExtraMargin - + (this->bOverrides.value().testFlag(TopMargin) ? this->bTopMarginOverride : this->bMargin - ); + + (this->bOverrides.value().testFlag(TopMargin) ? this->bTopMarginOverride + : this->bMargin); }); this->bBottomMargin.setBinding([this] { diff --git a/src/window/popupwindow.cpp b/src/window/popupwindow.cpp index ec2be7e..a1ae448 100644 --- a/src/window/popupwindow.cpp +++ b/src/window/popupwindow.cpp @@ -67,7 +67,8 @@ void ProxyPopupWindow::updateTransientParent() { void ProxyPopupWindow::onParentUpdated() { this->updateTransientParent(); } void ProxyPopupWindow::setScreen(QuickshellScreenInfo* /*unused*/) { - qmlWarning(this + qmlWarning( + this ) << "Cannot set screen of popup window, as that is controlled by the parent window"; }