Commit 78d1d3f1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Merge remote-tracking branch 'origin/release/20.08'

parents 05801f69 8314bb5f
Pipeline #28657 canceled with stage
......@@ -24,17 +24,17 @@
#include <QStringList>
namespace Global {
QStringList typeFilter();
Q_REQUIRED_RESULT QStringList typeFilter();
void setTypeFilter(const QStringList &filter);
void setPoFileName(const QString &poFileName);
QString poFileName();
QString assistant();
Q_REQUIRED_RESULT QString poFileName();
Q_REQUIRED_RESULT QString assistant();
void setAssistant(const QString &assistant);
QString assistantBasePath();
QStringList assistants();
Q_REQUIRED_RESULT QString assistantBasePath();
Q_REQUIRED_RESULT QStringList assistants();
QString unpackAssistant(const QUrl &remotePackageUrl);
Q_REQUIRED_RESULT QString unpackAssistant(const QUrl &remotePackageUrl);
}
#endif
......@@ -54,7 +54,7 @@ public Q_SLOTS:
Q_SCRIPTABLE void setKey(GpgME::Protocol protocol, const QByteArray &fingerprint);
private:
QString identityName() const;
Q_REQUIRED_RESULT QString identityName() const;
QString m_identityName;
KIdentityManagement::Identity *m_identity = nullptr;
};
......
......@@ -387,3 +387,23 @@ Ispdb::searchServerType Ispdb::serverType() const
{
return mServerType;
}
QDebug operator <<(QDebug d, const Server &t)
{
d << "authentication " << t.authentication;
d << "socketType " << t.socketType;
d << "hostname " << t.hostname;
d << "username " << t.username;
d << "port " << t.port;
return d;
}
QDebug operator <<(QDebug d, const identity &t)
{
d << " email " << t.email;
d << " name " << t.name;
d << " organization " << t.organization;
d << " signature " << t.signature;
d << " isDefault " << t.mDefault;
return d;
}
......@@ -197,6 +197,7 @@ struct Server {
QString username;
int port = -1;
};
QDebug operator <<(QDebug d, const Server &t);
struct identity {
identity()
......@@ -219,5 +220,6 @@ struct identity {
QString signature;
bool mDefault = false;
};
QDebug operator <<(QDebug d, const identity &t);
#endif
......@@ -78,16 +78,16 @@ void PersonalDataPage::slotRadioButtonClicked(QAbstractButton *button)
{
QString smptHostname;
if (!mIspdb->smtpServers().isEmpty()) {
Server s = mIspdb->smtpServers().at(0);
const Server s = mIspdb->smtpServers().at(0);
smptHostname = s.hostname;
}
ui.outgoingLabel->setText(i18n("SMTP, %1", smptHostname));
if (button == ui.imapAccount) {
Server simap = mIspdb->imapServers().at(0); // should be ok.
const Server simap = mIspdb->imapServers().at(0); // should be ok.
ui.incommingLabel->setText(i18n("IMAP, %1", simap.hostname));
ui.usernameLabel->setText(simap.username);
} else if (button == ui.pop3Account) {
Server spop3 = mIspdb->pop3Servers().at(0); // should be ok.
const Server spop3 = mIspdb->pop3Servers().at(0); // should be ok.
ui.incommingLabel->setText(i18n("POP3, %1", spop3.hostname));
ui.usernameLabel->setText(spop3.username);
}
......@@ -168,7 +168,7 @@ void PersonalDataPage::slotSearchType(const QString &type)
void PersonalDataPage::configureSmtpAccount()
{
if (!mIspdb->smtpServers().isEmpty()) {
Server s = mIspdb->smtpServers().at(0); // should be ok.
const Server s = mIspdb->smtpServers().at(0); // should be ok.
qCDebug(ACCOUNTWIZARD_LOG) << "Configuring transport for" << s.hostname;
QObject *object = mSetupManager->createTransport(QStringLiteral("smtp"));
......
......@@ -31,8 +31,6 @@ ProviderPage::ProviderPage(KAssistantDialog *parent)
: Page(parent)
, m_model(new QStandardItemModel(this))
, m_downloadManager(new KNSCore::DownloadManager(this))
, m_newPageWanted(false)
, m_newPageReady(false)
{
ui.setupUi(this);
......
......@@ -68,8 +68,8 @@ private:
QSortFilterProxyModel *mProxy;
KNSCore::EntryInternal::List m_providerEntries;
Provider m_wantedProvider;
bool m_newPageWanted;
bool m_newPageReady;
bool m_newPageWanted = false;
bool m_newPageReady = false;
};
#endif
......@@ -38,7 +38,7 @@ public:
public Q_SLOTS:
Q_SCRIPTABLE void setName(const QString &name);
Q_SCRIPTABLE void setOption(const QString &key, const QVariant &value);
Q_SCRIPTABLE QString identifier();
Q_SCRIPTABLE Q_REQUIRED_RESULT QString identifier();
Q_SCRIPTABLE void reconfigure();
Q_SCRIPTABLE void setEditMode(const bool editMode);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment