Skip to content

Commit

Permalink
Fix Qt deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vladisslav2011 committed Dec 2, 2024
1 parent a507140 commit 1562dd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/applications/gqrx/dcontrols_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ QWidget * dcontrols_ui::gen_checkbox(const c_id id)
QCheckBox * widget = new QCheckBox(QString(def.name()), parent);
if(def.writable())
{
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
parent->connect(widget, QOverload<int>::of(&QCheckBox::stateChanged), [=](int val){changed_gui(id, val==Qt::Checked);} );
#else
parent->connect(widget, QOverload<Qt::CheckState>::of(&QCheckBox::checkStateChanged), [=](Qt::CheckState val){changed_gui(id, val==Qt::Checked);} );
#endif
if(def.shortcut())
{
QAction * action = new QAction(parent);
Expand Down
3 changes: 2 additions & 1 deletion src/qtgui/iq_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <QStringList>
#include <QScrollBar>
#include <QDateTime>
#include <QTimeZone>
#include <QShortcut>
#include <QPushButton>

Expand Down Expand Up @@ -711,7 +712,7 @@ void CIqTool::parseFileName(const QString &filename)

// gqrx_yyyyMMdd_hhmmss_freq_samprate_fc.raw
QDateTime ts = QDateTime::fromString(list.at(1) + list.at(2), "yyyyMMddhhmmss");
ts.setOffsetFromUtc(0);
ts.setTimeZone(QTimeZone::utc());
time_ms = ts.toMSecsSinceEpoch();
sr = list.at(4).toLongLong(&sr_ok);
center = list.at(3).toLongLong(&center_ok);
Expand Down

0 comments on commit 1562dd6

Please sign in to comment.