fix: Get rid of warnings on clang-cl (#6528)
This commit is contained in:
@@ -44,10 +44,9 @@ BOOL CALLBACK enumWindows(HWND hwnd, LPARAM)
|
||||
}
|
||||
#endif
|
||||
|
||||
AttachedWindow::AttachedWindow(void *_target, int _yOffset)
|
||||
AttachedWindow::AttachedWindow(void *_target)
|
||||
: QWidget(nullptr, Qt::FramelessWindowHint | Qt::Window)
|
||||
, target_(_target)
|
||||
, yOffset_(_yOffset)
|
||||
{
|
||||
QLayout *layout = new QVBoxLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
@@ -86,7 +85,7 @@ AttachedWindow *AttachedWindow::get(void *target, const GetArgs &args)
|
||||
}
|
||||
}
|
||||
|
||||
auto *window = new AttachedWindow(target, args.yOffset);
|
||||
auto *window = new AttachedWindow(target);
|
||||
items.push_back(Item{target, window, args.winId});
|
||||
return window;
|
||||
}();
|
||||
|
||||
@@ -15,7 +15,7 @@ using ChannelPtr = std::shared_ptr<Channel>;
|
||||
|
||||
class AttachedWindow : public QWidget
|
||||
{
|
||||
AttachedWindow(void *_target, int _yOffset);
|
||||
AttachedWindow(void *_target);
|
||||
|
||||
public:
|
||||
struct GetArgs {
|
||||
@@ -60,8 +60,6 @@ private:
|
||||
void updateWindowRect(void *attached);
|
||||
|
||||
void *target_;
|
||||
int yOffset_;
|
||||
int currentYOffset_{};
|
||||
double x_ = -1;
|
||||
double pixelRatio_ = -1;
|
||||
int width_ = 360;
|
||||
|
||||
@@ -98,7 +98,6 @@ private:
|
||||
std::vector<QLayoutItem *> itemList_;
|
||||
int hSpace_ = -1;
|
||||
int vSpace_ = -1;
|
||||
int lineSpacing_ = -1;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "widgets/settingspages/SettingsPage.hpp"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class AccountSwitchWidget;
|
||||
@@ -12,11 +10,6 @@ class AccountsPage : public SettingsPage
|
||||
{
|
||||
public:
|
||||
AccountsPage();
|
||||
|
||||
private:
|
||||
QPushButton *addButton_{};
|
||||
QPushButton *removeButton_{};
|
||||
AccountSwitchWidget *accountSwitchWidget_{};
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -389,6 +389,9 @@ void HighlightingPage::tableCellClicked(const QModelIndex &clicked,
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case HighlightTab::Blacklist:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -371,8 +371,7 @@ SettingWidget *SettingWidget::dropdown(
|
||||
widget->managedConnections);
|
||||
|
||||
QObject::connect(combo, &QComboBox::currentTextChanged,
|
||||
[label, combo, &setting](const auto &newText) {
|
||||
bool ok = true;
|
||||
[label, combo, &setting](const auto & /*newText*/) {
|
||||
auto stringValue = combo->currentData().toString();
|
||||
|
||||
setting.setValue(stringValue);
|
||||
|
||||
@@ -638,6 +638,8 @@ void SplitContainer::paintSplitBorder(Node *node, QPainter *painter)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Node::Type::EmptyRoot:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1481,6 +1483,8 @@ void SplitContainer::Node::layout(bool addSpacing, float _scale,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Node::Type::EmptyRoot:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -353,7 +353,6 @@ void SplitHeader::initializeLayout()
|
||||
QObject::connect(
|
||||
this->moderationButton_, &Button::clicked, this,
|
||||
[this](Qt::MouseButton button) mutable {
|
||||
auto *w = this->moderationButton_;
|
||||
switch (button)
|
||||
{
|
||||
case Qt::LeftButton:
|
||||
@@ -378,6 +377,9 @@ void SplitHeader::initializeLayout()
|
||||
getApp()->getWindows()->showSettingsDialog(
|
||||
this, SettingsDialogPreference::ModerationActions);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -258,7 +258,6 @@ void SplitInput::triggerSelfMessageReceived()
|
||||
|
||||
void SplitInput::scaleChangedEvent(float scale)
|
||||
{
|
||||
auto *app = getApp();
|
||||
// update the icon size of the buttons
|
||||
this->updateEmoteButton();
|
||||
this->updateCancelReplyButton();
|
||||
|
||||
Reference in New Issue
Block a user