Skip to content

Commit

Permalink
Fix warnings (#321)
Browse files Browse the repository at this point in the history
* Fix warnings

* Fix deprecation warnings
  • Loading branch information
raccog committed Nov 24, 2023
1 parent 2a042c9 commit f673e59
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
8 changes: 5 additions & 3 deletions external/fancytabbar/fancytabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ void FancyTabBar::paintEvent(QPaintEvent *event) {
*/
void FancyTabBar::mousePressEvent(QMouseEvent *event) {
if (event->button() == Qt::LeftButton) {
qint32 ret = getTabIndexByPoint(event->x(), event->y());
qint32 ret =
getTabIndexByPoint(event->position().x(), event->position().y());

// If non of the tabs is clicked dont change the curent activeIndex.
if (ret != -1)
Expand All @@ -196,7 +197,7 @@ void FancyTabBar::mousePressEvent(QMouseEvent *event) {
*/
void FancyTabBar::mouseMoveEvent(QMouseEvent *event) {
QWidget::mouseMoveEvent(event);
hower = getTabIndexByPoint(event->x(), event->y());
hower = getTabIndexByPoint(event->position().x(), event->position().y());
update();
}

Expand All @@ -207,7 +208,8 @@ void FancyTabBar::mouseMoveEvent(QMouseEvent *event) {
*/
void FancyTabBar::enterEvent(QEnterEvent *event) {
QEnterEvent *enterEvent = static_cast<QEnterEvent *>(event);
hower = getTabIndexByPoint(enterEvent->x(), enterEvent->y());
hower = getTabIndexByPoint(enterEvent->position().x(),
enterEvent->position().y());
update();
}

Expand Down
2 changes: 1 addition & 1 deletion src/cachesim/chartlinemarker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void ChartLineMarker::move(const QPointF &center) {
qobject_cast<QValueAxis *>(m_chart->axes(Qt::Horizontal).constFirst());

// Note: we assume that the points are in a sorted order!
const auto &points = m_series->pointsVector();
const auto &points = m_series->points();
const QPointF chartPos = m_chart->mapToValue(center);
auto iter =
std::lower_bound(points.begin(), points.end(), chartPos.x(),
Expand Down
4 changes: 2 additions & 2 deletions src/processors/interface/ripesprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ class RipesProcessor {
*/
virtual void resetProcessor() = 0;

/*
/**
* @brief vcdTrace
* Enables VCD tracing of the processor model, if supported by the simulator.
*/
virtual void vcdTrace(bool enable, const QString &filename){};
virtual void vcdTrace(bool, const QString &){};

/**
* @brief clock
Expand Down
9 changes: 6 additions & 3 deletions src/wasmSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ namespace Ripes {

// Disable a widget if we are running in a wasm environment.
template <typename T>
inline void disableIfWasm(T *widget) {
#ifdef __EMSCRIPTEN__
inline void disableIfWasm(T *widget) {
widget->setEnabled(false);
#endif
}
#else
inline void disableIfWasm(T *) {
}
#endif

// Disables a list of widgets if we are running in a wasm environment.
template <typename TList>
Expand All @@ -19,4 +22,4 @@ inline void disableIfWasm(TList widgets) {
disableIfWasm(widget);
}

} // namespace Ripes
} // namespace Ripes

0 comments on commit f673e59

Please sign in to comment.