From 71d51a985ea14f6e5b2566e18c1a8f0a0d3c0e53 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 1 Jun 2024 04:03:37 +0300 Subject: [PATCH] kutils: fix build without openssl Signed-off-by: Ivailo Monev --- kutils/kpasswdstore/kded/kpasswdstoreimpl.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kutils/kpasswdstore/kded/kpasswdstoreimpl.cpp b/kutils/kpasswdstore/kded/kpasswdstoreimpl.cpp index f18ec0c9..f81d86e6 100644 --- a/kutils/kpasswdstore/kded/kpasswdstoreimpl.cpp +++ b/kutils/kpasswdstore/kded/kpasswdstoreimpl.cpp @@ -92,11 +92,16 @@ QString KPasswdStoreImpl::storeID() const bool KPasswdStoreImpl::isOpen() const { - return (m_passwdtimer.elapsed() < m_timeout); +#if defined(HAVE_OPENSSL) + return (!m_passwd.isEmpty() && m_passwdtimer.elapsed() < m_timeout); +#else + return false; +#endif } bool KPasswdStoreImpl::openStore(const qlonglong windowid) { +#if defined(HAVE_OPENSSL) if (m_cacheonly && m_passwdtimer.elapsed() < m_timeout) { kDebug() << "cache store" << m_storeid; return false; @@ -142,6 +147,9 @@ bool KPasswdStoreImpl::openStore(const qlonglong windowid) kDebug() << "store is now open" << m_storeid; setCacheOnly(false); return true; +#else + return false; +#endif } bool KPasswdStoreImpl::closeStore() @@ -293,8 +301,10 @@ bool KPasswdStoreImpl::ensurePasswd(const qlonglong windowid, const bool showerr } return hasPasswd(); #else - // not used - return true; + Q_UNUSED(windowid); + Q_UNUSED(showerror); + Q_UNUSED(cancel); + return false; #endif }