Skip to content

Commit

Permalink
gui: fix pre processor wrap
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Koucher <arthurckoucher@gmail.com>
  • Loading branch information
AcKoucher committed Jan 15, 2024
1 parent c554062 commit 6e544a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 5 additions & 9 deletions src/gui/src/chartsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@

#include "chartsWidget.h"

#include <QWidget>
#ifdef ENABLE_CHARTS
#include <QColor>
#include <QFrame>
#include <QString>
#include <QWidget>
#include <QtCharts>
#include <algorithm>
#include <cmath>
Expand All @@ -47,9 +47,10 @@
#include "sta/MinMax.hh"
#include "sta/Units.hh"
#include "staGuiInterface.h"
#endif

namespace gui {

#ifdef ENABLE_CHARTS
ChartsWidget::ChartsWidget(QWidget* parent)
: QDockWidget("Charts", parent),
logger_(nullptr),
Expand Down Expand Up @@ -261,13 +262,8 @@ ChartsWidget::ChartsWidget(QWidget* parent)
{
setObjectName("charts_widget"); // for settings

QWidget* container = new QWidget(this);
container->addWidget(label_);

label_->setText("QtCharts is not installed.")
label_->setAlignment(Qt::AlignCenter);

setWidget(container);
label_->setText("QtCharts is not installed.");
label_->setAlignment(Qt::AlignCenter);
}
#endif

Expand Down
3 changes: 2 additions & 1 deletion src/gui/src/chartsWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@
namespace sta {
class dbSta;
}
#endif

namespace gui {

#ifdef ENABLE_CHARTS
class ChartsWidget : public QDockWidget
{
Q_OBJECT
Expand Down

0 comments on commit 6e544a5

Please sign in to comment.