// Copyright 2020 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #pragma once #include #include // This exists purely to get rid of deprecation warnings while still supporting older Qt versions template int FontMetricsWidth(const QFontMetrics& fm, Args&&... args) { #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) return fm.horizontalAdvance(std::forward(args)...); #else return fm.width(std::forward(args)...); #endif }