mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 05:12:51 -04:00
Merge branch 'master' into AddRetroShareLinkOpenFileWhenExists
This commit is contained in:
commit
531ce34151
6 changed files with 467 additions and 381 deletions
|
@ -24,10 +24,15 @@
|
|||
#include "HelpDialog.h"
|
||||
#include "rshare.h"
|
||||
|
||||
#include <retroshare/rsiface.h>
|
||||
#include <retroshare/rsplugin.h>
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include "settings/rsharesettings.h"
|
||||
#include <microhttpd.h>
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QSysInfo>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPainter>
|
||||
#include <QBrush>
|
||||
|
@ -721,3 +726,79 @@ NextPieceLabel::NextPieceLabel( QWidget* parent /* = 0*/ ) : QLabel(parent)
|
|||
setAlignment(Qt::AlignCenter);
|
||||
setAutoFillBackground(true);
|
||||
}
|
||||
|
||||
static QString addLibraries(const std::string &name, const std::list<RsLibraryInfo> &libraries)
|
||||
{
|
||||
QString mTextEdit;
|
||||
mTextEdit+=QString::fromUtf8(name.c_str());
|
||||
mTextEdit+="\n";
|
||||
|
||||
std::list<RsLibraryInfo>::const_iterator libraryIt;
|
||||
for (libraryIt = libraries.begin(); libraryIt != libraries.end(); ++libraryIt) {
|
||||
|
||||
mTextEdit+=" - ";
|
||||
mTextEdit+=QString::fromUtf8(libraryIt->mName.c_str());
|
||||
mTextEdit+=": ";
|
||||
mTextEdit+=QString::fromUtf8(libraryIt->mVersion.c_str());
|
||||
mTextEdit+="\n";
|
||||
}
|
||||
mTextEdit+="\n";
|
||||
return mTextEdit;
|
||||
}
|
||||
|
||||
|
||||
void AboutDialog::on_copy_button_clicked()
|
||||
{
|
||||
QString verInfo;
|
||||
QString rsVerString = "RetroShare Version: ";
|
||||
rsVerString+=Rshare::retroshareVersion(true);
|
||||
verInfo+=rsVerString;
|
||||
verInfo+="\n";
|
||||
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 4, 0)
|
||||
verInfo+=QSysInfo::prettyProductName();
|
||||
#endif
|
||||
#else
|
||||
#ifdef Q_WS_X11
|
||||
verInfo+="Linux";
|
||||
#endif
|
||||
#ifdef Q_WS_WIN
|
||||
verInfo+="Windows";
|
||||
#endif
|
||||
#ifdef Q_WS_MACX
|
||||
verInfo+="Mac";
|
||||
#endif
|
||||
#endif
|
||||
verInfo+=" ";
|
||||
QString qtver = QString("QT ")+QT_VERSION_STR;
|
||||
verInfo+=qtver;
|
||||
verInfo+="\n\n";
|
||||
|
||||
/* Add version numbers of libretroshare */
|
||||
std::list<RsLibraryInfo> libraries;
|
||||
RsControl::instance()->getLibraries(libraries);
|
||||
verInfo+=addLibraries("libretroshare", libraries);
|
||||
|
||||
/* Add version numbers of RetroShare */
|
||||
// Add versions here. Find a better place.
|
||||
libraries.clear();
|
||||
libraries.push_back(RsLibraryInfo("Libmicrohttpd", MHD_get_version()));
|
||||
verInfo+=addLibraries("RetroShare", libraries);
|
||||
|
||||
/* Add version numbers of plugins */
|
||||
if (rsPlugins) {
|
||||
for (int i = 0; i < rsPlugins->nbPlugins(); ++i) {
|
||||
RsPlugin *plugin = rsPlugins->plugin(i);
|
||||
if (plugin) {
|
||||
libraries.clear();
|
||||
plugin->getLibraries(libraries);
|
||||
verInfo+=addLibraries(plugin->getPluginName(), libraries);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QApplication::clipboard()->setText(verInfo);
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@ private slots:
|
|||
void sl_levelChanged(int);
|
||||
void on_help_button_clicked();
|
||||
|
||||
void on_copy_button_clicked();
|
||||
|
||||
signals:
|
||||
void si_scoreChanged(QString);
|
||||
void si_maxScoreChanged(QString);
|
||||
|
|
|
@ -23,7 +23,16 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -52,6 +61,17 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="copy_button">
|
||||
<property name="text">
|
||||
<string>Copy Info</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/copy.png</normaloff>:/images/copy.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -76,7 +96,9 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>close_button</sender>
|
||||
|
|
|
@ -294,6 +294,22 @@ void GlobalRouterStatisticsWidget::updateContent()
|
|||
oy += celly ;
|
||||
oy += celly ;
|
||||
|
||||
//print friends in the same order their prob is shown
|
||||
QString FO = tr("Friend Order (");
|
||||
RsPeerDetails peer_ssl_details;
|
||||
for(uint32_t i=0;i<matrix_info.friend_ids.size();++i){
|
||||
rsPeers->getPeerDetails(matrix_info.friend_ids[i], peer_ssl_details);
|
||||
QString fn = QString::fromUtf8(peer_ssl_details.name.c_str());
|
||||
FO+=fn;
|
||||
FO+=" ";
|
||||
|
||||
}
|
||||
FO+=")";
|
||||
|
||||
painter.drawText(ox+0*cellx,oy+fm_times.height(),FO) ;
|
||||
oy += celly ;
|
||||
oy += celly ;
|
||||
|
||||
static const int MaxKeySize = 20*fact ;
|
||||
painter.setFont(monospace_f) ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue