Merge branch 'RetroShare:master' into wire_notifynew

This commit is contained in:
defnax 2025-07-15 20:06:04 +02:00 committed by GitHub
commit ca01c03999
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 373 additions and 121 deletions

View file

@ -18,8 +18,8 @@ At the end, you'll get at ..\\*-msys2\deploy\ the Portable 7zip file.
### MSYS2 INSTALLATION (for editing or debugging) ### MSYS2 INSTALLATION (for editing or debugging)
Download MSYS2 from [MSYS2](http://www.msys2.org/). Get the i686 version Download MSYS2 from [MSYS2](http://www.msys2.org/). Installing
if you run a 32-bit Windows or the x86_64 if you run a 64-bit Windows. MSYS2 requires 64 bit Windows 10 or newer.
Run the installer and install MSYS2. Run the installer and install MSYS2.
@ -40,26 +40,29 @@ Run MSYS2 MSYS again and finish updating with:
Install the default programs needed to build: Install the default programs needed to build:
pacman -S base-devel git wget p7zip gcc perl ruby python2 doxygen cmake pacman -S base-devel git wget p7zip gcc perl ruby doxygen cmake
Install the 32-bit toolchain: Install the 64-bit toolchain:
pacman -S mingw-w64-i686-toolchain pacman -S mingw-w64-x86_64-toolchain
Install all needed dependencies: Install all needed dependencies:
pacman -S mingw-w64-i686-miniupnpc pacman -S mingw-w64-x86_64-miniupnpc
pacman -S mingw-w64-i686-libmicrohttpd pacman -S mingw-w64-x86_64-libxslt
pacman -S mingw-w64-i686-libxslt pacman -S mingw-w64-x86_64-xapian-core
pacman -S mingw-w64-i686-xapian-core pacman -S mingw-w64-x86_64-sqlcipher
pacman -S mingw-w64-i686-sqlcipher pacman -S mingw-w64-x86_64-qt5-base
pacman -S mingw-w64-i686-qt5 pacman -S mingw-w64-x86_64-qt5-multimedia
pacman -S mingw32/mingw-w64-i686-cmake pacman -S mingw-w64-x86_64-ccmake
pacman -S mingw-w64-i686-rapidjson pacman -S mingw-w64-x86_64-rapidjson
pacman -S mingw-w64-x86_64-json-c
pacman -S mingw-w64-x86_64-libbotan
pacman -S mingw-w64-x86_64-asio
If you want to use QtCreator as IDE, prefer using this one publish by MSYS2 as all build Kit are already setted. If you want to use QtCreator as IDE, prefer using this one publish by MSYS2 as all build Kit are already setted.
pacman -S mingw-w64-i686-qt-creator pacman -S mingw-w64-x86_64-qt-creator
*You can start it from MSYS2 terminal.* *You can start it from MSYS2 terminal.*
@ -67,7 +70,7 @@ We're done installing MSYS2, close the shell terminal.
### BUILDING RETROSHARE ### BUILDING RETROSHARE
Now run the MSYS2 MinGW 32-bit shell terminal (it's in the start menu). Now run the MSYS2 MinGW 64-bit shell terminal (it's in the start menu).
We will use it to checkout Retroshare and build it: We will use it to checkout Retroshare and build it:
git clone https://github.com/RetroShare/RetroShare.git git clone https://github.com/RetroShare/RetroShare.git

View file

@ -22,7 +22,7 @@ if not "%ParamNoupdate%"=="1" (
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-json-c mingw-w64-%RsMSYS2Architecture%-libbotan" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-json-c mingw-w64-%RsMSYS2Architecture%-libbotan"
:: Webui :: Webui
if "%ParamWebui%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-doxygen" if "%ParamWebui%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-doxygen mingw-w64-%RsMSYS2Architecture%-asio"
:: Plugins :: Plugins
if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg" if "%ParamPlugins%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-speex mingw-w64-%RsMSYS2Architecture%-speexdsp mingw-w64-%RsMSYS2Architecture%-curl mingw-w64-%RsMSYS2Architecture%-libxslt mingw-w64-%RsMSYS2Architecture%-opencv mingw-w64-%RsMSYS2Architecture%-ffmpeg"

View file

@ -13,6 +13,7 @@ LIBMICROHTTPD_VERSION=0.9.75
FFMPEG_VERSION=4.4 FFMPEG_VERSION=4.4
RAPIDJSON_VERSION=1.1.0 RAPIDJSON_VERSION=1.1.0
XAPIAN_VERSION=1.4.19 XAPIAN_VERSION=1.4.19
ASIO_VERSION=1-34-2
#RNP_VERSION=0.17.1 #RNP_VERSION=0.17.1
# libaries for rnp # libaries for rnp
@ -23,7 +24,7 @@ DOWNLOAD_PATH?=download
BUILD_PATH=build BUILD_PATH=build
LIBS_PATH?=libs LIBS_PATH?=libs
all: dirs zlib bzip2 miniupnpc openssl speex speexdsp libxml2 libxslt curl sqlcipher libmicrohttpd ffmpeg rapidjson xapian jsonc botan copylibs all: dirs zlib bzip2 miniupnpc openssl speex speexdsp libxml2 libxslt curl sqlcipher libmicrohttpd ffmpeg rapidjson xapian jsonc botan asio copylibs
#rnp #rnp
download: \ download: \
@ -398,6 +399,20 @@ $(BUILD_PATH)/botan-$(BOTAN_VERSION):
rm -r -f botan-$(BOTAN_VERSION) rm -r -f botan-$(BOTAN_VERSION)
mv $(BUILD_PATH)/botan-$(BOTAN_VERSION).tmp $(BUILD_PATH)/botan-$(BOTAN_VERSION) mv $(BUILD_PATH)/botan-$(BOTAN_VERSION).tmp $(BUILD_PATH)/botan-$(BOTAN_VERSION)
asio: $(BUILD_PATH)/asio-$(ASIO_VERSION)
$(BUILD_PATH)/asio-$(ASIO_VERSION):
# prepare
rm -r -f $(BUILD_PATH)/asio-*
[ -d "asio-$(ASIO_VERSION)" ] || git clone https://github.com/chriskohlhoff/asio.git --depth=1 --branch asio-$(ASIO_VERSION) "asio-$(ASIO_VERSION)"
# copy files
mkdir -p $(BUILD_PATH)/asio-$(ASIO_VERSION).tmp/include/asio
cp asio-$(ASIO_VERSION)/asio/include/*.hpp $(BUILD_PATH)/asio-$(ASIO_VERSION).tmp/include/
cp -r asio-$(ASIO_VERSION)/asio/include/asio/* $(BUILD_PATH)/asio-$(ASIO_VERSION).tmp/include/asio/
# cleanup
rm -r -f asio-$(ASIO_VERSION)
mv $(BUILD_PATH)/asio-$(ASIO_VERSION).tmp $(BUILD_PATH)/asio-$(ASIO_VERSION)
rnp: $(BUILD_PATH)/rnp-$(RNP_VERSION) rnp: $(BUILD_PATH)/rnp-$(RNP_VERSION)
$(BUILD_PATH)/rnp-$(RNP_VERSION): $(BUILD_PATH)/rnp-$(RNP_VERSION):

View file

@ -45,6 +45,7 @@ SOURCES = FeedReaderPlugin.cpp \
gui/FeedReaderUserNotify.cpp \ gui/FeedReaderUserNotify.cpp \
gui/FeedReaderFeedItem.cpp \ gui/FeedReaderFeedItem.cpp \
gui/FeedTreeWidget.cpp \ gui/FeedTreeWidget.cpp \
gui/ProxyWidget.cpp \
util/CURLWrapper.cpp \ util/CURLWrapper.cpp \
util/XMLWrapper.cpp \ util/XMLWrapper.cpp \
util/HTMLWrapper.cpp \ util/HTMLWrapper.cpp \
@ -66,6 +67,7 @@ HEADERS = FeedReaderPlugin.h \
gui/FeedReaderUserNotify.h \ gui/FeedReaderUserNotify.h \
gui/FeedReaderFeedItem.h \ gui/FeedReaderFeedItem.h \
gui/FeedTreeWidget.h \ gui/FeedTreeWidget.h \
gui/ProxyWidget.h \
util/CURLWrapper.h \ util/CURLWrapper.h \
util/XMLWrapper.h \ util/XMLWrapper.h \
util/HTMLWrapper.h \ util/HTMLWrapper.h \
@ -76,7 +78,8 @@ FORMS = gui/FeedReaderDialog.ui \
gui/AddFeedDialog.ui \ gui/AddFeedDialog.ui \
gui/PreviewFeedDialog.ui \ gui/PreviewFeedDialog.ui \
gui/FeedReaderConfig.ui \ gui/FeedReaderConfig.ui \
gui/FeedReaderFeedItem.ui gui/FeedReaderFeedItem.ui \
gui/ProxyWidget.ui
TARGET = FeedReader TARGET = FeedReader

View file

@ -180,8 +180,7 @@ void AddFeedDialog::useStandardUpdateIntervalToggled()
void AddFeedDialog::useStandardProxyToggled() void AddFeedDialog::useStandardProxyToggled()
{ {
bool checked = ui->useStandardProxyCheckBox->isChecked(); bool checked = ui->useStandardProxyCheckBox->isChecked();
ui->proxyAddressLineEdit->setEnabled(!checked); ui->proxyWidget->setEnabled(!checked);
ui->proxyPortSpinBox->setEnabled(!checked);
} }
void AddFeedDialog::typeForumToggled() void AddFeedDialog::typeForumToggled()
@ -335,8 +334,8 @@ bool AddFeedDialog::fillFeed(uint32_t feedId)
ui->passwordLineEdit->setText(QString::fromUtf8(feedInfo.password.c_str())); ui->passwordLineEdit->setText(QString::fromUtf8(feedInfo.password.c_str()));
ui->useStandardProxyCheckBox->setChecked(feedInfo.flag.standardProxy); ui->useStandardProxyCheckBox->setChecked(feedInfo.flag.standardProxy);
ui->proxyAddressLineEdit->setText(QString::fromUtf8(feedInfo.proxyAddress.c_str())); ui->proxyWidget->setAddress(QString::fromUtf8(feedInfo.proxyAddress.c_str()));
ui->proxyPortSpinBox->setValue(feedInfo.proxyPort); ui->proxyWidget->setPort(feedInfo.proxyPort);
ui->useStandardUpdateInterval->setChecked(feedInfo.flag.standardUpdateInterval); ui->useStandardUpdateInterval->setChecked(feedInfo.flag.standardUpdateInterval);
ui->updateIntervalSpinBox->setValue(feedInfo.updateInterval / 60); ui->updateIntervalSpinBox->setValue(feedInfo.updateInterval / 60);
@ -425,8 +424,8 @@ void AddFeedDialog::getFeedInfo(FeedInfo &feedInfo)
feedInfo.password = ui->passwordLineEdit->text().toUtf8().constData(); feedInfo.password = ui->passwordLineEdit->text().toUtf8().constData();
feedInfo.flag.standardProxy = ui->useStandardProxyCheckBox->isChecked(); feedInfo.flag.standardProxy = ui->useStandardProxyCheckBox->isChecked();
feedInfo.proxyAddress = ui->proxyAddressLineEdit->text().toUtf8().constData(); feedInfo.proxyAddress = ui->proxyWidget->address().toUtf8().constData();
feedInfo.proxyPort = ui->proxyPortSpinBox->value(); feedInfo.proxyPort = ui->proxyWidget->port();
feedInfo.flag.standardUpdateInterval = ui->useStandardUpdateInterval->isChecked(); feedInfo.flag.standardUpdateInterval = ui->useStandardUpdateInterval->isChecked();
feedInfo.updateInterval = ui->updateIntervalSpinBox->value() * 60; feedInfo.updateInterval = ui->updateIntervalSpinBox->value() * 60;

View file

@ -133,37 +133,16 @@
<property name="title"> <property name="title">
<string>Proxy</string> <string>Proxy</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item row="0" column="0" colspan="2"> <item>
<widget class="QCheckBox" name="useStandardProxyCheckBox"> <widget class="QCheckBox" name="useStandardProxyCheckBox">
<property name="text"> <property name="text">
<string>Use standard proxy</string> <string>Use standard proxy</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QLabel" name="serverLabel"> <widget class="ProxyWidget" name="proxyWidget" native="true"/>
<property name="text">
<string>Server</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="proxyAddressLineEdit"/>
</item>
<item row="1" column="2">
<widget class="QLabel" name="portLabel">
<property name="text">
<string>:</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="proxyPortSpinBox">
<property name="maximum">
<number>65535</number>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -465,6 +444,12 @@
<extends>QComboBox</extends> <extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header> <header>gui/common/RSComboBox.h</header>
</customwidget> </customwidget>
<customwidget>
<class>ProxyWidget</class>
<extends>QWidget</extends>
<header>gui/ProxyWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>urlLineEdit</tabstop> <tabstop>urlLineEdit</tabstop>
@ -494,8 +479,7 @@
<tabstop>useStandardUpdateInterval</tabstop> <tabstop>useStandardUpdateInterval</tabstop>
<tabstop>updateIntervalSpinBox</tabstop> <tabstop>updateIntervalSpinBox</tabstop>
<tabstop>useStandardProxyCheckBox</tabstop> <tabstop>useStandardProxyCheckBox</tabstop>
<tabstop>proxyAddressLineEdit</tabstop> <tabstop>proxyWidget</tabstop>
<tabstop>proxyPortSpinBox</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections/> <connections/>

View file

@ -31,8 +31,7 @@ FeedReaderConfig::FeedReaderConfig(QWidget *parent, Qt::WindowFlags flags)
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui->setupUi(this); ui->setupUi(this);
ui->proxyAddressLineEdit->setEnabled(false); ui->proxyWidget->setEnabled(false);
ui->proxyPortSpinBox->setEnabled(false);
/* Connect signals */ /* Connect signals */
connect(ui->updateIntervalSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, [this]() { connect(ui->updateIntervalSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, [this]() {
@ -51,8 +50,7 @@ FeedReaderConfig::FeedReaderConfig(QWidget *parent, Qt::WindowFlags flags)
Settings->setValueToGroup("FeedReaderDialog", "OpenAllInNewTab", ui->openAllInNewTabCheckBox->isChecked()); Settings->setValueToGroup("FeedReaderDialog", "OpenAllInNewTab", ui->openAllInNewTabCheckBox->isChecked());
}); });
connect(ui->useProxyCheckBox, &QCheckBox::toggled, this, &FeedReaderConfig::updateProxy); connect(ui->useProxyCheckBox, &QCheckBox::toggled, this, &FeedReaderConfig::updateProxy);
connect(ui->proxyAddressLineEdit, &QLineEdit::textChanged, this, &FeedReaderConfig::updateProxy); connect(ui->proxyWidget, &ProxyWidget::changed, this, &FeedReaderConfig::updateProxy);
connect(ui->proxyPortSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, &FeedReaderConfig::updateProxy);
connect(ui->useProxyCheckBox, SIGNAL(toggled(bool)), this, SLOT(useProxyToggled())); connect(ui->useProxyCheckBox, SIGNAL(toggled(bool)), this, SLOT(useProxyToggled()));
} }
@ -75,8 +73,8 @@ void FeedReaderConfig::load()
std::string proxyAddress; std::string proxyAddress;
uint16_t proxyPort; uint16_t proxyPort;
whileBlocking(ui->useProxyCheckBox)->setChecked(rsFeedReader->getStandardProxy(proxyAddress, proxyPort)); whileBlocking(ui->useProxyCheckBox)->setChecked(rsFeedReader->getStandardProxy(proxyAddress, proxyPort));
whileBlocking(ui->proxyAddressLineEdit)->setText(QString::fromUtf8(proxyAddress.c_str())); whileBlocking(ui->proxyWidget)->setAddress(QString::fromUtf8(proxyAddress.c_str()));
whileBlocking(ui->proxyPortSpinBox)->setValue(proxyPort); whileBlocking(ui->proxyWidget)->setPort(proxyPort);
loaded = true; loaded = true;
@ -87,11 +85,10 @@ void FeedReaderConfig::useProxyToggled()
{ {
bool enabled = ui->useProxyCheckBox->isChecked(); bool enabled = ui->useProxyCheckBox->isChecked();
ui->proxyAddressLineEdit->setEnabled(enabled); ui->proxyWidget->setEnabled(enabled);
ui->proxyPortSpinBox->setEnabled(enabled);
} }
void FeedReaderConfig::updateProxy() void FeedReaderConfig::updateProxy()
{ {
rsFeedReader->setStandardProxy(ui->useProxyCheckBox->isChecked(), ui->proxyAddressLineEdit->text().toUtf8().constData(), ui->proxyPortSpinBox->value()); rsFeedReader->setStandardProxy(ui->useProxyCheckBox->isChecked(), ui->proxyWidget->address().toUtf8().constData(), ui->proxyWidget->port());
} }

