Fix code style and errors
This commit is contained in:
@@ -420,7 +420,7 @@ void FancyTabWidget::paintEvent(QPaintEvent *pe) {
|
||||
QColor baseColor = StyleHelper::baseColor();
|
||||
|
||||
QRect backgroundRect = rect();
|
||||
backgroundRect.setWidth(((FancyTabBar*)tabBar())->width());
|
||||
backgroundRect.setWidth(tabBar()->width());
|
||||
p.fillRect(backgroundRect, baseColor);
|
||||
|
||||
// Horizontal gradient over the sidebar from transparent to dark
|
||||
|
||||
@@ -54,6 +54,7 @@ ExtendedEditor::ExtendedEditor(QWidget *widget, int extra_right_padding, bool dr
|
||||
draw_hint_(draw_hint),
|
||||
font_point_size_(widget->font().pointSizeF() - 1),
|
||||
is_rtl_(false) {
|
||||
|
||||
clear_button_->setIcon(IconLoader::Load("edit-clear-locationbar-ltr"));
|
||||
clear_button_->setIconSize(QSize(16, 16));
|
||||
clear_button_->setCursor(Qt::ArrowCursor);
|
||||
@@ -76,6 +77,7 @@ ExtendedEditor::ExtendedEditor(QWidget *widget, int extra_right_padding, bool dr
|
||||
widget->connect(clear_button_, SIGNAL(clicked()), widget, SLOT(setFocus()));
|
||||
|
||||
UpdateButtonGeometry();
|
||||
|
||||
}
|
||||
|
||||
void ExtendedEditor::set_hint(const QString& hint) {
|
||||
|
||||
@@ -45,6 +45,7 @@ const int MultiLoadingIndicator::kSpacing = 6;
|
||||
|
||||
MultiLoadingIndicator::MultiLoadingIndicator(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
task_manager_(nullptr),
|
||||
spinner_(new BusyIndicator(this))
|
||||
{
|
||||
spinner_->move(kHorizontalPadding, kVerticalPadding);
|
||||
|
||||
@@ -160,7 +160,7 @@ void OSD::CallFinished(QDBusPendingCallWatcher *watcher) {
|
||||
|
||||
std::unique_ptr<QDBusPendingCallWatcher> w(watcher);
|
||||
|
||||
QDBusPendingReply<uint> reply = *watcher;
|
||||
QDBusPendingReply<uint> reply = *w.get();
|
||||
if (reply.isError()) {
|
||||
qLog(Warning) << "Error sending notification" << reply.error().name();
|
||||
return;
|
||||
|
||||
@@ -217,12 +217,7 @@ void PlayingWidget::SetMode(int mode) {
|
||||
|
||||
mode_ = Mode(mode);
|
||||
|
||||
if (mode_ == SmallSongDetails) {
|
||||
fit_cover_width_action_->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
fit_cover_width_action_->setEnabled(true);
|
||||
}
|
||||
fit_cover_width_action_->setEnabled(mode_ != SmallSongDetails);
|
||||
|
||||
UpdateHeight();
|
||||
UpdateDetailsText();
|
||||
|
||||
Reference in New Issue
Block a user