Building with enhanced clang warnings indicated a large number of instances with the warning: `warning: zero as null pointer constant` Recommended practice in C++11 is to use `nullptr` as value for a NULL or empty pointer value. All instances where this warning was encountered were corrected in this commit. Where warning was encountered in dependency code (i.e. external library) no chnages were made. Patching will be offered upstream.
38 lines
942 B
C++
38 lines
942 B
C++
#ifndef NEWSUPPRESSIONDIALOG_H
|
|
#define NEWSUPPRESSIONDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include "suppressions.h"
|
|
|
|
namespace Ui {
|
|
class NewSuppressionDialog;
|
|
}
|
|
|
|
class NewSuppressionDialog : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit NewSuppressionDialog(QWidget *parent = nullptr);
|
|
NewSuppressionDialog(const NewSuppressionDialog &) = delete;
|
|
~NewSuppressionDialog();
|
|
NewSuppressionDialog &operator=(const NewSuppressionDialog &) = delete;
|
|
|
|
/**
|
|
* @brief Translate the user input in the GUI into a suppression
|
|
* @return Cppcheck suppression
|
|
*/
|
|
Suppressions::Suppression getSuppression() const;
|
|
|
|
/**
|
|
* @brief Update the GUI so it corresponds with the given
|
|
* Cppcheck suppression
|
|
* @param suppression Cppcheck suppression
|
|
*/
|
|
void setSuppression(const Suppressions::Suppression &suppression);
|
|
|
|
private:
|
|
Ui::NewSuppressionDialog *mUI;
|
|
};
|
|
|
|
#endif // NEWSUPPRESSIONDIALOG_H
|