[Kde-games-devel] Freeze in 6 weeks

Ian Wadham iandw.au at gmail.com
Tue Jan 27 04:53:32 UTC 2015


Hi Jeremy,

Re Save and Load in KMahjongg requiring kded and friends:-

On 27/01/2015, at 2:00 PM, Jeremy Whiting wrote:
> Ah, maybe it's the use of kio :/

Any game or any app can crash… and then DrKonqi requires KIO
(via XML remote procedure calls) to connect to Bugzilla and submit
a bug report or check for duplicates.  I cannot see DrK for KF5 being
re-worked in any immediate time frame… :-(

> Is that strictly required for kmahjongg to save and load files?

No.  Actually, KMJ uses getSaveUrl() but then goes on to check that
it has a local file name.  On the load(), it uses getOpenUrl() and then:
    KIO::NetAccess::download(url, fname, this);
A "braces and belt" approach?

I think consistency should be restored, i.e. use getSaveFileName() and
getOpenFileName().  The actual file-I/O code in KMahjongg is using
QFile and QDataStream.

> Isn't QFileDialog and such adequate here?

Should be!  With the added benefit that QFileDialog gives you a native
file dialog on non-Linux platforms… :-)  This can make Qt-based apps
consistent with other apps on that platform.

> I mean are we expecting to save and load the save games over the
> network or something that would require kio?

No, not in KMahjongg.  But with some games, who knows?  Do KSudoku
and Palapeli players want to exchange puzzles over the Internet?  Or use
remote locations to save their games?

Or are those features there because network-transparent I/O was fashionable
with KDE Games programmers a few years ago?… ;-)  It is not that hard to
save a file locally and then move it to a remote site… or attach it to an email...

Cheers, Ian W.



More information about the kde-games-devel mailing list