comparison libgui/src/variable-editor.cc @ 33239:775dde0cb3e5

use qOverload<T>(fptr) instead of QOverload<T>::of(fptr) Now that we are using C++17 we can use qOverload<T> (function_pointer) instead of QOverload<T...>::of (function_pointer) Affected files: ButtonGroup.cc, Container.cc, Figure.cc, PopupMenuControl.cc, command-widget.cc, documentation-bookmarks.cc, file-editor-tab.cc, file-editor.cc, main-window.cc, octave-qobject.cc, octave-qobject.h, set-path-dialog.cc, settings-dialog.cc, terminal-dock-widget.cc, and variable-editor.cc.
author John W. Eaton <jwe@octave.org>
date Fri, 22 Mar 2024 23:51:33 -0400
parents 8f8bb94a1b83
children 689d4d069bbf
comparison
equal deleted inserted replaced
33238:ddd3da3f1a70 33239:775dde0cb3e5
1295 page->setWidget (stack); 1295 page->setWidget (stack);
1296 page->setFocusProxy (stack); 1296 page->setFocusProxy (stack);
1297 1297
1298 // Any interpreter_event signal from a variable_editor_stack object is 1298 // Any interpreter_event signal from a variable_editor_stack object is
1299 // handled the same as for the parent variable_editor object. 1299 // handled the same as for the parent variable_editor object.
1300 connect (stack, QOverload<const fcn_callback&>::of (&variable_editor_stack::interpreter_event), 1300 connect (stack, qOverload<const fcn_callback&> (&variable_editor_stack::interpreter_event),
1301 this, QOverload<const fcn_callback&>::of (&variable_editor::interpreter_event)); 1301 this, qOverload<const fcn_callback&> (&variable_editor::interpreter_event));
1302 1302
1303 connect (stack, QOverload<const meth_callback&>::of (&variable_editor_stack::interpreter_event), 1303 connect (stack, qOverload<const meth_callback&> (&variable_editor_stack::interpreter_event),
1304 this, QOverload<const meth_callback&>::of (&variable_editor::interpreter_event)); 1304 this, qOverload<const meth_callback&> (&variable_editor::interpreter_event));
1305 1305
1306 connect (stack, &variable_editor_stack::edit_variable_signal, 1306 connect (stack, &variable_editor_stack::edit_variable_signal,
1307 this, &variable_editor::edit_variable); 1307 this, &variable_editor::edit_variable);
1308 connect (this, &variable_editor::level_up_signal, 1308 connect (this, &variable_editor::level_up_signal,
1309 stack, &variable_editor_stack::levelUp); 1309 stack, &variable_editor_stack::levelUp);
1371 model, &variable_editor_model::double_click); 1371 model, &variable_editor_model::double_click);
1372 1372
1373 // Any interpreter_event signal from a variable_editor_model object is 1373 // Any interpreter_event signal from a variable_editor_model object is
1374 // handled the same as for the parent variable_editor object. 1374 // handled the same as for the parent variable_editor object.
1375 1375
1376 connect (model, QOverload<const fcn_callback&>::of (&variable_editor_model::interpreter_event), 1376 connect (model, qOverload<const fcn_callback&> (&variable_editor_model::interpreter_event),
1377 this, QOverload<const fcn_callback&>::of (&variable_editor::interpreter_event)); 1377 this, qOverload<const fcn_callback&> (&variable_editor::interpreter_event));
1378 1378
1379 connect (model, QOverload<const meth_callback&>::of (&variable_editor_model::interpreter_event), 1379 connect (model, qOverload<const meth_callback&> (&variable_editor_model::interpreter_event),
1380 this, QOverload<const meth_callback&>::of (&variable_editor::interpreter_event)); 1380 this, qOverload<const meth_callback&> (&variable_editor::interpreter_event));
1381 1381
1382 // Must supply a title for a QLabel to be created. Calling set_title() 1382 // Must supply a title for a QLabel to be created. Calling set_title()
1383 // more than once will add more QLabels. Could change octave_dock_widget 1383 // more than once will add more QLabels. Could change octave_dock_widget
1384 // to always supply a QLabel (initially empty) and then simply update its 1384 // to always supply a QLabel (initially empty) and then simply update its
1385 // contents. 1385 // contents.