Skip to content

Commit 8f545cb

Browse files
committed
Update to new UI
Signed-off-by: Raul Metsma <[email protected]>
1 parent 7a9d3fd commit 8f545cb

28 files changed

+1087
-1408
lines changed

client/Application.cpp

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,6 @@ class DigidocConf final: public digidoc::XmlConfCurrent
147147
#ifdef Q_OS_MAC
148148
std::string TSLCache() const final
149149
{ return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation).toStdString(); }
150-
151-
void setProxyHost( const std::string &host ) final
152-
{ Settings::PROXY_HOST = host; }
153-
void setProxyPort( const std::string &port ) final
154-
{ Settings::PROXY_PORT = port; }
155-
void setProxyUser( const std::string &user ) final
156-
{ Settings::PROXY_USER = user; }
157-
void setProxyPass( const std::string &pass ) final
158-
{ Settings::PROXY_PASS = pass; }
159150
#endif
160151

161152
std::vector<digidoc::X509Cert> TSCerts() const final
@@ -586,10 +577,6 @@ QVariant Application::confValue( ConfParameter parameter, const QVariant &value
586577
switch( parameter )
587578
{
588579
case SiVaUrl: r = i->verifyServiceUri().c_str(); break;
589-
case ProxyHost: r = i->proxyHost().c_str(); break;
590-
case ProxyPort: r = i->proxyPort().c_str(); break;
591-
case ProxyUser: r = i->proxyUser().c_str(); break;
592-
case ProxyPass: r = i->proxyPass().c_str(); break;
593580
case TSAUrl: r = i->TSUrl().c_str(); break;
594581
case TSLUrl: r = i->TSLUrl().c_str(); break;
595582
case TSLCache: r = i->TSLCache().c_str(); break;
@@ -835,33 +822,6 @@ int Application::run()
835822
return exec();
836823
}
837824

838-
void Application::setConfValue( ConfParameter parameter, const QVariant &value )
839-
{
840-
try
841-
{
842-
auto *i = dynamic_cast<digidoc::XmlConfCurrent*>(digidoc::Conf::instance());
843-
if(!i)
844-
return;
845-
QByteArray v = value.toString().toUtf8();
846-
switch( parameter )
847-
{
848-
case ProxyHost: i->setProxyHost( v.isEmpty()? std::string() : v.constData() ); break;
849-
case ProxyPort: i->setProxyPort( v.isEmpty()? std::string() : v.constData() ); break;
850-
case ProxyUser: i->setProxyUser( v.isEmpty()? std::string() : v.constData() ); break;
851-
case ProxyPass: i->setProxyPass( v.isEmpty()? std::string() : v.constData() ); break;
852-
case TSAUrl:
853-
case SiVaUrl:
854-
case TSLCerts:
855-
case TSLUrl:
856-
case TSLCache: break;
857-
}
858-
}
859-
catch( const digidoc::Exception &e )
860-
{
861-
showWarning(tr("Caught exception!"), e);
862-
}
863-
}
864-
865825
void Application::showClient(const QStringList &params, bool crypto, bool sign, bool newWindow)
866826
{
867827
if(sign)

client/Application.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ class Application final: public Common
4141
enum ConfParameter
4242
{
4343
SiVaUrl,
44-
ProxyHost,
45-
ProxyPort,
46-
ProxyUser,
47-
ProxyPass,
4844
TSAUrl,
4945
TSLUrl,
5046
TSLCerts,
@@ -72,7 +68,6 @@ class Application final: public Common
7268
static QWidget* mainWindow();
7369
static void openHelp();
7470
static uint readTSLVersion(const QString &path);
75-
static void setConfValue( ConfParameter parameter, const QVariant &value );
7671
static void showClient(const QStringList &params = {}, bool crypto = false, bool sign = false, bool newWindow = false);
7772
static void updateTSLCache(const QDateTime &tslTime);
7873

client/Settings.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ struct Settings
4646
void operator =(const T &value) const {
4747
operator =(QVariant(value));
4848
}
49+
void operator() (const T &value) const {
50+
operator =(QVariant(value));
51+
}
4952
template <typename P = T, typename = if_QString<P>>
5053
void operator =(const std::string &value) const {
5154
operator =(QString::fromStdString(value));

0 commit comments

Comments
 (0)