work on mergin inoreader to greader, better password text boxes
This commit is contained in:
parent
8bff56a1cf
commit
c7fc631f4c
@ -30,7 +30,7 @@
|
||||
<url type="donation">https://martinrotter.github.io/donate/</url>
|
||||
<content_rating type="oars-1.1" />
|
||||
<releases>
|
||||
<release version="3.9.2" date="2021-08-05"/>
|
||||
<release version="3.9.2" date="2021-08-06"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.0">
|
||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||
|
@ -1,5 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>./docs/images/rssguard.png</file>
|
||||
<file>./docs/videos/rssguard.gif</file>
|
||||
<file>./graphics/Faenza/actions/64/application-exit.png</file>
|
||||
<file>./graphics/Faenza/actions/64/back.png</file>
|
||||
<file>./graphics/Faenza/actions/64/call-start.png</file>
|
||||
@ -8,7 +10,6 @@
|
||||
<file>./graphics/Faenza/actions/64/document-edit.png</file>
|
||||
<file>./graphics/Faenza/actions/64/document-export.png</file>
|
||||
<file>./graphics/Faenza/actions/64/document-import.png</file>
|
||||
<file>./graphics/Faenza/actions/64/document-new.png</file>
|
||||
<file>./graphics/Faenza/actions/64/document-open.png</file>
|
||||
<file>./graphics/Faenza/actions/64/document-properties.png</file>
|
||||
<file>./graphics/Faenza/actions/64/document-revert.png</file>
|
||||
@ -68,6 +69,7 @@
|
||||
<file>./graphics/Faenza/places/64/user-trash.png</file>
|
||||
<file>./graphics/Faenza/status/64/dialog-error.png</file>
|
||||
<file>./graphics/Faenza/status/64/dialog-information.png</file>
|
||||
<file>./graphics/Faenza/status/64/dialog-password.png</file>
|
||||
<file>./graphics/Faenza/status/64/dialog-question.png</file>
|
||||
<file>./graphics/Faenza/status/64/dialog-warning.png</file>
|
||||
<file>./graphics/Numix/22/actions/application-exit.svg</file>
|
||||
@ -78,7 +80,6 @@
|
||||
<file>./graphics/Numix/22/actions/document-edit.svg</file>
|
||||
<file>./graphics/Numix/22/actions/document-export.svg</file>
|
||||
<file>./graphics/Numix/22/actions/document-import.svg</file>
|
||||
<file>./graphics/Numix/22/actions/document-new.svg</file>
|
||||
<file>./graphics/Numix/22/actions/document-open.svg</file>
|
||||
<file>./graphics/Numix/22/actions/document-properties.svg</file>
|
||||
<file>./graphics/Numix/22/actions/document-revert.svg</file>
|
||||
@ -140,8 +141,14 @@
|
||||
<file>./graphics/Numix/22/places/user-trash.svg</file>
|
||||
<file>./graphics/Numix/22/status/dialog-error.svg</file>
|
||||
<file>./graphics/Numix/22/status/dialog-information.svg</file>
|
||||
<file>./graphics/Numix/22/status/dialog-password.svg</file>
|
||||
<file>./graphics/Numix/22/status/dialog-question.svg</file>
|
||||
<file>./graphics/Numix/22/status/dialog-warning.svg</file>
|
||||
<file>./graphics/Numix/index.theme</file>
|
||||
<file>./graphics/original_sizes/rssguard.png</file>
|
||||
<file>./graphics/rssguard.ico</file>
|
||||
<file>./graphics/rssguard.png</file>
|
||||
<file>./macosx/rssguard.icns</file>
|
||||
<file>./rssguard.qrc</file>
|
||||
</qresource>
|
||||
</RCC>
|
0
resources/scripts/generate-used-icons.sh
Normal file → Executable file
0
resources/scripts/generate-used-icons.sh
Normal file → Executable file
@ -2,12 +2,44 @@
|
||||
|
||||
#include "gui/reusable/baselineedit.h"
|
||||
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QKeyEvent>
|
||||
|
||||
BaseLineEdit::BaseLineEdit(QWidget* parent) : QLineEdit(parent) {
|
||||
BaseLineEdit::BaseLineEdit(QWidget* parent)
|
||||
: QLineEdit(parent), m_actShowPassword(new QAction(qApp->icons()->fromTheme(QSL("dialog-password")),
|
||||
tr("Show/hide the password"),
|
||||
this)) {
|
||||
|
||||
connect(m_actShowPassword, &QAction::triggered, this, [this]() {
|
||||
setEchoMode(echoMode() == QLineEdit::EchoMode::Password
|
||||
? QLineEdit::EchoMode::Normal
|
||||
: QLineEdit::EchoMode::Password);
|
||||
});
|
||||
connect(this, &QLineEdit::textChanged, this, [this](const QString& text) {
|
||||
if (actions().contains(m_actShowPassword)) {
|
||||
m_actShowPassword->setVisible(!text.isEmpty());
|
||||
}
|
||||
});
|
||||
|
||||
setClearButtonEnabled(true);
|
||||
}
|
||||
|
||||
void BaseLineEdit::setPasswordMode(bool is_password) {
|
||||
if (is_password) {
|
||||
setEchoMode(QLineEdit::EchoMode::Password);
|
||||
addAction(m_actShowPassword, QLineEdit::ActionPosition::LeadingPosition);
|
||||
}
|
||||
else {
|
||||
setEchoMode(QLineEdit::EchoMode::Normal);
|
||||
removeAction(m_actShowPassword);
|
||||
}
|
||||
|
||||
emit textChanged(text());
|
||||
}
|
||||
|
||||
void BaseLineEdit::submit(const QString& text) {
|
||||
setText(text);
|
||||
emit submitted(text);
|
||||
|
@ -12,6 +12,8 @@ class BaseLineEdit : public QLineEdit {
|
||||
explicit BaseLineEdit(QWidget* parent = nullptr);
|
||||
virtual ~BaseLineEdit() = default;
|
||||
|
||||
void setPasswordMode(bool is_password);
|
||||
|
||||
public slots:
|
||||
void submit(const QString& text);
|
||||
|
||||
@ -19,9 +21,10 @@ class BaseLineEdit : public QLineEdit {
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
|
||||
signals:
|
||||
|
||||
// Emitted if user hits ENTER button.
|
||||
void submitted(const QString& text);
|
||||
|
||||
private:
|
||||
QAction* m_actShowPassword;
|
||||
};
|
||||
|
||||
#endif // BASELINEEDIT_H
|
||||
|
@ -10,17 +10,16 @@ NetworkProxyDetails::NetworkProxyDetails(QWidget* parent) : QWidget(parent) {
|
||||
m_ui.setupUi(this);
|
||||
GuiUtilities::setLabelAsNotice(*m_ui.m_lblProxyInfo, false);
|
||||
|
||||
m_ui.m_txtProxyPassword->setPasswordMode(true);
|
||||
|
||||
connect(m_ui.m_cmbProxyType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&NetworkProxyDetails::onProxyTypeChanged);
|
||||
connect(m_ui.m_checkShowPassword, &QCheckBox::stateChanged, this, &NetworkProxyDetails::displayProxyPassword);
|
||||
|
||||
m_ui.m_cmbProxyType->addItem(tr("No proxy"), QNetworkProxy::ProxyType::NoProxy);
|
||||
m_ui.m_cmbProxyType->addItem(tr("System proxy"), QNetworkProxy::ProxyType::DefaultProxy);
|
||||
m_ui.m_cmbProxyType->addItem(tr("Socks5"), QNetworkProxy::ProxyType::Socks5Proxy);
|
||||
m_ui.m_cmbProxyType->addItem(tr("Http"), QNetworkProxy::ProxyType::HttpProxy);
|
||||
|
||||
displayProxyPassword(Qt::CheckState::Unchecked);
|
||||
|
||||
connect(m_ui.m_cmbProxyType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&NetworkProxyDetails::changed);
|
||||
connect(m_ui.m_txtProxyHost, &QLineEdit::textChanged, this, &NetworkProxyDetails::changed);
|
||||
@ -48,15 +47,6 @@ void NetworkProxyDetails::setProxy(const QNetworkProxy& proxy) {
|
||||
m_ui.m_txtProxyPassword->setText(proxy.password());
|
||||
}
|
||||
|
||||
void NetworkProxyDetails::displayProxyPassword(int state) {
|
||||
if (state == Qt::CheckState::Checked) {
|
||||
m_ui.m_txtProxyPassword->setEchoMode(QLineEdit::EchoMode::Normal);
|
||||
}
|
||||
else {
|
||||
m_ui.m_txtProxyPassword->setEchoMode(QLineEdit::EchoMode::Password);
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkProxyDetails::onProxyTypeChanged(int index) {
|
||||
const QNetworkProxy::ProxyType selected_type = static_cast<QNetworkProxy::ProxyType>(m_ui.m_cmbProxyType->itemData(index).toInt());
|
||||
const bool is_proxy_selected = selected_type != QNetworkProxy::ProxyType::NoProxy &&
|
||||
|
@ -22,7 +22,6 @@ class NetworkProxyDetails : public QWidget {
|
||||
void changed();
|
||||
|
||||
private slots:
|
||||
void displayProxyPassword(int state);
|
||||
void onProxyTypeChanged(int index);
|
||||
|
||||
private:
|
||||
|
@ -119,17 +119,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="m_checkShowPassword">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="m_lblProxyInfo">
|
||||
<property name="text">
|
||||
<string>Note that these settings are applied only on newly established connections.</string>
|
||||
|
@ -11,9 +11,13 @@
|
||||
SettingsDatabase::SettingsDatabase(Settings* settings, QWidget* parent)
|
||||
: SettingsPanel(settings, parent), m_ui(new Ui::SettingsDatabase) {
|
||||
m_ui->setupUi(this);
|
||||
|
||||
GuiUtilities::setLabelAsNotice(*m_ui->m_lblDataStorageWarning, true);
|
||||
GuiUtilities::setLabelAsNotice(*m_ui->m_lblMysqlInfo, false);
|
||||
GuiUtilities::setLabelAsNotice(*m_ui->m_lblSqliteInMemoryWarnings, true);
|
||||
|
||||
m_ui->m_txtMysqlPassword->lineEdit()->setPasswordMode(true);
|
||||
|
||||
connect(m_ui->m_cmbDatabaseDriver, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&SettingsDatabase::dirtifySettings);
|
||||
connect(m_ui->m_checkSqliteUseInMemoryDatabase, &QCheckBox::toggled, this, &SettingsDatabase::dirtifySettings);
|
||||
@ -25,7 +29,6 @@ SettingsDatabase::SettingsDatabase(Settings* settings, QWidget* parent)
|
||||
connect(m_ui->m_spinMysqlPort, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &SettingsDatabase::dirtifySettings);
|
||||
connect(m_ui->m_cmbDatabaseDriver, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&SettingsDatabase::selectSqlBackend);
|
||||
connect(m_ui->m_checkMysqlShowPassword, &QCheckBox::toggled, this, &SettingsDatabase::switchMysqlPasswordVisiblity);
|
||||
connect(m_ui->m_txtMysqlUsername->lineEdit(), &BaseLineEdit::textChanged, this, &SettingsDatabase::onMysqlUsernameChanged);
|
||||
connect(m_ui->m_txtMysqlHostname->lineEdit(), &BaseLineEdit::textChanged, this, &SettingsDatabase::onMysqlHostnameChanged);
|
||||
connect(m_ui->m_txtMysqlPassword->lineEdit(), &BaseLineEdit::textChanged, this, &SettingsDatabase::onMysqlPasswordChanged);
|
||||
@ -118,10 +121,6 @@ void SettingsDatabase::selectSqlBackend(int index) {
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDatabase::switchMysqlPasswordVisiblity(bool visible) {
|
||||
m_ui->m_txtMysqlPassword->lineEdit()->setEchoMode(visible ? QLineEdit::Normal : QLineEdit::Password);
|
||||
}
|
||||
|
||||
void SettingsDatabase::loadSettings() {
|
||||
onBeginLoadSettings();
|
||||
m_ui->m_checkUseTransactions->setChecked(qApp->settings()->value(GROUP(Database), SETTING(Database::UseTransactions)).toBool());
|
||||
@ -158,7 +157,6 @@ void SettingsDatabase::loadSettings() {
|
||||
SETTING(Database::MySQLPassword)).toString());
|
||||
m_ui->m_txtMysqlDatabase->lineEdit()->setText(settings()->value(GROUP(Database), SETTING(Database::MySQLDatabase)).toString());
|
||||
m_ui->m_spinMysqlPort->setValue(settings()->value(GROUP(Database), SETTING(Database::MySQLPort)).toInt());
|
||||
m_ui->m_checkMysqlShowPassword->setChecked(false);
|
||||
}
|
||||
|
||||
int index_current_backend = m_ui->m_cmbDatabaseDriver->findData(settings()->value(GROUP(Database),
|
||||
|
@ -25,7 +25,6 @@ class SettingsDatabase : public SettingsPanel {
|
||||
void onMysqlPasswordChanged(const QString& new_password);
|
||||
void onMysqlDatabaseChanged(const QString& new_database);
|
||||
void selectSqlBackend(int index);
|
||||
void switchMysqlPasswordVisiblity(bool visible);
|
||||
|
||||
Ui::SettingsDatabase* m_ui;
|
||||
};
|
||||
|
@ -221,16 +221,6 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
<widget class="LineEditWithStatus" name="m_txtMysqlPassword" native="true"/>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="m_checkMysqlShowPassword">
|
||||
<property name="text">
|
||||
<string>&Show password</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_btnMysqlTestSetup">
|
||||
@ -257,7 +247,7 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QLabel" name="m_lblMysqlInfo">
|
||||
<property name="text">
|
||||
<string>Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages.</string>
|
||||
|
@ -6,6 +6,7 @@ AuthenticationDetails::AuthenticationDetails(QWidget* parent) : QWidget(parent)
|
||||
setupUi(this);
|
||||
|
||||
// Set text boxes.
|
||||
m_txtPassword->lineEdit()->setPasswordMode(true);
|
||||
m_txtUsername->lineEdit()->setPlaceholderText(tr("Username"));
|
||||
m_txtUsername->lineEdit()->setToolTip(tr("Set username to access the feed."));
|
||||
m_txtPassword->lineEdit()->setPlaceholderText(tr("Password"));
|
||||
|
@ -31,8 +31,8 @@ QString GreaderEntryPoint::code() const {
|
||||
}
|
||||
|
||||
QString GreaderEntryPoint::description() const {
|
||||
return QObject::tr("Google Reader API is used by many online RSS readers. This is here to support") +
|
||||
QSL(" Inoreader, FreshRSS, Bazqux, TheOldReader, Reedah, ...");
|
||||
return QObject::tr("Google Reader API is used by many online RSS readers.\n\nList of supported readers:") +
|
||||
QSL(" Inoreader, FreshRSS, Bazqux, TheOldReader, Reedah and possibly others.");
|
||||
}
|
||||
|
||||
QString GreaderEntryPoint::author() const {
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "network-web/oauth2service.h"
|
||||
#include "services/abstract/importantnode.h"
|
||||
#include "services/abstract/recyclebin.h"
|
||||
#include "services/greader/definitions.h"
|
||||
#include "services/greader/greaderentrypoint.h"
|
||||
#include "services/greader/greadernetwork.h"
|
||||
#include "services/greader/gui/formeditgreaderaccount.h"
|
||||
@ -43,7 +44,6 @@ QVariantHash GreaderServiceRoot::customDatabaseData() const {
|
||||
data["service"] = int(m_network->service());
|
||||
data["username"] = m_network->username();
|
||||
data["password"] = TextFactory::encrypt(m_network->password());
|
||||
data["url"] = m_network->baseUrl();
|
||||
data["batch_size"] = m_network->batchSize();
|
||||
data["download_only_unread"] = m_network->downloadOnlyUnreadMessages();
|
||||
data["intelligent_synchronization"] = m_network->intelligentSynchronization();
|
||||
@ -54,6 +54,9 @@ QVariantHash GreaderServiceRoot::customDatabaseData() const {
|
||||
data["refresh_token"] = m_network->oauth()->refreshToken();
|
||||
data["redirect_uri"] = m_network->oauth()->redirectUrl();
|
||||
}
|
||||
else {
|
||||
data["url"] = m_network->baseUrl();
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -62,7 +65,6 @@ void GreaderServiceRoot::setCustomDatabaseData(const QVariantHash& data) {
|
||||
m_network->setService(GreaderServiceRoot::Service(data["service"].toInt()));
|
||||
m_network->setUsername(data["username"].toString());
|
||||
m_network->setPassword(TextFactory::decrypt(data["password"].toString()));
|
||||
m_network->setBaseUrl(data["url"].toString());
|
||||
m_network->setBatchSize(data["batch_size"].toInt());
|
||||
m_network->setDownloadOnlyUnreadMessages(data["download_only_unread"].toBool());
|
||||
m_network->setIntelligentSynchronization(data["intelligent_synchronization"].toBool());
|
||||
@ -72,6 +74,11 @@ void GreaderServiceRoot::setCustomDatabaseData(const QVariantHash& data) {
|
||||
m_network->oauth()->setClientSecret(data["client_secret"].toString());
|
||||
m_network->oauth()->setRefreshToken(data["refresh_token"].toString());
|
||||
m_network->oauth()->setRedirectUrl(data["redirect_uri"].toString(), true);
|
||||
|
||||
m_network->setBaseUrl(QSL(GREADER_URL_INOREADER));
|
||||
}
|
||||
else {
|
||||
m_network->setBaseUrl(data["url"].toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ GreaderAccountDetails::GreaderAccountDetails(QWidget* parent) : QWidget(parent),
|
||||
}
|
||||
|
||||
m_ui.m_lblTestResult->label()->setWordWrap(true);
|
||||
m_ui.m_txtPassword->lineEdit()->setPasswordMode(true);
|
||||
m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your account"));
|
||||
m_ui.m_txtUsername->lineEdit()->setPlaceholderText(tr("Username for your account"));
|
||||
m_ui.m_txtUrl->lineEdit()->setPlaceholderText(tr("URL of your server, without any service-specific path"));
|
||||
@ -60,7 +61,6 @@ GreaderAccountDetails::GreaderAccountDetails(QWidget* parent) : QWidget(parent),
|
||||
|
||||
GuiUtilities::setLabelAsNotice(*m_ui.m_lblInfo, true);
|
||||
|
||||
connect(m_ui.m_checkShowPassword, &QCheckBox::toggled, this, &GreaderAccountDetails::displayPassword);
|
||||
connect(m_ui.m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &GreaderAccountDetails::onPasswordChanged);
|
||||
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &GreaderAccountDetails::onUsernameChanged);
|
||||
connect(m_ui.m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &GreaderAccountDetails::onUrlChanged);
|
||||
@ -77,8 +77,7 @@ GreaderAccountDetails::GreaderAccountDetails(QWidget* parent) : QWidget(parent),
|
||||
setTabOrder(m_ui.m_cbNewAlgorithm, m_ui.m_spinLimitMessages);
|
||||
setTabOrder(m_ui.m_spinLimitMessages, m_ui.m_txtUsername->lineEdit());
|
||||
setTabOrder(m_ui.m_txtUsername->lineEdit(), m_ui.m_txtPassword->lineEdit());
|
||||
setTabOrder(m_ui.m_txtPassword->lineEdit(), m_ui.m_checkShowPassword);
|
||||
setTabOrder(m_ui.m_checkShowPassword, m_ui.m_txtAppId);
|
||||
setTabOrder(m_ui.m_txtPassword->lineEdit(), m_ui.m_txtAppId);
|
||||
setTabOrder(m_ui.m_txtAppId, m_ui.m_txtAppKey);
|
||||
setTabOrder(m_ui.m_txtAppKey, m_ui.m_txtRedirectUrl);
|
||||
setTabOrder(m_ui.m_txtRedirectUrl, m_ui.m_btnRegisterApi);
|
||||
@ -87,7 +86,6 @@ GreaderAccountDetails::GreaderAccountDetails(QWidget* parent) : QWidget(parent),
|
||||
onPasswordChanged();
|
||||
onUsernameChanged();
|
||||
onUrlChanged();
|
||||
displayPassword(false);
|
||||
|
||||
emit m_ui.m_txtAppId->lineEdit()->textChanged(m_ui.m_txtAppId->lineEdit()->text());
|
||||
emit m_ui.m_txtAppKey->lineEdit()->textChanged(m_ui.m_txtAppKey->lineEdit()->text());
|
||||
@ -165,10 +163,6 @@ void GreaderAccountDetails::setService(GreaderServiceRoot::Service service) {
|
||||
m_ui.m_cmbService->setCurrentIndex(m_ui.m_cmbService->findData(QVariant::fromValue(service)));
|
||||
}
|
||||
|
||||
void GreaderAccountDetails::displayPassword(bool display) {
|
||||
m_ui.m_txtPassword->lineEdit()->setEchoMode(display ? QLineEdit::Normal : QLineEdit::Password);
|
||||
}
|
||||
|
||||
void GreaderAccountDetails::performTest(const QNetworkProxy& custom_proxy) {
|
||||
m_lastProxy = custom_proxy;
|
||||
|
||||
|
@ -25,7 +25,6 @@ class GreaderAccountDetails : public QWidget {
|
||||
void setService(GreaderServiceRoot::Service service);
|
||||
|
||||
private slots:
|
||||
void displayPassword(bool display);
|
||||
void performTest(const QNetworkProxy& custom_proxy);
|
||||
void onUsernameChanged();
|
||||
void onPasswordChanged();
|
||||
|
@ -157,13 +157,6 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtPassword" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="m_checkShowPassword">
|
||||
<property name="text">
|
||||
<string>Show password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -356,7 +349,6 @@
|
||||
<tabstop>m_cbDownloadOnlyUnreadMessages</tabstop>
|
||||
<tabstop>m_cbNewAlgorithm</tabstop>
|
||||
<tabstop>m_spinLimitMessages</tabstop>
|
||||
<tabstop>m_checkShowPassword</tabstop>
|
||||
<tabstop>m_btnTestSetup</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
@ -15,6 +15,7 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
|
||||
m_ui.m_lblServerSideUpdateInformation->setText(tr("Leaving this option on causes that updates "
|
||||
"of feeds will be probably much slower and may time-out often."));
|
||||
m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your Nextcloud account"));
|
||||
m_ui.m_txtPassword->lineEdit()->setPasswordMode(true);
|
||||
m_ui.m_txtUsername->lineEdit()->setPlaceholderText(tr("Username for your Nextcloud account"));
|
||||
m_ui.m_txtUrl->lineEdit()->setPlaceholderText(tr("URL of your Nextcloud server, without any API path"));
|
||||
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Information,
|
||||
@ -32,7 +33,6 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
|
||||
|
||||
GuiUtilities::setLabelAsNotice(*m_ui.m_lblServerSideUpdateInformation, true);
|
||||
|
||||
connect(m_ui.m_checkShowPassword, &QCheckBox::toggled, this, &OwnCloudAccountDetails::displayPassword);
|
||||
connect(m_ui.m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onPasswordChanged);
|
||||
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onUsernameChanged);
|
||||
connect(m_ui.m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onUrlChanged);
|
||||
@ -42,17 +42,11 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
|
||||
setTabOrder(m_ui.m_spinLimitMessages, m_ui.m_checkServerSideUpdate);
|
||||
setTabOrder(m_ui.m_checkServerSideUpdate, m_ui.m_txtUsername->lineEdit());
|
||||
setTabOrder(m_ui.m_txtUsername->lineEdit(), m_ui.m_txtPassword->lineEdit());
|
||||
setTabOrder(m_ui.m_txtPassword->lineEdit(), m_ui.m_checkShowPassword);
|
||||
setTabOrder(m_ui.m_checkShowPassword, m_ui.m_btnTestSetup);
|
||||
setTabOrder(m_ui.m_txtPassword->lineEdit(), m_ui.m_btnTestSetup);
|
||||
|
||||
onPasswordChanged();
|
||||
onUsernameChanged();
|
||||
onUrlChanged();
|
||||
displayPassword(false);
|
||||
}
|
||||
|
||||
void OwnCloudAccountDetails::displayPassword(bool display) {
|
||||
m_ui.m_txtPassword->lineEdit()->setEchoMode(display ? QLineEdit::Normal : QLineEdit::Password);
|
||||
}
|
||||
|
||||
void OwnCloudAccountDetails::performTest(const QNetworkProxy& custom_proxy) {
|
||||
|
@ -18,7 +18,6 @@ class OwnCloudAccountDetails : public QWidget {
|
||||
explicit OwnCloudAccountDetails(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void displayPassword(bool display);
|
||||
void performTest(const QNetworkProxy& custom_proxy);
|
||||
void onUsernameChanged();
|
||||
void onPasswordChanged();
|
||||
|
@ -107,6 +107,9 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtUsername" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
@ -120,16 +123,6 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtPassword" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtUsername" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="m_checkShowPassword">
|
||||
<property name="text">
|
||||
<string>Show password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -202,7 +195,6 @@
|
||||
<tabstop>m_checkDownloadOnlyUnreadMessages</tabstop>
|
||||
<tabstop>m_checkServerSideUpdate</tabstop>
|
||||
<tabstop>m_spinLimitMessages</tabstop>
|
||||
<tabstop>m_checkShowPassword</tabstop>
|
||||
<tabstop>m_btnTestSetup</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
@ -29,14 +29,14 @@ TtRssAccountDetails::TtRssAccountDetails(QWidget* parent) : QWidget(parent) {
|
||||
setTabOrder(m_ui.m_spinLimitMessages, m_ui.m_checkServerSideUpdate);
|
||||
setTabOrder(m_ui.m_checkServerSideUpdate, m_ui.m_txtUsername->lineEdit());
|
||||
setTabOrder(m_ui.m_txtUsername->lineEdit(), m_ui.m_txtPassword->lineEdit());
|
||||
setTabOrder(m_ui.m_txtPassword->lineEdit(), m_ui.m_checkShowPassword);
|
||||
setTabOrder(m_ui.m_checkShowPassword, m_ui.m_gbHttpAuthentication);
|
||||
setTabOrder(m_ui.m_txtPassword->lineEdit(), m_ui.m_gbHttpAuthentication);
|
||||
setTabOrder(m_ui.m_gbHttpAuthentication, m_ui.m_txtHttpUsername->lineEdit());
|
||||
setTabOrder(m_ui.m_txtHttpUsername->lineEdit(), m_ui.m_txtHttpPassword->lineEdit());
|
||||
setTabOrder(m_ui.m_txtHttpPassword->lineEdit(), m_ui.m_checkShowHttpPassword);
|
||||
setTabOrder(m_ui.m_checkShowHttpPassword, m_ui.m_btnTestSetup);
|
||||
setTabOrder(m_ui.m_txtHttpPassword->lineEdit(), m_ui.m_btnTestSetup);
|
||||
|
||||
m_ui.m_txtHttpPassword->lineEdit()->setPasswordMode(true);
|
||||
m_ui.m_txtPassword->lineEdit()->setPasswordMode(true);
|
||||
|
||||
connect(m_ui.m_checkShowPassword, &QCheckBox::toggled, this, &TtRssAccountDetails::displayPassword);
|
||||
connect(m_ui.m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &TtRssAccountDetails::onPasswordChanged);
|
||||
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &TtRssAccountDetails::onUsernameChanged);
|
||||
connect(m_ui.m_txtHttpPassword->lineEdit(), &BaseLineEdit::textChanged, this, &TtRssAccountDetails::onHttpPasswordChanged);
|
||||
@ -44,23 +44,12 @@ TtRssAccountDetails::TtRssAccountDetails(QWidget* parent) : QWidget(parent) {
|
||||
connect(m_ui.m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &TtRssAccountDetails::onUrlChanged);
|
||||
connect(m_ui.m_gbHttpAuthentication, &QGroupBox::toggled, this, &TtRssAccountDetails::onHttpPasswordChanged);
|
||||
connect(m_ui.m_gbHttpAuthentication, &QGroupBox::toggled, this, &TtRssAccountDetails::onHttpUsernameChanged);
|
||||
connect(m_ui.m_checkShowHttpPassword, &QCheckBox::toggled, this, &TtRssAccountDetails::displayHttpPassword);
|
||||
|
||||
onPasswordChanged();
|
||||
onUsernameChanged();
|
||||
onUrlChanged();
|
||||
onHttpPasswordChanged();
|
||||
onHttpUsernameChanged();
|
||||
displayPassword(false);
|
||||
displayHttpPassword(false);
|
||||
}
|
||||
|
||||
void TtRssAccountDetails::displayPassword(bool display) {
|
||||
m_ui.m_txtPassword->lineEdit()->setEchoMode(display ? QLineEdit::Normal : QLineEdit::Password);
|
||||
}
|
||||
|
||||
void TtRssAccountDetails::displayHttpPassword(bool display) {
|
||||
m_ui.m_txtHttpPassword->lineEdit()->setEchoMode(display ? QLineEdit::Normal : QLineEdit::Password);
|
||||
}
|
||||
|
||||
void TtRssAccountDetails::performTest(const QNetworkProxy& proxy) {
|
||||
|
@ -20,8 +20,6 @@ class TtRssAccountDetails : public QWidget {
|
||||
explicit TtRssAccountDetails(QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void displayPassword(bool display);
|
||||
void displayHttpPassword(bool display);
|
||||
void performTest(const QNetworkProxy& proxy);
|
||||
|
||||
void onUsernameChanged();
|
||||
|
@ -127,6 +127,9 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtUsername" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
@ -140,16 +143,6 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtPassword" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtUsername" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="m_checkShowPassword">
|
||||
<property name="text">
|
||||
<string>Show password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -197,13 +190,6 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtHttpPassword" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="m_checkShowHttpPassword">
|
||||
<property name="text">
|
||||
<string>Show password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user