Status of the libkdeedu API

Andreas Xavier andxav at zoho.com
Sat Jun 21 12:31:18 UTC 2014



I am wondering about the status of libkdeedu and its interface.  May I add some functions and enums to KEduVocDoument?  

In particular I started working on a patch for 

https://bugs.kde.org/show_bug.cgi?id=240552

Bug 240552 - Second parley process cancels out changes in language file when closing 

The patch

https://git.reviewboard.kde.org/r/118686/

uses KAutoSaveFile to lock the vocdoc and prevent overwriting the file.  However, the patch is incomplete because Parley has no useful way to repond when the file cannot be opened.  I would like to give the user the option to steal the lock and forcefully open/save the file.  So I need to create a function to open/save/saveAs to a locked file.


I have read the binary compatibility article.

http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B

I think that something like the following new member functions and enums are acceptable.

    enum ErrorCode {
        NoError = 0,
        Unknown,
        InvalidXml,
        FileTypeUnknown,
        FileCannotWrite,
        FileWriterFailed,
        FileCannotRead,
        FileReaderFailed,
        FileDoesNotExist,
        FileIsLocked         //<******* NEW
    };

//**********  All New *************
enum LockingBehavior {
RespectLock =0,
ForceLock
};

void close();   // <***************  NEW                              


int open(const QUrl & url, LockingBehavior lb);   //** Merge this with open on API change
                                       ^^^^^^^^^
//                                    NEW param

int saveAs( const KUrl & url, FileType ft, const QString & generator , LockingBehavior lb);  //** Merge this with saveAs when the API changes
//                                                                                                  ^^^^^^^^^^^^^^^^
//                                                                                                   NEW param


Thanks for your time in answering.

Have a good.
Andreas.




More information about the kde-edu mailing list