[leechcraft/f17] Fixing bugs
Minh Ngo
ignotusp at fedoraproject.org
Sat Mar 17 19:12:26 UTC 2012
commit fe874aebb97cffc13c618af1b3a9d12e7f0bb6f1
Author: Minh Ngo <nlminhtl at gmail.com>
Date: Sat Mar 17 21:11:57 2012 +0200
Fixing bugs
find_qxmpp.patch | 14 +++
leechcraft-for-gcc-4.7.0.patch | 205 ++++++++++++++++++++++++++++++++++++++++
leechcraft.spec | 6 +-
3 files changed, 224 insertions(+), 1 deletions(-)
---
diff --git a/find_qxmpp.patch b/find_qxmpp.patch
new file mode 100644
index 0000000..a05bd93
--- /dev/null
+++ b/find_qxmpp.patch
@@ -0,0 +1,14 @@
+diff -ru ../leechcraft-0.5.60/src/plugins/azoth/plugins/xoox/cmake/FindQXmpp.cmake ./src/plugins/azoth/plugins/xoox/cmake/FindQXmpp.cmake
+--- ../leechcraft-0.5.60/src/plugins/azoth/plugins/xoox/cmake/FindQXmpp.cmake 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/azoth/plugins/xoox/cmake/FindQXmpp.cmake 2012-03-17 19:08:26.974642341 +0200
+@@ -37,7 +37,9 @@
+
+ IF(QXMPP_LIBRARIES AND QXMPP_INCLUDE_DIR)
+ IF(NOT QXMPP_LOCAL)
+- SET(QXMPP_INCLUDE_DIR "${QXMPP_INCLUDE_DIR}/qxmpp")
++ SET(QXMPP_INCLUDE_DIR
++ ${QXMPP_INCLUDE_DIR}/qxmpp
++ ${QXMPP_INCLUDE_DIR}/qxmpp-dev)
+ ENDIF(NOT QXMPP_LOCAL)
+ SET(QXMPP_FOUND 1)
+ ENDIF(QXMPP_LIBRARIES AND QXMPP_INCLUDE_DIR)
diff --git a/leechcraft-for-gcc-4.7.0.patch b/leechcraft-for-gcc-4.7.0.patch
new file mode 100644
index 0000000..6d1c30a
--- /dev/null
+++ b/leechcraft-for-gcc-4.7.0.patch
@@ -0,0 +1,205 @@
+diff -ru ../leechcraft-0.5.60/src/plugins/aggregator/core.cpp ./src/plugins/aggregator/core.cpp
+--- ../leechcraft-0.5.60/src/plugins/aggregator/core.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/aggregator/core.cpp 2012-03-17 18:03:16.728925270 +0200
+@@ -422,7 +422,7 @@
+ channels_shorts_t channels;
+ StorageBackend_->GetChannels (channels, feedId);
+ std::for_each (channels.begin (), channels.end (),
+- [ChannelsModel_] (ChannelShort chan)
++ [this] (ChannelShort chan)
+ { ChannelsModel_->AddChannel (chan); });
+ }
+
+diff -ru ../leechcraft-0.5.60/src/plugins/azoth/core.cpp ./src/plugins/azoth/core.cpp
+--- ../leechcraft-0.5.60/src/plugins/azoth/core.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/azoth/core.cpp 2012-03-17 18:15:55.419206463 +0200
+@@ -2373,7 +2373,7 @@
+ Util::NotificationActionHandler *nh =
+ new Util::NotificationActionHandler (e, this);
+ nh->AddFunction (tr ("Open chat"),
+- [parentCL, ChatTabsManager_] () { ChatTabsManager_->OpenChat (parentCL); });
++ [parentCL, this] () { ChatTabsManager_->OpenChat (parentCL); });
+ nh->AddDependentObject (parentCL->GetObject ());
+
+ emit gotEntity (e);
+@@ -2453,7 +2453,7 @@
+ Util::NotificationActionHandler *nh =
+ new Util::NotificationActionHandler (e, this);
+ nh->AddFunction (tr ("Open chat"),
+- [entry, ChatTabsManager_] () { ChatTabsManager_->OpenChat (entry); });
++ [entry, this] () { ChatTabsManager_->OpenChat (entry); });
+ nh->AddDependentObject (entry->GetObject ());
+
+ emit gotEntity (e);
+diff -ru ../leechcraft-0.5.60/src/plugins/azoth/msgformatterwidget.cpp ./src/plugins/azoth/msgformatterwidget.cpp
+--- ../leechcraft-0.5.60/src/plugins/azoth/msgformatterwidget.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/azoth/msgformatterwidget.cpp 2012-03-17 18:26:54.147910604 +0200
+@@ -235,25 +235,25 @@
+
+ void MsgFormatterWidget::handleBold ()
+ {
+- CharFormatActor ([FormatBold_] (QTextCharFormat *fmt)
++ CharFormatActor ([this] (QTextCharFormat *fmt)
+ { fmt->setFontWeight (FormatBold_->isChecked () ? QFont::Bold : QFont::Normal); });
+ }
+
+ void MsgFormatterWidget::handleItalic ()
+ {
+- CharFormatActor ([FormatItalic_] (QTextCharFormat *fmt)
++ CharFormatActor ([this] (QTextCharFormat *fmt)
+ { fmt->setFontItalic (FormatItalic_->isChecked ()); });
+ }
+
+ void MsgFormatterWidget::handleUnderline ()
+ {
+- CharFormatActor ([FormatUnderline_] (QTextCharFormat *fmt)
++ CharFormatActor ([this] (QTextCharFormat *fmt)
+ { fmt->setFontUnderline (FormatUnderline_->isChecked ()); });
+ }
+
+ void MsgFormatterWidget::handleStrikeThrough ()
+ {
+- CharFormatActor ([FormatStrikeThrough_] (QTextCharFormat *fmt)
++ CharFormatActor ([this] (QTextCharFormat *fmt)
+ { fmt->setFontStrikeOut (FormatStrikeThrough_->isChecked ()); });
+ }
+
+diff -ru ../leechcraft-0.5.60/src/plugins/azoth/plugins/vader/mrimbuddy.cpp ./src/plugins/azoth/plugins/vader/mrimbuddy.cpp
+--- ../leechcraft-0.5.60/src/plugins/azoth/plugins/vader/mrimbuddy.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/azoth/plugins/vader/mrimbuddy.cpp 2012-03-17 18:32:33.892514368 +0200
+@@ -327,7 +327,7 @@
+
+ void MRIMBuddy::UpdateClientVersion ()
+ {
+- auto defClient = [&ClientInfo_, this] ()
++ auto defClient = [this] ()
+ {
+ ClientInfo_ ["client_type"] = "mailruagent";
+ ClientInfo_ ["client_name"] = tr ("Mail.Ru Agent");
+
+diff -ru ../leechcraft-0.5.60/src/plugins/azoth/plugins/xoox/msgarchivingmanager.cpp ./src/plugins/azoth/plugins/xoox/msgarchivingmanager.cpp
+--- ../leechcraft-0.5.60/src/plugins/azoth/plugins/xoox/msgarchivingmanager.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/azoth/plugins/xoox/msgarchivingmanager.cpp 2012-03-17 19:30:33.102464125 +0200
+@@ -291,7 +291,7 @@
+
+ Prefs_.AutoSave_ = autoSave.attribute ("save") == "true";
+
+- auto handleMeth = [&Prefs_] (const QDomElement& meth)
++ auto handleMeth = [this] (const QDomElement& meth)
+ {
+ Prefs_.MethodPolicies_ [MethodConverter (meth.attribute ("type"))] =
+ MethodPolicyConverter (meth.attribute ("use"));
+diff -ru ../leechcraft-0.5.60/src/plugins/azoth/plugins/xoox/roomhandler.cpp ./src/plugins/azoth/plugins/xoox/roomhandler.cpp
+--- ../leechcraft-0.5.60/src/plugins/azoth/plugins/xoox/roomhandler.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/azoth/plugins/xoox/roomhandler.cpp 2012-03-17 19:22:16.888949769 +0200
+@@ -52,7 +52,7 @@
+ {
+ const QString& server = jid.split ('@', QString::SkipEmptyParts).value (1);
+ auto sdManager = Account_->GetClientConnection ()->GetSDManager ();
+- sdManager->RequestInfo ([&ServerDisco_] (const QXmppDiscoveryIq& iq)
++ sdManager->RequestInfo ([this] (const QXmppDiscoveryIq& iq)
+ { ServerDisco_ = iq; },
+ server);
+
+diff -ru ../leechcraft-0.5.60/src/plugins/azoth/plugins/xoox/sdmanager.cpp ./src/plugins/azoth/plugins/xoox/sdmanager.cpp
+--- ../leechcraft-0.5.60/src/plugins/azoth/plugins/xoox/sdmanager.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/azoth/plugins/xoox/sdmanager.cpp 2012-03-17 19:25:31.005492464 +0200
+@@ -33,7 +33,7 @@
+ void SDManager::RequestInfo (ClientConnection::DiscoCallback_t callback,
+ const QString& jid, const QString& node)
+ {
+- auto f = [Conn_] (const QString& jid, ClientConnection::DiscoCallback_t cb, const QString& node)
++ auto f = [this] (const QString& jid, ClientConnection::DiscoCallback_t cb, const QString& node)
+ { Conn_->RequestInfo (jid, cb, node); };
+ CommonDo (Infos_, f, callback, jid, node);
+ }
+@@ -41,7 +41,7 @@
+ void SDManager::RequestItems (ClientConnection::DiscoCallback_t callback,
+ const QString& jid, const QString& node)
+ {
+- auto f = [Conn_] (const QString& jid, ClientConnection::DiscoCallback_t cb, const QString& node)
++ auto f = [this] (const QString& jid, ClientConnection::DiscoCallback_t cb, const QString& node)
+ { Conn_->RequestItems (jid, cb, node); };
+ CommonDo (Items_, f, callback, jid, node);
+ }
+diff -ru ../leechcraft-0.5.60/src/plugins/newlife/importers/psiplus/psiplusimportpage.cpp ./src/plugins/newlife/importers/psiplus/psiplusimportpage.cpp
+--- ../leechcraft-0.5.60/src/plugins/newlife/importers/psiplus/psiplusimportpage.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/newlife/importers/psiplus/psiplusimportpage.cpp 2012-03-17 19:54:32.184623933 +0200
+@@ -32,22 +32,27 @@
+ {
+ namespace Importers
+ {
++ namespace
++ {
++ QString tfd (const QDomElement& account, const QString& field)
++ {
++ return account.firstChildElement (field).text ();
++ }
++ }
++
+ PsiPlusImportPage::PsiPlusImportPage (QWidget *parent)
+ : Common::IMImportPage (parent)
+ {
+- auto tfd = [] (const QDomElement& account, const QString& field)
+- { return account.firstChildElement (field).text (); };
+-
+ auto adapter = Common::XMLIMAccount::ConfigAdapter
+ {
+ AccountsModel_,
+ QStringList (".config") << "Psi+" << "profiles",
+ "accounts.xml",
+ [] (const QDomElement&) { return "xmpp"; },
+- [tfd] (const QDomElement& acc) { return tfd (acc, "name"); },
+- [tfd] (const QDomElement& acc) { return tfd (acc, "enabled") == "true"; },
+- [tfd] (const QDomElement& acc) { return tfd (acc, "jid"); },
+- [tfd] (const QDomElement& acc, QVariantMap& accountData)
++ [] (const QDomElement& acc) { return tfd (acc, "name"); },
++ [] (const QDomElement& acc) { return tfd (acc, "enabled") == "true"; },
++ [] (const QDomElement& acc) { return tfd (acc, "jid"); },
++ [] (const QDomElement& acc, QVariantMap& accountData)
+ {
+ accountData ["Port"] = tfd (acc, "port").toInt ();
+ accountData ["Host"] = tfd (acc, "use-host") == "true" ?
+diff -ru ../leechcraft-0.5.60/src/plugins/newlife/importers/vacuum/vacuumimportpage.cpp ./src/plugins/newlife/importers/vacuum/vacuumimportpage.cpp
+--- ../leechcraft-0.5.60/src/plugins/newlife/importers/vacuum/vacuumimportpage.cpp 2012-03-15 11:36:54.000000000 +0200
++++ ./src/plugins/newlife/importers/vacuum/vacuumimportpage.cpp 2012-03-17 19:55:40.825213517 +0200
+@@ -29,27 +29,32 @@
+ {
+ namespace Importers
+ {
++ namespace
++ {
++ QString tfd (const QDomElement& account, const QString& field)
++ {
++ return account.firstChildElement (field).text ();
++ }
++ }
++
+ VacuumImportPage::VacuumImportPage (QWidget *parent)
+ : Common::IMImportPage (parent)
+ {
+- auto tfd = [] (const QDomElement& account, const QString& field)
+- { return account.firstChildElement (field).text (); };
+-
+ auto adapter = Common::XMLIMAccount::ConfigAdapter
+ {
+ AccountsModel_,
+ QStringList (".vacuum") << "profiles",
+ "options.xml",
+ [] (const QDomElement&) { return "xmpp"; },
+- [tfd] (const QDomElement& acc) { return tfd (acc, "name"); },
+- [tfd] (const QDomElement& acc) { return tfd (acc, "active") == "true"; },
+- [tfd] (const QDomElement& acc)
++ [] (const QDomElement& acc) { return tfd (acc, "name"); },
++ [] (const QDomElement& acc) { return tfd (acc, "active") == "true"; },
++ [] (const QDomElement& acc)
+ {
+ const auto& sjid = tfd (acc, "streamJid");
+ const int pos = sjid.indexOf ('/');
+ return pos < 0 ? sjid : sjid.left (pos);
+ },
+- [tfd] (const QDomElement& acc, QVariantMap& accountData)
++ [] (const QDomElement& acc, QVariantMap& accountData)
+ {
+ const QDomElement& conn = acc.firstChildElement ("connection");
+
diff --git a/leechcraft.spec b/leechcraft.spec
index 9968ad8..ca4b2ae 100644
--- a/leechcraft.spec
+++ b/leechcraft.spec
@@ -14,7 +14,9 @@ Url: http://leechcraft.org
Source0: http://freefr.dl.sourceforge.net/project/leechcraft/LeechCraft/0.5.60/leechcraft-0.5.60.tar.xz
Source1: %{name}.desktop
+Patch1: find_qxmpp.patch
Patch2: defaultstyle.patch
+Patch3: leechcraft-for-gcc-4.7.0.patch
Requires: %{name}-iconset = %{full_version}
@@ -780,7 +782,9 @@ This package provides a image viewer for LeechCraft IC.
%prep
%setup -qn %{name}-%{version}
+%patch1
%patch2
+%patch3
#removing non-free icons
rm -rf src/plugins/azoth/share/azoth/iconsets/clients/default
@@ -1167,7 +1171,7 @@ fi
%changelog
* Sat Mar 17 2012 Minh Ngo <nlminhtl at gmailcom> 0.5.60-1
- Changes http://leechcraft.org/leechcraft-0.5.60-is-released
-- Removing find_qxmpp.patch
+- Fixing source for GCC 4.7.0
* Wed Mar 14 2012 Minh Ngo <nlminhtl at gmail.com> 0.5.0-4
- Disabling eiskaltcpp plugin (Cannot be built for F17
More information about the scm-commits
mailing list