ChartWidget::~ChartWidget() = default;
+#ifdef QWT_FOUND
void ChartWidget::createActions()
{
m_resetZoomAction = new QAction(i18n("Reset Zoom and Pan"), this);
#endif
setFocusPolicy(Qt::StrongFocus);
}
+#endif
void ChartWidget::setModel(ChartModel* model, bool minimalMode)
{
#include <KLocalizedString>
#endif
+#include "util.h"
+
#include <QBrush>
#include <QColor>
#include <QPen>
if (!column.location) {
return {};
}
+ QString tooltip;
if (!column.location->file.isEmpty()) {
- return i18n("%1 allocations from %2 at %3:%4 in %5", column.allocations, column.location->function,
- column.location->file, column.location->line, column.location->module);
+ tooltip = i18n("%1 allocations from %2 at %3:%4 in %5", column.allocations, column.location->function,
+ column.location->file, column.location->line, column.location->module);
+ }
+ else
+ {
+ tooltip = i18n("%1 allocations from %2 in %3", column.allocations, column.location->function,
+ column.location->module);
}
- return i18n("%1 allocations from %2 in %3", column.allocations, column.location->function,
- column.location->module);
+ return Util::wrapLabel(tooltip, 96);
}
return column.allocations;
}