Commit 034401be authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

It compiles fine without deprecated method

parent e4232788
......@@ -32,6 +32,9 @@ 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})
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
endif()
add_subdirectory(kcmkgamma)
# add_subdirectory(xf86gammacfg)
......
......@@ -48,7 +48,7 @@ void DisplayNumber::setWidth(int digits) {
QString s(QStringLiteral("0123456789.+-"));
int width = 0, charWidth=0;
for (int i = 0; i < 11; i++, width = fm.width(s[i]))
for (int i = 0; i < 11; i++, width = fm.boundingRect(s[i]).width())
charWidth = (width > charWidth) ? width : charWidth;
dg = digits;
......
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