Commit e900dc3b authored by Bhushan Shah's avatar Bhushan Shah 📱 Committed by Bhushan Shah
Browse files

qpa: remove unused override for the inputcontext

Previously qtvirtualkeyboard was integrated weirdly so that it was
acting as the focus object and proxy for input methods, however now that
we support proper input methods, this code is totally unused in the QPA
and actually prevents the QT_IM_MODULE from working now that
qtvirtualkeyboard is dropped.

See: f26f2fe1 for the reference of the
code deleted.
parent 29a960c3
......@@ -16,13 +16,10 @@
#include "../../main.h"
#include "../../platform.h"
#include "../../screens.h"
#include "../../virtualkeyboard.h"
#include <QCoreApplication>
#include <QtConcurrentRun>
#include <qpa/qplatforminputcontext.h>
#include <qpa/qplatforminputcontextfactory_p.h>
#include <qpa/qplatformwindow.h>
#include <qpa/qwindowsysteminterface.h>
......@@ -40,7 +37,6 @@ Integration::Integration()
: QObject()
, QPlatformIntegration()
, m_fontDb(new QGenericUnixFontDatabase())
, m_inputContext()
{
}
......@@ -84,24 +80,6 @@ void Integration::initialize()
auto dummyScreen = new Screen(-1);
QWindowSystemInterface::handleScreenAdded(dummyScreen);
m_screens << dummyScreen;
m_inputContext.reset(QPlatformInputContextFactory::create(QStringLiteral("qtvirtualkeyboard")));
qunsetenv("QT_IM_MODULE");
if (!m_inputContext.isNull()) {
connect(qApp, &QGuiApplication::focusObjectChanged, this,
[this] {
if (VirtualKeyboard::self() && qApp->focusObject() != VirtualKeyboard::self()) {
m_inputContext->setFocusObject(VirtualKeyboard::self());
}
}
);
connect(kwinApp(), &Application::workspaceCreated, this,
[this] {
if (VirtualKeyboard::self()) {
m_inputContext->setFocusObject(VirtualKeyboard::self());
}
}
);
}
}
QAbstractEventDispatcher *Integration::createEventDispatcher() const
......@@ -177,10 +155,5 @@ void Integration::initScreens()
m_screens = newScreens;
}
QPlatformInputContext *Integration::inputContext() const
{
return m_inputContext.data();
}
}
}
......@@ -40,7 +40,6 @@ public:
QStringList themeNames() const override;
QPlatformTheme *createPlatformTheme(const QString &name) const override;
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
QPlatformInputContext *inputContext() const override;
void initialize() override;
......@@ -50,7 +49,6 @@ private:
QScopedPointer<QPlatformFontDatabase> m_fontDb;
QPlatformNativeInterface *m_nativeInterface;
Screen *m_dummyScreen = nullptr;
QScopedPointer<QPlatformInputContext> m_inputContext;
QVector<Screen*> m_screens;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment