diff --git a/retroshare-gui/src/gui/ChatLobbyWidget.cpp b/retroshare-gui/src/gui/ChatLobbyWidget.cpp index 9682bc4c5..f882e29d2 100644 --- a/retroshare-gui/src/gui/ChatLobbyWidget.cpp +++ b/retroshare-gui/src/gui/ChatLobbyWidget.cpp @@ -170,7 +170,10 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags) publicLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC); ui.lobbyTreeWidget->insertTopLevelItem(3, publicLobbyItem); - ui.lobbyTreeWidget->expandAll(); + ui.lobbyTreeWidget->expandItem(privateSubLobbyItem); + ui.lobbyTreeWidget->expandItem(publicSubLobbyItem); + ui.lobbyTreeWidget->expandItem(privateLobbyItem); + // ui.lobbyTreeWidget->expandItem(publicLobbyItem); ui.lobbyTreeWidget->setColumnHidden(COLUMN_NAME,false) ; ui.lobbyTreeWidget->setColumnHidden(COLUMN_USER_COUNT,true) ; ui.lobbyTreeWidget->setColumnHidden(COLUMN_TOPIC,true) ; diff --git a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp index 8978ccf71..e82e21cd2 100644 --- a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp @@ -140,6 +140,9 @@ class ShareFlagsItemDelegate: public QStyledItemDelegate { public: ShareFlagsItemDelegate() {} + /** Default Destructor */ + ~ShareFlagsItemDelegate() {} + virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { diff --git a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp index 3ee120162..888a5c3a5 100644 --- a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp @@ -1144,6 +1144,9 @@ TransfersDialog::~TransfersDialog() delete ULDelegate; delete DLDelegate; + delete ULListModel; + delete DLListModel; + delete DLLFilterModel; } void TransfersDialog::activatePage(TransfersDialog::Page page) diff --git a/retroshare-gui/src/gui/HomePage.cpp b/retroshare-gui/src/gui/HomePage.cpp index ff7622b4b..b91b729d5 100644 --- a/retroshare-gui/src/gui/HomePage.cpp +++ b/retroshare-gui/src/gui/HomePage.cpp @@ -202,6 +202,7 @@ void HomePage::certContextMenu(QPoint /*point*/) HomePage::~HomePage() { rsEvents->unregisterEventsHandler(mEventHandlerId); + delete ui->shareButton->menu(); delete ui; } diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index 032acaa2d..5d44b4a44 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -1239,6 +1239,11 @@ IdDialog::~IdDialog() { rsEvents->unregisterEventsHandler(mEventHandlerId_identity); rsEvents->unregisterEventsHandler(mEventHandlerId_circles); + delete ui->idTreeWidget->itemDelegateForColumn(RSID_COL_NICKNAME); + delete ui->idTreeWidget->itemDelegateForColumn(RSID_COL_VOTES); + delete ui->idTreeWidget->itemDelegate(); + delete ui->treeWidget_membership->itemDelegateForColumn(CIRCLEGROUP_CIRCLE_COL_GROUPNAME); + delete ui->toolButton_New->menu(); // save settings processSettings(false); diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index b1e4b1e69..feef97ed7 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -389,6 +389,7 @@ MainWindow::~MainWindow() MacDockIconHandler::cleanup(); #endif // delete notifyMenu; // already deleted by the deletion of trayMenu + delete idle; StatisticsWindow::releaseInstance(); #ifdef MESSENGER_WINDOW @@ -1638,8 +1639,28 @@ void MainWindow::settingsChanged() ui->toolBarPage->setIconSize(QSize(toolSize,toolSize)); ui->toolBarAction->setToolButtonStyle(Settings->getToolButtonStyle()); ui->toolBarAction->setIconSize(QSize(toolSize,toolSize)); - int itemSize = Settings->getListItemIconSize(); - ui->listWidget->setIconSize(QSize(itemSize,itemSize)); + switch (Settings->RshareSettings::getToolButtonStyle()) + { + case Qt::ToolButtonTextOnly: + for (int i = 0; i < ui->listWidget->count(); ++i) + { + // annihilate icons + ui->listWidget->item(i)->setIcon(QIcon()); + } + break; + default: + QList pages = ui->stackPages->pages(); + int count = 0; + for (QList::iterator i = pages.begin(); i != pages.end(); ++i) { + ui->listWidget->item(count++)->setIcon((*i)->iconPixmap()); + } + // because 'exit' isn't a 'page', but only 'action' + ui->listWidget->item(count)->setIcon(QIcon(IMAGE_QUIT)) ; + + int itemSize = Settings->getListItemIconSize(); + ui->listWidget->setIconSize(QSize(itemSize,itemSize)); + break; + } } void MainWindow::externalLinkActivated(const QUrl &url) diff --git a/retroshare-gui/src/gui/NewsFeed.cpp b/retroshare-gui/src/gui/NewsFeed.cpp index dc0834e71..b6905efe3 100644 --- a/retroshare-gui/src/gui/NewsFeed.cpp +++ b/retroshare-gui/src/gui/NewsFeed.cpp @@ -146,6 +146,7 @@ NewsFeed::~NewsFeed() if (instance == this) { instance = NULL; + delete ui; } } diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp index 3b92883e8..62834fb3e 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "ChatLobbyDialog.h" @@ -98,6 +99,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi distantChatAct = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/chats.png"), tr("Start private chat"), this); sendMessageAct = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/mail/write-mail.png"), tr("Send Message"), this); showInPeopleAct = new QAction(QIcon(), tr("Show author in people tab"), this); + copyIdAct = new QAction(QIcon(), tr("Copy ID to clipboard"), this); QActionGroup *sortgrp = new QActionGroup(this); actionSortByName = new QAction(QIcon(), tr("Sort by Name"), this); @@ -118,6 +120,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi connect(voteNeutralAct, SIGNAL(triggered()), this, SLOT(voteParticipant())); connect(voteNegativeAct, SIGNAL(triggered()), this, SLOT(voteParticipant())); connect(showInPeopleAct, SIGNAL(triggered()), this, SLOT(showInPeopleTab())); + connect(copyIdAct, SIGNAL(triggered()), this, SLOT(copyId())); connect(actionSortByName, SIGNAL(triggered()), this, SLOT(sortParcipants())); connect(actionSortByActivity, SIGNAL(triggered()), this, SLOT(sortParcipants())); @@ -290,6 +293,7 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QListaddAction(voteNeutralAct); contextMnu->addAction(voteNegativeAct); contextMnu->addAction(showInPeopleAct); + contextMnu->addAction(copyIdAct); distantChatAct->setEnabled(false); sendMessageAct->setEnabled(false); @@ -300,6 +304,7 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QListsetEnabled(false); voteNegativeAct->setEnabled(false); showInPeopleAct->setEnabled(idList.count() == 1); + copyIdAct->setEnabled(idList.count() == 1); distantChatAct->setData(QVariant::fromValue(idList)); sendMessageAct->setData(QVariant::fromValue(idList)); @@ -311,6 +316,19 @@ void ChatLobbyDialog::initParticipantsContextMenu(QMenu *contextMnu, QListsetData(QString::fromStdString(gxsid.toStdString())); + + if (!gxsid.isNull() && rsIdentity->isOwnId(gxsid)) + { + distantChatAct->setVisible(false); + sendMessageAct->setVisible(false); + muteAct->setVisible(false); + votePositiveAct->setVisible(false); + voteNeutralAct->setVisible(false); + voteNegativeAct->setVisible(false); + } + if(!gxsid.isNull() && !rsIdentity->isOwnId(gxsid)) { distantChatAct->setEnabled(true); @@ -379,6 +397,13 @@ void ChatLobbyDialog::showInPeopleTab() idDialog->navigate(nickname); } +void ChatLobbyDialog::copyId() +{ + QAction* the_action = qobject_cast(sender()); + if (the_action) + QApplication::clipboard()->setText(the_action->data().toString()) ; +} + void ChatLobbyDialog::init(const ChatId &/*id*/, const QString &/*title*/) { ChatLobbyInfo linfo ; @@ -444,6 +469,7 @@ ChatLobbyDialog::~ChatLobbyDialog() // save settings processSettings(false); + delete mParticipantCompareRole; } ChatWidget *ChatLobbyDialog::getChatWidget() diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.h b/retroshare-gui/src/gui/chat/ChatLobbyDialog.h index 065abacee..05e1bd7e4 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.h +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.h @@ -62,6 +62,7 @@ private slots: void inviteFriends() ; void filterChanged(const QString &text); void showInPeopleTab(); + void copyId(); void toggleWindowed(){setWindowed(!isWindowed());} void setWindowed(bool windowed); @@ -131,6 +132,7 @@ private: QWidgetAction *checkableAction; QAction *sendMessageAct; QAction *showInPeopleAct; + QAction *copyIdAct; GxsIdChooser *ownIdChooser ; //icons cache diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index abab8336a..bb5acf734 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -259,6 +259,8 @@ ChatWidget::~ChatWidget() foreach (ChatWidgetHolder *chatWidgetHolder, mChatWidgetHolder) { delete(chatWidgetHolder); } + delete ui->fontcolorButton->menu(); + delete ui->pushtoolsButton->menu(); delete ui; } diff --git a/retroshare-gui/src/gui/chat/ChatWidget.ui b/retroshare-gui/src/gui/chat/ChatWidget.ui index 39bd84bb7..6e518458b 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.ui +++ b/retroshare-gui/src/gui/chat/ChatWidget.ui @@ -894,6 +894,12 @@ border-image: url(:/images/closepressed.png) + + + 16777215 + 78 + + true diff --git a/retroshare-gui/src/gui/common/GroupTreeWidget.cpp b/retroshare-gui/src/gui/common/GroupTreeWidget.cpp index 0597a652c..e4c315f9d 100644 --- a/retroshare-gui/src/gui/common/GroupTreeWidget.cpp +++ b/retroshare-gui/src/gui/common/GroupTreeWidget.cpp @@ -153,6 +153,8 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) : GroupTreeWidget::~GroupTreeWidget() { + delete compareRole; + delete ui->treeWidget->itemDelegate(); delete ui; } diff --git a/retroshare-gui/src/gui/common/GroupTreeWidget.ui b/retroshare-gui/src/gui/common/GroupTreeWidget.ui index 10b5eb48b..6eb495122 100644 --- a/retroshare-gui/src/gui/common/GroupTreeWidget.ui +++ b/retroshare-gui/src/gui/common/GroupTreeWidget.ui @@ -10,6 +10,12 @@ 257 + + + 0 + 0 + + 2 diff --git a/retroshare-gui/src/gui/common/LineEditClear.cpp b/retroshare-gui/src/gui/common/LineEditClear.cpp index a6ba67bfa..b2fa7cd65 100644 --- a/retroshare-gui/src/gui/common/LineEditClear.cpp +++ b/retroshare-gui/src/gui/common/LineEditClear.cpp @@ -68,6 +68,14 @@ LineEditClear::LineEditClear(QWidget *parent) qMax(msz.height(), mClearButton->sizeHint().height() + frameWidth * 2)); } +LineEditClear::~LineEditClear() +{ + delete (mFilterButton ? mFilterButton->menu() : nullptr); + delete mClearButton; + delete mFilterButton; + delete mActionGroup; +} + void LineEditClear::resizeEvent(QResizeEvent *) { QSize sz = mClearButton->sizeHint(); diff --git a/retroshare-gui/src/gui/common/LineEditClear.h b/retroshare-gui/src/gui/common/LineEditClear.h index ae30f6127..596123c98 100644 --- a/retroshare-gui/src/gui/common/LineEditClear.h +++ b/retroshare-gui/src/gui/common/LineEditClear.h @@ -37,6 +37,7 @@ class LineEditClear : public QLineEdit public: LineEditClear(QWidget *parent = 0); + ~LineEditClear(); void addFilter(const QIcon &icon, const QString &text, int id, const QString &description = ""); void setCurrentFilter(int id); diff --git a/retroshare-gui/src/gui/common/NewFriendList.cpp b/retroshare-gui/src/gui/common/NewFriendList.cpp index 6acb8da9a..a239b37d9 100644 --- a/retroshare-gui/src/gui/common/NewFriendList.cpp +++ b/retroshare-gui/src/gui/common/NewFriendList.cpp @@ -1026,6 +1026,15 @@ void NewFriendList::removeProfile() if ((QMessageBox::question(this, "RetroShare", tr("Do you want to remove this Friend?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes) rsPeers->removeFriend(det.gpg_id); + QModelIndex index_to_remove = ui->peerTreeWidget->selectionModel()->selectedIndexes().first(); + // could be only one selected item + ui->peerTreeWidget->selectionModel()->select(index_to_remove, QItemSelectionModel::Clear); + // otherwise already at top + QModelIndex index_to_select = ui->peerTreeWidget->indexAbove(index_to_remove); + if (index_to_select.isValid()) { + ui->peerTreeWidget->selectionModel()->select(index_to_select, QItemSelectionModel::Select | QItemSelectionModel::Rows); + } + checkInternalData(true); } diff --git a/retroshare-gui/src/gui/common/RSComboBox.cpp b/retroshare-gui/src/gui/common/RSComboBox.cpp index e11a3c99d..993e86fbe 100644 --- a/retroshare-gui/src/gui/common/RSComboBox.cpp +++ b/retroshare-gui/src/gui/common/RSComboBox.cpp @@ -33,6 +33,11 @@ RSComboBox::RSComboBox(QWidget *parent /*= nullptr*/) view()->installEventFilter(this); } +RSComboBox::~RSComboBox() +{ + delete this->itemDelegate(); +} + bool RSComboBox::eventFilter(QObject *obj, QEvent *event) { if(QAbstractItemView* view = dynamic_cast(obj)) diff --git a/retroshare-gui/src/gui/common/RSComboBox.h b/retroshare-gui/src/gui/common/RSComboBox.h index 8ce46a649..21e9eb37f 100644 --- a/retroshare-gui/src/gui/common/RSComboBox.h +++ b/retroshare-gui/src/gui/common/RSComboBox.h @@ -28,6 +28,7 @@ class RSComboBox : public QComboBox Q_OBJECT public: explicit RSComboBox(QWidget *parent = nullptr); + ~RSComboBox(); protected: bool eventFilter(QObject *obj, QEvent *event); diff --git a/retroshare-gui/src/gui/common/RSGraphWidget.cpp b/retroshare-gui/src/gui/common/RSGraphWidget.cpp index dab0645c4..48f22638d 100644 --- a/retroshare-gui/src/gui/common/RSGraphWidget.cpp +++ b/retroshare-gui/src/gui/common/RSGraphWidget.cpp @@ -301,6 +301,8 @@ RSGraphWidget::~RSGraphWidget() { delete _painter; delete _source ; + _timer->stop(); + delete _timer; } void RSGraphWidget::setFiltering(bool b) diff --git a/retroshare-gui/src/gui/common/RSImageBlockWidget.cpp b/retroshare-gui/src/gui/common/RSImageBlockWidget.cpp index 63dd224f1..01ba310a2 100644 --- a/retroshare-gui/src/gui/common/RSImageBlockWidget.cpp +++ b/retroshare-gui/src/gui/common/RSImageBlockWidget.cpp @@ -47,6 +47,7 @@ RSImageBlockWidget::~RSImageBlockWidget() delete mAnimation; mTimer->stop(); delete mTimer; + delete ui->loadImagesButton->menu(); delete ui; } diff --git a/retroshare-gui/src/gui/common/UserNotify.cpp b/retroshare-gui/src/gui/common/UserNotify.cpp index f712f4822..be669167d 100644 --- a/retroshare-gui/src/gui/common/UserNotify.cpp +++ b/retroshare-gui/src/gui/common/UserNotify.cpp @@ -179,7 +179,12 @@ void UserNotify::update() } if (mListItem) { - mListItem->setIcon(getMainIcon(count > 0)); + switch (Settings->RshareSettings::getToolButtonStyle()) { + case Qt::ToolButtonTextOnly: + break; + default: + mListItem->setIcon(getMainIcon(count > 0)); + } mListItem->setText((count > 0) ? QString("%1 (%2)").arg(mButtonText).arg(count) : mButtonText); QFont font = mListItem->font(); diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 11d04fdd8..2ca8ee4f4 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -97,6 +97,7 @@ class DistributionItemDelegate: public QStyledItemDelegate { public: DistributionItemDelegate() {} + ~DistributionItemDelegate() {} virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override { @@ -435,6 +436,10 @@ GxsForumThreadWidget::~GxsForumThreadWidget() // save settings processSettings(false); + delete ui->threadTreeWidget->itemDelegateForColumn(RsGxsForumModel::COLUMN_THREAD_DISTRIBUTION) ; + delete ui->threadTreeWidget->itemDelegateForColumn(RsGxsForumModel::COLUMN_THREAD_AUTHOR) ; + delete ui->threadTreeWidget->itemDelegateForColumn(RsGxsForumModel::COLUMN_THREAD_READ) ; + delete ui->threadTreeWidget->model(); delete ui; } @@ -925,6 +930,12 @@ void GxsForumThreadWidget::changedThread(QModelIndex index) #endif markMsgAsReadUnread(true, false, false); } + + if (Settings->getForumExpandNewMessages()) + { + recursExpandUnread(index); + } + } void GxsForumThreadWidget::clickedThread(QModelIndex index) @@ -1314,7 +1325,7 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg) else { RsIdentityDetails details; rsIdentity->getIdDetails(msg.mMeta.mAuthorId, details); - QString name = GxsIdDetails::getName(details); + QString name = QString::fromUtf8(details.mNickname.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE); banned_text_info += "

