Skip to content

Commit

Permalink
add missing gui edits
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 24, 2021
1 parent c7eb0e3 commit c88eabc
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 11 deletions.
11 changes: 11 additions & 0 deletions src/auth/esritoken/core/qgsauthesritokenmethod.cpp
Expand Up @@ -20,6 +20,10 @@
#include "qgslogger.h"
#include "qgsapplication.h"

#ifdef HAVE_GUI
#include "qgsauthesritokenedit.h"
#endif

#include <QNetworkProxy>
#include <QMutexLocker>
#include <QUuid>
Expand Down Expand Up @@ -128,6 +132,13 @@ void QgsAuthEsriTokenMethod::removeMethodConfig( const QString &authcfg )
}
}

#ifdef HAVE_GUI
QWidget *QgsAuthEsriTokenMethod::editWidget( QWidget *parent ) const
{
return new QgsAuthEsriTokenEdit( parent );
}
#endif

//////////////////////////////////////////////
// Plugin externals
//////////////////////////////////////////////
Expand Down
4 changes: 4 additions & 0 deletions src/auth/esritoken/core/qgsauthesritokenmethod.h
Expand Up @@ -47,6 +47,10 @@ class QgsAuthEsriTokenMethod : public QgsAuthMethod
void clearCachedConfig( const QString &authcfg ) override;
void updateMethodConfig( QgsAuthMethodConfig &mconfig ) override;

#ifdef HAVE_GUI
QWidget *editWidget( QWidget *parent )const override;
#endif

private:
QgsAuthMethodConfig getMethodConfig( const QString &authcfg, bool fullconfig = true );

Expand Down
18 changes: 14 additions & 4 deletions src/auth/identcert/core/qgsauthidentcertmethod.cpp
Expand Up @@ -16,6 +16,14 @@

#include "qgsauthidentcertmethod.h"

#include "qgsauthcertutils.h"
#include "qgsauthmanager.h"
#include "qgslogger.h"
#include "qgsapplication.h"
#ifdef HAVE_GUI
#include "qgsauthidentcertedit.h"
#endif

#include <QDir>
#include <QFile>
#include <QUuid>
Expand All @@ -26,10 +34,6 @@
#endif
#include <QMutexLocker>

#include "qgsauthcertutils.h"
#include "qgsauthmanager.h"
#include "qgslogger.h"
#include "qgsapplication.h"

const QString QgsAuthIdentCertMethod::AUTH_METHOD_KEY = QStringLiteral( "Identity-Cert" );
const QString QgsAuthIdentCertMethod::AUTH_METHOD_DESCRIPTION = tr( "Identity certificate authentication" );
Expand Down Expand Up @@ -289,6 +293,12 @@ void QgsAuthIdentCertMethod::removePkiConfigBundle( const QString &authcfg )
}
}

#ifdef HAVE_GUI
QWidget *QgsAuthIdentCertMethod::editWidget( QWidget *parent ) const
{
return new QgsAuthIdentCertEdit( parent );
}
#endif

//////////////////////////////////////////////
// Plugin externals
Expand Down
4 changes: 4 additions & 0 deletions src/auth/identcert/core/qgsauthidentcertmethod.h
Expand Up @@ -52,6 +52,10 @@ class QgsAuthIdentCertMethod : public QgsAuthMethod

void updateMethodConfig( QgsAuthMethodConfig &mconfig ) override;

#ifdef HAVE_GUI
QWidget *editWidget( QWidget *parent )const override;
#endif

private:

QgsPkiConfigBundle *getPkiConfigBundle( const QString &authcfg );
Expand Down
9 changes: 9 additions & 0 deletions src/auth/oauth2/core/qgsauthoauth2method.cpp
Expand Up @@ -26,6 +26,9 @@
#include "qgslogger.h"
#include "qgsmessagelog.h"
#include "qgssettings.h"
#ifdef HAVE_GUI
#include "qgsauthoauth2edit.h"
#endif

#include <algorithm>

Expand Down Expand Up @@ -651,6 +654,12 @@ void QgsAuthOAuth2Method::removeOAuth2Bundle( const QString &authcfg )
}
}

#ifdef HAVE_GUI
QWidget *QgsAuthOAuth2Method::editWidget( QWidget *parent ) const
{
return new QgsAuthOAuth2Edit( parent );
}
#endif

