Skip to content

Commit

Permalink
Use casts to resolve ambiguities
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrewillenbrockdfki committed Apr 22, 2022
1 parent 3d9e44a commit 9113d6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/gui/models/AgentStyleModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ AgentStyleModel::AgentStyleModel(const moreorg::ModelPool& modelPool)

{
QModelIndex idx = createIndex(row, 1);
QVariant value = Qt::black;
QVariant value = (QColor)Qt::black;
setData(idx, value, Qt::BackgroundColorRole);
}

Expand Down
8 changes: 4 additions & 4 deletions src/gui/widgets/PenStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ PenStyle::PenStyle(QWidget* parent)
QVariant variant = mSettings.value("editor/edge/pen");

// style
mpUi->styleComboBox->addItem(/*icon, */"Solid Line", Qt::SolidLine);
mpUi->styleComboBox->addItem(/*icon, */"Dash Line", Qt::DashLine);
mpUi->styleComboBox->addItem(/*icon, */"Dot Line", Qt::DotLine);
mpUi->styleComboBox->addItem(/*icon, */"Solid Line", (int)Qt::SolidLine);
mpUi->styleComboBox->addItem(/*icon, */"Dash Line", (int)Qt::DashLine);
mpUi->styleComboBox->addItem(/*icon, */"Dot Line", (int)Qt::DotLine);

// pen join style
mpUi->joinStyleComboBox->addItem(/*icon, */"Bevel", Qt::BevelJoin);
Expand All @@ -37,7 +37,7 @@ PenStyle::PenStyle(QWidget* parent)
} else {
QPen pen = variant.value<QPen>();
mpUi->colorPushButton->setStyleSheet("background-color: " + pen.brush().color().name());
mpUi->styleComboBox->setCurrentIndex( mpUi->styleComboBox->findData( pen.style() ) );
mpUi->styleComboBox->setCurrentIndex( mpUi->styleComboBox->findData( (int)pen.style() ) );
mpUi->joinStyleComboBox->setCurrentIndex( mpUi->joinStyleComboBox->findData( pen.joinStyle() ) );
mpUi->capStyleComboBox->setCurrentIndex( mpUi->capStyleComboBox->findData( pen.capStyle() ) );
mpUi->widthSpinBox->setValue(pen.width());
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/csp/branchers/TimelineBrancher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ bool TimelineBrancher::status(const Gecode::Space& home) const
while(!mNextRoles.empty())
{
// Pick role randomly from the remaining set of roles
size_t nextRoleIdx = mRandom(mNextRoles.size() - 1);
size_t nextRoleIdx = mRandom((unsigned long long)(mNextRoles.size() - 1));
size_t role = mNextRoles[nextRoleIdx];

LOG_DEBUG_S << "Brancher: " << id() << " trying role " << role;
Expand Down

0 comments on commit 9113d6d

Please sign in to comment.