feat: rework highlights & their UI#6695
Conversation
|
|
||
| // turn a vector item into a model row | ||
| SharedHighlight HighlightBetaModel::getItemFromRow( | ||
| std::vector<QStandardItem *> &row, const SharedHighlight &original) |
There was a problem hiding this comment.
warning: parameter 'original' is unused [misc-unused-parameters]
| std::vector<QStandardItem *> &row, const SharedHighlight &original) | |
| std::vector<QStandardItem *> &row, const SharedHighlight & /*original*/) |
| explicit HighlightBetaModel(QObject *parent); | ||
|
|
||
| // Used here, in HighlightingPage and in UserHighlightModel | ||
| enum Column { |
There was a problem hiding this comment.
warning: enum 'Column' is unscoped, use 'enum class' instead [cppcoreguidelines-use-enum-class]
enum Column {
^| explicit HighlightBetaModel(QObject *parent); | ||
|
|
||
| // Used here, in HighlightingPage and in UserHighlightModel | ||
| enum Column { |
There was a problem hiding this comment.
warning: enum 'Column' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
enum Column {
^| explicit HighlightBetaModel(QObject *parent); | ||
|
|
||
| // Used here, in HighlightingPage and in UserHighlightModel | ||
| enum Column { |
There was a problem hiding this comment.
warning: initial values in enum 'chatterino::HighlightBetaModel::Column' are not consistent, consider explicit initialization of all, none or only the first enumerator [cert-int09-c]
src/controllers/highlights/HighlightBetaModel.hpp:24:
- COUNT,
+ COUNT = 4,| { | ||
| } | ||
|
|
||
| bool HighlightPhrase::isEnabled() const |
There was a problem hiding this comment.
warning: method 'isEnabled' can be made static [readability-convert-member-functions-to-static]
| bool HighlightPhrase::isEnabled() const | |
| bool HighlightPhrase::isEnabled() |
src/controllers/highlights/HighlightPhrase.hpp:40:
- bool isEnabled() const;
+ static bool isEnabled() ;| }); | ||
|
|
||
| QObject::connect(view, &QTableView::clicked, | ||
| [this, view, model](const QModelIndex &clicked) { |
There was a problem hiding this comment.
warning: lambda capture 'this' is not used [clang-diagnostic-unused-lambda-capture]
| [this, view, model](const QModelIndex &clicked) { | |
| [ view, model](const QModelIndex &clicked) { |
| }); | ||
|
|
||
| QObject::connect(view, &QTableView::clicked, | ||
| [this, view, model](const QModelIndex &clicked) { |
There was a problem hiding this comment.
warning: lambda capture 'view' is not used [clang-diagnostic-unused-lambda-capture]
[this, view, model](const QModelIndex &clicked) {
^this fix will not be applied because it overlaps with another fix
| }); | ||
| QObject::connect( | ||
| this->configureDialog, &HighlightsBetaConfigureDialog::confirmed, this, | ||
| [this, index, view](SharedHighlight data) { |
There was a problem hiding this comment.
warning: chatterino::HighlightsBetaWidget::openConfigureDialog(QTableView *, const QModelIndex &)::(anonymous class)::operator(): Missing reference on non-trivial type (SharedHighlight data) [clazy-function-args-by-ref]
| [this, index, view](SharedHighlight data) { | |
| [this, index, view](const SharedHighlight &data) { |
| }); | ||
| QObject::connect( | ||
| this->configureDialog, &HighlightsBetaConfigureDialog::confirmed, this, | ||
| [this, index, view](SharedHighlight data) { |
There was a problem hiding this comment.
warning: lambda capture 'this' is not used [clang-diagnostic-unused-lambda-capture]
| [this, index, view](SharedHighlight data) { | |
| [ index, view](SharedHighlight data) { |
| }); | ||
| QObject::connect( | ||
| this->configureDialog, &HighlightsBetaConfigureDialog::confirmed, this, | ||
| [this, index, view](SharedHighlight data) { |
There was a problem hiding this comment.
warning: the parameter 'data' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
| [this, index, view](SharedHighlight data) { | |
| [this, index, view](const SharedHighlight& data) { |
72e7693 to
3144ac0
Compare
7619c99 to
d9b661f
Compare
416a95b to
ca3bb7d
Compare
c038a8c to
f17a84b
Compare
00a0a5b to
210716b
Compare
8bb9bc4 to
eaf5071
Compare
0c84e7e to
57885ed
Compare
3fd2b4f to
14ffe60
Compare
a76738e to
1a5bf9f
Compare
1bafa08 to
c53af0f
Compare
0b182bc to
5a02f02
Compare
5918afa to
8e18d8b
Compare
67c5736 to
5eccbe2
Compare
1cbe3e4 to
e292d3c
Compare
e292d3c to
c7ac05b
Compare
This PR shows the progress I'm going through for a highlights rework.
There's an MD file in the PR that describes a little bit what my goals are.
I will fill out this description later.
I am currently not open to feedback for this PR.
Things that would be nice: