Skip to content

Commit

Permalink
Remove UpdateNotifier and related code depending on UpdateEvent API
Browse files Browse the repository at this point in the history
  • Loading branch information
dobey committed Jul 21, 2022
1 parent 80a857f commit 5f9dda2
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 205 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ set(MALIIT_KEYBOARD_COMMON_SOURCES
src/plugin/feedback.h
src/plugin/gettext.cpp
src/plugin/gettext.h
src/plugin/updatenotifier.cpp
src/plugin/updatenotifier.h
src/plugin/inputmethod.cpp
src/plugin/inputmethod.h
src/plugin/inputmethod_p.h
Expand Down
3 changes: 0 additions & 3 deletions src/plugin/inputmethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@
#include "view/setup.h"

#include <maliit/plugins/subviewdescription.h>
#include <maliit/plugins/updateevent.h>
#include <maliit/namespace.h>

#include <QGuiApplication>


class MImUpdateEvent;

using namespace MaliitKeyboard;

namespace {
Expand Down
101 changes: 0 additions & 101 deletions src/plugin/updatenotifier.cpp

This file was deleted.

75 changes: 0 additions & 75 deletions src/plugin/updatenotifier.h

This file was deleted.

24 changes: 0 additions & 24 deletions tests/unittests/ut_preedit-string/ut_preedit-string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@

#include "view/setup.h"
#include "plugin/editor.h"
#include "plugin/updatenotifier.h"
#include "inputmethodhostprobe.h"
#include "wordengineprobe.h"

#include <maliit/plugins/testsurfacefactory.h>
#include <maliit/plugins/updateevent.h>

#include <QtTest>
#include <QtCore>
Expand Down Expand Up @@ -147,19 +145,6 @@ bool operator==(const Maliit::PreeditTextFormat &a, const Maliit::PreeditTextFor
return ((a.start == b.start) and (a.length == b.length) and (a.preeditFace == b.preeditFace));
}

MImUpdateEvent *createUpdateEvent(const QString &surrounding_text,
int cursor_position)
{
const char *const cur_pos("cursorPosition");
QStringList properties_changed(cur_pos);
QMap<QString, QVariant> update;

update.insert(cur_pos, cursor_position);
update.insert("surroundingText", surrounding_text);

return new MImUpdateEvent(update, properties_changed);
}

} // unnamed namespace

struct BasicSetupTest
Expand All @@ -175,7 +160,6 @@ struct BasicSetupTest

Editor editor;
InputMethodHostProbe host;
UpdateNotifier notifier;
};

class SetupTest
Expand Down Expand Up @@ -477,10 +461,6 @@ class TestPreeditString
QFETCH(bool, expected_preedit_string_sent);

BasicSetupTest test_setup;
QScopedPointer<MImUpdateEvent> update_event(createUpdateEvent(surrounding_text,
cursor_position));

test_setup.notifier.notify(update_event.data());

QCOMPARE(test_setup.host.preeditStringSent(), expected_preedit_string_sent);
if (expected_preedit_string_sent) {
Expand Down Expand Up @@ -602,10 +582,6 @@ class TestPreeditString
QFETCH(int, expected_cursor_position);

SetupTest test_setup;
QScopedPointer<MImUpdateEvent> update_event(createUpdateEvent(surrounding_text,
cursor_position));

test_setup.notifier.notify(update_event.data());

Q_FOREACH (const QString &k, keys) {
test_setup.event_handler.onPressed(lookup(k));
Expand Down

0 comments on commit 5f9dda2

Please sign in to comment.