diff options
author | Neil <nyamatongwe@gmail.com> | 2021-12-12 14:54:09 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-12-12 14:54:09 +1100 |
commit | 89bad0a356d4445a0946ad56e2803b39c419fa51 (patch) | |
tree | 29935e76e217e030a3aac38225bd1b27f37ac5ff | |
parent | eea4b6966459309da0502271f37666feb6003d67 (diff) | |
download | scintilla-mirror-89bad0a356d4445a0946ad56e2803b39c419fa51.tar.gz |
Fix some minor analysis warnings.
-rw-r--r-- | qt/ScintillaEditBase/ScintillaEditBase.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp index 89d7a2e34..edee70032 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.cpp +++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp @@ -56,10 +56,12 @@ ScintillaEditBase::ScintillaEditBase(QWidget *parent) setAttribute(Qt::WA_KeyCompression); setAttribute(Qt::WA_InputMethodEnabled); - sqt->vs.indicators[IndicatorUnknown] = Indicator(IndicatorStyle::Hidden, ColourRGBA(0, 0, 0xff)); - sqt->vs.indicators[IndicatorInput] = Indicator(IndicatorStyle::Dots, ColourRGBA(0, 0, 0xff)); - sqt->vs.indicators[IndicatorConverted] = Indicator(IndicatorStyle::CompositionThick, ColourRGBA(0, 0, 0xff)); - sqt->vs.indicators[IndicatorTarget] = Indicator(IndicatorStyle::StraightBox, ColourRGBA(0, 0, 0xff)); + // All IME indicators drawn in same colour, blue, with different patterns + const ColourRGBA colourIME(0, 0, UCHAR_MAX); + sqt->vs.indicators[IndicatorUnknown] = Indicator(IndicatorStyle::Hidden, colourIME); + sqt->vs.indicators[IndicatorInput] = Indicator(IndicatorStyle::Dots, colourIME); + sqt->vs.indicators[IndicatorConverted] = Indicator(IndicatorStyle::CompositionThick, colourIME); + sqt->vs.indicators[IndicatorTarget] = Indicator(IndicatorStyle::StraightBox, colourIME); connect(sqt, SIGNAL(notifyParent(Scintilla::NotificationData)), this, SLOT(notifyParent(Scintilla::NotificationData))); @@ -468,7 +470,7 @@ void ScintillaEditBase::DrawImeIndicator(int indicator, int len) // Draw an indicator on the character before caret by the character bytes of len // so it should be called after InsertCharacter(). // It does not affect caret positions. - if (indicator < 8 || indicator > INDICATOR_MAX) { + if (indicator < INDICATOR_CONTAINER || indicator > INDICATOR_MAX) { return; } sqt->pdoc->DecorationSetCurrentIndicator(indicator); |