Skip to content

Commit

Permalink
formatting, fix #if
Browse files Browse the repository at this point in the history
  • Loading branch information
zjeffer committed Aug 27, 2023
1 parent b7a4715 commit 4742fc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/fontloader.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#include "fontloader.h"

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
FontLoader::FontLoader() : m_fontDatabase() { }
#else
FontLoader::FontLoader() { }
#endif

QFont FontLoader::loadFont(const QString &family, const QString &style, int pointSize)
{
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
return m_fontDatabase.font(family, style, pointSize);
#else
return QFontDatabase::font(family, style, pointSize);
Expand Down
2 changes: 1 addition & 1 deletion src/fontloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class FontLoader
{
public:
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QFontDatabase m_fontDatabase;
#endif

Expand Down

0 comments on commit 4742fc2

Please sign in to comment.