View file

@ -77,37 +77,16 @@
<property name="title"> <property name="title">
<string>Proxy</string> <string>Proxy</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item row="0" column="0" colspan="4"> <item>
<widget class="QCheckBox" name="useProxyCheckBox"> <widget class="QCheckBox" name="useProxyCheckBox">
<property name="text"> <property name="text">
<string>Use proxy</string> <string>Use proxy</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QLabel" name="serverLabel"> <widget class="ProxyWidget" name="proxyWidget" native="true"/>
<property name="text">
<string>Server</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="proxyAddressLineEdit"/>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="proxyPortSpinBox">
<property name="maximum">
<number>65535</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="potLabel">
<property name="text">
<string>:</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -157,12 +136,19 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>ProxyWidget</class>
<extends>QWidget</extends>
<header>gui/ProxyWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops> <tabstops>
<tabstop>updateIntervalSpinBox</tabstop> <tabstop>updateIntervalSpinBox</tabstop>
<tabstop>storageTimeSpinBox</tabstop> <tabstop>storageTimeSpinBox</tabstop>
<tabstop>useProxyCheckBox</tabstop> <tabstop>useProxyCheckBox</tabstop>
<tabstop>proxyAddressLineEdit</tabstop> <tabstop>proxyWidget</tabstop>
<tabstop>proxyPortSpinBox</tabstop>
<tabstop>saveInBackgroundCheckBox</tabstop> <tabstop>saveInBackgroundCheckBox</tabstop>
<tabstop>setMsgToReadOnActivate</tabstop> <tabstop>setMsgToReadOnActivate</tabstop>
<tabstop>openAllInNewTabCheckBox</tabstop> <tabstop>openAllInNewTabCheckBox</tabstop>

