Skip to content

Commit

Permalink
Fixed a few compiation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Oct 6, 2024
1 parent ce742e6 commit fb5ac2c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/chatview_webkit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,8 @@ ChatView::ChatView(QWidget *parent) : QFrame(parent), d(new ChatViewPrivate(this
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(d->webView);
setLayout(layout);
setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
setFrameShadow(QFrame::Sunken);
setFrameShape(QFrame::StyledPanel);
setLooks(d->webView);

#ifndef HAVE_X11 // linux has this feature built-in
Expand Down
6 changes: 4 additions & 2 deletions src/eventdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,8 @@ void EventDlg::init()
l = new QLabel(tr("Time:"), this);
hb2->addWidget(l);
d->lb_time = new QLabel(this);
d->lb_time->setFrameStyle(QFrame::Panel | QFrame::Sunken);
d->lb_time->setFrameShadow(QFrame::Sunken);
d->lb_time->setFrameShape(QFrame::Panel);
hb2->addWidget(d->lb_time);
}

Expand All @@ -689,7 +690,8 @@ void EventDlg::init()
d->lb_count = new QLabel(this);
d->lb_count->setToolTip(tr("Message length"));
d->lb_count->setFixedWidth(40);
d->lb_count->setFrameStyle(QFrame::Panel | QFrame::Sunken);
d->lb_count->setFrameShadow(QFrame::Sunken);
d->lb_count->setFrameShape(QFrame::Panel);
d->lb_count->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
d->lb_count->setNum(0);

Expand Down
3 changes: 2 additions & 1 deletion src/filetransdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ FileRequestDlg::FileRequestDlg(const QDateTime &ts, FileTransfer *ft, PsiAccount
hbLayout->addWidget(d->lb_ident);
hbLayout->addWidget(new QLabel(tr("Time:")));
d->lb_time = new QLabel(QLocale().toString(ts.time(), QLocale::ShortFormat), hb);
d->lb_time->setFrameStyle(QFrame::Panel | QFrame::Sunken);
d->lb_time->setFrameShadow(QFrame::Sunken);
d->lb_time->setFrameShape(QFrame::Panel);
hbLayout->addWidget(d->lb_time);
connect(d->pa->psi(), SIGNAL(accountCountChanged()), this, SLOT(updateIdentityVisibility()));
updateIdentityVisibility();
Expand Down
6 changes: 4 additions & 2 deletions src/registrationdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ RegistrationDlg::RegistrationDlg(const Jid &jid, PsiAccount *pa) : QDialog(nullp
vb1->setContentsMargins(4, 4, 4, 4);
d->lb_top = new QLabel(this);
d->lb_top->setWordWrap(true);
d->lb_top->setFrameStyle(QFrame::Panel | QFrame::Sunken);
d->lb_top->setFrameShadow(QFrame::Sunken);
d->lb_top->setFrameShape(QFrame::Panel);
d->lb_top->hide();
vb1->addWidget(d->lb_top);

Expand All @@ -162,7 +163,8 @@ RegistrationDlg::RegistrationDlg(const Jid &jid, PsiAccount *pa) : QDialog(nullp

QFrame *line = new QFrame(this);
line->setFixedHeight(2);
line->setFrameStyle(QFrame::HLine | QFrame::Sunken);
line->setFrameShadow(QFrame::Sunken);
line->setFrameShape(QFrame::HLine);
vb1->addWidget(line);

QHBoxLayout *hb1 = new QHBoxLayout;
Expand Down
3 changes: 2 additions & 1 deletion src/widgets/eventnotifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ EventNotifier::EventNotifier(QWidget *parent, const char *name) :
eventLayout->addWidget(eventLabel);
eventLabel->setText("");
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
setFrameStyle(QFrame::Panel | QFrame::Sunken);
setFrameShadow(QFrame::Sunken);
setFrameShape(QFrame::Panel);
connect(eventLabel, &ClickableLabel::clicked, this, &EventNotifier::clicked);
}

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/iconselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ public slots:
: 0;
emotsScrollArea_->setMinimumWidth(emotsSel_->sizeHint().rwidth() + vBarWidth);
emotsScrollArea_->setMinimumHeight(qMin(emotsSel_->sizeHint().rheight(), maxSize));
emotsScrollArea_->setFrameStyle(QFrame::Plain);
emotsScrollArea_->setFrameShadow(QFrame::Plain);

if (emotsSel_->rowSize()) {
recentSel_->setRowSize(*emotsSel_->rowSize());
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/psitiplabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void PsiTipLabel::setText(const QString &text)
void PsiTipLabel::initUi()
{
margin = 1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, nullptr, this);
setFrameStyle(QFrame::NoFrame);
setFrameShape(QFrame::NoFrame);

doc = new QTextDocument(this);
QTextOption opt = doc->defaultTextOption();
Expand Down

0 comments on commit fb5ac2c

Please sign in to comment.