mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-15 00:28:58 -05:00
removed old calls to NotifyQt, and fixed missing initialization causing crash
This commit is contained in:
parent
daaa7985a3
commit
d7ff04c552
25 changed files with 9 additions and 85 deletions
|
|
@ -105,10 +105,6 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
|
|||
myInviteYesButton = NULL;
|
||||
myInviteIdChooser = NULL;
|
||||
|
||||
//QObject::connect( NotifyQt::getInstance(), SIGNAL(lobbyListChanged()), SLOT(lobbyChanged()));
|
||||
//QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyEvent(qulonglong,int,RsGxsId,QString)), this, SLOT(displayChatLobbyEvent(qulonglong,int,RsGxsId,QString)));
|
||||
//QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyInviteReceived()), this, SLOT(readChatLobbyInvites()));
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
RsQThreadUtils::postToObject([=](){
|
||||
|
|
|
|||
|
|
@ -1010,7 +1010,6 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
|||
connect(collViewAct,SIGNAL(triggered()),this,SLOT(collView()));
|
||||
collOpenAct = new QAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COLLOPEN), tr( "Download from collection file..." ), this );
|
||||
connect(collOpenAct, SIGNAL(triggered()), this, SLOT(collOpen()));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(downloadComplete(QString)), this, SLOT(collAutoOpen(QString)));
|
||||
|
||||
/** Setup the actions for the download header context menu */
|
||||
showDLSizeAct= new QAction(tr("Size"),this);
|
||||
|
|
@ -1115,6 +1114,10 @@ void TransfersDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> eve
|
|||
switch (fe->mFileTransferEventCode)
|
||||
{
|
||||
case RsFileTransferEventCode::DOWNLOAD_COMPLETE:
|
||||
collAutoOpen(fe->mHash);
|
||||
|
||||
[[fallthrough]];
|
||||
|
||||
case RsFileTransferEventCode::COMPLETED_FILES_REMOVED:
|
||||
|
||||
getUserNotify()->updateIcon();
|
||||
|
|
@ -2568,11 +2571,10 @@ void TransfersDialog::collOpen()
|
|||
QMessageBox::information(nullptr,tr("Error openning collection file"),RsCollection::errorString(code));
|
||||
}
|
||||
|
||||
void TransfersDialog::collAutoOpen(const QString &fileHash)
|
||||
void TransfersDialog::collAutoOpen(const RsFileHash& hash)
|
||||
{
|
||||
if (Settings->valueFromGroup("Transfer","AutoDLColl").toBool())
|
||||
{
|
||||
RsFileHash hash = RsFileHash(fileHash.toStdString());
|
||||
FileInfo info;
|
||||
if (rsFiles->FileDetails(hash, RS_FILE_HINTS_DOWNLOAD, info)) {
|
||||
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ private slots:
|
|||
void collModif();
|
||||
void collView();
|
||||
void collOpen();
|
||||
void collAutoOpen(const QString& fileHash);
|
||||
void collAutoOpen(const RsFileHash &hash);
|
||||
|
||||
void setShowDLSizeColumn(bool show);
|
||||
void setShowDLCompleteColumn(bool show);
|
||||
|
|
|
|||
|
|
@ -78,9 +78,6 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
|
|||
ui.chatWidget->setWelcomeMessage(msg);
|
||||
ui.chatWidget->init(ChatId::makeBroadcastId(), tr("Broadcast"));
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(chatMessageReceived(ChatMessage)), this, SLOT(chatMessageReceived(ChatMessage)));
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(chatStatusChanged(ChatId,QString)), this, SLOT(chatStatusReceived(ChatId,QString)));
|
||||
|
||||
mEventHandlerId_chat = 0;
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
|
|
|
|||
|
|
@ -345,9 +345,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
|
|||
/* intialize friend count */
|
||||
updateFriends();
|
||||
|
||||
// connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateFriends()));
|
||||
// connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateFriends()));
|
||||
|
||||
loadOwnStatus();
|
||||
|
||||
/* Set focus to the current page */
|
||||
|
|
|
|||
|
|
@ -95,9 +95,6 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WindowFlags flags)
|
|||
|
||||
connect(ui.messagelineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(savestatusmessage()));
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(ownStatusMessageChanged()), this, SLOT(loadmystatusmessage()));
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateOwnStatus(QString,int)));
|
||||
|
||||
mEventHandlerId = 0;
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -432,10 +432,6 @@ void NewsFeed::handleConnectionEvent(std::shared_ptr<const RsEvent> event)
|
|||
|
||||
auto& e(*pe);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NotifyQt: handling connection event from peer " << e.mSslId << std::endl;
|
||||
#endif
|
||||
|
||||
switch(e.mEventCode)
|
||||
{
|
||||
case RsFriendListEventCode::NODE_CONNECTED:
|
||||
|
|
@ -465,9 +461,6 @@ void NewsFeed::handleSecurityEvent(std::shared_ptr<const RsEvent> event)
|
|||
return;
|
||||
|
||||
auto& e(*pe);
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NotifyQt: handling security event from (" << e.mSslId << "," << e.mPgpId << ") error code: " << (int)e.mErrorCode << std::endl;
|
||||
#endif
|
||||
RsFeedTypeFlags flags = (RsFeedTypeFlags)Settings->getNewsFeedFlags();
|
||||
|
||||
if(e.mErrorCode == RsAuthSslError::PEER_REFUSED_CONNECTION && (!!(flags & RsFeedTypeFlags::RS_FEED_TYPE_SECURITY_IP)))
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ ShareManager::ShareManager()
|
|||
connect(ui.shareddirList, SIGNAL(cellDoubleClicked(int,int)), this, SLOT(doubleClickedCell(int,int)));
|
||||
connect(ui.shareddirList, SIGNAL(cellChanged(int,int)), this, SLOT(handleCellChange(int,int)));
|
||||
|
||||
// connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(reload()));
|
||||
|
||||
mEventHandlerId = 0;
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ static ChatUserNotify* instance = 0;
|
|||
ChatUserNotify::ChatUserNotify(QObject *parent) :
|
||||
UserNotify(parent)
|
||||
{
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(chatMessageReceived(ChatMessage)), this, SLOT(chatMessageReceived(ChatMessage)));
|
||||
instance = this;
|
||||
|
||||
mEventHandlerId = 0;
|
||||
|
|
|
|||
|
|
@ -174,8 +174,6 @@ ChatWidget::ChatWidget(QWidget *parent)
|
|||
|
||||
connect(ui->hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&, int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
|
||||
mEventHandlerId_friends = 0;
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
|
|
@ -201,7 +199,6 @@ ChatWidget::ChatWidget(QWidget *parent)
|
|||
}, this );
|
||||
},mEventHandlerId_friends,RsEventType::FRIEND_LIST);
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(peerHasNewCustomStateString(const QString&, const QString&)), this, SLOT(updatePeersCustomStateString(const QString&, const QString&)));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(chatFontChanged()), this, SLOT(resetFonts()));
|
||||
|
||||
connect(ui->textBrowser, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ PopupChatDialog::PopupChatDialog(QWidget *parent, Qt::WindowFlags flags)
|
|||
|
||||
connect(ui.avatarFrameButton, SIGNAL(toggled(bool)), this, SLOT(showAvatarFrame(bool)));
|
||||
connect(ui.actionClearOfflineMessages, SIGNAL(triggered()), this, SLOT(clearOfflineMessages()));
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(chatStatusChanged(ChatId,QString)), this, SLOT(chatStatusChanged(ChatId,QString)));
|
||||
|
||||
mEventHandlerId_chat =0;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,10 +48,6 @@ AvatarWidget::AvatarWidget(QWidget *parent) : QLabel(parent), ui(new Ui::AvatarW
|
|||
|
||||
setFrameType(NO_FRAME);
|
||||
|
||||
/* connect signals */
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(ownAvatarChanged()), this, SLOT(updateOwnAvatar()));
|
||||
|
||||
mEventHandlerId = 0;
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
||||
|
|
@ -137,22 +133,6 @@ void AvatarWidget::setFrameType(FrameType type)
|
|||
{
|
||||
mFrameType = type;
|
||||
|
||||
#ifdef TO_REMOVE
|
||||
switch (mFrameType) {
|
||||
case NO_FRAME:
|
||||
disconnect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
break;
|
||||
case NORMAL_FRAME:
|
||||
disconnect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
break;
|
||||
case STATUS_FRAME:
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//refreshAvatarImage();
|
||||
refreshStatus();
|
||||
RsApplication::refreshStyleSheet(this, false);
|
||||
|
|
|
|||
|
|
@ -101,9 +101,6 @@ FriendSelectionWidget::FriendSelectionWidget(QWidget *parent)
|
|||
connect(ui->friendList, SIGNAL(itemSelectionChanged()), this, SIGNAL(itemSelectionChanged()));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(groupsChanged(int)));
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&,int)), this, SLOT(peerStatusChanged(const QString&,int)));
|
||||
|
||||
mCompareRole = new RSTreeWidgetItemCompareRole;
|
||||
mActionSortByState = new QAction(tr("Sort by state"), this);
|
||||
mActionSortByState->setCheckable(true);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ GroupSelectionBox::GroupSelectionBox(QWidget *parent)
|
|||
{
|
||||
setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(fillGroups()));
|
||||
|
||||
mEventHandlerId = 0;
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
|
|
|
|||
|
|
@ -203,9 +203,6 @@ NewFriendList::NewFriendList(QWidget */*parent*/) : /* RsAutoUpdatePage(5000,par
|
|||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e) { handleEvent(e); }, mEventHandlerId_peer, RsEventType::FRIEND_LIST );
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e) { handleEvent(e); }, mEventHandlerId_gssp, RsEventType::GOSSIP_DISCOVERY );
|
||||
|
||||
// connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(QString)), this, SLOT(forceUpdateDisplay()));
|
||||
// connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(forceUpdateDisplay()));
|
||||
|
||||
mModel = new RsFriendListModel(ui->peerTreeWidget);
|
||||
mProxyModel = new FriendListSortFilterProxyModel(ui->peerTreeWidget->header(),this);
|
||||
|
||||
|
|
|
|||
|
|
@ -856,8 +856,6 @@ void ConnectFriendWizard::accept()
|
|||
ConnectProgressDialog::showProgress(ssl_id);
|
||||
}
|
||||
|
||||
//NotifyQt::getInstance()->notifyListChange(NOTIFY_LIST_NEIGHBOURS,1) ;
|
||||
|
||||
auto ev = std::make_shared<RsFriendListEvent>();
|
||||
ev->mEventCode = RsFriendListEventCode::NODE_ADDED;
|
||||
ev->mSslId = peerDetails.id;
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, const RsPeerId &peerId,
|
|||
connect( chatButton, SIGNAL( clicked() ), this, SLOT( openChat() ) );
|
||||
connect( sendmsgButton, SIGNAL( clicked() ), this, SLOT( sendMsg() ) );
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateItem()));
|
||||
|
||||
mEventHandlerId = 0;
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
|
|
|
|||
|
|
@ -73,8 +73,6 @@ SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const RsPgpId &g
|
|||
connect( peerDetailsButton, SIGNAL(clicked()), this, SLOT(peerDetails()));
|
||||
connect( friendRequesttoolButton, SIGNAL(clicked()), this, SLOT(friendRequest()));
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateItem()));
|
||||
|
||||
mEventHandlerId = 0;
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
|
|
|
|||
|
|
@ -102,8 +102,6 @@ ImHistoryBrowser::ImHistoryBrowser(const ChatId &chatId, QTextEdit *edit,const Q
|
|||
m_chatId = chatId;
|
||||
textEdit = edit;
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(historyChanged(uint, int)), this, SLOT(historyChanged(uint, int)));
|
||||
|
||||
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||
|
||||
connect(ui.copyButton, SIGNAL(clicked()), SLOT(copyMessage()));
|
||||
|
|
|
|||
|
|
@ -216,8 +216,6 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
|||
connect(ui.addBccButton, SIGNAL(clicked()), this, SLOT(addBcc()));
|
||||
connect(ui.addRecommendButton, SIGNAL(clicked()), this, SLOT(addRecommend()));
|
||||
|
||||
//connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(peerStatusChanged(QString,int)));
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e)
|
||||
{
|
||||
RsQThreadUtils::postToObject([=](){
|
||||
|
|
|
|||
|
|
@ -62,12 +62,12 @@
|
|||
* #define NOTIFY_DEBUG
|
||||
****/
|
||||
|
||||
/*static*/ NotifyQt *NotifyQt::_instance = NULL;
|
||||
/*static*/ NotifyQt *NotifyQt::_instance = nullptr;
|
||||
/*static*/ bool NotifyQt::_disableAllToaster = false;
|
||||
|
||||
/*static*/ NotifyQt *NotifyQt::Create ()
|
||||
{
|
||||
if (_instance == NULL) {
|
||||
if (_instance == nullptr) {
|
||||
_instance = new NotifyQt ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ class NotifyQt: public QObject
|
|||
void logInfoChanged(const QString&) const ;
|
||||
void chatCleared(const ChatId&) const ;
|
||||
void historyChanged(uint msgId, int type);
|
||||
void connectionWithoutCert();
|
||||
|
||||
/* Notify from GUI */
|
||||
void chatFontChanged();
|
||||
|
|
|
|||
|
|
@ -201,8 +201,6 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
QObject::connect(ui.hiddenpage_proxyAddress_i2p, SIGNAL(textChanged(QString)), this, SLOT(syncI2PProxyAddrNormal(QString)));
|
||||
QObject::connect(ui.hiddenpage_proxyAddress_i2p_2, SIGNAL(textChanged(QString)), this, SLOT(syncI2PProxyAddrSam(QString)));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(connectionWithoutCert()), this, SLOT(connectionWithoutCert()));
|
||||
|
||||
QObject::connect(ui.localPort,SIGNAL(valueChanged(int)),this,SLOT(saveAddresses()));
|
||||
QObject::connect(ui.extPort,SIGNAL(valueChanged(int)),this,SLOT(saveAddresses()));
|
||||
|
||||
|
|
@ -1670,14 +1668,6 @@ void ServerPage::taskFinished(taskTicket *&ticket)
|
|||
#endif //RS_USE_I2P_SAM3
|
||||
}
|
||||
|
||||
void ServerPage::connectionWithoutCert()
|
||||
{
|
||||
if (mOngoingConnectivityCheck > 0) {
|
||||
mOngoingConnectivityCheck = -1;
|
||||
updateInProxyIndicatorResult(true);
|
||||
}
|
||||
}
|
||||
|
||||
void ServerPage::loadCommon()
|
||||
{
|
||||
/* HIDDEN PAGE SETTINGS - only Proxy (outgoing) */
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@ private slots:
|
|||
void syncI2PProxyAddrNormal(QString);
|
||||
void syncI2PProxyAddrSam(QString);
|
||||
|
||||
void connectionWithoutCert();
|
||||
|
||||
//Relay Tab
|
||||
void updateRelayOptions();
|
||||
void updateEnabled();
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||
//
|
||||
RsControl::earlyInitNotificationSystem() ;
|
||||
|
||||
//NotifyQt *notify = NotifyQt::Create();
|
||||
NotifyQt *notify = NotifyQt::Create();
|
||||
//rsNotify->registerNotifyClient(notify);
|
||||
|
||||
/* RetroShare Core Objects */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue