2929#include < QScrollBar>
3030
3131QTMCompletionPopup::QTMCompletionPopup (QWidget* parent,
32- qt_simple_widget_rep* owner_widget)
32+ qt_simple_widget_rep* owner_widget)
3333 : QListWidget (parent), owner_widget (owner_widget), cached_cursor_x (0 ),
3434 cached_cursor_y (0 ), cached_scroll_x (0 ), cached_scroll_y (0 ),
3535 cached_canvas_x (0 ), cached_magf (0.0 ) {
@@ -66,8 +66,8 @@ QTMCompletionPopup::showCompletions (array<string>& completions, SI x, SI y) {
6666
6767void
6868QTMCompletionPopup::showCompletions (path tp, array<string>& completions,
69- struct cursor cu, double magf,
70- SI scroll_x, SI scroll_y, SI canvas_x) {
69+ struct cursor cu, double magf, SI scroll_x ,
70+ SI scroll_y, SI canvas_x) {
7171 // TODO: do not cache tp
7272 cached_tp= tp;
7373 cachePosition (cu, magf, scroll_x, scroll_y, canvas_x);
@@ -78,7 +78,7 @@ QTMCompletionPopup::showCompletions (path tp, array<string>& completions,
7878
7979void
8080QTMCompletionPopup::cachePosition (struct cursor cu, double magf, SI scroll_x,
81- SI scroll_y, SI canvas_x) {
81+ SI scroll_y, SI canvas_x) {
8282 cached_cursor_x= cu->ox ;
8383 cached_cursor_y= cu->oy ;
8484 cached_scroll_x= scroll_x;
@@ -89,8 +89,8 @@ QTMCompletionPopup::cachePosition (struct cursor cu, double magf, SI scroll_x,
8989
9090void
9191QTMCompletionPopup::updateCache (tree& et, box eb, path tp, double magf,
92- SI scroll_x, SI scroll_y, SI canvas_x,
93- SI index) {
92+ SI scroll_x, SI scroll_y, SI canvas_x,
93+ SI index) {
9494 // MUST called when cache is already set
9595 // now that the cursor position has been updated to a completed position
9696 // we need to get the new cursor based on that position
@@ -189,7 +189,7 @@ QTMCompletionPopup::selectItemIndex (int index) {
189189
190190void
191191QTMCompletionPopup::setScrollOrigin (QPoint origin) {
192- coord2 origin2= from_qpoint (origin);
192+ coord2 origin2 = from_qpoint (origin);
193193 cached_scroll_x= (SI) (origin2.x1 / cached_magf);
194194 cached_scroll_y= (SI) (origin2.x2 / cached_magf);
195195 // updatePosition ();
@@ -235,7 +235,7 @@ QTMCompletionPopup::getText (SI idx) {
235235
236236void
237237QTMCompletionPopup::onCurrentItemChanged (QListWidgetItem* current,
238- QListWidgetItem* previous) {
238+ QListWidgetItem* previous) {
239239 if (previous) {
240240 lastSelectedText= from_qstring (previous->text ());
241241 }
0 commit comments