From 3ba481274911f3c071ceef01f76767811010d42b Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Tue, 21 Sep 2010 08:37:23 +0200
Subject: [PATCH] fakevim: disable completion on each keystroke.

This has bad interaction with '.' and ESC.
---
 src/plugins/debugger/breakpoint.ui     | 182 +++++++++++++++++++++++++
 src/plugins/fakevim/fakevimhandler.cpp |   4 +-
 2 files changed, 184 insertions(+), 2 deletions(-)
 create mode 100644 src/plugins/debugger/breakpoint.ui

diff --git a/src/plugins/debugger/breakpoint.ui b/src/plugins/debugger/breakpoint.ui
new file mode 100644
index 00000000000..e2198ea2e47
--- /dev/null
+++ b/src/plugins/debugger/breakpoint.ui
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>382</width>
+    <height>252</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QFormLayout" name="formLayout">
+     <item row="0" column="0">
+      <widget class="QLabel" name="labelType">
+       <property name="text">
+        <string>Breakpoint type:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="QComboBox" name="comboBoxType">
+       <item>
+        <property name="text">
+         <string>File and Line Number</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Function Name</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Function &quot;main()&quot;</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Address</string>
+        </property>
+       </item>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="labelFileName">
+       <property name="text">
+        <string>File name:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QLineEdit" name="lineEditFileName"/>
+     </item>
+     <item row="2" column="0">
+      <widget class="QLabel" name="labelLineNumber">
+       <property name="text">
+        <string>Line number:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1">
+      <widget class="QLineEdit" name="lineEditLineNumber"/>
+     </item>
+     <item row="4" column="0">
+      <widget class="QLabel" name="labelFunction">
+       <property name="text">
+        <string>Function:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="1">
+      <widget class="QLineEdit" name="lineEditFunction"/>
+     </item>
+     <item row="5" column="0">
+      <widget class="QLabel" name="labelCondition">
+       <property name="text">
+        <string>Condition:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="5" column="1">
+      <widget class="QLineEdit" name="lineEditCondition"/>
+     </item>
+     <item row="6" column="0">
+      <widget class="QLabel" name="labelIgnoreCount">
+       <property name="text">
+        <string>Ignore count:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="1">
+      <widget class="QLineEdit" name="lineEditIgnoreCount"/>
+     </item>
+     <item row="7" column="0">
+      <widget class="QLabel" name="labelThreadSpec">
+       <property name="text">
+        <string>Thread specification:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="7" column="1">
+      <widget class="QLineEdit" name="lineEditThreadSpec"/>
+     </item>
+     <item row="3" column="0">
+      <widget class="QLabel" name="labelAddress">
+       <property name="text">
+        <string>Address:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="1">
+      <widget class="QLineEdit" name="lineEditAddress"/>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index 895b646b0f1..b431a33a234 100644
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -4799,8 +4799,8 @@ bool FakeVimHandler::eventFilter(QObject *ob, QEvent *ev)
         QKeyEvent *kev = static_cast<QKeyEvent *>(ev);
         KEY_DEBUG("KEYPRESS" << kev->key() << kev->text() << QChar(kev->key()));
         EventResult res = d->handleEvent(kev);
-        if (d->m_mode == InsertMode)
-            emit completionRequested();
+        //if (d->m_mode == InsertMode)
+        //    emit completionRequested();
         // returning false core the app see it
         //KEY_DEBUG("HANDLED CODE:" << res);
         //return res != EventPassedToCore;
-- 
GitLab