[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kexi/kexidb
From:       Jarosław Staniek <staniek () kde ! org>
Date:       2009-09-21 20:53:31
Message-ID: 1253566411.634418.7298.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1026468 by staniek:

KexiDB
add matches() to version info



 M  +2 -7      drivermanager.cpp  
 M  +2 -0      global.h  


--- trunk/koffice/kexi/kexidb/drivermanager.cpp #1026467:1026468
@@ -43,11 +43,6 @@
 
 DriverManagerInternal* DriverManagerInternal::s_self = 0L;
 
-static bool versionMatches(uint major_ver,  uint minor_ver, const \
                DatabaseVersionInfo& kexiDbVersion)
-{
-    return major_ver == kexiDbVersion.major && minor_ver == kexiDbVersion.minor;
-}
-
 DriverManagerInternal::DriverManagerInternal() /* protected */
         : QObject(0)
         , Object()
@@ -138,7 +133,7 @@
             continue;
         }
 
-        if (!versionMatches(major_ver, minor_ver, KexiDB::version())) {
+        if (!KexiDB::version().matches(major_ver, minor_ver)) {
             KexiDBWarn << QString("DriverManagerInternal::lookupDrivers(): '%1' \
                driver"
                                   " has version '%2' but required KexiDB driver \
                version is '%3.%4'\n"
                                   " -- skipping this \
driver!").arg(srv_name).arg(srv_ver_str) @@ -224,7 +219,7 @@
     KPluginLoader loader(ptr->library());
     const uint foundMajor = (loader.pluginVersion() >> 16) & 0xff;
     const uint foundMinor = (loader.pluginVersion() >> 8) & 0xff;
-    if (!versionMatches(foundMajor, foundMinor, KexiDB::version())) {
+    if (!KexiDB::version().matches(foundMajor, foundMinor)) {
         setError(ERR_INCOMPAT_DRIVER_VERSION,
                  i18n(
                      "Incompatible database driver's \"%1\" version: found version \
                %2, expected version %3.",
--- trunk/koffice/kexi/kexidb/global.h #1026467:1026468
@@ -110,6 +110,8 @@
     DatabaseVersionInfo();
     DatabaseVersionInfo(uint majorVersion, uint minorVersion);
 
+    bool matches(uint _major, uint _minor) const { return _major == major && _minor \
== minor; } +
     //! Major version number, e.g. 1 for 1.8
     uint major;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic