removed more dead code

This commit is contained in:
csoler 2020-04-03 10:54:06 +02:00
parent cd98f02246
commit 72a22bcc88
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
9 changed files with 1 additions and 194 deletions

View File

@ -576,21 +576,6 @@ void IdEditDialog::createId()
QMessageBox::critical(NULL,tr("Identity creation failed"),tr("Cannot create identity. Something went wrong. Check your profile password."));
}
#ifdef TO_REMOVE
void IdEditDialog::idCreated(uint32_t token)
{
if (!rsIdentity->acknowledgeGrp(token, mGroupId)) {
std::cerr << "IdDialog::idCreated() acknowledgeGrp failed";
std::cerr << std::endl;
reject();
return;
}
accept();
}
#endif
void IdEditDialog::updateId()
{
/* submit updated details */
@ -630,21 +615,3 @@ void IdEditDialog::updateId()
accept();
}
#ifdef TO_REMOVE
void IdEditDialog::loadRequest(const TokenQueue */*queue*/, const TokenRequest &req)
{
std::cerr << "IdDialog::loadRequest() UserType: " << req.mUserType;
std::cerr << std::endl;
switch (req.mUserType) {
case IDEDITDIALOG_LOADID:
loadExistingId(req.mToken);
break;
case IDEDITDIALOG_CREATEID:
idCreated(req.mToken);
break;
}
}
#endif

View File

