D11962: Fix problems with unnesesary unsaved empty entries when load worksheet from file
Alexander Semke
noreply at phabricator.kde.org
Thu Apr 5 15:24:11 UTC 2018
asemke added a comment.
In D11962#240606 <https://phabricator.kde.org/D11962#240606>, @sirgienko wrote:
> In D11962#240605 <https://phabricator.kde.org/D11962#240605>, @asemke wrote:
>
> > A simple
> >
> > if (m_isLoadingFromFile)
> > return;
> >
> >
> > in the beginning of Worksheet::appendCommandEntry() should do the same, right? With this we don't need any changes in worksheetentry.cpp and any Worksheet::isLoadingFromFile().
>
>
> In `Worksheet::load(QIODevice* device)` we also call `appendCommandEntry()`.
I'd rather call appendEntry(CommandEntry::Type), etc. directly in Worksheet::load(QIODevice*) instead of going via all those append*Entry() functions - this additional indirection (one more function call) is of no benefit here and blocks my proposal for a simple fix for the problem you're addressing here.
REPOSITORY
R55 Cantor
REVISION DETAIL
https://phabricator.kde.org/D11962
To: sirgienko, #cantor, asemke
Cc: #cantor, #kde_edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180405/356deecf/attachment.html>
More information about the kde-edu
mailing list