Review Request 111545: Port komain away from KParts
Boudewijn Rempt
boud at valdyas.org
Tue Aug 13 09:15:36 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111545/
-----------------------------------------------------------
(Updated Aug. 13, 2013, 8:15 a.m.)
Review request for Calligra, Friedrich W. H. Kossebau and Marijn Kruisselbrink.
Changes
-------
The updated diff fixes the view activation issue in Plan and starts moving code from KoPart to KoDocument.
The goal is to make KoPart a simple factory/manager class that creates views, documents and mainwindows.
Description
-------
This is a continuation of the KoDocument/KoPart split that Camilla and I worked on last year, and it is a step towards the MVC refactoring discussed in Essen.
We actually did not use any of the kparts functionality anymore: not the embedding of Calligra parts in other applications, not document embedding, and the various plugins that were kparts actually did not do anything beyond what a kxmlguiclient plugin did.
This patch makes KoView and KoPart a KXMLGuiClient and lets KoMainWindow manage the KoParts. It is the first step in further refactoring:
* Make KoMainWindow a generic window for Calligra apps
* Make KoDocument responsible for all loading and saving
* Make KoPart a factory class that can create documents, views and canvaes
* Make KoView more properly an application-specific mainwindow implementation for an application that can show one or more documents
Current issues:
* In CalligraPlan I have commented out some code that didn't seem to actually do anything but was dependent on KParts. That needs to be checked by Friedrich for regressions
* KoMainWindow has way too many local KoPart pointers... That needs to be cleaned up.
Then I want to move the load/save code from KoPart to KoDocument and start the bigger refactoring... That will hopefully give us split view/mdi/tabbed view of documents again. And make the flipbook and animation plugins for krita easier to handle.
For easy testing I recommend checking out the krita-mvc-rempt branch.
This addresses bugs 310310, 313482 and 313483.
http://bugs.kde.org/show_bug.cgi?id=310310
http://bugs.kde.org/show_bug.cgi?id=313482
http://bugs.kde.org/show_bug.cgi?id=313483
Diffs (updated)
-----
CMakeLists.txt 06e4971
active/src/CATextDocumentHandler.cpp 609832f
braindump/data/braindump.desktop 1159537
braindump/plugins/quickstates/CMakeLists.txt ecadaea
braindump/src/CMakeLists.txt 7bfe50b
cmake/modules/FindCalligraLibs.cmake.in 1e49d17
extras/filemanagertemplates/Presentation.desktop 070d017
extras/filemanagertemplates/SpreadSheet.desktop c20409b
filters/karbon/wmf/karbon_wmf_thumbnail.desktop 66a5b55
filters/plan/mpxj/import/calligra_filter_mpx2plan.desktop bd2a693
filters/sheets/xlsx/sheets_xlsx_thumbnail.desktop 54014be
filters/words/docx/import/words_docx_thumbnail.desktop e25c7a7
flow/part/FlowPart.cpp 5fedf83
flow/stencils/LST/distributor_subsystem.desktop 5f011bd
flow/stencils/LST/encoder.desktop 3ed9982
flow/stencils/LST/producer.desktop 3304572
flow/stencils/LST/supporter_subsystem.desktop 48129b3
flow/stencils/Lights/Stroboscope.desktop 13ff568
flow/stencils/Lights/Structure.desktop 82b2953
flow/stencils/Logic/collection.desktop 5e617bd
flow/stencils/Logic/nand.desktop 1b7cce9
flow/stencils/Logic/nor.desktop 7e3b309
flow/stencils/Logic/not.desktop 1a3639c
flow/stencils/Logic/xor.desktop 007858b
flow/stencils/MSE/tacsat.desktop ea79abf
flow/stencils/Map/Corner1.desktop b4b335f
flow/stencils/Map/Corner2.desktop 3c5bace
flow/stencils/Map/Crossroads.desktop e83bd3c
flow/stencils/Map/Factory.desktop 12aa1a3
flow/stencils/Map/RedCar.desktop 70ac05e
flow/stencils/Map/River.desktop e77b095
flow/stencils/Map/Road1.desktop c4cab43
flow/stencils/Map/Roof1.desktop 5ee0579
flow/stencils/Network/computer.desktop 0134cdc
flow/stencils/Network/dat_external.desktop 34c584b
flow/stencils/Network/digitizing_board.desktop 547103a
flow/stencils/Network/diskette.desktop ecba100
flow/stencils/Network/genmonitor.desktop d11c14c
flow/stencils/Network/mobile_phone.desktop b7bac6f
flow/stencils/Network/pc_bigtower.desktop b425b14
flow/stencils/Network/pc_desktop.desktop 74a2d90
flow/stencils/Network/pc_miditower.desktop 1c3a4cf
flow/stencils/Network/pc_minitower.desktop a2d0c5f
flow/stencils/Network/router-symbol.desktop dd5ec10
flow/stencils/Network/speaker.desktop 25a2bbb
flow/stencils/Network/speaker_amp.desktop cefc97a
flow/stencils/Network/switch-atm-symbol.desktop 0341b6e
flow/stencils/Network/switch-symbol.desktop a57d90d
flow/stencils/Network/telephone.desktop 14ff8ab
flow/stencils/Optics/coupler.desktop ab3c252
flow/stencils/Optics/coupler_vert.desktop 4eef406
flow/stencils/Optics/detector_vert.desktop 74d7c27
flow/stencils/Optics/dfb_laser.desktop bacfdd1
flow/stencils/Optics/dfb_laser_vert.desktop 6dca028
flow/stencils/Optics/edfa.desktop d5d6445
flow/stencils/Optics/edfa_vert.desktop 012663b
flow/stencils/Optics/isolator.desktop d758de1
flow/stencils/Optics/isolator_vert.desktop 52b491f
flow/stencils/Optics/mod_vert.desktop bcef930
flow/stencils/Optics/phasemod.desktop 3c74998
flow/stencils/Optics/phasemod_vert.desktop 3fff080
flow/stencils/Optics/polarisation_control.desktop 1a926cb
flow/stencils/Optics/polarisation_control_vert.desktop e88141d
flow/stencils/Optics/tuneable.desktop f0f9019
flow/stencils/Racks/equipment_10u.desktop ff67181
flow/stencils/Racks/equipment_11u.desktop 8e3ef95
flow/stencils/Racks/equipment_12u.desktop 1c4939f
flow/stencils/Racks/equipment_1u.desktop 3dd1b9e
flow/stencils/Racks/equipment_2u.desktop cd971dc
flow/stencils/Racks/equipment_3u.desktop ba36bdb
flow/stencils/Racks/equipment_4u.desktop cb7ac0a
flow/stencils/Racks/equipment_5u.desktop f74fa52
flow/stencils/Racks/equipment_6u.desktop ef791ec
flow/stencils/Racks/equipment_7u.desktop a9c67e2
flow/stencils/Racks/equipment_8u.desktop c4d511a
flow/stencils/Racks/equipment_9u.desktop e3089f2
flow/stencils/Renewable_Energy/collection.desktop 2b084a8
flow/stencils/Renewable_Energy/cup_anemometer.desktop f3cb36b
flow/stencils/Renewable_Energy/data_logger.desktop ebec8b9
flow/stencils/Renewable_Energy/meas_tower.desktop 76aebdf
flow/stencils/Renewable_Energy/solar_module.desktop d05fced
flow/stencils/Renewable_Energy/temp_humi_sensor.desktop b47f789
flow/stencils/Scenegraph/callback.desktop ecd8dd2
flow/stencils/Value_Stream_Mapping/collection.desktop ffbd130
flow/templates/basic/empty-landscape.desktop bcb8b42
flow/templates/basic/empty-portrait.desktop 4ce08d6
karbon/data/CMakeLists.txt 5183c06
karbon/data/karbon.desktop 0cca57a
karbon/data/karbon_plugin.desktop d925268
karbon/data/karbon_viewplugin.desktop PRE-CREATION
karbon/main.cpp b341d27
karbon/plugins/dockers/karbondockersplugin.desktop b733ad1
karbon/plugins/flattenpath/CMakeLists.txt 60bfe96
karbon/plugins/flattenpath/FlattenPathPlugin.cpp 936ddcc
karbon/plugins/flattenpath/karbonflattenpath.desktop 19bf2e8
karbon/plugins/flattenpath/karbonflattenpathplugin.desktop PRE-CREATION
karbon/plugins/refinepath/CMakeLists.txt 6d3de3d
karbon/plugins/refinepath/RefinePathPlugin.cpp 2e375cf
karbon/plugins/refinepath/karbonrefinepath.desktop d127ff1
karbon/plugins/refinepath/karbonrefinepathplugin.desktop PRE-CREATION
karbon/plugins/roundcorners/CMakeLists.txt f22cd94
karbon/plugins/roundcorners/RoundCornersPlugin.cpp 9892ce9
karbon/plugins/roundcorners/karbonroundcorners.desktop 5d37755
karbon/plugins/roundcorners/karbonroundcornersplugin.desktop PRE-CREATION
karbon/plugins/whirlpinch/CMakeLists.txt accac4e
karbon/plugins/whirlpinch/WhirlPinchPlugin.cpp 4a50720
karbon/plugins/whirlpinch/karbonwhirlpinch.desktop cac4cca
karbon/plugins/whirlpinch/karbonwhirlpinchplugin.desktop PRE-CREATION
karbon/ui/KarbonDocument.cpp da78714
karbon/ui/KarbonPart.cpp ab6774e
karbon/ui/KarbonView.cpp d84b6da
kexi/kexi.desktop 1fa83b3
kexi/kexidb/drivers/mysql/kexidb_mysqldriver.desktop c5f844c
kexi/kexidb/drivers/odbc/kexidb_odbcdriver.desktop e1eece4
kexi/kexidb/drivers/oracle/kexidb_oracledriver.desktop 73c7217
kexi/kexidb/drivers/pqxx/kexidb_pqxxsqldriver.desktop 1b3c437
kexi/kexidb/drivers/sybase/kexidb_sybasedriver.desktop 2dd1a5a
kexi/kexidb/drivers/xbase/kexidb_xbasedriver.desktop f2084b4
kexi/plugins/autoforms/kexiautoformhandler.desktop 4b05a86
kexi/plugins/forms/kformdesigner_kexidbfactory.desktop a31b179
kexi/plugins/forms/widgets/mapbrowser/kformdesigner_mapbrowser.desktop 51ee2b4
kexi/plugins/forms/widgets/webbrowser/kformdesigner_webbrowser.desktop e223fad
kexi/plugins/shapes/relationdesign/kexirelationdesignshape.desktop 9045a46
krita/data/templates/design/Designcinema16_10_2484x1200_96dpiRGB_8bit_.desktop acd54f1
krita/data/templates/design/Designcinema2.39_1_2484x1040_96dpiRGB_8bit_.desktop 1b2c5dd
krita/data/templates/design/DesignpresentationA3Landscape_4960x3508_300dpiRGB_8bit_.desktop c4225ad
krita/data/templates/design/DesignpresentationA4portrait_2480x3508,300dpiRGB_8bit_.desktop d026449
krita/data/templates/design/DesignpresentationA4portrait_2480x3508_300dpiRGB_8bit_.desktop d026449
krita/data/templates/design/Designscreen4_3_2250x1680_96dpiRGB_8bit_.desktop 30768ad
krita/data/templates/dslr/.directory 0f34ee0
krita/plugins/assistants/RulerAssistant/CMakeLists.txt 957fb4f
krita/plugins/extensions/dockers/flipbook/flipbookdocker_dock.cpp 49cf62a
krita/plugins/extensions/dockers/overview/krita_overviewdocker.desktop b249658
krita/plugins/extensions/dockers/palettedocker/krita_palettedocker.desktop 7ab3b36
krita/plugins/extensions/dockers/presetdocker/krita_presetdocker.desktop 051336f
krita/plugins/generators/pattern/kritapatterngenerator.desktop 9050e4b
krita/sdk/tests/ui_manager_test.h 63d8397
krita/ui/actions/kis_selection_action_factories.cpp bf49d0a
krita/ui/kis_flipbook.cpp 918df92
krita/ui/kis_part2.cpp 83d5f34
krita/ui/kis_view2.cpp 2deab8b
krita/ui/tests/kis_action_manager_test.cpp f4df430
krita/ui/tests/kis_doc2_test.cpp d86e20a
krita/ui/tests/kis_zoom_and_pan_test.cpp 794c1ae
krita/ui/widgets/kis_workspace_chooser.cpp 0100372
libs/flake/flakeborder.desktop 27aa1ba
libs/flake/flakedevice.desktop b0e57f0
libs/flake/flakeshape.desktop 08f55d6
libs/flake/flaketool.desktop 9104378
libs/kokross/KoScriptingDocker.cpp d2b7e16
libs/kokross/KoScriptingModule.h 4d57e94
libs/kokross/KoScriptingModule.cpp 304d547
libs/kokross/KoScriptingPart.cpp 68054ac
libs/kopageapp/KoPAView.h 80b9f78
libs/kopageapp/KoPAView.cpp bb88ee4
libs/kopageapp/tests/CMakeLists.txt 0d44ee3
libs/main/CMakeLists.txt 3a9110c
libs/main/KoApplication.h d973820
libs/main/KoApplication.cpp 7421107
libs/main/KoApplicationAdaptor.h d71356f
libs/main/KoDocument.h 3372060
libs/main/KoDocument.cpp 622678f
libs/main/KoDocumentEntry.cpp abbb55b
libs/main/KoDocument_p.h 6f3931f
libs/main/KoFilterEntry.cpp 8e23eac
libs/main/KoMainWindow.h 1b3503f
libs/main/KoMainWindow.cpp 26327aa
libs/main/KoPart.h d4ecf5f
libs/main/KoPart.cpp 56e27b5
libs/main/KoPartAdaptor.h b7eb540
libs/main/KoPartAdaptor.cpp 58acde5
libs/main/KoStartupDialog.h PRE-CREATION
libs/main/KoStartupDialog.cpp PRE-CREATION
libs/main/KoVersionDialog.cpp 2f38510
libs/main/KoView.h 7b8d943
libs/main/KoView.cpp 1b4a722
libs/main/calligradocker.desktop 60f1f07
libs/pigment/KoColorSpaceMaths.h a517b2f
libs/pigment/pigment.desktop 1946951
libs/pigment/pigmentextension.desktop 008d07c
libs/rdf/CMakeLists.txt bd29ead
plan/kptmaindocument.cpp 26cd92b
plan/kptpart.cpp 7674480
plan/kptview.h 02acb77
plan/kptview.cpp 64d0c68
plan/libs/kernel/plan_schedulerplugin.desktop fce6e84
plan/libs/ui/kptviewbase.h 9c4022a
plan/libs/ui/kptviewbase.cpp 7049a76
plan/plan_viewplugin.desktop b95e2e4
plan/plugins/scripting/planscripting.desktop 95257c6
plan/workpackage/CMakeLists.txt a1fbb87
plugins/chartshape/ChartShape.cpp 34a3db9
plugins/colorengines/lcms2/CMakeLists.txt faa07a9
plugins/kexi/spreadsheet/CMakeLists.txt 78fbe7e
plugins/reporting/barcode/CMakeLists.txt 7423872
plugins/reporting/chart/CMakeLists.txt a0d6378
plugins/reporting/maps/CMakeLists.txt 6bc29a0
plugins/reporting/web/CMakeLists.txt 03a9aeb
plugins/staging/CMakeLists.txt 754362f
plugins/staging/googledocs/onlinedocument.h d4141f3
plugins/staging/googledocs/onlinedocument.cpp a74ecd5
plugins/staging/pivottables/sheetspivottables.desktop 2e73ec4
sheets/part/Part.cpp 7fd573e
sheets/part/View.h 49bcdf6
sheets/part/View.cpp 9dae4a5
sheets/plugins/scripting/CMakeLists.txt 90a0b24
sheets/plugins/scripting/sheetsscripting.desktop b213276
sheets/plugins/solver/sheetssolver.desktop 2e66303
sheets/sheets_viewplugin.desktop 086073b
sheets/ui/MapViewModel.h ef3cf55
sheets/ui/MapViewModel.cpp 070ee29
stage/part/KPrDocument.cpp 7bdd5f9
stage/part/KPrPart.cpp b79da91
stage/part/KPrView.cpp fd6b762
words/part/CMakeLists.txt 4e2650c
words/part/KWDocument.h 7654aa3
words/part/KWDocument.cpp 259fd4e
words/part/KWGui.cpp 26c5281
words/part/KWPart.h 63e4e5f
words/part/KWPart.cpp 9e3a818
words/part/KWView.cpp 48265fd
words/part/author/CAuPart.cpp 0863305
Diff: http://git.reviewboard.kde.org/r/111545/diff/
Testing
-------
Ran all apps, loaded and saved documents and ran unittests.
Thanks,
Boudewijn Rempt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130813/1c1c1c52/attachment.htm>
More information about the calligra-devel
mailing list