From b26ab72e6eed5902963daa65b1f0b9c8073d7fe0 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 20 Jul 2016 18:10:38 +0200 Subject: [PATCH] Some more template simplifications followed --- lib/EAPBase_UI/include/EAP_UI.h | 20 +++++++------------- lib/PAP_UI/include/PAP_UI.h | 2 +- lib/TLS_UI/include/TLS_UI.h | 2 +- lib/TTLS_UI/src/Module.cpp | 2 +- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/lib/EAPBase_UI/include/EAP_UI.h b/lib/EAPBase_UI/include/EAP_UI.h index 632e8ff..60f6b0a 100644 --- a/lib/EAPBase_UI/include/EAP_UI.h +++ b/lib/EAPBase_UI/include/EAP_UI.h @@ -32,7 +32,7 @@ class wxEAPBannerPanel; /// /// EAP top-most configuration dialog /// -template class wxEAPConfigDialog; +template class wxEAPConfigDialog; /// /// EAP top-most credential dialog @@ -47,7 +47,7 @@ class wxEAPProviderLockedPanel; /// /// Base template for credential configuration panel /// -template class wxEAPCredentialsConfigPanel; +template class wxEAPCredentialsConfigPanel; /// /// Base template for all credential entry panels @@ -99,15 +99,9 @@ protected: }; -template +template class wxEAPConfigDialog : public wxEAPConfigDialogBase { -public: - /// - /// This data type - /// - typedef wxEAPConfigDialog<_Tmeth, _wxT> _T; - public: /// /// Constructs a configuration dialog @@ -146,7 +140,7 @@ protected: { // Forward the event to child panels. for (wxWindowList::compatibility_iterator provider = m_providers->GetChildren().GetFirst(); provider; provider = provider->GetNext()) { - _wxT *prov = wxDynamicCast(provider->GetData(), _wxT); + wxWindow *prov = wxDynamicCast(provider->GetData(), wxWindow); if (prov) prov->GetEventHandler()->ProcessEvent(event); } @@ -222,7 +216,7 @@ protected: }; -template +template class wxEAPCredentialsConfigPanel : public wxEAPCredentialsConfigPanelBase { public: @@ -234,7 +228,7 @@ public: /// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name. /// \param[in] parent Parent window /// - wxEAPCredentialsConfigPanel(const eap::config_provider &prov, _Tmeth &cfg, LPCTSTR pszCredTarget, wxWindow *parent) : + wxEAPCredentialsConfigPanel(const eap::config_provider &prov, eap::config_method &cfg, LPCTSTR pszCredTarget, wxWindow *parent) : m_prov(prov), m_cfg(cfg), m_target(pszCredTarget), @@ -372,7 +366,7 @@ protected: protected: const eap::config_provider &m_prov; ///< EAP provider - _Tmeth &m_cfg; ///< EAP configuration + eap::config_method &m_cfg; ///< EAP method configuration winstd::library m_shell32; ///< shell32.dll resource library reference wxIcon m_icon; ///< Panel icon winstd::tstring m_target; ///< Credential Manager target diff --git a/lib/PAP_UI/include/PAP_UI.h b/lib/PAP_UI/include/PAP_UI.h index d8af6ef..1daa320 100644 --- a/lib/PAP_UI/include/PAP_UI.h +++ b/lib/PAP_UI/include/PAP_UI.h @@ -25,7 +25,7 @@ /// /// PAP credential configuration panel /// -typedef wxEAPCredentialsConfigPanel wxPAPCredentialsConfigPanel; +typedef wxEAPCredentialsConfigPanel wxPAPCredentialsConfigPanel; /// /// PAP configuration panel diff --git a/lib/TLS_UI/include/TLS_UI.h b/lib/TLS_UI/include/TLS_UI.h index 95b9d8a..96d40d0 100644 --- a/lib/TLS_UI/include/TLS_UI.h +++ b/lib/TLS_UI/include/TLS_UI.h @@ -68,7 +68,7 @@ class wxTLSServerTrustPanel; /// /// TLS credentials configuration panel /// -typedef wxEAPCredentialsConfigPanel wxTLSCredentialsConfigPanel; +typedef wxEAPCredentialsConfigPanel wxTLSCredentialsConfigPanel; /// /// TLS configuration panel diff --git a/lib/TTLS_UI/src/Module.cpp b/lib/TTLS_UI/src/Module.cpp index f8cb5a3..ce2ce58 100644 --- a/lib/TTLS_UI/src/Module.cpp +++ b/lib/TTLS_UI/src/Module.cpp @@ -50,7 +50,7 @@ bool eap::peer_ttls_ui::invoke_config_ui( wxTopLevelWindows.Append(&parent); // Create and launch configuration dialog. - wxEAPConfigDialog dlg(cfg, &parent); + wxEAPConfigDialog dlg(cfg, &parent); result = dlg.ShowModal(); wxTopLevelWindows.DeleteObject(&parent);