commit libqca2 for openSUSE:Factory
Hello community, here is the log from the commit of package libqca2 for openSUSE:Factory checked in at Tue Feb 3 22:56:55 CET 2009. -------- --- libqca2/libqca2.changes 2009-01-22 01:31:24.000000000 +0100 +++ libqca2/libqca2.changes 2009-02-03 14:17:40.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Feb 3 14:17:15 CET 2009 - dmueller@suse.de + +- fix qt version check (bnc#471444) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- fix-qt-check.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqca2.spec ++++++ --- /var/tmp/diff_new_pack.B28857/_old 2009-02-03 22:54:18.000000000 +0100 +++ /var/tmp/diff_new_pack.B28857/_new 2009-02-03 22:54:18.000000000 +0100 @@ -38,7 +38,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://delta.affinix.com/qca/ Version: 2.0.1 -Release: 4 +Release: 5 %define tar_version %version %define with_botan 0 %define with_nss 0 @@ -47,6 +47,7 @@ Source2: qca-gnupg-2.0.0-beta3.tar.bz2 Source3: qca-ossl-2.0.0-beta3.tar.bz2 Source4: qca-pkcs11-2.0.0-beta2.tar.bz2 +Patch0: fix-qt-check.diff %if %suse_version > 1020 Requires: gpg2 >= 2.0.0 %endif @@ -181,6 +182,9 @@ %prep %setup -c -n qca-%{tar_version}/plugins -a 1 -a 2 -a 3 -a 4 +pushd qca-gnupg-* +%patch0 +popd cd ../../.. %setup -D -q -n qca-%{tar_version} @@ -274,6 +278,8 @@ %endif %changelog +* Tue Feb 03 2009 dmueller@suse.de +- fix qt version check (bnc#471444) * Thu Jan 22 2009 dmueller@suse.de - add baselibs.conf * Thu Aug 28 2008 wstephenson@suse.de ++++++ fix-qt-check.diff ++++++ --- qca-gnupg.cpp +++ qca-gnupg.cpp @@ -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()) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de