View file

@ -0,0 +1,142 @@
#include "ProxyWidget.h"
#include "ui_ProxyWidget.h"
ProxyWidget::ProxyWidget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::ProxyWidget)
{
ui->setupUi(this);
/* Connect signals */
connectUi(true);
connect(ui->portSpinBox, (void(QSpinBox::*)(int))&QSpinBox::valueChanged, this, &ProxyWidget::changed);
/* Initialize types */
ui->schemeComboBox->addItem("", "");
ui->schemeComboBox->addItem("HTTP", "http://");
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("HTTP Proxy."), Qt::ToolTipRole);
ui->schemeComboBox->addItem("HTTPS", "https://");
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("HTTPS Proxy."), Qt::ToolTipRole);
ui->schemeComboBox->addItem("SOCKS4", "socks4://");
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("SOCKS4 Proxy."), Qt::ToolTipRole);
ui->schemeComboBox->addItem("SOCKS4a", "socks4a://");
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("SOCKS4a Proxy. Proxy resolves URL hostname."), Qt::ToolTipRole);
ui->schemeComboBox->addItem("SOCKS5", "socks5://");
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("SOCKS5 Proxy."), Qt::ToolTipRole);
ui->schemeComboBox->addItem("SOCKS5h", "socks5h://");
ui->schemeComboBox->setItemData(ui->schemeComboBox->count() - 1, tr("SOCKS5 Proxy. Proxy resolves URL hostname."), Qt::ToolTipRole);
}
ProxyWidget::~ProxyWidget()
{
delete ui;
}
void ProxyWidget::connectUi(bool doConnect)
{
if (doConnect) {
if (!mAddressConnection) {
mAddressConnection = connect(ui->addressLineEdit, &QLineEdit::textChanged, this, &ProxyWidget::addressChanged);
}
if (!mSchemeConnection) {
mSchemeConnection = connect(ui->schemeComboBox, (void(QComboBox::*)(int))&QComboBox::currentIndexChanged, this, &ProxyWidget::changed);
}
} else {
if (mAddressConnection) {
disconnect(mAddressConnection);
}
if (mSchemeConnection) {
disconnect(mSchemeConnection);
}
}
}
QString ProxyWidget::address()
{
QString host = ui->addressLineEdit->text();
if (host.isEmpty()) {
return "";
}
QString value;
QString scheme = ui->schemeComboBox->currentData().toString();
if (!scheme.isEmpty()) {
value = scheme;
}
value += ui->addressLineEdit->text();
return value;
}
void ProxyWidget::setAddress(const QString &value)
{
int schemeIndex;
QString host;
splitAddress(value, schemeIndex, host);
connectUi(false);
ui->schemeComboBox->setCurrentIndex(schemeIndex);
ui->addressLineEdit->setText(host);
connectUi(true);
}
int ProxyWidget::port()
{
return ui->portSpinBox->value();
}
void ProxyWidget::setPort(int value)
{
ui->portSpinBox->setValue(value);
}
void ProxyWidget::addressChanged(const QString &value)
{
int schemeIndex;
QString host;
splitAddress(value, schemeIndex, host);
connectUi(false);
ui->schemeComboBox->setCurrentIndex(schemeIndex);
if (host != ui->addressLineEdit->text()) {
ui->addressLineEdit->setText(host);
}
connectUi(true);
emit changed();
}
void ProxyWidget::splitAddress(const QString &value, int &schemeIndex, QString &host)
{
if (value.isEmpty()) {
schemeIndex = ui->schemeComboBox->currentIndex();
host = value;
return;
}
QString scheme;
int index = value.indexOf("://");
if (index >= 0) {
scheme = value.left(index + 3);
host = value.mid(index + 3);
} else {
if (ui->schemeComboBox->currentIndex() == 0) {
// Default to HTTP
scheme = "http://";
} else {
scheme = ui->schemeComboBox->currentData().toString();
}
host = value;
}
schemeIndex = ui->schemeComboBox->findData(scheme);
if (schemeIndex < 0) {
/* Unknown scheme */
schemeIndex = 0;
host = value;
}
}

