From ffbf4458585f336999fba3421a37c772ec4240e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E7=B3=96=E9=9B=AA=E7=8B=B8?= Date: Mon, 26 Feb 2024 17:45:39 +0300 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=B9=B6=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/bll_polychat.h | 24 ++++++++++++------------ App/main.cpp | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/App/bll_polychat.h b/App/bll_polychat.h index c41d387..2d40283 100644 --- a/App/bll_polychat.h +++ b/App/bll_polychat.h @@ -42,44 +42,44 @@ static QHostAddress getIPAddress() */ static bool initLocalUser(QString name, QString groupNumber) { - localUserName = name; - localUserGroupNumber = groupNumber; - localIpAddress = getIPAddress(); + ::localUserName = name; + ::localUserGroupNumber = groupNumber; + ::localIpAddress = getIPAddress(); return true; } static QString getLocalUserName() { - return localUserName; + return ::localUserName; } static void setLocalUserName(QString localUserName) { - localUserName = localUserName; + ::localUserName = localUserName; } static QString getLocalUserGroupNumber() { - return localUserGroupNumber; + return ::localUserGroupNumber; } static void setLocalUserGroupNumber(QString localUserGroupNumber) { - localUserGroupNumber = localUserGroupNumber; + ::localUserGroupNumber = localUserGroupNumber; } static QHostAddress getLocalIpAddress() { - return localIpAddress; + return ::localIpAddress; } static void setLocalIpAddress(QHostAddress localIpAddress) { - localIpAddress = localIpAddress; + ::localIpAddress = localIpAddress; } static qint16 getPortChatList() { - return PORT_CHAT_LIST; + return ::PORT_CHAT_LIST; } /** Show ChatList Widget @@ -87,8 +87,8 @@ static qint16 getPortChatList() */ static void initAndShowChatList(QWidget* parent) { - chatList = new ChatList(parent, localUserName, localUserGroupNumber, localIpAddress); - chatList->show(); + ::chatList = new ChatList(parent, ::localUserName, ::localUserGroupNumber, ::localIpAddress); + ::chatList->show(); } } diff --git a/App/main.cpp b/App/main.cpp index 4e9a036..991e38a 100644 --- a/App/main.cpp +++ b/App/main.cpp @@ -6,8 +6,8 @@ #include "tcpserver.h" #include "db_localdata.h" -QString localUserName = ""; // User Name (get in user login) -QString localUserGroupNumber = ""; // Group number (get in user login) +QString localUserName = ""; // User Name (will get in user login) +QString localUserGroupNumber = ""; // Group number (will get in user login) QHostAddress localIpAddress = QHostAddress(); ChatList* chatList = nullptr; // Widget ChatList (Only one)