~beernarrd/ubuntu-keyboard/slovenian-layout

« back to all changes in this revision

Viewing changes to src/plugin/inputmethod.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-05-27 15:37:47 UTC
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: package-import@ubuntu.com-20140527153747-1kyarbk91aon0tu6
Tags: upstream-0.99.trunk.phablet2+14.10.20140527
ImportĀ upstreamĀ versionĀ 0.99.trunk.phablet2+14.10.20140527

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
    qDebug() << "inputMethod::reset()";
159
159
    Q_D(InputMethod);
160
160
    d->editor.clearPreedit();
 
161
    d->previous_position = -1;
161
162
}
162
163
 
163
164
void InputMethod::setPreedit(const QString &preedit,
201
202
 
202
203
void InputMethod::handleFocusChange(bool focusIn)
203
204
{
204
 
    if (focusIn) {
205
 
        checkInitialAutocaps();
206
 
    } else {
 
205
    if (!focusIn) {
207
206
        hide();
208
207
    }
209
208
}
357
356
    if (ok) {
358
357
        d->editor.text()->setSurrounding(text);
359
358
        d->editor.text()->setSurroundingOffset(position);
 
359
 
 
360
        updateAutoCaps();
 
361
 
 
362
        // If we're at the beginning of a text field (e.g. because it's been cleared,
 
363
        // or the cursor has been moved) then re-evaluate initial autocaps
 
364
        if (position == 0 && position != d->previous_position) {
 
365
            checkInitialAutocaps();
 
366
        }
 
367
        d->previous_position = position;
360
368
    }
361
 
 
362
 
    updateAutoCaps();
363
369
}
364
370
 
365
371
void InputMethod::updateWordEngine()
404
410
void InputMethod::checkInitialAutocaps()
405
411
{
406
412
    Q_D(InputMethod);
407
 
    update();
408
413
 
409
414
    if (d->autocapsEnabled) {
410
415
        QString text;