mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 11:39:16 +02:00
Fixed most clazy warnings
This commit is contained in:
@ -24,12 +24,12 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
|
||||
installTranslator(gpxsee);
|
||||
|
||||
QTranslator *qt = new QTranslator(this);
|
||||
#if defined(Q_OS_WINDOWS) || defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
|
||||
qt->load(QLocale::system(), "qt", "_", TRANSLATIONS_DIR);
|
||||
#else // Q_OS_WINDOWS || Q_OS_MAC
|
||||
#else // Q_OS_WIN32 || Q_OS_MAC
|
||||
qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
||||
QLibraryInfo::TranslationsPath));
|
||||
#endif // Q_OS_WINDOWS || Q_OS_MAC
|
||||
#endif // Q_OS_WIN32 || Q_OS_MAC
|
||||
installTranslator(qt);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
|
@ -81,12 +81,12 @@ GraphView::~GraphView()
|
||||
|
||||
void GraphView::createXLabel()
|
||||
{
|
||||
_xAxis->setLabel(QString("%1 [%2]").arg(_xLabel).arg(_xUnits));
|
||||
_xAxis->setLabel(QString("%1 [%2]").arg(_xLabel, _xUnits));
|
||||
}
|
||||
|
||||
void GraphView::createYLabel()
|
||||
{
|
||||
_yAxis->setLabel(QString("%1 [%2]").arg(_yLabel).arg(_yUnits));
|
||||
_yAxis->setLabel(QString("%1 [%2]").arg(_yLabel, _yUnits));
|
||||
}
|
||||
|
||||
void GraphView::setYLabel(const QString &label)
|
||||
|
@ -23,7 +23,7 @@ void InfoItem::updateBoundingRect()
|
||||
|
||||
for (i = _list.constBegin(); i != _list.constEnd(); i++) {
|
||||
width += fm.width(i->key + ": ");
|
||||
width += fm.width(i->value) + ((i == _list.end() - 1) ? 0 : PADDING);
|
||||
width += fm.width(i->value) + ((i == _list.constEnd() - 1) ? 0 : PADDING);
|
||||
}
|
||||
|
||||
_boundingRect = QRectF(0, 0, width, _list.isEmpty() ? 0 : fm.height());
|
||||
@ -49,8 +49,8 @@ void InfoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
painter->drawText(width, fm.height() - fm.descent(), i->key + ": ");
|
||||
width += fm.width(i->key + ": ");
|
||||
painter->drawText(width, fm.height() - fm.descent(), i->value);
|
||||
width += fm.width(i->value) + ((i == _list.end() - 1) ? 0 : PADDING);
|
||||
if (i != _list.end() - 1) {
|
||||
width += fm.width(i->value) + ((i == _list.constEnd() - 1) ? 0 : PADDING);
|
||||
if (i != _list.constEnd() - 1) {
|
||||
painter->save();
|
||||
painter->setPen(Qt::gray);
|
||||
painter->drawLine(width - PADDING/2, fm.descent(),
|
||||
|
Reference in New Issue
Block a user