diff --git a/interface/src/ui/SnapshotShareDialog.cpp b/interface/src/ui/SnapshotShareDialog.cpp index d57951a484..081d3518b2 100644 --- a/interface/src/ui/SnapshotShareDialog.cpp +++ b/interface/src/ui/SnapshotShareDialog.cpp @@ -44,3 +44,9 @@ SnapshotShareDialog::SnapshotShareDialog(QString fileName, QWidget* parent) : QD ui.snapshotWidget->setPixmap(snaphsotPixmap); ui.snapshotWidget->adjustSize(); } + +void SnapshotShareDialog::accept() { + // post to Discourse forum + + close(); +} diff --git a/interface/src/ui/SnapshotShareDialog.h b/interface/src/ui/SnapshotShareDialog.h index 077acd182b..2823c8b78d 100644 --- a/interface/src/ui/SnapshotShareDialog.h +++ b/interface/src/ui/SnapshotShareDialog.h @@ -20,6 +20,9 @@ public: private: QString _fileName; Ui_SnapshotShareDialog ui; + +private slots: + void accept(); }; #endif /* defined(__hifi__snapshotShareDialog__) */ diff --git a/interface/ui/shareSnapshot.ui b/interface/ui/shareSnapshot.ui index 19857bfb28..0f59349442 100644 --- a/interface/ui/shareSnapshot.ui +++ b/interface/ui/shareSnapshot.ui @@ -311,5 +311,22 @@ p, li { white-space: pre-wrap; } - + + + shareButton + clicked() + SnapshotShareDialog + accept() + + + 420 + 565 + + + 250 + 307 + + + + diff --git a/libraries/networking/src/DataServerAccountInfo.cpp b/libraries/networking/src/DataServerAccountInfo.cpp index 87d3b694a7..d7cbd91e78 100644 --- a/libraries/networking/src/DataServerAccountInfo.cpp +++ b/libraries/networking/src/DataServerAccountInfo.cpp @@ -16,7 +16,8 @@ DataServerAccountInfo::DataServerAccountInfo() : _accessToken(), _username(), - _xmppPassword() + _xmppPassword(), + _discourseApiKey() { } @@ -29,6 +30,7 @@ DataServerAccountInfo::DataServerAccountInfo(const QJsonObject& jsonObject) : QJsonObject userJSONObject = jsonObject["user"].toObject(); setUsername(userJSONObject["username"].toString()); setXMPPPassword(userJSONObject["xmpp_password"].toString()); + setDiscourseApiKey(userJSONObject["discourse_api_key"].toString()); } DataServerAccountInfo::DataServerAccountInfo(const DataServerAccountInfo& otherInfo) { @@ -65,6 +67,12 @@ void DataServerAccountInfo::setXMPPPassword(const QString& xmppPassword) { } } +void DataServerAccountInfo::setDiscourseApiKey(const QString& discourseApiKey) { + if (_discourseApiKey != discourseApiKey) { + _discourseApiKey = discourseApiKey; + } +} + QDataStream& operator<<(QDataStream &out, const DataServerAccountInfo& info) { out << info._accessToken << info._username << info._xmppPassword; return out; diff --git a/libraries/networking/src/DataServerAccountInfo.h b/libraries/networking/src/DataServerAccountInfo.h index 21380c0855..a7d1fa9cb0 100644 --- a/libraries/networking/src/DataServerAccountInfo.h +++ b/libraries/networking/src/DataServerAccountInfo.h @@ -31,7 +31,10 @@ public: const QString& getXMPPPassword() const { return _xmppPassword; } void setXMPPPassword(const QString& xmppPassword); - + + const QString& getDiscourseApiKey() const { return _discourseApiKey; } + void setDiscourseApiKey(const QString& discourseApiKey); + friend QDataStream& operator<<(QDataStream &out, const DataServerAccountInfo& info); friend QDataStream& operator>>(QDataStream &in, DataServerAccountInfo& info); private: @@ -40,6 +43,7 @@ private: OAuthAccessToken _accessToken; QString _username; QString _xmppPassword; + QString _discourseApiKey; }; #endif // hifi_DataServerAccountInfo_h