View file

@ -0,0 +1,40 @@
#ifndef PROXYWIDGET_H
#define PROXYWIDGET_H
#include <QWidget>
namespace Ui {
class ProxyWidget;
}
class ProxyWidget : public QWidget
{
Q_OBJECT
public:
explicit ProxyWidget(QWidget *parent = nullptr);
~ProxyWidget();
QString address();
void setAddress(const QString &value);
int port();
void setPort(int value);
Q_SIGNALS:
void changed();
private Q_SLOTS:
void addressChanged(const QString &value);
private:
void connectUi(bool doConnect);
void splitAddress(const QString &value, int &schemeIndex, QString &host);
private:
Ui::ProxyWidget *ui;
QMetaObject::Connection mAddressConnection;
QMetaObject::Connection mSchemeConnection;
};
#endif // PROXYWIDGET_H

View file

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ProxyWidget</class>
<widget class="QWidget" name="ProxyWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>22</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="schemeComboBox"/>
</item>
<item>
<widget class="QLineEdit" name="addressLineEdit"/>
</item>
<item>
<widget class="QLabel" name="portLabel">
<property name="text">
<string notr="true">:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="portSpinBox">
<property name="maximum">
<number>65535</number>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -9,7 +9,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+398"/> <location line="+377"/>
<source>Board</source> <source>Board</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -34,7 +34,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="-391"/> <location line="-370"/>
<source>Authentication (not yet supported)</source> <source>Authentication (not yet supported)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -59,7 +59,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+50"/> <location line="+29"/>
<source>Update interval</source> <source>Update interval</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -89,7 +89,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="-216"/> <location line="-195"/>
<source>Storage time</source> <source>Storage time</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -114,17 +114,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+7"/> <location line="+196"/>
<source>Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+10"/>
<source>:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+200"/>
<source>Type</source> <source>Type</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -199,7 +189,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+211"/> <location line="+208"/>
<location line="+152"/> <location line="+152"/>
<location line="+15"/> <location line="+15"/>
<source>Edit feed</source> <source>Edit feed</source>
@ -264,17 +254,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+7"/> <location line="+13"/>
<source>Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+17"/>
<source>:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+10"/>
<source>Misc</source> <source>Misc</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -317,12 +297,12 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../gui/FeedReaderDialog.cpp" line="+101"/> <location filename="../gui/FeedReaderDialog.cpp" line="+105"/>
<source>Message Folders</source> <source>Message Folders</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+197"/> <location line="+199"/>
<source>New</source> <source>New</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -372,7 +352,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+241"/> <location line="+259"/>
<source>Add new folder</source> <source>Add new folder</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -535,7 +515,7 @@
</message> </message>
<message> <message>
<location line="+26"/> <location line="+26"/>
<location filename="../gui/FeedReaderMessageWidget.cpp" line="+117"/> <location filename="../gui/FeedReaderMessageWidget.cpp" line="+126"/>
<source>Title</source> <source>Title</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -551,6 +531,11 @@
<source>Author</source> <source>Author</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location line="+121"/>
<source>Copy Link Location</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../gui/FeedReaderMessageWidget.cpp" line="-2"/> <location filename="../gui/FeedReaderMessageWidget.cpp" line="-2"/>
<source>Search Title</source> <source>Search Title</source>
@ -567,7 +552,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+12"/> <location line="+16"/>
<source>Open link in browser</source> <source>Open link in browser</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -577,7 +562,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+127"/> <location line="+131"/>
<source>The messages will be added to the forum</source> <source>The messages will be added to the forum</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -637,7 +622,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+374"/> <location line="+412"/>
<source>Hide</source> <source>Hide</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -957,4 +942,37 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>ProxyWidget</name>
<message>
<location filename="../gui/ProxyWidget.cpp" line="+17"/>
<source>HTTP Proxy.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>HTTPS Proxy.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>SOCKS4 Proxy.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>SOCKS4a Proxy. Proxy resolves URL hostname.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>SOCKS5 Proxy.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>SOCKS5 Proxy. Proxy resolves URL hostname.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS> </TS>

View file

@ -520,6 +520,18 @@ trough qmake command line arguments!")
} }
} }
# Some supportlibs compilation won't start if the intstalled CMAKE verison is >=3.5.
# Force compilation in that case
CMAKE_FORCE_MINVERSION=""
CMAKE_VERSION_SPLIT = $$system(cmake --version)
CMAKE_VERSION_SPLIT = $$split(CMAKE_VERSION_SPLIT, \\s+)
CMAKE_VERSION = $$member(CMAKE_VERSION_SPLIT, 2)
message("Cmake version detected: $${CMAKE_VERSION}")
versionAtLeast(CMAKE_VERSION, 3.5) {
warning("Forcing compilation with CMAKE_POLICY_VERSION_MINIMUM=3.5")
CMAKE_FORCE_MINVERSION="-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
}
gxsdistsync:DEFINES *= RS_USE_GXS_DISTANT_SYNC gxsdistsync:DEFINES *= RS_USE_GXS_DISTANT_SYNC
wikipoos:DEFINES *= RS_USE_WIKI wikipoos:DEFINES *= RS_USE_WIKI
rs_gxs:DEFINES *= RS_ENABLE_GXS rs_gxs:DEFINES *= RS_ENABLE_GXS