Commit c13d9950 authored by Laurent Montel's avatar Laurent Montel 😁

Fix compile with strict compile flags

parent aa3271b5
......@@ -32,6 +32,11 @@ add_feature_info("X11_xf86vmode" X11_xf86vmode_FOUND "Required to build kgamma."
configure_file(config-kgamma.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kgamma.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_USE_QSTRINGBUILDER)
add_definitions(-DQT_NO_CAST_FROM_ASCII)
add_definitions(-DQT_NO_CAST_TO_ASCII)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_subdirectory(kcmkgamma)
# add_subdirectory(xf86gammacfg)
......
......@@ -45,7 +45,7 @@ void DisplayNumber::setFont( const QFont & f ) {
void DisplayNumber::setWidth(int digits) {
QFontMetrics fm(font());
QString s("0123456789.+-");
QString s(QStringLiteral("0123456789.+-"));
int width = 0, charWidth=0;
for (int i = 0; i < 11; i++, width = fm.width(s[i]))
......
......@@ -33,8 +33,8 @@ class GammaCtrl : public QWidget {
public:
/** construktor */
explicit GammaCtrl(QWidget *parent=nullptr, XVidExtWrap *xvid=nullptr, int channel=0,
const QString& mingamma="0.40", const QString& maxgamma="3.50",
const QString& setgamma="1.00");
const QString& mingamma=QStringLiteral("0.40"), const QString& maxgamma=QStringLiteral("3.50"),
const QString& setgamma=QStringLiteral("1.00"));
/** destruktor */
~GammaCtrl() override;
/** Return the current gamma value with precision prec */
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment