Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meta-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
meta-nemo
Commits
ab14cef4
Commit
ab14cef4
authored
Oct 31, 2016
by
Florent Revest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a qtvirtualkeyboard recipe
parent
4fd088e2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
310 additions
and
0 deletions
+310
-0
0001-Remove-features-to-fix-build-on-Qt-5.6.patch
...eyboard/0001-Remove-features-to-fix-build-on-Qt-5.6.patch
+262
-0
qtvirtualkeyboard_git.bb
recipes-qt/qt5/qtvirtualkeyboard_git.bb
+48
-0
No files found.
recipes-qt/qt5/qtvirtualkeyboard/0001-Remove-features-to-fix-build-on-Qt-5.6.patch
0 → 100644
View file @
ab14cef4
From 614cb4c5e77e97b1339ad77b3402f7a6e4d15e87 Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Mon, 31 Oct 2016 17:11:34 +0100
Subject: [PATCH] Remove features to fix build on Qt 5.6
---
src/virtualkeyboard/inputcontext.cpp | 58 +------------------------
src/virtualkeyboard/inputcontext.h | 12 -----
src/virtualkeyboard/inputengine.cpp | 6 +--
src/virtualkeyboard/lipiinputmethod.cpp | 6 +--
src/virtualkeyboard/t9writeinputmethod.cpp | 2 +-
src/virtualkeyboard/virtualkeyboardsettings.cpp | 2 +-
6 files changed, 10 insertions(+), 76 deletions(-)
diff --git a/src/virtualkeyboard/inputcontext.cpp b/src/virtualkeyboard/inputcontext.cpp
index 070e290..147319c 100644
--- a/src/virtualkeyboard/inputcontext.cpp
+++ b/src/virtualkeyboard/inputcontext.cpp
@@ -106,10 +106,7 @@
public:
preeditTextAttributes(),
surroundingText(),
selectedText(),
- cursorRectangle(),
- selectionControlVisible(false),
- anchorRectIntersectsClipRect(false),
- cursorRectIntersectsClipRect(false)
+ cursorRectangle()
#ifdef QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION
, activeNavigationKeys()
#endif
@@ -135,9 +132,6 @@
public:
QString surroundingText;
QString selectedText;
QRectF cursorRectangle;
- bool selectionControlVisible;
- bool anchorRectIntersectsClipRect;
- bool cursorRectIntersectsClipRect;
#ifdef QT_VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION
QSet<int> activeNavigationKeys;
#endif
@@ -561,29 +555,6 @@
bool InputContext::hasEnterKeyAction(QObject *item) const
return item != 0 && qmlAttachedPropertiesObject<EnterKeyAction>(item, false);
}
-void InputContext::setSelectionOnFocusObject(const QPointF &anchorPos, const QPointF &cursorPos)
-{
- QPlatformInputContext::setSelectionOnFocusObject(anchorPos, cursorPos);
-}
-
-bool InputContext::anchorRectIntersectsClipRect() const
-{
- Q_D(const InputContext);
- return d->anchorRectIntersectsClipRect;
-}
-
-bool InputContext::cursorRectIntersectsClipRect() const
-{
- Q_D(const InputContext);
- return d->cursorRectIntersectsClipRect;
-}
-
-bool InputContext::selectionControlVisible() const
-{
- Q_D(const InputContext);
- return d->selectionControlVisible;
-}
-
void InputContext::onInputItemChanged()
{
Q_D(InputContext);
@@ -651,8 +622,7 @@
void InputContext::update(Qt::InputMethodQueries queries)
// fetch
Qt::InputMethodHints inputMethodHints = Qt::InputMethodHints(d->inputContext->inputMethodQuery(Qt::ImHints).toInt());
- const int cursorPosition = d->inputContext->inputMethodQuery(Qt::ImCursorPosition).toInt();
- const int anchorPosition = d->inputContext->inputMethodQuery(Qt::ImAnchorPosition).toInt();
+ int cursorPosition = d->inputContext->inputMethodQuery(Qt::ImCursorPosition).toInt();
QRectF cursorRectangle = qApp->inputMethod()->cursorRectangle();
QString surroundingText = d->inputContext->inputMethodQuery(Qt::ImSurroundingText).toString();
QString selectedText = d->inputContext->inputMethodQuery(Qt::ImCurrentSelection).toString();
@@ -663,18 +633,6 @@
void InputContext::update(Qt::InputMethodQueries queries)
bool newSelectedText = selectedText != d->selectedText;
bool newCursorPosition = cursorPosition != d->cursorPosition;
bool newCursorRectangle = cursorRectangle != d->cursorRectangle;
- bool selectionControlVisible = d->inputContext->isInputPanelVisible() && (cursorPosition != anchorPosition);
- bool newSelectionControlVisible = selectionControlVisible != d->selectionControlVisible;
-
- QRectF inputItemClipRect = d->inputContext->inputMethodQuery(Qt::ImInputItemClipRectangle).toRectF();
- QRectF anchorRect = d->inputContext->inputMethodQuery(Qt::ImAnchorRectangle).toRectF();
- QRectF cursorRect = d->inputContext->inputMethodQuery(Qt::ImCursorRectangle).toRectF();
-
- bool anchorRectIntersectsClipRect = inputItemClipRect.intersects(anchorRect);
- bool newAnchorRectIntersectsClipRect = anchorRectIntersectsClipRect != d->anchorRectIntersectsClipRect;
-
- bool cursorRectIntersectsClipRect = inputItemClipRect.intersects(cursorRect);
- bool newCursorRectIntersectsClipRect = cursorRectIntersectsClipRect != d->cursorRectIntersectsClipRect;
// update
d->inputMethodHints = inputMethodHints;
@@ -682,9 +640,6 @@
void InputContext::update(Qt::InputMethodQueries queries)
d->selectedText = selectedText;
d->cursorPosition = cursorPosition;
d->cursorRectangle = cursorRectangle;
- d->selectionControlVisible = selectionControlVisible;
- d->anchorRectIntersectsClipRect = anchorRectIntersectsClipRect;
- d->cursorRectIntersectsClipRect = cursorRectIntersectsClipRect;
// update input engine
if ((newSurroundingText || newCursorPosition) &&
@@ -711,15 +666,6 @@
void InputContext::update(Qt::InputMethodQueries queries)
if (newCursorRectangle) {
emit cursorRectangleChanged();
}
- if (newSelectionControlVisible) {
- emit selectionControlVisibleChanged();
- }
- if (newAnchorRectIntersectsClipRect) {
- emit anchorRectIntersectsClipRectChanged();
- }
- if (newCursorRectIntersectsClipRect) {
- emit cursorRectIntersectsClipRectChanged();
- }
// word reselection
if (newInputMethodHints || newSurroundingText || newSelectedText)
diff --git a/src/virtualkeyboard/inputcontext.h b/src/virtualkeyboard/inputcontext.h
index fa7e07c..d1220b2 100644
--- a/src/virtualkeyboard/inputcontext.h
+++ b/src/virtualkeyboard/inputcontext.h
@@ -65,9 +65,6 @@
class InputContext : public QObject
Q_PROPERTY(QObject *inputItem READ inputItem NOTIFY inputItemChanged)
Q_PROPERTY(QtVirtualKeyboard::ShiftHandler *shiftHandler READ shiftHandler CONSTANT)
Q_PROPERTY(QtVirtualKeyboard::InputEngine *inputEngine READ inputEngine CONSTANT)
- Q_PROPERTY(bool selectionControlVisible READ selectionControlVisible NOTIFY selectionControlVisibleChanged)
- Q_PROPERTY(bool anchorRectIntersectsClipRect READ anchorRectIntersectsClipRect NOTIFY anchorRectIntersectsClipRectChanged)
- Q_PROPERTY(bool cursorRectIntersectsClipRect READ cursorRectIntersectsClipRect NOTIFY cursorRectIntersectsClipRectChanged)
public:
explicit InputContext(PlatformInputContext *parent = 0);
@@ -99,9 +96,6 @@
public:
QObject *inputItem() const;
ShiftHandler *shiftHandler() const;
InputEngine *inputEngine() const;
- bool selectionControlVisible() const;
- bool anchorRectIntersectsClipRect() const;
- bool cursorRectIntersectsClipRect() const;
Q_INVOKABLE void hideInputPanel();
Q_INVOKABLE void sendKeyClick(int key, const QString &text, int modifiers = 0);
@@ -113,9 +107,6 @@
public:
Q_INVOKABLE bool fileExists(const QUrl &fileUrl);
Q_INVOKABLE bool hasEnterKeyAction(QObject *item) const;
- // For selection handles
- Q_INVOKABLE void setSelectionOnFocusObject(const QPointF &anchorPos, const QPointF &cursorPos);
-
signals:
void focusChanged();
void focusEditorChanged();
@@ -133,11 +124,8 @@
signals:
void animatingChanged();
void localeChanged();
void inputItemChanged();
- void selectionControlVisibleChanged();
void navigationKeyPressed(int key, bool isAutoRepeat);
void navigationKeyReleased(int key, bool isAutoRepeat);
- void anchorRectIntersectsClipRectChanged();
- void cursorRectIntersectsClipRectChanged();
private slots:
void onInputItemChanged();
diff --git a/src/virtualkeyboard/inputengine.cpp b/src/virtualkeyboard/inputengine.cpp
index 9b6b3a5..9f7086e 100644
--- a/src/virtualkeyboard/inputengine.cpp
+++ b/src/virtualkeyboard/inputengine.cpp
@@ -390,7 +390,7 @@
void InputEngine::setInputMethod(AbstractInputMethod *inputMethod)
}
// Deallocate inactive selection lists
- for (const SelectionListModel::Type &selectionListType : qAsConst(inactiveSelectionLists)) {
+ for (const SelectionListModel::Type &selectionListType : inactiveSelectionLists) {
const auto it = d->selectionListModels.constFind(selectionListType);
if (it != d->selectionListModels.cend()) {
it.value()->setDataSource(0, selectionListType);
@@ -421,7 +421,7 @@
QList<int> InputEngine::inputModes() const
return resultList;
}
resultList.reserve(inputModeList.size());
- for (const InputMode &inputMode : qAsConst(inputModeList))
+ for (const InputMode &inputMode : inputModeList)
resultList.append(inputMode);
return resultList;
}
@@ -479,7 +479,7 @@
QList<int> InputEngine::patternRecognitionModes() const
if (patterRecognitionModeList.isEmpty())
return resultList;
resultList.reserve(patterRecognitionModeList.size());
- for (const PatternRecognitionMode &patternRecognitionMode : qAsConst(patterRecognitionModeList))
+ for (const PatternRecognitionMode &patternRecognitionMode : patterRecognitionModeList)
resultList.append(patternRecognitionMode);
return resultList;
}
diff --git a/src/virtualkeyboard/lipiinputmethod.cpp b/src/virtualkeyboard/lipiinputmethod.cpp
index 30ee9ed..f5e5c1e 100644
--- a/src/virtualkeyboard/lipiinputmethod.cpp
+++ b/src/virtualkeyboard/lipiinputmethod.cpp
@@ -189,7 +189,7 @@
public:
int countActiveTraces() const
{
int count = 0;
- for (Trace *trace : qAsConst(traceList)) {
+ for (Trace *trace : traceList) {
if (!trace->isFinal())
count++;
}
@@ -382,7 +382,7 @@
public:
bool matchesToExisting = true;
const qreal minimumSwipeLength = (swipeLength * (100.0 - MAXIMUM_WIDTH_VARIANCE) / 100.0);
const qreal maximumSwipeLength = (swipeLength * (100.0 + MAXIMUM_WIDTH_VARIANCE) / 100.0);
- for (const QVector2D &otherSwipeVector : qAsConst(swipeVectors)) {
+ for (const QVector2D &otherSwipeVector : swipeVectors) {
const qreal otherSwipeLength = otherSwipeVector.length();
const qreal theta = qAcos(QVector2D::dotProduct(swipeVector, otherSwipeVector) / (swipeLength * otherSwipeLength));
@@ -582,7 +582,7 @@
public:
recordedData.append(QStringLiteral(".POINTS_PER_SECOND %1").arg(deviceInfo->getSamplingRate()));
qlonglong t0 = 0;
- for (const Trace *trace : qAsConst(traceList)) {
+ for (const Trace *trace : traceList) {
const QVariantList &points = trace->points();
const bool hasTime = trace->channels().contains("t");
const QVariantList timeData = hasTime ? trace->channelData("t") : QVariantList();
diff --git a/src/virtualkeyboard/t9writeinputmethod.cpp b/src/virtualkeyboard/t9writeinputmethod.cpp
index 71a166b..a582ec8 100644
--- a/src/virtualkeyboard/t9writeinputmethod.cpp
+++ b/src/virtualkeyboard/t9writeinputmethod.cpp
@@ -653,7 +653,7 @@
public:
int countActiveTraces() const
{
int count = 0;
- for (Trace *trace : qAsConst(traceList)) {
+ for (Trace *trace : traceList) {
if (!trace->isFinal())
count++;
}
diff --git a/src/virtualkeyboard/virtualkeyboardsettings.cpp b/src/virtualkeyboard/virtualkeyboardsettings.cpp
index 1bc8758..1a0e412 100644
--- a/src/virtualkeyboard/virtualkeyboardsettings.cpp
+++ b/src/virtualkeyboard/virtualkeyboardsettings.cpp
@@ -77,7 +77,7 @@
public:
}
}
- for (const QString &styleImportPath : qAsConst(styleImportPathList)) {
+ for (const QString &styleImportPath : styleImportPathList) {
QString filePath = buildStyleFilePath(styleImportPath, name);
bool pathExist = false;
#ifdef COMPILING_QML
--
2.10.1
recipes-qt/qt5/qtvirtualkeyboard_git.bb
0 → 100644
View file @
ab14cef4
QT_MODULE_BRANCH = "5.7"
require qt5.inc
require qt5-git.inc
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = " \
file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
"
SRC_URI += "file://0001-Remove-features-to-fix-build-on-Qt-5.6.patch"
PACKAGECONFIG ?= "lang-all lipi-toolkit"
PACKAGECONFIG[hunspell] = ",CONFIG+=disable-hunspell,hunspell"
PACKAGECONFIG[t9write] = "CONFIG+=t9write"
PACKAGECONFIG[lipi-toolkit] = "CONFIG+=lipi-toolkit"
PACKAGECONFIG[lang-all] = "CONFIG+=lang-all"
PACKAGECONFIG[lang-ar_AR] = "CONFIG+=lang-ar_AR"
PACKAGECONFIG[lang-da_DK] = "CONFIG+=lang-da_DK"
PACKAGECONFIG[lang-de_DE] = "CONFIG+=lang-de_DE"
PACKAGECONFIG[lang-en_GB] = "CONFIG+=lang-en_GB"
PACKAGECONFIG[lang-es_ES] = "CONFIG+=lang-es_ES"
PACKAGECONFIG[lang-fa_FA] = "CONFIG+=lang-fa_FA"
PACKAGECONFIG[lang-fi_FI] = "CONFIG+=lang-fi_FI"
PACKAGECONFIG[lang-fr_FR] = "CONFIG+=lang-fr_FR"
PACKAGECONFIG[lang-hi_IN] = "CONFIG+=lang-hi_IN"
PACKAGECONFIG[lang-it_IT] = "CONFIG+=lang-it_IT"
PACKAGECONFIG[lang-ja_JP] = "CONFIG+=lang-ja_JP"
PACKAGECONFIG[lang-ko_KR] = "CONFIG+=lang-ko_KR"
PACKAGECONFIG[lang-nb_NO] = "CONFIG+=lang-nb_NO"
PACKAGECONFIG[lang-pl_PL] = "CONFIG+=lang-pl_PL"
PACKAGECONFIG[lang-pt_PT] = "CONFIG+=lang-pt_PT"
PACKAGECONFIG[lang-ru_RU] = "CONFIG+=lang-ru_RU"
PACKAGECONFIG[lang-sv_SE] = "CONFIG+=lang-sv_SE"
PACKAGECONFIG[lang-zh_CN] = "CONFIG+=lang-zh_CN"
PACKAGECONFIG[lang-zh_TW] = "CONFIG+=lang-zh_TW"
EXTRA_QMAKEVARS_PRE += "${PACKAGECONFIG_CONFARGS}"
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'CONFIG+=disable-desktop', d)}"
PACKAGES += "${PN}-dictionaries"
RRECOMMENDS_${PN} += "${PN}-dictionaries"
FILES_${PN}-dictionaries = "${OE_QMAKE_PATH_DATA}/qtvirtualkeyboard/*/*.dat"
FILES_${PN} += "${OE_QMAKE_PATH_DATA}/qtvirtualkeyboard/lipi_toolkit"
DEPENDS += "qtbase qtdeclarative qtsvg"
SRCREV = "626e78c9660cff063e1f9370538b5a424631571c"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment