Clean up compiler warnings (#2027)
Fix the following compiler warning
../src/common/NetworkResult.hpp: In constructor ‘chatterino::NetworkResult::NetworkResult(const QByteArray&, int)’:
../src/common/NetworkResult.hpp:28:16: warning: ‘chatterino::NetworkResult::data_’ will be initialized after [-Wreorder]
28 | QByteArray data_;
| ^~~~~
../src/common/NetworkResult.hpp:27:9: warning: ‘int chatterino::NetworkResult::status_’ [-Wreorder]
27 | int status_;
| ^~~~~~~
../src/common/NetworkResult.cpp:9:1: warning: when initialized here [-Wreorder]
9 | NetworkResult::NetworkResult(const QByteArray &data, int status)
* Clang compiler warnings
Fixes every instance of the following error:
In file included from ../src/widgets/settingspages/CommandPage.cpp:12:
In file included from ../src/controllers/commands/CommandModel.hpp:5:
../src/common/SignalVectorModel.hpp:242:10: warning: 'moveRows' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count,
^
../src/controllers/commands/CommandModel.hpp:12:29: note: in instantiation of template class 'chatterino::SignalVectorModel<chatterino::Command>' requested here
class CommandModel : public SignalVectorModel<Command>
This commit is contained in:
committed by
GitHub
parent
58a6983796
commit
de04ff82a7
@@ -24,8 +24,8 @@ public:
|
|||||||
static constexpr int timedoutStatus = -2;
|
static constexpr int timedoutStatus = -2;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int status_;
|
|
||||||
QByteArray data_;
|
QByteArray data_;
|
||||||
|
int status_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|||||||
@@ -240,7 +240,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count,
|
bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count,
|
||||||
const QModelIndex &destinationParent, int destinationChild)
|
const QModelIndex &destinationParent,
|
||||||
|
int destinationChild) override
|
||||||
{
|
{
|
||||||
if (count != 1)
|
if (count != 1)
|
||||||
{
|
{
|
||||||
@@ -287,7 +288,7 @@ public:
|
|||||||
return {"chatterino_row_id"};
|
return {"chatterino_row_id"};
|
||||||
}
|
}
|
||||||
|
|
||||||
QMimeData *mimeData(const QModelIndexList &list) const
|
QMimeData *mimeData(const QModelIndexList &list) const override
|
||||||
{
|
{
|
||||||
if (list.length() == 1)
|
if (list.length() == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ private:
|
|||||||
void appendTwitchEmote(const QString &emote,
|
void appendTwitchEmote(const QString &emote,
|
||||||
std::vector<TwitchEmoteOccurence> &vec,
|
std::vector<TwitchEmoteOccurence> &vec,
|
||||||
std::vector<int> &correctPositions);
|
std::vector<int> &correctPositions);
|
||||||
Outcome tryAppendEmote(const EmoteName &name);
|
Outcome tryAppendEmote(const EmoteName &name) override;
|
||||||
|
|
||||||
void addWords(const QStringList &words,
|
void addWords(const QStringList &words,
|
||||||
const std::vector<TwitchEmoteOccurence> &twitchEmotes);
|
const std::vector<TwitchEmoteOccurence> &twitchEmotes);
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual void action() override;
|
virtual void action() override;
|
||||||
|
|
||||||
virtual void paint(QPainter *painter, const QRect &rect) const;
|
virtual void paint(QPainter *painter, const QRect &rect) const override;
|
||||||
virtual QSize sizeHint(const QRect &rect) const;
|
virtual QSize sizeHint(const QRect &rect) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr const char *TEXT_FORMAT = "Open channel \"%1\" in new tab";
|
static constexpr const char *TEXT_FORMAT = "Open channel \"%1\" in new tab";
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ public:
|
|||||||
|
|
||||||
virtual void action() override;
|
virtual void action() override;
|
||||||
|
|
||||||
virtual void paint(QPainter *painter, const QRect &rect) const;
|
virtual void paint(QPainter *painter, const QRect &rect) const override;
|
||||||
virtual QSize sizeHint(const QRect &rect) const;
|
virtual QSize sizeHint(const QRect &rect) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Split *split_{};
|
Split *split_{};
|
||||||
|
|||||||
Reference in New Issue
Block a user