--- a/libpurple/plugins/keyrings/kwallet.cpp Tue Sep 17 02:35:09 2019 +0000
+++ b/libpurple/plugins/keyrings/kwallet.cpp Thu Sep 26 21:25:14 2019 -0500
@@ -28,13 +28,13 @@
#include <QCoreApplication>
+#include "purplekwallet.h" #define KWALLET_NAME N_("KWallet")
#define KWALLET_DESCRIPTION N_("This plugin will store passwords in KWallet.")
@@ -49,81 +49,6 @@
PurpleKeyring *keyring_handler = NULL;
QCoreApplication *qCoreApp = NULL;
-namespace KWalletPlugin {
- virtual void detailedAbort(enum PurpleKeyringError error) = 0;
- virtual void execute(KWallet::Wallet *wallet) = 0;
- PurpleAccount *account;
-class engine : private QObject, private QQueue<request*>
- void queue(request *req);
- static engine *instance(bool create);
- static void closeInstance(void);
- void walletOpened(bool opened);
- static engine *pinstance;
- KWallet::Wallet *wallet;
- void executeRequests();
-class save_request : public request
- save_request(PurpleAccount *account, const char *password,
- PurpleKeyringSaveCallback cb, void *data);
- void detailedAbort(enum PurpleKeyringError error);
- void execute(KWallet::Wallet *wallet);
- PurpleKeyringSaveCallback callback;
-class read_request : public request
- read_request(PurpleAccount *account,
- PurpleKeyringReadCallback cb, void *data);
- void detailedAbort(enum PurpleKeyringError error);
- void execute(KWallet::Wallet *wallet);
- PurpleKeyringReadCallback callback;
@@ -572,5 +497,3 @@
PURPLE_PLUGIN_INIT(kwallet_keyring, plugin_query, plugin_load, plugin_unload);
--- a/libpurple/plugins/keyrings/meson.build Tue Sep 17 02:35:09 2019 +0000
+++ b/libpurple/plugins/keyrings/meson.build Thu Sep 26 21:25:14 2019 -0500
@@ -21,10 +21,13 @@
- kwallet_moc = moc.process('kwallet.cpp')
+ kwallet_moc = qt5.preprocess( + moc_headers: 'purplekwallet.h', - kwallet_plugin = library('kwallet', 'kwallet.cpp', kwallet_moc,
- dependencies : [kwallet, qt4, libpurple_dep],
+ kwallet_plugin = library('kwallet', 'kwallet.cpp', 'purplekwallet.h', kwallet_moc, + dependencies : [kwallet, qt5_dep, libpurple_dep], install : true, install_dir : PURPLE_PLUGINDIR)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/plugins/keyrings/purplekwallet.h Thu Sep 26 21:25:14 2019 -0500
@@ -0,0 +1,100 @@
+ * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program ; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +namespace KWalletPlugin { + virtual void detailedAbort(enum PurpleKeyringError error) = 0; + virtual void execute(KWallet::Wallet *wallet) = 0; + PurpleAccount *account; +class engine : private QObject, private QQueue<request*> + void queue(request *req); + static engine *instance(bool create); + static void closeInstance(void); + void walletOpened(bool opened); + static engine *pinstance; + KWallet::Wallet *wallet; + void executeRequests(); +class save_request : public request + save_request(PurpleAccount *account, const char *password, + PurpleKeyringSaveCallback cb, void *data); + void detailedAbort(enum PurpleKeyringError error); + void execute(KWallet::Wallet *wallet); + PurpleKeyringSaveCallback callback; +class read_request : public request + read_request(PurpleAccount *account, + PurpleKeyringReadCallback cb, void *data); + void detailedAbort(enum PurpleKeyringError error); + void execute(KWallet::Wallet *wallet); + PurpleKeyringReadCallback callback; --- a/meson.build Tue Sep 17 02:35:09 2019 +0000
+++ b/meson.build Thu Sep 26 21:25:14 2019 -0500
@@ -690,76 +690,18 @@
#######################################################################
enable_kwallet = get_option('kwallet') and not IS_WIN32
# Ensure C++ compiler works
cxx_compiler = meson.get_compiler('cpp')
- qt4 = dependency('qt4', modules : 'Core', required : force_deps)
- enable_kwallet = qt4.found()
+ add_project_arguments('-DHAVE_CONFIG_H=1', language : 'cpp')
-# AC_MSG_CHECKING([for metaobject compiler])
-# MOC=`$PKG_CONFIG --variable=moc_location QtCore`
-# if test -z '$with_kwallet_includes' || test -z '$with_kwallet_libs'; then
-# AC_CHECK_PROG(KDE4_CONFIG, kde4-config, kde4-config, no)
-# if test 'x$KDE4_CONFIG' = 'xno'; then
-# enable_kwallet = false
-# if test 'x$force_deps' = 'xyes'; then
-#kde4-config not found. $KDE4_CONFIG
-#Use -Dkwallet=false if you do not need KWallet support.
-# if test 'x$KDE4_CONFIG' != 'xno'; then
-# KWALLET_CXXFLAGS='$QT4_CFLAGS -I`$KDE4_CONFIG --path include`'
-# CPPFLAGS='$CPPFLAGS $KWALLET_CXXFLAGS'
-# AC_CHECK_HEADER([kwallet.h], , [
-# enable_kwallet = false
-# if test 'x$force_deps' = 'xyes'; then
-#KWallet development headers not found.
-#Use -Dkwallet=false if you do not need KWallet support.
+ qt5_dep = dependency('qt5', modules: ['Core'])
-# AC_MSG_CHECKING([for KWallet libraries])
-# if test 'x$KDE4_CONFIG' != 'xno'; then
-# KWALLET_LIBS='-L`$KDE4_CONFIG --install lib`/kde4/devel -lkdeui'
-# KWALLET_LIBS='-lkdeui'
-# KWALLET_LIBS='$KWALLET_LIBS'
-# LIBS='$LIBS $KWALLET_LIBS $QT4_LIBS'
-# AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <kwallet.h>],
-# [KWallet::Wallet::LocalWallet();])], [AC_MSG_RESULT([yes])],
-# enable_kwallet = false
-# if test 'x$force_deps' = 'xyes'; then
-#KWallet development libraries not found.
-#Use -Dkwallet=false if you do not need KWallet support.
+ kwallet = dependency('KF5Wallet') #######################################################################