cleanup: get rid of "parent" argument
- The Xkb object is owned by std::unique_ptr so there is no need in the parent relationship - Remove unused header
This commit is contained in:
parent
9bbcc506d3
commit
58e2ce1057
4 changed files with 5 additions and 7 deletions
|
@ -16,7 +16,6 @@
|
|||
#include "keyboard_layout.h"
|
||||
#include "keyboard_repeat.h"
|
||||
#include "modifier_only_shortcuts.h"
|
||||
#include "utils/common.h"
|
||||
#include "wayland/datadevice_interface.h"
|
||||
#include "wayland/keyboard_interface.h"
|
||||
#include "wayland/seat_interface.h"
|
||||
|
@ -41,7 +40,7 @@ namespace KWin
|
|||
KeyboardInputRedirection::KeyboardInputRedirection(InputRedirection *parent)
|
||||
: QObject(parent)
|
||||
, m_input(parent)
|
||||
, m_xkb(new Xkb(parent, kwinApp()->followLocale1()))
|
||||
, m_xkb(new Xkb(kwinApp()->followLocale1()))
|
||||
{
|
||||
connect(m_xkb.get(), &Xkb::ledsChanged, this, &KeyboardInputRedirection::ledsChanged);
|
||||
if (waylandServer()) {
|
||||
|
|
|
@ -64,7 +64,7 @@ Q_SIGNALS:
|
|||
private:
|
||||
InputRedirection *m_input;
|
||||
bool m_inited = false;
|
||||
std::unique_ptr<Xkb> m_xkb;
|
||||
const std::unique_ptr<Xkb> m_xkb;
|
||||
QMetaObject::Connection m_activeWindowSurfaceChangedConnection;
|
||||
ModifiersChangedSpy *m_modifiersChangedSpy = nullptr;
|
||||
KeyboardLayout *m_keyboardLayout = nullptr;
|
||||
|
|
|
@ -70,9 +70,8 @@ static void xkbLogHandler(xkb_context *context, xkb_log_level priority, const ch
|
|||
}
|
||||
}
|
||||
|
||||
Xkb::Xkb(QObject *parent, bool followLocale1)
|
||||
: QObject(parent)
|
||||
, m_context(xkb_context_new(XKB_CONTEXT_NO_FLAGS))
|
||||
Xkb::Xkb(bool followLocale1)
|
||||
: m_context(xkb_context_new(XKB_CONTEXT_NO_FLAGS))
|
||||
, m_keymap(nullptr)
|
||||
, m_state(nullptr)
|
||||
, m_shiftModifier(0)
|
||||
|
|
|
@ -42,7 +42,7 @@ class KWIN_EXPORT Xkb : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Xkb(QObject *parent = nullptr, bool followLocale1 = false);
|
||||
Xkb(bool followLocale1 = false);
|
||||
~Xkb() override;
|
||||
void setConfig(const KSharedConfigPtr &config);
|
||||
void setNumLockConfig(const KSharedConfigPtr &config);
|
||||
|
|
Loading…
Reference in a new issue