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: f26f2fe181 for the reference of the
code deleted.
This commit is contained in:
Bhushan Shah 2020-09-03 17:44:28 +05:30 committed by Bhushan Shah
parent 29a960c399
commit e900dc3b5e
2 changed files with 0 additions and 29 deletions

View file

@ -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();
}
}
}

View file

@ -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;
};