need to backport patch in kinit/kinit_win.cpp to 4.6

Wolfgang Rohdewald wolfgang at
Wed Mar 9 21:26:26 GMT 2011


when compiling kdelibs 4.6 on Windows, I get an 
error in kinit_win.cpp at line 110 (I am afraid I deleted it)

but the commit in kdelibs below obviously fixes it. So I
want to backport it to kdelibs.

Would that be OK, and how would I do it? Like this:

git checkout --track origin/KDE/4.6
git cherry-pick fd16288
git push

or would I violate dozens of rules by doing so?

i5:~/src/kdelibs.was/kinit$ git show fd16288
commit fd16288cedadf8ccf469df8a7be296763f5003d8
Author: Patrick Spendrin <ps_ml at>
Date:   Sun Feb 20 21:39:20 2011 +0100

    we need to cast by hand from wchar to ushort

diff --git a/kinit/kinit_win.cpp b/kinit/kinit_win.cpp
index 17266a4..9c1521a 100644
--- a/kinit/kinit_win.cpp
+++ b/kinit/kinit_win.cpp
@@ -107,7 +107,7 @@ QString toString(PSID sid)
     if (!ConvertSidToStringSid(sid, &s))
         return QString();
-    QString result = QString::fromUtf16(s);
+    QString result = QString::fromUtf16(reinterpret_cast<ushort*>(s));
     return result;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list