]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/variant.cpp
fixed ANSI/Unicode incompatibility of the cache (bug 663396)
[wxWidgets.git] / src / common / variant.cpp
index defe41807fdf1002c87921e4358e9369369da799..9ef2f1ae9311db2b6afd7d50792b8c3ad9622816 100644 (file)
@@ -1026,6 +1026,8 @@ public:
 
 protected:
     void* m_value;
+
+    DECLARE_NO_COPY_CLASS(wxVariantDataVoidPtr)
 };
 
 IMPLEMENT_DYNAMIC_CLASS(wxVariantDataVoidPtr, wxVariantData)
@@ -2244,9 +2246,11 @@ bool wxVariant::Convert(wxDateTime* value) const
 {
     wxString type(GetType());
     if (type == wxT("datetime"))
+    {
         *value = ((wxVariantDataDateTime*)GetData())->GetValue();
-    else
-        return FALSE;
-
-    return TRUE;
+       return TRUE;
+    } 
+    // Fallback to string conversion
+    wxString val;
+    return Convert(&val) && (value->ParseDate(val));
 }