28 : m_fontDb(
new QGenericUnixFontDatabase)
30 QRegularExpression portRx(
"port=(\\d+)"_L1);
32 for (
const QString &arg : paramList) {
33 QRegularExpressionMatch match;
34 if (arg.contains(portRx, &match))
35 port = match.captured(1).toInt();
38 m_primaryScreen =
new QVncScreen(paramList);
39 m_server =
new QVncServer(m_primaryScreen, port);
40 m_primaryScreen->vncServer = m_server;
49void QVncIntegration::initialize()
51 if (m_primaryScreen->initialize())
52 QWindowSystemInterface::handleScreenAdded(m_primaryScreen);
54 qWarning(
"vnc: Failed to initialize screen");
56 m_inputContext = QPlatformInputContextFactory::create();
58 m_nativeInterface.reset(
new QPlatformNativeInterface);
61 QInputDeviceManagerPrivate::get(QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount(
62 QInputDeviceManager::DeviceTypePointer, 1);
63 QInputDeviceManagerPrivate::get(QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount(
64 QInputDeviceManager::DeviceTypeKeyboard, 1);