Skip to content

Commit

Permalink
Avoid warnings about implicit conversions/promotions when compiling w…
Browse files Browse the repository at this point in the history
…ith Clang
  • Loading branch information
Martchus committed May 19, 2024
1 parent 9dcd1c2 commit 159d91b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion syncthingwidgets/misc/otherdialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ QDialog *browseRemoteFilesDialog(Data::SyncthingConnection &connection, const Da
const auto actionNames = model->data(index, SyncthingFileModel::ActionNames).toStringList();
const auto actionIcons = model->data(index, SyncthingFileModel::ActionIcons).toList();
auto menu = QMenu(view);
auto actionIndex = qsizetype();
auto actionIndex = QStringList::size_type();
for (const auto &action : actions) {
QObject::connect(menu.addAction(actionIndex < actionIcons.size() ? actionIcons.at(actionIndex).value<QIcon>() : QIcon(),
actionIndex < actionNames.size() ? actionNames.at(actionIndex) : action),
Expand Down
2 changes: 1 addition & 1 deletion syncthingwidgets/webview/webpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void WebPage::styleScrollBars(bool immediate)

// determine colors from palette
const auto palette = m_view->palette();
const auto alphaF = 0.75f;
const auto alphaF = static_cast<qreal>(0.75);
auto highlightColor = palette.color(QPalette::Active, QPalette::Highlight);
auto highlightColorInactive = QColor::fromHsv(highlightColor.hue(), 0, highlightColor.value());
highlightColor.setAlphaF(alphaF);
Expand Down

0 comments on commit 159d91b

Please sign in to comment.