Angus Leeming wrote:
 #ifdef Q_WS_MACX
        // The MAC clipboard uses \r for lineendings, and we use \n
        return subst(fromqstr(str), '\r', '\n');
+#endif
+#ifdef Q_WS_WIN
+       // The WIN clipboard uses \r\n for lineendings, and we use \n
+       return subst(fromqstr(str), "\r\n", "\n");
 #else
-       return fromqstr(str);
+ return fromqstr(str); #endif

Perhaps you should factor the code into a utility function? Maybe even into
fromqstr inself?

Yes, I wanted to do that for a long time.

Abdel.

Reply via email to