Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fcitx
Browse files Browse the repository at this point in the history
  • Loading branch information
Fcitx Bot committed Sep 17, 2024
2 parents 9d69314 + 0c29141 commit 03dbfcb
Show file tree
Hide file tree
Showing 18 changed files with 199 additions and 127 deletions.
6 changes: 3 additions & 3 deletions src/client/client_mock.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ClientMock : public client::ClientInterface {
MOCK_METHOD(void, SetServerLauncher,
(std::unique_ptr<ServerLauncherInterface> server_launcher),
(override));
MOCK_METHOD(bool, IsValidRunLevel, (), (const override));
MOCK_METHOD(bool, IsValidRunLevel, (), (const, override));
MOCK_METHOD(bool, EnsureConnection, (), (override));
MOCK_METHOD(bool, EnsureSession, (), (override));
MOCK_METHOD(bool, CheckVersionOrRestartServer, (), (override));
Expand All @@ -69,7 +69,7 @@ class ClientMock : public client::ClientInterface {
(override));

MOCK_METHOD(bool, IsDirectModeCommand, (const commands::KeyEvent &key),
(const override));
(const, override));
MOCK_METHOD(bool, GetConfig, (config::Config * config), (override));
MOCK_METHOD(bool, SetConfig, (const config::Config &config), (override));
MOCK_METHOD(bool, ClearUserHistory, (), (override));
Expand All @@ -80,7 +80,7 @@ class ClientMock : public client::ClientInterface {
MOCK_METHOD(bool, Reload, (), (override));
MOCK_METHOD(bool, Cleanup, (), (override));
MOCK_METHOD(void, Reset, (), (override));
MOCK_METHOD(bool, PingServer, (), (const override));
MOCK_METHOD(bool, PingServer, (), (const, override));
MOCK_METHOD(bool, NoOperation, (), (override));
MOCK_METHOD(void, EnableCascadingWindow, (bool enable), (override));
MOCK_METHOD(void, set_timeout, (absl::Duration timeout), (override));
Expand Down
1 change: 1 addition & 0 deletions src/converter/converter_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ std::string CandidateAttributesToString(uint32_t attrs) {
ADD_STR(AUTO_PARTIAL_SUGGESTION);
ADD_STR(USER_HISTORY_PREDICTION);
ADD_STR(NO_MODIFICATION);
ADD_STR(USER_SEGMENT_HISTORY_REWRITER);

#undef ADD_STR
return absl::StrJoin(v, " | ");
Expand Down
6 changes: 3 additions & 3 deletions src/converter/converter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ class MockPredictor : public mozc::prediction::PredictorInterface {
~MockPredictor() override = default;

MOCK_METHOD(bool, PredictForRequest, (const ConversionRequest &, Segments *),
(const override));
(const, override));
MOCK_METHOD(void, Revert, (Segments *), (override));
MOCK_METHOD(const std::string &, GetPredictorName, (), (const override));
MOCK_METHOD(const std::string &, GetPredictorName, (), (const, override));
};

class MockRewriter : public RewriterInterface {
Expand All @@ -182,7 +182,7 @@ class MockRewriter : public RewriterInterface {
~MockRewriter() override = default;

MOCK_METHOD(bool, Rewrite, (const ConversionRequest &, Segments *),
(const override));
(const, override));
MOCK_METHOD(void, Revert, (Segments *), (override));
};

Expand Down
4 changes: 3 additions & 1 deletion src/converter/segments.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ class Segment final {
SUFFIX_DICTIONARY = 1 << 15,
// Disables modification and removal in rewriters.
NO_MODIFICATION = 1 << 16,
// Candidate which is reranked by user segment history rewriter.
USER_SEGMENT_HISTORY_REWRITER = 1 << 17,
};
// LINT.ThenChange(//converter/converter_main.cc)

Expand Down Expand Up @@ -467,7 +469,7 @@ class Segments final {
};

// This class wraps an iterator as is, except that `operator*` dereferences
// twice. For example, if `InnnerIterator` is the iterator of
// twice. For example, if `InnerIterator` is the iterator of
// `std::deque<Segment *>`, `operator*` dereferences to `Segment&`.
using inner_iterator = std::deque<Segment *>::iterator;
using inner_const_iterator = std::deque<Segment *>::const_iterator;
Expand Down
2 changes: 1 addition & 1 deletion src/data/version/mozc_version_template.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ MAJOR = 2
MINOR = 30

# BUILD number used for the OSS version.
BUILD_OSS = 5544
BUILD_OSS = 5595

# Number to be increased. This value may be replaced by other tools.
BUILD = BUILD_OSS
Expand Down
16 changes: 7 additions & 9 deletions src/mac/GoogleJapaneseInputController.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,15 @@
* separated from |keyCodeMap_| because it is for DIRECT mode. */
mozc::config::Config::YenSignCharacter yenSignCharacter_;

/** Check the kana/ascii input mode at the key event if true. Because it requires GetConfig which
* asks Converter server, we want to delay the checking to the key event timing but we don't want
* to call this every key events. */
BOOL checkInputMode_;

/** |suppressSuggestion_| indicates whether to suppress the suggestion. */
BOOL suppressSuggestion_;
bool suppressSuggestion_;

/** |keyCodeMap_| manages the mapping between Mac key code and mozc key events. */
KeyCodeMap *keyCodeMap_;

/** |clientBundle_| is the Bundle ID of the client application which the controller communicates
* with. */
std::string *clientBundle_;
std::string clientBundle_;

NSRange replacementRange_;

Expand All @@ -93,10 +88,10 @@
uint16_t lastKeyCode_;

/** |candidateController_| controls the candidate windows. */
mozc::renderer::RendererInterface *candidateController_;
std::unique_ptr<mozc::renderer::RendererInterface> candidateController_;

/** |rendererCommand_| stores the command sent to |candidateController_| */
mozc::commands::RendererCommand *rendererCommand_;
mozc::commands::RendererCommand rendererCommand_;

/** |mozcClient_| manages connection to the mozc server. */
std::unique_ptr<mozc::client::ClientInterface> mozcClient_;
Expand Down Expand Up @@ -137,6 +132,9 @@
/** Sets the ClientInterface to use in the controller. */
- (void)setMozcClient:(std::unique_ptr<mozc::client::ClientInterface>)newMozcClient;

/** Sets the RendererInterface to use in the controller. */
- (void)setRenderer:(std::unique_ptr<mozc::renderer::RendererInterface>)newRenderer;

/** create instances for global objects which will be referred from the controller instances. */
+ (void)initializeConstants;
@end
Loading

0 comments on commit 03dbfcb

Please sign in to comment.