History

cleanup username API from GlobalServicesScriptingInterface

Stephen Birarda committed 11 years ago

Commit 2f22c0c1 parent 2de19ec3 files · +10 −12Browse files

Showing the changes to interface/src/scripting/GlobalServicesScriptingInterface.h (1 of 3 files). Show all

Unified · Split

interface/src/scripting/GlobalServicesScriptingInterface.h+9−7
@@ -31,20 +31,21 @@ Q_DECLARE_METATYPE(DownloadInfoResult) · 30 unmodified lines
3131 QScriptValue DownloadInfoResultToScriptValue(QScriptEngine* engine, const DownloadInfoResult& result);
3232 void DownloadInfoResultFromScriptValue(const QScriptValue& object, DownloadInfoResult& result);
3333
34−
3534 class GlobalServicesScriptingInterface : public QObject {
3635 Q_OBJECT
37− Q_PROPERTY(QString myUsername READ getMyUsername)
38− GlobalServicesScriptingInterface();
39− ~GlobalServicesScriptingInterface();
36+
37+ Q_PROPERTY(QString username READ getUsername)
38+
4039 public:
4140 static GlobalServicesScriptingInterface* getInstance();
4241
43− QString getMyUsername();
42+ const QString& getUsername() const { return AccountManager::getInstance().getAccountInfo().getUsername(); }
4443
4544 public slots:
4645 DownloadInfoResult getDownloadInfo();
4746 void updateDownloadInfo();
47+
48+ void setDiscoverability(const QString& discoverability);
4849
4950 private slots:
5051 void loggedOut();
@@ -53,12 +54,13 @@ private slots: · 2 unmodified lines
5354 signals:
5455 void connected();
5556 void disconnected(const QString& reason);
56− void incomingMessage(const QString& username, const QString& message);
57− void onlineUsersChanged(const QStringList& usernames);
5857 void myUsernameChanged(const QString& username);
5958 void downloadInfoChanged(DownloadInfoResult info);
6059
6160 private:
61+ GlobalServicesScriptingInterface();
62+ ~GlobalServicesScriptingInterface();
63+
6264 bool _downloading;
6365 };
6466

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t