Review Request 108698: separate the rdf code into its own library
Friedrich W. H. Kossebau
kossebau at kde.org
Fri Feb 1 20:14:13 GMT 2013
> On Feb. 1, 2013, 6:27 p.m., Friedrich W. H. Kossebau wrote:
> > libs/main/KoDocument.h, lines 576-578
> > <http://git.reviewboard.kde.org/r/108698/diff/1/?file=111355#file111355line576>
> >
> > This adds QWidget/UI stuff dependency to KoDocument. Ideally that can be avoided. A pure document better does not offer a hardcoded implementation of an editor for its data IMHO.
> >
> > No perfect idea for now. What about having a virtual method in KoPart which delivers a KoDocumentInfoDlg? The specific KoPart has all needed info about the document and can create the properly stuffed dialog.
> >
> >
>
> Boudewijn Rempt wrote:
> Well, actually, a KoPageWidgetItem isn't a widget, is it? I started deriving it from KPageWidgetItem, but then it turned out that that wasn't necessary. Maybe a better name would work better. I'm also open to a better solution for the whole thing, but it's kinda tricky.
What I meant is that KoPageWidgetItem has a property "virtual QWidget *widget()", so knows about QWidget.
BTW, seems the overload with KWDocument of KoDocument::infoDialogPages() is missing from the patch?
In that overload I suspect you would also deal with QWidget elements on creating the KoPageWidgetItems. So KWDocument would be a place where document deals with UI stuff.
This solution also would not be QML-friendly.
Proposal for a better solution still would be to move creation of KoDocumentInfoDlg to some "virtual KoDocumentInfoDlg * KoPart::createDocumentInfoDialog(KoDocument *doc, QWidget *window)", with default implementation doing what is currently done:
KoDocumentInfoDlg * KoPart::createDocumentInfoDialog(KoDocument *doc, QWidget *window)
{
KoDocumentInfo *docInfo = doc->documentInfo();
if (! docInfo) {
return 0;
}
return new KoDocumentInfoDlg(widget, docInfo);
}
KWPart would then override this and also add the RDF pages to the created KoDocumentInfoDlg. KoPart & subclasses know about views and docs, so the right place to also know about docinfo and docinfo views, no?
- Friedrich W. H.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108698/#review26518
-----------------------------------------------------------
On Feb. 1, 2013, 1:16 p.m., Boudewijn Rempt wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108698/
> -----------------------------------------------------------
>
> (Updated Feb. 1, 2013, 1:16 p.m.)
>
>
> Review request for Calligra.
>
>
> Description
> -------
>
> This patch moves the rdf code from komain to a kordf library, and only words and calligraactive link to that. There is one tricky bit, the rdf page in the document info dialog, but that's fixed as well. There's now no ifdeffing anymore in kotext for rdf either.
>
>
> Diffs
> -----
>
> CMakeLists.txt 34ff56d
> active/CMakeLists.txt 7cabbef
> krita/plugins/formats/qml/qml_export.cc 800d13c
> krita/ui/kis_doc2.h e4d2249
> krita/ui/kis_doc2.cc f0dcc28
> libs/CMakeLists.txt 2a880c9
> libs/kotext/KoDocumentRdfBase.h 211b3a8
> libs/kotext/KoTextEditor.cpp 98f22b8
> libs/kotext/KoTextOdfSaveHelper.cpp f7cbf9a
> libs/kotext/KoTextSopranoRdfModel_p.h 80ae5bb
> libs/kotext/commands/TextPasteCommand.cpp d203b5a
> libs/kotext/opendocument/KoTextSharedSavingData.cpp 3fb3d51
> libs/main/CMakeLists.txt 9b54bfb
> libs/main/KoDocument.h ed8d1b7
> libs/main/KoDocument.cpp 66ad868
> libs/main/KoDocumentInfoDlg.h c93e3f5
> libs/main/KoDocumentInfoDlg.cpp 9870341
> libs/main/KoMainWindow.cpp 01689ac
> libs/main/rdf/InsertSemanticObjectActionBase.h 86dc07a
> libs/main/rdf/InsertSemanticObjectActionBase.cpp 23d7e6a
> libs/main/rdf/InsertSemanticObjectCreateAction.h 344e307
> libs/main/rdf/InsertSemanticObjectCreateAction.cpp 2ba731f
> libs/main/rdf/InsertSemanticObjectReferenceAction.h 607468c
> libs/main/rdf/InsertSemanticObjectReferenceAction.cpp 45a4a3f
> libs/main/rdf/KoChangeTrackerDisabledRAII.h 5ac98bd
> libs/main/rdf/KoChangeTrackerDisabledRAII.cpp 8511646
> libs/main/rdf/KoDocumentRdf.h 2c1d196
> libs/main/rdf/KoDocumentRdf.cpp 6cceae6
> libs/main/rdf/KoDocumentRdfEditWidget.h bb7c10f
> libs/main/rdf/KoDocumentRdfEditWidget.cpp b779729
> libs/main/rdf/KoDocumentRdfEditWidget.ui ea343f8
> libs/main/rdf/KoDocumentRdfEditWidgetBase.h 8362bc8
> libs/main/rdf/KoDocumentRdfEditWidgetBase.cpp 36a6ce2
> libs/main/rdf/KoRdfCalendarEvent.h 60dcfa3
> libs/main/rdf/KoRdfCalendarEvent.cpp 6658a6c
> libs/main/rdf/KoRdfCalendarEventEditWidget.ui 2ad3024
> libs/main/rdf/KoRdfCalendarEventTreeWidgetItem.h 8209962
> libs/main/rdf/KoRdfCalendarEventTreeWidgetItem.cpp 56a9f14
> libs/main/rdf/KoRdfFoaF.h 6892133
> libs/main/rdf/KoRdfFoaF.cpp 7c85717
> libs/main/rdf/KoRdfFoaFEditWidget.ui e938036
> libs/main/rdf/KoRdfFoaFTreeWidgetItem.h 47ae0ec
> libs/main/rdf/KoRdfFoaFTreeWidgetItem.cpp 4198ba1
> libs/main/rdf/KoRdfLocation.h 2d0851d
> libs/main/rdf/KoRdfLocation.cpp 77f78c7
> libs/main/rdf/KoRdfLocationEditWidget.h 6c27635
> libs/main/rdf/KoRdfLocationEditWidget.cpp fcdcb30
> libs/main/rdf/KoRdfLocationEditWidget.ui 8315aa5
> libs/main/rdf/KoRdfLocationEditWidgetMarble.ui 49dc790
> libs/main/rdf/KoRdfLocationTreeWidgetItem.h c37619a
> libs/main/rdf/KoRdfLocationTreeWidgetItem.cpp 35bf3b6
> libs/main/rdf/KoRdfLocationViewWidget.ui 42ada4d
> libs/main/rdf/KoRdfLocationViewWidgetMarble.ui 9323e4a
> libs/main/rdf/KoRdfPrefixMapping.h 49cedb3
> libs/main/rdf/KoRdfPrefixMapping.cpp d6d3479
> libs/main/rdf/KoRdfSemanticItem.h 8bd6fa8
> libs/main/rdf/KoRdfSemanticItem.cpp 5b10fde
> libs/main/rdf/KoRdfSemanticItemViewSite.h 5bd81ac
> libs/main/rdf/KoRdfSemanticItemViewSite.cpp 045e347
> libs/main/rdf/KoRdfSemanticItem_p.h 4e00f76
> libs/main/rdf/KoRdfSemanticTree.h 9bd4578
> libs/main/rdf/KoRdfSemanticTree.cpp c824e02
> libs/main/rdf/KoRdfSemanticTreeWidgetItem.h 962f0ec
> libs/main/rdf/KoRdfSemanticTreeWidgetItem.cpp f13dc57
> libs/main/rdf/KoSemanticStylesheet.h 831acb6
> libs/main/rdf/KoSemanticStylesheet.cpp ed0072c
> libs/main/rdf/KoSemanticStylesheetsEditor.h 35365a6
> libs/main/rdf/KoSemanticStylesheetsEditor.cpp 0c345cb
> libs/main/rdf/KoSemanticStylesheetsEditor.ui 3ef5b9a
> libs/main/rdf/KoSopranoTableModel.h bc0344a
> libs/main/rdf/KoSopranoTableModel.cpp 8a92beb
> libs/main/rdf/KoSopranoTableModelDelegate.h b8822ca
> libs/main/rdf/KoSopranoTableModelDelegate.cpp 46dc34a
> libs/main/rdf/RdfForward.h b847027
> libs/main/rdf/RdfSemanticTreeWidgetAction.h c5aec3c
> libs/main/rdf/RdfSemanticTreeWidgetAction.cpp 3ea3e48
> libs/main/rdf/RdfSemanticTreeWidgetSelectAction.h 57e7e89
> libs/main/rdf/RdfSemanticTreeWidgetSelectAction.cpp 8788946
> libs/main/tests/CMakeLists.txt 768d033
> libs/main/tests/TestKoDocumentRdf.h 237a6ab
> libs/main/tests/TestKoDocumentRdf.cpp 3d05b85
> libs/main/tests/TestSemanticItem.h 1a9bd60
> libs/main/tests/rdf_test.h 8f6948a
> libs/main/tests/rdf_test.cpp 2f58d0d
> libs/rdf/CMakeLists.txt PRE-CREATION
> libs/rdf/InsertSemanticObjectActionBase.h PRE-CREATION
> libs/rdf/InsertSemanticObjectActionBase.cpp PRE-CREATION
> libs/rdf/InsertSemanticObjectCreateAction.h PRE-CREATION
> libs/rdf/InsertSemanticObjectCreateAction.cpp PRE-CREATION
> libs/rdf/InsertSemanticObjectReferenceAction.h PRE-CREATION
> libs/rdf/InsertSemanticObjectReferenceAction.cpp PRE-CREATION
> libs/rdf/KoChangeTrackerDisabledRAII.h PRE-CREATION
> libs/rdf/KoChangeTrackerDisabledRAII.cpp PRE-CREATION
> libs/rdf/KoDocumentRdf.h PRE-CREATION
> libs/rdf/KoDocumentRdf.cpp PRE-CREATION
> libs/rdf/KoDocumentRdfEditWidget.h PRE-CREATION
> libs/rdf/KoDocumentRdfEditWidget.cpp PRE-CREATION
> libs/rdf/KoDocumentRdfEditWidget.ui PRE-CREATION
> libs/rdf/KoRdfCalendarEvent.h PRE-CREATION
> libs/rdf/KoRdfCalendarEvent.cpp PRE-CREATION
> libs/rdf/KoRdfCalendarEventEditWidget.ui PRE-CREATION
> libs/rdf/KoRdfCalendarEventTreeWidgetItem.h PRE-CREATION
> libs/rdf/KoRdfCalendarEventTreeWidgetItem.cpp PRE-CREATION
> libs/rdf/KoRdfFoaF.h PRE-CREATION
> libs/rdf/KoRdfFoaF.cpp PRE-CREATION
> libs/rdf/KoRdfFoaFEditWidget.ui PRE-CREATION
> libs/rdf/KoRdfFoaFTreeWidgetItem.h PRE-CREATION
> libs/rdf/KoRdfFoaFTreeWidgetItem.cpp PRE-CREATION
> libs/rdf/KoRdfLocation.h PRE-CREATION
> libs/rdf/KoRdfLocation.cpp PRE-CREATION
> libs/rdf/KoRdfLocationEditWidget.h PRE-CREATION
> libs/rdf/KoRdfLocationEditWidget.cpp PRE-CREATION
> libs/rdf/KoRdfLocationEditWidget.ui PRE-CREATION
> libs/rdf/KoRdfLocationEditWidgetMarble.ui PRE-CREATION
> libs/rdf/KoRdfLocationTreeWidgetItem.h PRE-CREATION
> libs/rdf/KoRdfLocationTreeWidgetItem.cpp PRE-CREATION
> libs/rdf/KoRdfLocationViewWidget.ui PRE-CREATION
> libs/rdf/KoRdfLocationViewWidgetMarble.ui PRE-CREATION
> libs/rdf/KoRdfPrefixMapping.h PRE-CREATION
> libs/rdf/KoRdfPrefixMapping.cpp PRE-CREATION
> libs/rdf/KoRdfSemanticItem.h PRE-CREATION
> libs/rdf/KoRdfSemanticItem.cpp PRE-CREATION
> libs/rdf/KoRdfSemanticItemViewSite.h PRE-CREATION
> libs/rdf/KoRdfSemanticItemViewSite.cpp PRE-CREATION
> libs/rdf/KoRdfSemanticItem_p.h PRE-CREATION
> libs/rdf/KoRdfSemanticTree.h PRE-CREATION
> libs/rdf/KoRdfSemanticTree.cpp PRE-CREATION
> libs/rdf/KoRdfSemanticTreeWidgetItem.h PRE-CREATION
> libs/rdf/KoRdfSemanticTreeWidgetItem.cpp PRE-CREATION
> libs/rdf/KoSemanticStylesheet.h PRE-CREATION
> libs/rdf/KoSemanticStylesheet.cpp PRE-CREATION
> libs/rdf/KoSemanticStylesheetsEditor.h PRE-CREATION
> libs/rdf/KoSemanticStylesheetsEditor.cpp PRE-CREATION
> libs/rdf/KoSemanticStylesheetsEditor.ui PRE-CREATION
> libs/rdf/KoSopranoTableModel.h PRE-CREATION
> libs/rdf/KoSopranoTableModel.cpp PRE-CREATION
> libs/rdf/KoSopranoTableModelDelegate.h PRE-CREATION
> libs/rdf/KoSopranoTableModelDelegate.cpp PRE-CREATION
> libs/rdf/RdfForward.h PRE-CREATION
> libs/rdf/RdfSemanticTreeWidgetAction.h PRE-CREATION
> libs/rdf/RdfSemanticTreeWidgetAction.cpp PRE-CREATION
> libs/rdf/RdfSemanticTreeWidgetSelectAction.h PRE-CREATION
> libs/rdf/RdfSemanticTreeWidgetSelectAction.cpp PRE-CREATION
> libs/rdf/kordf_export.h PRE-CREATION
> libs/rdf/tests/CMakeLists.txt PRE-CREATION
> libs/rdf/tests/TestKoDocumentRdf.h PRE-CREATION
> libs/rdf/tests/TestKoDocumentRdf.cpp PRE-CREATION
> libs/rdf/tests/TestSemanticItem.h PRE-CREATION
> libs/rdf/tests/rdf_test.h PRE-CREATION
> libs/rdf/tests/rdf_test.cpp PRE-CREATION
> plugins/reporting/CMakeLists.txt 5497811
> plugins/reporting/maps/CMakeLists.txt 3e2d5f0
> words/part/CMakeLists.txt a31ed09
> words/part/KWDocument.h 3b60ed7
> words/part/KWDocument.cpp 8430180
> words/part/KWFactory.cpp ec08271
> words/part/KWOdfLoader.cpp 977832b
> words/part/KWOdfWriter.cpp 7c5beaf
> words/part/KWView.cpp 77be4b9
> words/part/author/CAuFactory.cpp be20262
> words/part/dockers/KWRdfDocker.h 7618449
> words/part/dockers/KWRdfDockerTree.cpp 4d13842
>
> Diff: http://git.reviewboard.kde.org/r/108698/diff/
>
>
> Testing
> -------
>
> Manual tests + unittests.
>
>
> Thanks,
>
> Boudewijn Rempt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130201/91194210/attachment.htm>
More information about the calligra-devel
mailing list