diff options
author | Jedi18 <targetakhil@gmail.com> | 2021-01-29 12:06:38 +0530 |
---|---|---|
committer | Jedi18 <targetakhil@gmail.com> | 2021-01-29 12:06:38 +0530 |
commit | e09e587796373d4cb2093689c82f9912e5f84c52 (patch) | |
tree | 4eabfbd9acb5d7ddc8d30c7aebca12d37e248056 /src/ui | |
parent | made requeste changes (diff) | |
download | nheko-e09e587796373d4cb2093689c82f9912e5f84c52.tar.xz |
shifted isUsernameEditingAllowed to qml from c++
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/UserProfile.cpp | 15 | ||||
-rw-r--r-- | src/ui/UserProfile.h | 10 |
2 files changed, 2 insertions, 23 deletions
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp index 9e8d45b5..3872294a 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp @@ -270,8 +270,6 @@ UserProfile::changeUsername(QString username) err->matrix_error.error); }); } - - allowUsernameEditing(false); } void @@ -291,19 +289,6 @@ UserProfile::unverify(QString device) } void -UserProfile::allowUsernameEditing(bool allow) -{ - usernameEditing = allow; - emit usernameEditingChanged(); -} - -bool -UserProfile::isUsernameEditingAllowed() const -{ - return usernameEditing; -} - -void UserProfile::setGlobalUsername(const QString &globalUser) { globalUsername = globalUser; diff --git a/src/ui/UserProfile.h b/src/ui/UserProfile.h index d450d58f..11f588b6 100644 --- a/src/ui/UserProfile.h +++ b/src/ui/UserProfile.h @@ -88,8 +88,6 @@ class UserProfile : public QObject Q_PROPERTY( bool userVerificationEnabled READ userVerificationEnabled NOTIFY userStatusChanged) Q_PROPERTY(bool isSelf READ isSelf CONSTANT) - Q_PROPERTY( - bool isUsernameEditingAllowed READ isUsernameEditingAllowed NOTIFY usernameEditingChanged) public: UserProfile(QString roomid, QString userid, @@ -105,7 +103,6 @@ public: bool getUserStatus(); bool userVerificationEnabled() const; bool isSelf() const; - bool isUsernameEditingAllowed() const; Q_INVOKABLE void verify(QString device = ""); Q_INVOKABLE void unverify(QString device = ""); @@ -115,11 +112,9 @@ public: Q_INVOKABLE void kickUser(); Q_INVOKABLE void startChat(); Q_INVOKABLE void changeUsername(QString username); - Q_INVOKABLE void allowUsernameEditing(bool allow); signals: void userStatusChanged(); - void usernameEditingChanged(); void displayNameChanged(); void globalUsernameRetrieved(const QString &globalUser); @@ -130,9 +125,8 @@ private: QString roomid_, userid_; QString globalUsername; DeviceInfoModel deviceList_; - bool isUserVerified = false; - bool hasMasterKey = false; - bool usernameEditing = false; + bool isUserVerified = false; + bool hasMasterKey = false; TimelineViewManager *manager; TimelineModel *model; }; |