summaryrefslogtreecommitdiff
path: root/net-p2p
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-16 10:16:28 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-16 10:16:28 +0300
commit23b02440204b922932e6979870fd3458cd119554 (patch)
tree80ede3e8d16ce1d155dccf2675d923b68f305429 /net-p2p
parent9004b11bb07a5db3bcc82211a9003fb0ffbb5b1d (diff)
mpv: fortunately mpv team games with ffmpeg ended
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/retroshare/files/keyring_bgcolors+potential_crash_fix.patch128
1 files changed, 50 insertions, 78 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
index 4b143bf..a1f8a1b 100644
--- a/net-p2p/retroshare/files/keyring_bgcolors+potential_crash_fix.patch
+++ b/net-p2p/retroshare/files/keyring_bgcolors+potential_crash_fix.patch
@@ -1,28 +1,5 @@
-diff --git a/RetroShare.pro b/RetroShare.pro
-index 833173029..dba75453e 100644
---- a/RetroShare.pro
-+++ b/RetroShare.pro
-@@ -56,12 +56,12 @@ retroshare_qml_app {
- }
- }
-
--retroshare_plugins {
-- SUBDIRS += plugins
-- plugins.file = plugins/plugins.pro
-- plugins.depends = retroshare_gui
-- plugins.target = plugins
--}
-+#retroshare_plugins {
-+# SUBDIRS += plugins
-+# plugins.file = plugins/plugins.pro
-+# plugins.depends = retroshare_gui
-+# plugins.target = plugins
-+#}
-
- wikipoos {
- SUBDIRS += pegmarkdown
diff --git a/retroshare-gui/src/gui/NetworkDialog.cpp b/retroshare-gui/src/gui/NetworkDialog.cpp
-index bc5ea3e06..50a2afcdd 100644
+index bc5ea3e06..e9e305ca8 100644
--- a/retroshare-gui/src/gui/NetworkDialog.cpp
+++ b/retroshare-gui/src/gui/NetworkDialog.cpp
@@ -58,18 +58,22 @@
@@ -67,19 +44,15 @@ index bc5ea3e06..50a2afcdd 100644
ui.setupUi(this);
connect( ui.filterLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterItems(QString)));
-@@ -91,7 +96,10 @@ NetworkDialog::NetworkDialog(QWidget *parent)
+@@ -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);
+
-+ bg_colors colors = bg_colors(mBackgroundColorSelf, mBackgroundColorOwnSign, mBackgroundColorAcceptConnection, mBackgroundColorHasSignedMe, mBackgroundColorHasSignedMe);
-+
-+ PGPIdItemModel = new pgpid_item_model(neighs, f, colors, this);
+ 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)));
- PGPIdItemProxy->setSourceModel(PGPIdItemModel);
-@@ -105,11 +113,10 @@ NetworkDialog::NetworkDialog(QWidget *parent)
+@@ -105,11 +111,10 @@ NetworkDialog::NetworkDialog(QWidget *parent)
ui.connectTreeWidget->setUpdatesEnabled(true);
ui.connectTreeWidget->setSortingEnabled(true);
ui.connectTreeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
@@ -92,16 +65,16 @@ index bc5ea3e06..50a2afcdd 100644
/* Set header resize modes and initial section sizes */
/* QHeaderView * _header = ui.connectTreeWidget->header () ;
QHeaderView_setSectionResizeModeColumn(_header, COLUMN_CHECK, QHeaderView::Custom);
-@@ -122,7 +129,7 @@ NetworkDialog::NetworkDialog(QWidget *parent)
+@@ -122,8 +127,6 @@ NetworkDialog::NetworkDialog(QWidget *parent)
ui.onlyTrustedKeys->setMinimumWidth(20*f);
-
-+backgroundColorDenied();
-
+-
/* QMenu *menu = new QMenu();
menu->addAction(ui.actionTabsright);
-@@ -159,7 +166,9 @@ void NetworkDialog::connectTreeWidgetCostumPopupMenu( QPoint /*point*/ )
+ menu->addAction(ui.actionTabswest);
+@@ -159,7 +162,9 @@ void NetworkDialog::connectTreeWidgetCostumPopupMenu( QPoint /*point*/ )
QModelIndexList l = ui.connectTreeWidget->selectionModel()->selection().indexes();
if(l.empty())
@@ -112,7 +85,7 @@ index bc5ea3e06..50a2afcdd 100644
QMenu *contextMnu = new QMenu;
diff --git a/retroshare-gui/src/gui/NetworkDialog.h b/retroshare-gui/src/gui/NetworkDialog.h
-index 5c73c0a51..0dcdb18b8 100644
+index 5c73c0a51..6f3851907 100644
--- a/retroshare-gui/src/gui/NetworkDialog.h
+++ b/retroshare-gui/src/gui/NetworkDialog.h
@@ -33,6 +33,7 @@ class QTreeWidgetItem;
@@ -123,11 +96,28 @@ index 5c73c0a51..0dcdb18b8 100644
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..3b16dc57e 100644
+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,16 +2,14 @@
+@@ -2,10 +2,8 @@
#include <time.h>
#include <retroshare/rspeers.h>
#include <QIcon>
@@ -139,14 +129,6 @@ index 40c29fa4c..3b16dc57e 100644
/*TODO:
* using list here for internal data storage is not best option
- */
--pgpid_item_model::pgpid_item_model(std::list<RsPgpId> &neighs_, float &_font_height, QObject *parent)
-- : QAbstractTableModel(parent), neighs(neighs_), font_height(_font_height)
-+pgpid_item_model::pgpid_item_model(std::list<RsPgpId> &neighs_, float &_font_height, bg_colors &__bg_colors, QObject *parent)
-+ : QAbstractTableModel(parent), neighs(neighs_), font_height(_font_height), _bg_colors(__bg_colors)
- {
- }
-
@@ -151,6 +149,7 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const
}
@@ -170,11 +152,11 @@ index 40c29fa4c..3b16dc57e 100644
{
- if (detail.ownsign)
- ;
-+ return QBrush(_bg_colors.mBackgroundColorOwnSign);
++ return QBrush(mBackgroundColorOwnSign);
+ }
+ else
+ {
-+ return QBrush(_bg_colors.mBackgroundColorAcceptConnection);
++ return QBrush(mBackgroundColorAcceptConnection);
}
}
- break;
@@ -183,11 +165,11 @@ index 40c29fa4c..3b16dc57e 100644
+ {
+ if (detail.hasSignedMe)
+ {
-+ return QBrush(_bg_colors.mBackgroundColorHasSignedMe);
++ return QBrush(mBackgroundColorHasSignedMe);
+ }
+ else
+ {
-+ return QBrush(_bg_colors.mBackgroundColorDenied);
++ return QBrush(mBackgroundColorDenied);
+ }
}
}
@@ -216,7 +198,7 @@ index 40c29fa4c..3b16dc57e 100644
}
//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..d4c78c56a 100644
+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 @@
@@ -232,39 +214,29 @@ index 8dc31d276..d4c78c56a 100644
#define COLUMN_CHECK 0
#define COLUMN_PEERNAME 1
-@@ -12,13 +18,26 @@
- #define COLUMN_LAST_USED 5
- #define COLUMN_COUNT 6
+@@ -29,12 +35,24 @@ public:
+
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
-+struct bg_colors {
-+ bg_colors (QColor _mBackgroundColorSelf, QColor _mBackgroundColorOwnSign, QColor _mBackgroundColorAcceptConnection,
-+ QColor _mBackgroundColorHasSignedMe, QColor _mBackgroundColorDenied) :
-+ mBackgroundColorSelf(_mBackgroundColorSelf), mBackgroundColorOwnSign(_mBackgroundColorOwnSign), mBackgroundColorAcceptConnection(_mBackgroundColorAcceptConnection),
-+ mBackgroundColorHasSignedMe(_mBackgroundColorHasSignedMe), mBackgroundColorDenied(_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; }
++
++
+ 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;
-+};
-+
-
- class pgpid_item_model : public QAbstractTableModel
- {
- Q_OBJECT
-
- public:
-- explicit pgpid_item_model(std::list<RsPgpId> &neighs, float &font_height, QObject *parent = nullptr);
-+ explicit pgpid_item_model(std::list<RsPgpId> &neighs, float &font_height, bg_colors &__bg_colors, QObject *parent = nullptr);
-
- // Header:
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
-@@ -35,6 +54,7 @@ public slots:
- private:
- std::list<RsPgpId> &neighs;
- float &font_height;
-+ bg_colors _bg_colors;
};
#endif // KEY_ITEM_MODEL_H