Commit 5b4445b4 authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

make clazy a bit happier

- comprehensively cover notify/constant requirement
- fully qualify enums in invokables
parent de4c18ba
Pipeline #154249 failed with stage
in 1 minute and 15 seconds
......@@ -26,7 +26,7 @@
// Max size a report may have. This is enforced in bugzilla, hardcoded, and
// cannot be queried through the API, so handle this client-side in a hardcoded
// fashion as well.
static int s_maxReportSize = 65535;
static const int s_maxReportSize = 65535;
ReportInterface::ReportInterface(QObject *parent)
: QObject(parent)
......@@ -94,6 +94,7 @@ QString ReportInterface::backtrace() const
void ReportInterface::setBacktrace(const QString &backtrace)
m_backtrace = backtrace;
Q_EMIT backtraceChanged();
QStringList ReportInterface::firstBacktraceFunctions() const
......@@ -114,11 +115,13 @@ QString ReportInterface::title() const
void ReportInterface::setTitle(const QString &text)
m_reportTitle = text;
Q_EMIT titleChanged();
void ReportInterface::setDetailText(const QString &text)
m_reportDetailText = text;
Q_EMIT detailTextChanged();
void ReportInterface::setPossibleDuplicates(const QStringList &list)
......@@ -17,7 +17,7 @@
namespace Bugzilla
class NewBug;
} // namespace Bugzilla
class BugzillaManager;
class ProductMapping;
......@@ -27,15 +27,15 @@ class ReportInterface : public QObject
Q_PROPERTY(BugzillaManager *bugzilla READ bugzillaManager CONSTANT)
Q_PROPERTY(QString title READ title WRITE setTitle)
Q_PROPERTY(QString detailText MEMBER m_reportDetailText WRITE setDetailText)
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
Q_PROPERTY(QString detailText MEMBER m_reportDetailText WRITE setDetailText NOTIFY detailTextChanged)
Q_PROPERTY(bool userRememberCrashSitutation MEMBER m_userRememberCrashSituation NOTIFY awarenessChanged)
Q_PROPERTY(Reproducible reproducible MEMBER m_reproducible NOTIFY awarenessChanged)
Q_PROPERTY(bool provideActionsApplicationDesktop MEMBER m_provideActionsApplicationDesktop NOTIFY awarenessChanged)
Q_PROPERTY(bool provideUnusualBehavior MEMBER m_provideUnusualBehavior)
Q_PROPERTY(bool provideUnusualBehavior MEMBER m_provideUnusualBehavior NOTIFY provideUnusualBehaviorChanged)
Q_PROPERTY(bool provideApplicationConfigurationDetails MEMBER m_provideApplicationConfigurationDetails NOTIFY awarenessChanged)
Q_PROPERTY(QString backtrace READ backtrace WRITE setBacktrace)
Q_PROPERTY(QString backtrace READ backtrace WRITE setBacktrace NOTIFY backtraceChanged)
Q_PROPERTY(bool isBugAwarenessPageDataUseful READ isBugAwarenessPageDataUseful NOTIFY awarenessChanged)
......@@ -76,11 +76,15 @@ public:
QString backtrace() const;
void setBacktrace(const QString &backtrace);
Q_SIGNAL void backtraceChanged();
QString title() const;
void setTitle(const QString &text);
Q_SIGNAL void titleChanged();
void setDetailText(const QString &text);
Q_SIGNAL void detailTextChanged();
Q_INVOKABLE void setPossibleDuplicates(const QStringList &duplicatesList);
Q_INVOKABLE QString generateReportFullText(ReportInterface::DrKonqiStamp stamp, ReportInterface::Backtrace inlineBacktrace) const;
......@@ -133,6 +137,7 @@ private Q_SLOTS:
void reportSent(int);
void sendReportError(const QString &);
void provideUnusualBehaviorChanged();
// Attach backtrace to bug. Only used internally when the comment isn't
......@@ -16,7 +16,7 @@ class DetachedProcessMonitor;
class AbstractDebuggerLauncher : public QObject
Q_PROPERTY(QString name READ name)
explicit AbstractDebuggerLauncher(QObject *parent = nullptr)
: QObject(parent)
......@@ -52,7 +52,7 @@ public:
virtual QString simplifiedBacktrace() const;
/*! Returns a value that indicates how much useful is the backtrace that we got */
Q_INVOKABLE virtual Usefulness backtraceUsefulness() const;
Q_INVOKABLE virtual BacktraceParser::Usefulness backtraceUsefulness() const;
/*! Returns a short list of the first good functions that appear in the backtrace
* (in the crashing thread). This is used for quering for duplicate reports.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment