summaryrefslogtreecommitdiff
path: root/net-p2p/retroshare
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-16 22:15:57 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-16 22:15:57 +0300
commit7c266409721d9b18f222880d0e01eacebb01c952 (patch)
treec324e298635317009048a5fff293f2381a8e896f /net-p2p/retroshare
parent23b02440204b922932e6979870fd3458cd119554 (diff)
retroshare: patch merged by upstream
Diffstat (limited to 'net-p2p/retroshare')
-rw-r--r--net-p2p/retroshare/files/keyring_bgcolors+potential_crash_fix.patch242
-rw-r--r--net-p2p/retroshare/retroshare-scm.ebuild1
2 files changed, 0 insertions, 243 deletions
diff --git a/net-p2p/retroshare/files/keyring_bgcolors+potential_crash_fix.patch b/net-p2p/retroshare/files/keyring_bgcolors+potential_crash_fix.patch
deleted file mode 100644
index a1f8a1b..0000000
--- a/net-p2p/retroshare/files/keyring_bgcolors+potential_crash_fix.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-diff --git a/retroshare-gui/src/gui/NetworkDialog.cpp b/retroshare-gui/src/gui/NetworkDialog.cpp
-index bc5ea3e06..e9e305ca8 100644
---- a/retroshare-gui/src/gui/NetworkDialog.cpp
-+++ b/retroshare-gui/src/gui/NetworkDialog.cpp
-@@ -58,18 +58,22 @@
- #define IMAGE_MESSAGE ":/images/mail_new.png"
-
- /* Images for Status icons */
--#define IMAGE_AUTHED ":/images/accepted16.png"
-+
-+//following defined in model
-+/*#define IMAGE_AUTHED ":/images/accepted16.png"
- #define IMAGE_DENIED ":/images/denied16.png"
--#define IMAGE_TRUSTED ":/images/rs-2.png"
-+#define IMAGE_TRUSTED ":/images/rs-2.png" */
-
- // Defines for key list columns
--#define COLUMN_CHECK 0
-+
-+//following defined in model
-+/*#define COLUMN_CHECK 0
- #define COLUMN_PEERNAME 1
- #define COLUMN_I_AUTH_PEER 2
- #define COLUMN_PEER_AUTH_ME 3
- #define COLUMN_PEERID 4
- #define COLUMN_LAST_USED 5
--#define COLUMN_COUNT 6
-+#define COLUMN_COUNT 6 */
-
- //RsPeerId getNeighRsCertId(QTreeWidgetItem *i);
-
-@@ -77,12 +81,13 @@
- * #define NET_DEBUG 1
- *****/
-
--static const unsigned int ROLE_SORT = Qt::UserRole + 1 ;
-+//static const unsigned int ROLE_SORT = Qt::UserRole + 1 ;
-
- /** Constructor */
- NetworkDialog::NetworkDialog(QWidget *parent)
- {
- /* Invoke the Qt Designer generated object setup routine */
-+ Q_UNUSED(parent);
- ui.setupUi(this);
-
- connect( ui.filterLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterItems(QString)));
-@@ -91,6 +96,7 @@ NetworkDialog::NetworkDialog(QWidget *parent)
-
- //list data model
- float f = QFontMetricsF(font()).height()/14.0 ;
-+
- PGPIdItemModel = new pgpid_item_model(neighs, f, this);
- PGPIdItemProxy = new pgpid_item_proxy(this);
- connect(ui.onlyTrustedKeys, SIGNAL(toggled(bool)), PGPIdItemProxy, SLOT(use_only_trusted_keys(bool)));
-@@ -105,11 +111,10 @@ NetworkDialog::NetworkDialog(QWidget *parent)
- ui.connectTreeWidget->setUpdatesEnabled(true);
- ui.connectTreeWidget->setSortingEnabled(true);
- ui.connectTreeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
-+ ui.connectTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
- connect(ui.connectTreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( connectTreeWidgetCostumPopupMenu( QPoint ) ) );
- connect(ui.connectTreeWidget, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(peerdetails()));
-
--
--
- /* Set header resize modes and initial section sizes */
- /* QHeaderView * _header = ui.connectTreeWidget->header () ;
- QHeaderView_setSectionResizeModeColumn(_header, COLUMN_CHECK, QHeaderView::Custom);
-@@ -122,8 +127,6 @@ NetworkDialog::NetworkDialog(QWidget *parent)
-
- ui.onlyTrustedKeys->setMinimumWidth(20*f);
-
--
--
- /* QMenu *menu = new QMenu();
- menu->addAction(ui.actionTabsright);
- menu->addAction(ui.actionTabswest);
-@@ -159,7 +162,9 @@ void NetworkDialog::connectTreeWidgetCostumPopupMenu( QPoint /*point*/ )
-
- QModelIndexList l = ui.connectTreeWidget->selectionModel()->selection().indexes();
- if(l.empty())
-+ {
- return;
-+ }
-
- QMenu *contextMnu = new QMenu;
-
-diff --git a/retroshare-gui/src/gui/NetworkDialog.h b/retroshare-gui/src/gui/NetworkDialog.h
-index 5c73c0a51..6f3851907 100644
---- a/retroshare-gui/src/gui/NetworkDialog.h
-+++ b/retroshare-gui/src/gui/NetworkDialog.h
-@@ -33,6 +33,7 @@ class QTreeWidgetItem;
-
- class RSTreeWidgetItemCompareRole ;
-
-+
- class NetworkDialog : public RsAutoUpdatePage
- {
- Q_OBJECT
-@@ -55,11 +56,11 @@ public:
- QColor backgroundColorHasSignedMe() const { return mBackgroundColorHasSignedMe; }
- QColor backgroundColorDenied() const { return mBackgroundColorDenied; }
-
-- void setBackgroundColorSelf(QColor color) { mBackgroundColorSelf = color; }
-- void setBackgroundColorOwnSign(QColor color) { mBackgroundColorOwnSign = color; }
-- void setBackgroundColorAcceptConnection(QColor color) { mBackgroundColorAcceptConnection = color; }
-- void setBackgroundColorHasSignedMe(QColor color) { mBackgroundColorHasSignedMe = color; }
-- void setBackgroundColorDenied(QColor color) { mBackgroundColorDenied = color; }
-+ void setBackgroundColorSelf(QColor color) { PGPIdItemModel->setBackgroundColorSelf(color); mBackgroundColorSelf = color; }
-+ void setBackgroundColorOwnSign(QColor color) { PGPIdItemModel->setBackgroundColorOwnSign(color); mBackgroundColorOwnSign = color; }
-+ void setBackgroundColorAcceptConnection(QColor color) { PGPIdItemModel->setBackgroundColorAcceptConnection(color); mBackgroundColorAcceptConnection = color; }
-+ void setBackgroundColorHasSignedMe(QColor color) { PGPIdItemModel->setBackgroundColorHasSignedMe(color); mBackgroundColorHasSignedMe = color; }
-+ void setBackgroundColorDenied(QColor color) { PGPIdItemModel->setBackgroundColorDenied(color); mBackgroundColorDenied = color; }
-
- private:
- // void insertConnect();
-diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp
-index 40c29fa4c..a4599414d 100644
---- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp
-+++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp
-@@ -2,10 +2,8 @@
- #include <time.h>
- #include <retroshare/rspeers.h>
- #include <QIcon>
-+#include <QBrush>
-
--#define IMAGE_AUTHED ":/images/accepted16.png"
--#define IMAGE_DENIED ":/images/denied16.png"
--#define IMAGE_TRUSTED ":/images/rs-2.png"
-
- /*TODO:
- * using list here for internal data storage is not best option
-@@ -151,6 +149,7 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const
- }
-
- }
-+ //we using editrole only where it is useful, for other data we use display, so no "else if" here
- if(role == Qt::DisplayRole || role == Qt::EditRole)
- {
- switch(index.column())
-@@ -261,23 +260,29 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const
- }
- else if(role == Qt::BackgroundRole)
- {
-- switch(index.column())
-- {
-- default:
-+ if (detail.accept_connection)
- {
-- //TODO: add access to bckground colors from networkdialog
-- if (detail.accept_connection)
-+ if (detail.ownsign)
- {
-- if (detail.ownsign)
-- ;
-+ return QBrush(mBackgroundColorOwnSign);
-+ }
-+ else
-+ {
-+ return QBrush(mBackgroundColorAcceptConnection);
- }
- }
-- break;
--
-+ else
-+ {
-+ if (detail.hasSignedMe)
-+ {
-+ return QBrush(mBackgroundColorHasSignedMe);
-+ }
-+ else
-+ {
-+ return QBrush(mBackgroundColorDenied);
-+ }
- }
- }
--
--
- return QVariant();
- }
-
-@@ -300,14 +305,14 @@ void pgpid_item_model::data_updated(std::list<RsPgpId> &new_neighs)
- //reflect actual row count in model
- if(old_size < new_size)
- {
-- beginInsertRows(QModelIndex(), old_size - 1, old_size - 1 + new_size - old_size);
-- insertRows(old_size - 1 , new_size - old_size);
-+ beginInsertRows(QModelIndex(), old_size, new_size);
-+ insertRows(old_size, new_size - old_size);
- endInsertRows();
- }
- else if(new_size < old_size)
- {
-- beginRemoveRows(QModelIndex(), new_size - 1, new_size - 1 + old_size - new_size);
-- removeRows(old_size - 1, old_size - new_size);
-+ beginRemoveRows(QModelIndex(), new_size, old_size);
-+ removeRows(old_size, old_size - new_size);
- endRemoveRows();
- }
- //update data in ui, to avoid unnecessary redraw and ui updates, updating only changed elements
-diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h
-index 8dc31d276..063c0bc38 100644
---- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h
-+++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h
-@@ -3,6 +3,12 @@
-
- #include <QAbstractItemModel>
- #include <retroshare/rspeers.h>
-+#include <QColor>
-+
-+#define IMAGE_AUTHED ":/images/accepted16.png"
-+#define IMAGE_DENIED ":/images/denied16.png"
-+#define IMAGE_TRUSTED ":/images/rs-2.png"
-+
-
- #define COLUMN_CHECK 0
- #define COLUMN_PEERNAME 1
-@@ -29,12 +35,24 @@ public:
-
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
-
-+ void setBackgroundColorSelf(QColor color) { mBackgroundColorSelf = color; }
-+ void setBackgroundColorOwnSign(QColor color) { mBackgroundColorOwnSign = color; }
-+ void setBackgroundColorAcceptConnection(QColor color) { mBackgroundColorAcceptConnection = color; }
-+ void setBackgroundColorHasSignedMe(QColor color) { mBackgroundColorHasSignedMe = color; }
-+ void setBackgroundColorDenied(QColor color) { mBackgroundColorDenied = color; }
-+
-+
- public slots:
- void data_updated(std::list<RsPgpId> &new_neighs);
-
- private:
- std::list<RsPgpId> &neighs;
-- float &font_height;
-+ float font_height;
-+ QColor mBackgroundColorSelf;
-+ QColor mBackgroundColorOwnSign;
-+ QColor mBackgroundColorAcceptConnection;
-+ QColor mBackgroundColorHasSignedMe;
-+ QColor mBackgroundColorDenied;
- };
-
- #endif // KEY_ITEM_MODEL_H
diff --git a/net-p2p/retroshare/retroshare-scm.ebuild b/net-p2p/retroshare/retroshare-scm.ebuild
index e70ffee..ac96b7b 100644
--- a/net-p2p/retroshare/retroshare-scm.ebuild
+++ b/net-p2p/retroshare/retroshare-scm.ebuild
@@ -83,7 +83,6 @@ PATCHES=(
"${FILESDIR}/hidden_service.patch"
"${FILESDIR}/cflags.patch"
"${FILESDIR}/disable_key_array_redraw.patch"
- "${FILESDIR}/keyring_bgcolors+potential_crash_fix.patch"
)