@ -354,6 +354,7 @@ void GxsCommentTreeWidget::requestComments(const RsGxsGroupId& group, const std:
service_requestComments(group,message_versions);
}
void GxsCommentTreeWidget::service_requestComments(const RsGxsGroupId& group_id,const std::set<RsGxsMessageId> & msgIds)
{
/* request comments */

View File

@ -72,14 +72,6 @@ protected:
void loadAllPosts();
void loadPosts(const std::set<RsGxsMessageId>& msgIds);
#ifdef TO_REMOVE
void requestAllPosts();
void loadAllPosts();
virtual void insertAllPosts(const uint32_t &token, GxsMessageFramePostThread *thread) = 0;
//void requestPosts(const std::set<RsGxsMessageId> &msgIds);
//void loadPosts(const uint32_t &token);
#endif
// In the following 3 methods, the memory ownership is kept by GxsMessageFramePostWidget
virtual bool insertGroupData(const RsGxsGenericGroupData *data) =0;

View File

@ -49,12 +49,6 @@ const std::set<RsGxsGroupId> &RsGxsUpdateBroadcastWidget::getGrpIds()
return mBase->getGrpIds();
}
#ifdef TO_REMOVE
const std::set<TurtleRequestId>& RsGxsUpdateBroadcastWidget::getSearchResults()
{
return mBase->getSearchResults();
}
#endif
const std::set<RsGxsGroupId> &RsGxsUpdateBroadcastWidget::getGrpIdsMeta()
{
return mBase->getGrpIdsMeta();

View File

@ -366,34 +366,6 @@ bool GxsChannelDialog::getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo
return true;
}
#ifdef TO_REMOVE
void GxsChannelDialog::loadGroupSummaryToken(const uint32_t &token, std::list<RsGroupMetaData> &groupInfo, RsUserdata *&userdata)
{
std::vector<RsGxsChannelGroup> groups;
rsGxsChannels->getGroupData(token, groups);
/* Save groups to fill icons and description */
GxsChannelGroupInfoData *channelData = new GxsChannelGroupInfoData;
userdata = channelData;
std::vector<RsGxsChannelGroup>::iterator groupIt;
for (groupIt = groups.begin(); groupIt != groups.end(); ++groupIt) {
RsGxsChannelGroup &group = *groupIt;
groupInfo.push_back(group.mMeta);
if (group.mImage.mData != NULL) {
QPixmap image;
GxsIdDetails::loadPixmapFromData(group.mImage.mData, group.mImage.mSize, image,GxsIdDetails::ORIGINAL);
channelData->mIcon[group.mMeta.mGroupId] = image;
}
if (!group.mDescription.empty()) {
channelData->mDescription[group.mMeta.mGroupId] = QString::fromUtf8(group.mDescription.c_str());
}
}
}
#endif
void GxsChannelDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *groupData, GroupItemInfo &groupItemInfo)
{
GxsGroupFrameDialog::groupInfoToGroupItemInfo(groupData, groupItemInfo);

View File

@ -741,16 +741,6 @@ bool GxsChannelPostsWidget::insertGroupData(const RsGxsGenericGroupData *data)
}
#ifdef TO_REMOVE
void GxsChannelPostsWidget::insertAllPosts(const uint32_t &token, GxsMessageFramePostThread *thread)
{
std::vector<RsGxsChannelPost> posts;
rsGxsChannels->getPostData(token, posts);
insertChannelPosts(posts, thread, false);
}
#endif
void GxsChannelPostsWidget::getMsgData(const std::set<RsGxsMessageId>& msgIds,std::vector<RsGxsGenericMsgData*>& psts)
{
std::vector<RsGxsChannelPost> posts;
@ -820,16 +810,6 @@ void GxsChannelPostsWidget::insertPosts(const std::vector<RsGxsGenericMsgData*>&
insertChannelPosts(cposts, NULL, true);
}
#ifdef TO_REMOVE
void GxsChannelPostsWidget::insertPosts(const uint32_t &token)
{
std::vector<RsGxsChannelPost> posts;
rsGxsChannels->getPostData(token, posts);
insertChannelPosts(posts, NULL, true);
}
#endif
class GxsChannelPostsReadData
{
public:

View File

@ -66,10 +66,6 @@ protected:
/* GxsMessageFramePostWidget */
virtual void groupNameChanged(const QString &name);
virtual bool insertGroupData(const RsGxsGenericGroupData *data) override;
#ifdef TO_REMOVE
virtual void insertAllPosts(const uint32_t &token, GxsMessageFramePostThread *thread);
virtual void insertPosts(const uint32_t &token);
#endif
virtual void clearPosts();
virtual bool useThread() { return mUseThread; }
virtual void fillThreadCreatePost(const QVariant &post, bool related, int current, int count);

View File

@ -304,36 +304,6 @@ void NotifyQt::notifyDiscInfoChanged()
emit discInfoChanged() ;
}
#ifdef TO_REMOVE
void NotifyQt::notifyDownloadComplete(const std::string& fileHash)
{
{
QMutexLocker m(&_mutex) ;
if(!_enabled)
return ;
}
#ifdef NOTIFY_DEBUG
std::cerr << "Notifyqt::notifyDownloadComplete notified that a download is completed" << std::endl;
#endif
emit downloadComplete(QString::fromStdString(fileHash));
}
void NotifyQt::notifyDownloadCompleteCount(uint32_t count)
{
{
QMutexLocker m(&_mutex) ;
if(!_enabled)
return ;
}
std::cerr << "Notifyqt::notifyDownloadCompleteCount " << count << std::endl;
emit downloadCompleteCountChanged(count);
}
#endif
void NotifyQt::notifyDiskFull(uint32_t loc,uint32_t size_in_mb)
{
{
@ -379,23 +349,6 @@ void NotifyQt::notifyPeerStatusChangedSummary()
emit peerStatusChangedSummary();
}
#ifdef TO_REMOVE
void NotifyQt::notifyGxsChange(const RsGxsChanges& changes)
{
{
QMutexLocker m(&_mutex) ;
if(!_enabled)
return ;
}
#ifdef NOTIFY_DEBUG
std::cerr << "Notifyqt:: notified that gxs has changes" << std::endl;
#endif
emit gxsChange(changes);
}
#endif
void NotifyQt::notifyOwnStatusMessageChanged()
{
{
@ -539,35 +492,6 @@ void NotifyQt::notifyTurtleSearchResult(const RsPeerId& pid,uint32_t search_id,c
}
}
#ifdef TO_REMOVE
void NotifyQt::notifyHashingInfo(uint32_t type, const std::string& fileinfo)
{
QString info;
{
QMutexLocker m(&_mutex) ;
if(!_enabled)
return ;
}
switch (type) {
case NOTIFY_HASHTYPE_EXAMINING_FILES:
info = tr("Examining shared files...");
break;
case NOTIFY_HASHTYPE_FINISH:
break;
case NOTIFY_HASHTYPE_HASH_FILE:
info = tr("Hashing file") + " " + QString::fromUtf8(fileinfo.c_str());
break;
case NOTIFY_HASHTYPE_SAVE_FILE_INDEX:
info = tr("Saving file index...");
break;
}
emit hashingInfoChanged(info);
}
#endif
void NotifyQt::notifyHistoryChanged(uint32_t msgId, int type)
{
{

View File

@ -67,9 +67,6 @@ class NotifyQt: public QObject, public NotifyClient
virtual void notifyChatStatus(const ChatId &chat_id,const std::string& status_string);
virtual void notifyChatCleared(const ChatId &chat_id);
virtual void notifyCustomState(const std::string& peer_id, const std::string& status_string);
#ifdef TO_REMOVE
virtual void notifyHashingInfo(uint32_t type, const std::string& fileinfo);
#endif
virtual void notifyTurtleSearchResult(const RsPeerId &pid, uint32_t search_id, const std::list<TurtleFileInfo>& found_files);
virtual void notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleGxsInfo>& found_groups);
virtual void notifyPeerHasNewAvatar(std::string peer_id) ;
@ -87,10 +84,6 @@ class NotifyQt: public QObject, public NotifyClient
virtual void notifyHistoryChanged(uint32_t msgId, int type);
virtual void notifyDiscInfoChanged() ;
#ifdef TO_REMOVE
virtual void notifyDownloadComplete(const std::string& fileHash);
virtual void notifyDownloadCompleteCount(uint32_t count);
#endif
virtual bool askForPassword(const std::string& title, const std::string& key_details, bool prev_is_bad, std::string& password, bool &cancelled);
virtual bool askForPluginConfirmation(const std::string& plugin_filename, const std::string& plugin_file_hash,bool first_time);
@ -118,10 +111,6 @@ class NotifyQt: public QObject, public NotifyClient
void neighboursChanged() const ;
void messagesChanged() const ;
void messagesTagsChanged() const;
#ifdef REMOVE
void forumsChanged() const ; // use connect with Qt::QueuedConnection
void channelsChanged(int type) const ; // use connect with Qt::QueuedConnection
#endif
void configChanged() const ;
void logInfoChanged(const QString&) const ;
void chatStatusChanged(const ChatId&,const QString&) const ;
@ -136,17 +125,9 @@ class NotifyQt: public QObject, public NotifyClient
void peerStatusChanged(const QString& /* peer_id */, int /* status */);
void peerStatusChangedSummary() const;
void gxsChange(const RsGxsChanges& /* changes */);
#ifdef REMOVE
void publicChatChanged(int type) const ;
void privateChatChanged(int list, int type) const ;
#endif
void chatMessageReceived(ChatMessage msg);
void groupsChanged(int type) const ;
void discInfoChanged() const ;
#ifdef REMOVE
void forumMsgReadSatusChanged(const QString& forumId, const QString& msgId, int status);
void channelMsgReadSatusChanged(const QString& channelId, const QString& msgId, int status);
#endif
void historyChanged(uint msgId, int type);
void chatLobbyInviteReceived() ;
void deferredSignatureHandlingRequested() ;