moved key share consts into an enum in GroupKeyShare class

This commit is contained in:
csoler 2021-02-26 11:16:01 +01:00
parent ab12f531d0
commit 8e61b0ce4f
3 changed files with 9 additions and 5 deletions

View File

@ -193,7 +193,7 @@ GxsGroupDialog *PostedDialog::createGroupDialog(GxsGroupDialog::Mode mode, RsGxs
int PostedDialog::shareKeyType()
{
//return POSTED_KEY_SHARE;
return 0; // Boards are public. By the time we offer the possibility to make them restricted, we need to not show the 'share publish permission' entry in the drop menu.
return GroupShareKey::NO_KEY_SHARE; // Boards are public. By the time we offer the possibility to make them restricted, we need to not show the 'share publish permission' entry in the drop menu.
}
GxsMessageFrameWidget *PostedDialog::createMessageFrameWidget(const RsGxsGroupId &groupId)

View File

@ -25,9 +25,6 @@
#include "ui_GxsGroupShareKey.h"
#define CHANNEL_KEY_SHARE 0x00000001
#define FORUM_KEY_SHARE 0x00000002
#define POSTED_KEY_SHARE 0x00000003
class GroupShareKey : public QDialog
{
@ -40,6 +37,13 @@ public:
GroupShareKey(QWidget *parent = 0, const RsGxsGroupId& grpId = RsGxsGroupId(), int grpType = 0);
~GroupShareKey();
enum KeyShareType: uint8_t {
NO_KEY_SHARE = 0x00000000,
CHANNEL_KEY_SHARE = 0x00000001,
FORUM_KEY_SHARE = 0x00000002,
POSTED_KEY_SHARE = 0x00000003,
};
protected:
void changeEvent(QEvent *e);

View File

@ -207,7 +207,7 @@ GxsGroupDialog *GxsChannelDialog::createGroupDialog(GxsGroupDialog::Mode mode, R
int GxsChannelDialog::shareKeyType()
{
return CHANNEL_KEY_SHARE;
return GroupShareKey::CHANNEL_KEY_SHARE;
}
GxsMessageFrameWidget *GxsChannelDialog::createMessageFrameWidget(const RsGxsGroupId &groupId)