//////////////////////////////////////////////
// Plugin externals
Expand Down
4 changes: 4 additions & 0 deletions src/auth/oauth2/core/qgsauthoauth2method.h
Expand Up @@ -92,6 +92,10 @@ class QgsAuthOAuth2Method : public QgsAuthMethod
//! Triggered when auth code needs to be manually entered by the user
void onAuthCode();

#ifdef HAVE_GUI
QWidget *editWidget( QWidget *parent )const override;
#endif

signals:

//! Emitted when authcode was manually set by the user
Expand Down
20 changes: 14 additions & 6 deletions src/auth/pkipaths/core/qgsauthpkipathsmethod.cpp
Expand Up @@ -16,6 +16,14 @@

#include "qgsauthpkipathsmethod.h"

#include "qgsauthcertutils.h"
#include "qgsauthmanager.h"
#include "qgslogger.h"
#include "qgsapplication.h"
#ifdef HAVE_GUI
#include "qgsauthpkipathsedit.h"
#endif

#include <QDir>
#include <QFile>
#include <QUuid>
Expand All @@ -26,12 +34,6 @@
#endif
#include <QMutexLocker>

#include "qgsauthcertutils.h"
#include "qgsauthmanager.h"
#include "qgslogger.h"
#include "qgsapplication.h"


const QString QgsAuthPkiPathsMethod::AUTH_METHOD_KEY = QStringLiteral( "PKI-Paths" );
const QString QgsAuthPkiPathsMethod::AUTH_METHOD_DESCRIPTION = tr( "PKI paths authentication" );

Expand Down Expand Up @@ -325,6 +327,12 @@ void QgsAuthPkiPathsMethod::removePkiConfigBundle( const QString &authcfg )
}
}

#ifdef HAVE_GUI
QWidget *QgsAuthPkiPathsMethod::editWidget( QWidget *parent ) const
{
return new QgsAuthPkiPathsEdit( parent );
}
#endif

//////////////////////////////////////////////
// Plugin externals
Expand Down
4 changes: 4 additions & 0 deletions src/auth/pkipaths/core/qgsauthpkipathsmethod.h
Expand Up @@ -52,6 +52,10 @@ class QgsAuthPkiPathsMethod : public QgsAuthMethod

void updateMethodConfig( QgsAuthMethodConfig &mconfig ) override;

#ifdef HAVE_GUI
QWidget *editWidget( QWidget *parent )const override;
#endif

private:

QgsPkiConfigBundle *getPkiConfigBundle( const QString &authcfg );
Expand Down
11 changes: 10 additions & 1 deletion src/auth/pkipkcs12/core/qgsauthpkcs12method.cpp
Expand Up @@ -30,7 +30,9 @@
#include "qgsauthmanager.h"
#include "qgslogger.h"
#include "qgsapplication.h"

#ifdef HAVE_GUI
#include "qgsauthpkcs12edit.h"
#endif

const QString QgsAuthPkcs12Method::AUTH_METHOD_KEY = QStringLiteral( "PKI-PKCS#12" );
const QString QgsAuthPkcs12Method::AUTH_METHOD_DESCRIPTION = tr( "PKI PKCS#12 authentication" );
Expand Down Expand Up @@ -345,6 +347,13 @@ void QgsAuthPkcs12Method::removePkiConfigBundle( const QString &authcfg )
}
}

#ifdef HAVE_GUI
QWidget *QgsAuthPkcs12Method::editWidget( QWidget *parent ) const
{
return new QgsAuthPkcs12Edit( parent );
}
#endif

//////////////////////////////////////////////
// Plugin externals
//////////////////////////////////////////////
Expand Down
4 changes: 4 additions & 0 deletions src/auth/pkipkcs12/core/qgsauthpkcs12method.h
Expand Up @@ -53,6 +53,10 @@ class QgsAuthPkcs12Method : public QgsAuthMethod

void updateMethodConfig( QgsAuthMethodConfig &mconfig ) override;

#ifdef HAVE_GUI
QWidget *editWidget( QWidget *parent )const override;
#endif

private:

QgsPkiConfigBundle *getPkiConfigBundle( const QString &authcfg );
Expand Down

0 comments on commit c88eabc

Please sign in to comment.