~ubuntu-branches/ubuntu/saucy/kate/saucy

« back to all changes in this revision

Viewing changes to part/completion/katecompletionwidget.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell, Rohan Garg, Jonathan Riddell
  • Date: 2013-06-21 00:48:29 UTC
  • mfrom: (1.1.28)
  • Revision ID: package-import@ubuntu.com-20130621004829-y2ui02eg0j47h94y
Tags: 4:4.10.80-0ubuntu1
[ Rohan Garg ]
* New upstream release
  - Update and sort install files
  - Drop kubuntu_pate_find_python.diff, kubuntu_kate_initial_preference.patch,
    kubuntu_find_python.diff from debian/patches , not required

[ Jonathan Riddell ]
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1151
1151
      if( m_argumentHintModel->rowCount(QModelIndex()) != 0 ) {
1152
1152
        m_entryList->setCurrentIndex(QModelIndex());
1153
1153
        m_argumentHintTree->setCurrentIndex(m_argumentHintModel->index(m_argumentHintModel->rowCount(QModelIndex())-1, 0));
 
1154
        m_inCompletionList = false;
1154
1155
      }
1155
1156
  } else {
1156
1157
      if( m_presentationModel->rowCount(QModelIndex()) != 0 ) {
1158
1159
        m_entryList->setCurrentIndex(m_presentationModel->index(0, 0));
1159
1160
        if(model()->hasGroups()) //If we have groups we have to move on, because the first item is a label
1160
1161
          m_entryList->nextCompletion();
 
1162
        m_inCompletionList = true;
1161
1163
      }
1162
1164
  }
1163
 
  m_inCompletionList = !m_inCompletionList;
1164
1165
}
1165
1166
 
1166
1167
void KateCompletionWidget::showConfig( )
1286
1287
  m_automaticInvocationTimer->stop();
1287
1288
}
1288
1289
 
1289
 
#if 0
1290
 
void KateCompletionWidget::editDone(KateEditInfo * edit)
1291
 
{
1292
 
  return;
1293
 
  
1294
 
  if(!edit->newText().join("\n").trimmed().isEmpty())
1295
 
  m_lastInsertionByUser = edit->editSource() == Kate::UserInputEdit;
1296
 
 
1297
 
  if (!view()->config()->automaticCompletionInvocation()
1298
 
       || (edit->editSource() != Kate::UserInputEdit)
1299
 
       || edit->isRemoval()
1300
 
       || (edit->editSource() != Kate::UserInputEdit && edit->editSource() != Kate::CodeCompletionEdit)
1301
 
       || edit->newText().isEmpty() )
1302
 
  {
1303
 
    m_automaticInvocationLine.clear();
1304
 
    m_automaticInvocationTimer->stop();
1305
 
    return;
1306
 
  }
1307
 
 
1308
 
  if(m_automaticInvocationAt != edit->newRange().start()) {
1309
 
    m_automaticInvocationLine.clear();
1310
 
    m_lastInsertionByUser = edit->editSource() == Kate::UserInputEdit;
1311
 
  }
1312
 
 
1313
 
  m_automaticInvocationLine += edit->newText().last();
1314
 
  m_automaticInvocationAt = edit->newRange().end();
1315
 
 
1316
 
  if (m_automaticInvocationLine.isEmpty()) {
1317
 
    m_automaticInvocationTimer->stop();
1318
 
    return;
1319
 
  }
1320
 
 
1321
 
  m_automaticInvocationTimer->start(m_automaticInvocationDelay);
1322
 
}
1323
 
#endif
1324
 
 
1325
1290
void KateCompletionWidget::automaticInvocation()
1326
1291
{
1327
1292
  //kDebug()<<"m_automaticInvocationAt:"<<m_automaticInvocationAt;