Jelajahi Sumber

OSXUtils doesn't have to be a class

Tobias Hieta 9 tahun lalu
induk
melakukan
395b278b91
3 mengubah file dengan 5 tambahan dan 6 penghapusan
  1. 1 1
      src/utils/Utils.cpp
  2. 3 4
      src/utils/osx/OSXUtils.h
  3. 1 1
      src/utils/osx/OSXUtils.mm

+ 1 - 1
src/utils/Utils.cpp

@@ -23,7 +23,7 @@
 QString Utils::ComputerName()
 {
 #ifdef Q_OS_MAC
-  return OSXUtils::computerName();
+  return OSXUtils::ComputerName();
 #else
   return QHostInfo::localHostName();
 #endif

+ 3 - 4
src/utils/osx/OSXUtils.h

@@ -3,11 +3,10 @@
 
 #include <QString>
 
-class OSXUtils
+namespace OSXUtils
 {
-public:
-  static void SetMenuBarVisible(bool visible);
-  static QString computerName();
+  void SetMenuBarVisible(bool visible);
+  QString ComputerName();
 };
 
 #endif /* OSXUTILS_H */

+ 1 - 1
src/utils/osx/OSXUtils.mm

@@ -18,7 +18,7 @@ void OSXUtils::SetMenuBarVisible(bool visible)
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////
-QString OSXUtils::computerName()
+QString OSXUtils::ComputerName()
 {
   return QString::fromNSString([[NSHost currentHost] localizedName]);
 }