comparison libgui/src/m-editor/octave-qscintilla.cc @ 20312:48d9001bdee3

Avoid HAVE_ macros in header file. * octave-qscintilla.h, octave-qscintilla.cc (octave_qscintilla::contextMenuEvent): Define unconditionally.
author John W. Eaton <jwe@octave.org>
date Wed, 24 Jun 2015 11:53:33 -0400
parents 4197fc428c7d
children
comparison
equal deleted inserted replaced
20311:396e9cd6cd98 20312:48d9001bdee3
181 { 181 {
182 if (hasSelectedText ()) 182 if (hasSelectedText ())
183 contextmenu_run (true); 183 contextmenu_run (true);
184 } 184 }
185 185
186 // context menu requested
187 void
188 octave_qscintilla::contextMenuEvent (QContextMenuEvent *e)
189 {
186 #ifdef HAVE_QSCI_VERSION_2_6_0 190 #ifdef HAVE_QSCI_VERSION_2_6_0
187 // context menu requested
188 void
189 octave_qscintilla::contextMenuEvent (QContextMenuEvent *e)
190 {
191 QPoint global_pos, local_pos; // the menu's position 191 QPoint global_pos, local_pos; // the menu's position
192 QMenu *context_menu = createStandardContextMenu (); // standard menu 192 QMenu *context_menu = createStandardContextMenu (); // standard menu
193 193
194 // fill context menu with editor's standard actions 194 // fill context menu with editor's standard actions
195 emit create_context_menu_signal (context_menu); 195 emit create_context_menu_signal (context_menu);
233 } 233 }
234 } 234 }
235 235
236 // finaly show the menu 236 // finaly show the menu
237 context_menu->exec (global_pos); 237 context_menu->exec (global_pos);
238 } 238 #endif
239 #endif 239 }
240 240
241 241
242 // handle the menu entry for calling help or doc 242 // handle the menu entry for calling help or doc
243 void 243 void
244 octave_qscintilla::contextmenu_doc (bool) 244 octave_qscintilla::contextmenu_doc (bool)