ce0ac10b6d
Kirigami: remove stub .cpp, add Qt platform integration headers for QML gate. Matches KDE src/pattern for direct header-only builds. Cookbook: add --no-backup-if-mismatch to patch invocation (fetch.rs). Kernel: consolidate patch chain, add debug-scheme-serial-fix. Docs: archive old audit reports, add CHANGELOG and hardware validation matrix. Update AGENTS.md with Linux reference source policy. Scripts: add test-network-qemu.sh, test-storage-qemu.sh. .gitignore: add local/reference/ exclusion.
57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
/*
|
|
* SPDX-FileCopyrightText: 2024 Nathan Misner <nathan@infochunk.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
*/
|
|
|
|
#include "smoothscrollwatcher.h"
|
|
|
|
#ifdef KIRIGAMI_ENABLE_DBUS
|
|
#include <QDBusConnection>
|
|
#endif
|
|
|
|
#include "kirigamiplatform_logging.h"
|
|
|
|
namespace Kirigami
|
|
{
|
|
namespace Platform
|
|
{
|
|
Q_GLOBAL_STATIC(SmoothScrollWatcher, smoothScrollWatcherSelf)
|
|
|
|
SmoothScrollWatcher::SmoothScrollWatcher(QObject *parent)
|
|
: QObject(parent)
|
|
{
|
|
#ifdef KIRIGAMI_ENABLE_DBUS
|
|
QDBusConnection::sessionBus().connect(QStringLiteral(""),
|
|
QStringLiteral("/SmoothScroll"),
|
|
QStringLiteral("org.kde.SmoothScroll"),
|
|
QStringLiteral("notifyChange"),
|
|
this,
|
|
SLOT(setEnabled(bool)));
|
|
#endif
|
|
m_enabled = true;
|
|
}
|
|
|
|
SmoothScrollWatcher::~SmoothScrollWatcher() = default;
|
|
|
|
bool SmoothScrollWatcher::enabled() const
|
|
{
|
|
return m_enabled;
|
|
}
|
|
|
|
SmoothScrollWatcher *SmoothScrollWatcher::self()
|
|
{
|
|
return smoothScrollWatcherSelf();
|
|
}
|
|
|
|
void SmoothScrollWatcher::setEnabled(bool value)
|
|
{
|
|
m_enabled = value;
|
|
Q_EMIT enabledChanged(value);
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
#include "moc_smoothscrollwatcher.cpp"
|