make && ctest
- Group Reviewers
- R241:54ccb1ac4883: More fixes to compile without implicit conversion from ASCII/ByteArray
QLatin1String is sufficient for comparisons (and cheaper)
KF6 TODO: return QByteArray
This method should be const
Should this be remoteEncoding()->decode(...) given that the method will then use q->remoteEncoding()->encode()?
(I'm a bit confused with kremoteencoding, I could be wrong)
fromLatin1 is enough for adviceToStr, like you did on line 177 (so it's inconsistent)
(repeats 3 more times)
You could remove the QChar() around I guess.
should be enough.
A B C, nothing changed inside make it const, D E F.
Yes, that makes much more sense; using remoteEncoding()->decode() makes this bit of code consistent with the reset of how the ftp ioslave handles encoding.
Apparently I was confused by the I18N_NOOP calls in adviceToStr, but looking again now, the translations aren't saved in the config file...
You're just being polite.
In my defence, since that looks a bit too crazy even to me, I was worried about files with names that have encoding issues, e.g. the dreaded �; but looking up just a little at the code I see that fileList was written by the code, so if the encoding did go south, that ship has sailed and already has sunk :)
Hmm, also it's in the middle of member variables, better not mix them up.
This is more commonly written as "static const"
In any case, encoding issues are for QString<->QByteArray conversions. Any time we can stick to QString<->QString like here, we're safe :)
[strange mix of QLatin1String and QStringLiteral, but harmless]
This does not work. Our translation system cannot extract from something like
all the strings below with I18NC_NOOP should be left as is. Thanks.
The QStringLiteral here might create trouble for the translation extraction scripts?
I think the proper fix is to change the signature of createSystemBookmark to take two QByteArray arguments. Or you could even keep const char* for the context (the first one of the two) since it's dropped, no point in creating a QByteArray out of it.
[same as above]
Per dfaure's recommendation, change createSystemBookmark 2nd and 3rd params to take a const char * (since this is the translation context which will be dropped) and a QByteArray, respectively.