diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-08-26 00:21:41 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-08-26 00:21:41 -0400 |
| commit | 7395fbb7544740a136884e103cb0829bd10b5655 (patch) | |
| tree | 06131c395344d1bd08eb3a8b40e4f22a66b66e69 /src/serverinfo.cpp | |
| parent | b1687380c5c10342699f95361e30f18a32bad585 (diff) | |
made ServerInfo a class
moved server functions together in Settings
Diffstat (limited to 'src/serverinfo.cpp')
| -rw-r--r-- | src/serverinfo.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/serverinfo.cpp b/src/serverinfo.cpp index e96b69d2..5912c226 100644 --- a/src/serverinfo.cpp +++ b/src/serverinfo.cpp @@ -1 +1,32 @@ #include "serverinfo.h"
+
+ServerInfo::ServerInfo()
+ : ServerInfo({}, false, {}, false)
+{
+}
+
+ServerInfo::ServerInfo(QString n, bool premium, QDate last, bool preferred) :
+ m_name(std::move(n)), m_premium(premium), m_lastSeen(std::move(last)),
+ m_preferred(preferred)
+{
+}
+
+const QString& ServerInfo::name() const
+{
+ return m_name;
+}
+
+bool ServerInfo::isPremium() const
+{
+ return m_premium;
+}
+
+const QDate& ServerInfo::lastSeen() const
+{
+ return m_lastSeen;
+}
+
+bool ServerInfo::isPreferred() const
+{
+ return m_preferred;
+}
|
