pv/dialogs/settings.cpp: In member function ‘QWidget* pv::dialogs::Settings::get_decoder_settings_form(QWidget*) const’:
pv/dialogs/settings.cpp:218:1: error: no return statement in function returning non-void [-Werror=return-type]
Relevant Qt commit:
https://codereview.qt-project.org/#/c/72637/
"QProgressDialog: don't require setValue(0) to be called."
"Fixed by starting the timer in the constructor (most code doesn't reuse
progress dialogs, so this fixes the most common case)"
This messes us up because we're (ab-)using the dialog
in a non-standard way.
https://bugreports.qt.io/browse/QTBUG-47042
"QProgressDialog is designed to show itself automatically, based
on an internal estimate for the duration of the operation and the
minimumDuration property. You never call show() or exec() on it
manually. You're also not supposed to keep it around when it's not
used. In 5.4, the only way to start the internal duration estimation
was to call setValue(0). But we noticed that many people didn't call
setValue(0)"
Workaround here:
https://bugreports.qt.io/browse/QTBUG-47042
"As a workaround I added the line m_progressDlg->reset(); in the main
window constructor in order to get the same behavior as in former
versions."
This patch was generated using clang-tidy:
clang-tidy -checks="-*,google-readability-namespace-comments" -fix
Switch to the format used by clang-tidy to allow easy, automatic,
tool-based maintenance / checking of the comments.
This also found a few instances of comments that were out of sync.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,misc-unused-using-decls" -fix
(with manual add-on fixes such as dropping unused headers as well,
and commenting some false-positive cases)
Use "using std::foo" to make the actual code itself a lot more readable.
There are some exceptions where we usually cannot do this, e.g. std::thread
often conflicts with "thread" from Qt or Boost.
Users are expecting *any* device to be found when pressing
the "Scan for Devices" button. As that is not what it's doing,
we need to clarify what it does.
This fixes the following g++-5 warning:
pv/dialogs/about.hpp:51:7: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
std::auto_ptr<QTextDocument> supportedDoc;