Skip to content

Commit

Permalink
gui: Don't use QOverload since older versions of Qt do not have it.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidEGrayson committed Apr 20, 2018
1 parent f931685 commit 00c7306
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions gui/qt/current_spin_box.cpp
Expand Up @@ -27,10 +27,12 @@ current_spin_box::current_spin_box(QWidget * parent)
// We rely on Qt's documented behavior that if multiple slots are connected to
// one signal, they are called in the order they were connected.
//
// Note: We don't use QOverload so we can support Qt 5.5 in Ubuntu 16.04.
//
// Warning: Don't use a QSignalBlocker with this class unless you really know
// what you're doing, since you'll block this signal.
connect(this, QOverload<int>::of(&QSpinBox::valueChanged),
this, &current_spin_box::set_code_from_value);
connect(this, SIGNAL(valueChanged(int)),
this, SLOT(set_code_from_value()));

connect(this, &QSpinBox::editingFinished,
this, &current_spin_box::editing_finished);
Expand Down
2 changes: 1 addition & 1 deletion gui/qt/current_spin_box.h
Expand Up @@ -16,10 +16,10 @@ class current_spin_box : public QSpinBox

private slots:
void editing_finished();
void set_code_from_value();

private:
void fix_code_if_not_allowed();
void set_code_from_value();
void set_value_from_code();

QMap<int, int> mapping;
Expand Down

0 comments on commit 00c7306

Please sign in to comment.