Hi,

There is a compilation warning with clang related to the new splash stuff:

../../../../master/src/frontends/qt4/GuiView.cpp: In member function ‘QSize lyx::frontend::{anonymous}::BackgroundWidget::splashSize()’: ../../../../master/src/frontends/qt4/GuiView.cpp:248:61: warning: conversion to ‘int’ from ‘double’ may alter its value [-Wfloat-conversion]
   return  QSize(width_ * pixelRatio(),height_ * pixelRatio());
                                                             ^
../../../../master/src/frontends/qt4/GuiView.cpp:248:61: warning: conversion to ‘int’ from ‘double’ may alter its value [-Wfloat-conversion]

It is easy enough to fix, but I am a bit confused about the code there (see below). Is there a reason why splashSize has nothing to do with splashWidth() and splashHeight()?

Moreover there are some cosmetic remarks

* spacing: add spaces around '/', and after comma.

* these methods and some of the ones around them should be const.

JMarc

src/frontends/qt4/GuiView.cpp:

        QSize splashSize() {
                return  QSize(width_ * pixelRatio(),height_ * pixelRatio());
        }

        double splashWidth() {
                return splash_.width()/splashPixelRatio();
        }

        double splashHeigth() {
                return splash_.height()/splashPixelRatio();
        }

/// Ratio between physical pixels and device-independent pixels of splash image
        double splashPixelRatio() const {
#if QT_VERSION >= 0x050000
                return splash_.devicePixelRatio();
#else
                return 1.0;
#endif
        }

Reply via email to