rpms/qca-gnupg/F-9 qca-gnupg-keyringmonitoring.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 qca-gnupg-includes.patch, 1.1, NONE

Sven Lankes slankes at fedoraproject.org
Mon Jun 8 21:20:20 UTC 2009


Author: slankes

Update of /cvs/pkgs/rpms/qca-gnupg/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5680

Modified Files:
	.cvsignore sources 
Added Files:
	qca-gnupg-keyringmonitoring.patch 
Removed Files:
	qca-gnupg-includes.patch 
Log Message:
new upstream release

qca-gnupg-keyringmonitoring.patch:

--- NEW FILE qca-gnupg-keyringmonitoring.patch ---
--- /home/sven/rpmbuild/SOURCES/qca-gnupg-2.0.0-beta3/qca-gnupg.cpp	2008-04-08 05:03:20.000000000 +0200
+++ qca-gnupg.cpp	2009-06-05 20:50:25.952546747 +0200
@@ -41,35 +41,54 @@
 
 namespace gpgQCAPlugin {
 
+#ifdef Q_OS_LINUX
 static int qVersionInt()
 {
 	static int out = -1;
 
-	if(out == -1) {
+	if(out == -1)
+	{
 		QString str = QString::fromLatin1(qVersion());
 		QStringList parts = str.split('.', QString::KeepEmptyParts);
-		Q_ASSERT(parts.count() == 3);
+		if(parts.count() != 3)
+		{
+			out = 0;
+			return out;
+		}
+
 		out = 0;
-		for(int n = 0; n < 3; ++n) {
+		for(int n = 0; n < 3; ++n)
+		{
 			bool ok;
 			int x = parts[n].toInt(&ok);
-			Q_ASSERT(ok);
-			Q_ASSERT(x > 0 && x <= 0xff);
-			out <<= x;
+			if(ok && x >= 0 && x <= 0xff)
+			{
+				out <<= 8;
+				out += x;
+			}
+			else
+			{
+				out = 0;
+				return out;
+			}
 		}
 	}
 
 	return out;
 }
 
-#ifdef Q_OS_LINUX
 static bool qt_buggy_fsw()
 {
-	// FIXME: just a guess that this is fixed in 4.3.5 and 4.4.0
-	if(qVersionInt() < 0x040305)
+	// fixed in 4.3.5 and 4.4.1
+	int ver = qVersionInt();
+	int majmin = ver >> 8;
+	if(majmin < 0x0403)
 		return true;
-	else
-		return false;
+	else if(majmin == 0x0403 && ver < 0x040305)
+		return true;
+	else if(majmin == 0x0404 && ver < 0x040401)
+		return true;
+	return false;
 }
 #else
 static bool qt_buggy_fsw()
@@ -603,7 +622,8 @@
 //   problem, we'll watch the directories containing the keyring files
 //   instead of watching the actual files themselves.
 //
-// FIXME: consider moving this logic into FileWatch
+// FIXME: qca 2.0.1 FileWatch has this logic already, so we can probably
+//   simplify this class.
 class RingWatch : public QObject
 {
 	Q_OBJECT
@@ -1131,10 +1151,10 @@
 			// secret keyring filename
 			else if(init_step == 1)
 			{
-				secring = gpg.keyringFile();
+				secring = QFileInfo(gpg.keyringFile()).canonicalFilePath();
 
 				if(qt_buggy_fsw())
-					fprintf(stderr, "qca-gnupg: disabling keyring monitoring due to buggy Qt version\n");
+					fprintf(stderr, "qca-gnupg: disabling keyring monitoring in Qt version < 4.3.5 or 4.4.1\n");
 
 				if(!secring.isEmpty())
 				{
@@ -1149,7 +1169,7 @@
 			// public keyring filename
 			else if(init_step == 2)
 			{
-				pubring = gpg.keyringFile();
+				pubring = QFileInfo(gpg.keyringFile()).canonicalFilePath();
 				if(!pubring.isEmpty())
 				{
 					if(!qt_buggy_fsw())


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/qca-gnupg/F-9/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- .cvsignore	12 Nov 2007 22:03:19 -0000	1.2
+++ .cvsignore	8 Jun 2009 21:19:49 -0000	1.3
@@ -1 +1 @@
-qca-gnupg-2.0.0-beta1.tar.bz2
+qca-gnupg-2.0.0-beta3.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/qca-gnupg/F-9/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sources	12 Nov 2007 22:03:19 -0000	1.2
+++ sources	8 Jun 2009 21:19:49 -0000	1.3
@@ -1 +1 @@
-88fe56f2b673fa7d66c8d18046ade22e  qca-gnupg-2.0.0-beta1.tar.bz2
+9b4d020efd835a52d98b2ced9ae79c4b  qca-gnupg-2.0.0-beta3.tar.bz2


--- qca-gnupg-includes.patch DELETED ---




More information about the fedora-extras-commits mailing list