" + tr( "The author of this message (with ID %1) is banned. And named by name ( %2 )").arg(QString::fromStdString(msg.mMeta.mAuthorId.toStdString()), name) + ""; banned_text_info += "

  • " + tr( "Messages from this author are not forwarded.") + "
"; @@ -2099,3 +2110,16 @@ void GxsForumThreadWidget::showAuthorInPeople(const RsGxsForumMsg& msg) MainWindow::showWindow(MainWindow::People); idDialog->navigate(RsGxsId(msg.mMeta.mAuthorId)); } + +void GxsForumThreadWidget::recursExpandUnread(const QModelIndex &index) +{ + if (index.isValid() + && index.data(RsGxsForumModel::UnreadChildrenRole).toBool() + ) { + ui->threadTreeWidget->expand(index); + for (int row=0; row < mThreadProxyModel->rowCount(index); ++row) + { + recursExpandUnread(index.child(row, 0)); + } + } +} diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h index 322c64fae..135a56842 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h @@ -200,6 +200,7 @@ private: void setForumDescriptionLoading(); void clearForumDescription(); void blankPost(); + void recursExpandUnread(const QModelIndex &index); RsGxsGroupId mLastForumID; RsGxsMessageId mThreadId; diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui index 439234047..88cabf1ee 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui @@ -474,7 +474,11 @@
- + + + QComboBox::AdjustToContents + + diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.cpp b/retroshare-gui/src/gui/msgs/MessageWidget.cpp index 0d2e934f2..19da8f11a 100644 --- a/retroshare-gui/src/gui/msgs/MessageWidget.cpp +++ b/retroshare-gui/src/gui/msgs/MessageWidget.cpp @@ -223,6 +223,7 @@ MessageWidget::~MessageWidget() } rsEvents->unregisterEventsHandler(mEventHandlerId); + delete ui.moreButton->menu(); } void MessageWidget::handleEvent_main_thread(std::shared_ptr event) diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp index 85611b585..c6537fd5b 100644 --- a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp @@ -415,6 +415,7 @@ MessagesDialog::~MessagesDialog() rsEvents->unregisterEventsHandler(mEventHandlerId); rsEvents->unregisterEventsHandler(mTagEventHandlerId); + delete ui.messageTreeWidget->itemDelegateForColumn(RsMessageModel::COLUMN_THREAD_AUTHOR) ; } UserNotify *MessagesDialog::createUserNotify(QObject *parent) diff --git a/retroshare-gui/src/gui/settings/PostedPage.cpp b/retroshare-gui/src/gui/settings/PostedPage.cpp index f4c178705..acf1e95fd 100644 --- a/retroshare-gui/src/gui/settings/PostedPage.cpp +++ b/retroshare-gui/src/gui/settings/PostedPage.cpp @@ -36,6 +36,7 @@ PostedPage::PostedPage(QWidget * parent, Qt::WindowFlags flags) PostedPage::~PostedPage() { + delete ui; } /** Loads the settings for this page */ diff --git a/retroshare-gui/src/gui/statistics/BwCtrlWindow.cpp b/retroshare-gui/src/gui/statistics/BwCtrlWindow.cpp index 44f606318..d65862a24 100644 --- a/retroshare-gui/src/gui/statistics/BwCtrlWindow.cpp +++ b/retroshare-gui/src/gui/statistics/BwCtrlWindow.cpp @@ -197,6 +197,7 @@ BwCtrlWindow::BwCtrlWindow(QWidget *parent) BwCtrlWindow::~BwCtrlWindow() { + delete BWDelegate; } void BwCtrlWindow::updateDisplay() diff --git a/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp b/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp index 48b1462cc..34cfc87a9 100644 --- a/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp +++ b/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp @@ -59,6 +59,7 @@ #define IMAGE_BWGRAPH ":/icons/bandwidth128.png" #define IMAGE_GLOBALROUTER ":/icons/GRouter128.png" #define IMAGE_GXSTRANSPORT ":/icons/transport128.png" +#define IMAGE_QUIT ":/icons/png/exit.png" #define IMAGE_RTT ":/icons/RTT128.png" //#define IMAGE_BANDWIDTH ":images/office-chart-area-stacked.png" @@ -97,6 +98,7 @@ StatisticsWindow::StatisticsWindow(QWidget *parent) : ui(new Ui::StatisticsWindow) { ui->setupUi(this); + // setAttribute(Qt::WA_DeleteOnClose, true); Settings->loadWidgetInformation(this); @@ -200,6 +202,9 @@ void StatisticsWindow::initStackedPage() /* Create the toolbar */ ui->toolBar->addActions(grp->actions()); + // commented out per cyril taste + // action = ui->toolBar->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_QUIT), tr("Quit")); + // connect(action, &QAction::triggered, this, &StatisticsWindow::close); connect(grp, SIGNAL(triggered(QAction *)), ui->stackPages, SLOT(showPage(QAction *))); diff --git a/retroshare-gui/src/util/HandleRichText.cpp b/retroshare-gui/src/util/HandleRichText.cpp index 6f6eec750..65805e2d3 100644 --- a/retroshare-gui/src/util/HandleRichText.cpp +++ b/retroshare-gui/src/util/HandleRichText.cpp @@ -1210,7 +1210,7 @@ QString RsHtml::toHtml(QString text, bool realHtml) /** Loads image and converts image to embedded image HTML fragment **/ bool RsHtml::makeEmbeddedImage(const QString &fileName, QString &embeddedImage, const int maxPixels, const int maxBytes) { - QImage image; + QImage image {}; if (image.load (fileName) == false) { fprintf (stderr, "RsHtml::makeEmbeddedImage() - image \"%s\" can't be load\n", fileName.toLatin1().constData());