Skip to content

Commit 1177ffb

Browse files
authored
Avoid FontLoader Class from being constructed and copied elsewhere (#721)
1 parent 4cc7c2a commit 1177ffb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/fontloader.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
class FontLoader
88
{
99
public:
10-
FontLoader() = default;
11-
~FontLoader() = default;
12-
1310
static FontLoader &getInstance()
1411
{
1512
static FontLoader instance;
1613
return instance;
1714
}
1815

16+
FontLoader(const FontLoader &) = delete;
17+
void operator=(const FontLoader &) = delete;
1918
QFont loadFont(const QString &family, const QString &style, int pointSize);
19+
20+
private:
21+
FontLoader() = default;
22+
~FontLoader() = default;
2023
};

0 commit comments

Comments
 (0)