From kde-commits Mon Aug 31 23:40:03 2015 From: Friedrich W. H. Kossebau Date: Mon, 31 Aug 2015 23:40:03 +0000 To: kde-commits Subject: [calligra] /: Reenable reports in Plan, using KReport Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=144106441208504 Git commit 18da645666d0801e779599d63a2ee7691e4b7d52 by Friedrich W. H. Koss= ebau. Committed on 31/08/2015 at 23:38. Pushed by kossebau into branch 'master'. Reenable reports in Plan, using KReport Fixes T450 M +2 -0 CMakeLists.txt M +0 -16 plan/kptview.cpp M +2 -14 plan/kptviewlistdialog.cpp M +12 -16 plan/libs/ui/CMakeLists.txt M +1 -1 plan/libs/ui/reports/reportdata.cpp M +1 -1 plan/libs/ui/reports/reportdata.h http://commits.kde.org/calligra/18da645666d0801e779599d63a2ee7691e4b7d52 diff --git a/CMakeLists.txt b/CMakeLists.txt index 174a7f3..cf8e549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1026,6 +1026,8 @@ calligra_drop_product_on_bad_condition( APP_BRAINDUMP calligra_drop_product_on_bad_condition( APP_PLAN KGantt_FOUND "KGantt devel not found" KChart_FOUND "KChart devel not found" + KReport_FOUND "KReport not found" + KProperty_FOUND "KProperty not found" ) = calligra_drop_product_on_bad_condition( PLUGIN_CALLIGRAGEMINI_GIT diff --git a/plan/kptview.cpp b/plan/kptview.cpp index efc46ad..b724816 100644 --- a/plan/kptview.cpp +++ b/plan/kptview.cpp @@ -105,11 +105,8 @@ #include "kptcolorsconfigpanel.h" #include "kptinsertfiledlg.h" #include "kpthtmlview.h" -// QT5TODO: T450 reenable reports -#if 0 #include "reports/reportview.h" #include "reports/reportdata.h" -#endif #include "about/aboutpage.h" #include "kptlocaleconfigmoneydialog.h" #include "kptflatproxymodel.h" @@ -594,8 +591,6 @@ void View::createViews() = ct =3D "Reports"; cat =3D m_viewlist->addCategory( ct, defaultCategoryInfo( ct ).nam= e ); -// QT5TODO: reenable reports -#if 0 // A little hack to get the user started... ReportView *rv =3D qobject_cast( createReportView( ca= t, "ReportView", i18n( "Task Status Report" ), TIP_USE_DEFAULT_TEXT ) ); if ( rv ) { @@ -603,7 +598,6 @@ void View::createViews() doc.setContent( standardTaskStatusReport() ); rv->loadXML( doc ); } -#endif } } = @@ -1362,8 +1356,6 @@ ViewBase *View::createResourceAssignmentView( ViewLis= tItem *cat, const QString & = ViewBase *View::createReportView( ViewListItem *cat, const QString &tag, c= onst QString &name, const QString &tip, int index ) { -// QT5TODO: reenable reports -#if 0 ReportView *v =3D new ReportView(getKoPart(), getPart(), m_tab ); m_tab->addWidget( v ); = @@ -1387,8 +1379,6 @@ ViewBase *View::createReportView( ViewListItem *cat, = const QString &tag, const Q connect( v, SIGNAL(guiActivated(ViewBase*,bool)), SLOT(slotGuiActivate= d(ViewBase*,bool)) ); v->updateReadWrite( m_readWrite ); return v; -#endif - return 0; } = Project& View::getProject() const @@ -2695,13 +2685,10 @@ void View::slotCreateReport() */ void View::slotCreateReportView( ReportDesignDialog *dlg ) { -// QT5TODO: reenable reports -#if 0 QPointer vd =3D new ViewListReportsDialog( this= , *m_viewlist, dlg ); connect( vd, SIGNAL(viewCreated(ViewBase*)), dlg, SLOT(slotViewCreated= (ViewBase*)) ); vd->exec(); delete vd; -#endif } = void View::slotOpenReportFile() @@ -2728,8 +2715,6 @@ void View::slotOpenReportFileFinished( int result ) KMessageBox::sorry( this, i18nc( "@info", "Cannot open file:
<= filename>%1", fn ) ); return; } -// QT5TODO: reenable reports -#if 0 QDomDocument doc; doc.setContent( &file ); QDomElement e =3D doc.documentElement(); @@ -2742,7 +2727,6 @@ void View::slotOpenReportFileFinished( int result ) dlg->show(); dlg->raise(); dlg->activateWindow(); -#endif } = void View::slotReportDesignFinished( int /*result */) diff --git a/plan/kptviewlistdialog.cpp b/plan/kptviewlistdialog.cpp index 603f706..49459b62 100644 --- a/plan/kptviewlistdialog.cpp +++ b/plan/kptviewlistdialog.cpp @@ -21,10 +21,7 @@ #include "kptviewlistdialog.h" #include "kptviewlist.h" #include "kptview.h" -// QT5TODO: reenable reports -#if 0 #include "reports/reportview.h" -#endif #include = #include @@ -91,11 +88,8 @@ AddViewPanel::AddViewPanel( View *view, ViewListWidget &= viewlist, QWidget *paren << "ResourceAppointmentsGanttView" << "AccountsView" << "ProjectStatusView" - << "PerformanceStatusView"; -// QT5TODO: reenable reports -#if 0 + << "PerformanceStatusView" << "ReportView"; -#endif QStringList lst; lst << i18n( "Resource Editor" ) << i18n( "Task Editor" ) @@ -113,11 +107,8 @@ AddViewPanel::AddViewPanel( View *view, ViewListWidget= &viewlist, QWidget *paren << i18n( "Resource Assignments (Gantt)" ) << i18n( "Cost Breakdown" ) << i18n( "Project Performance Chart" ) - << i18n( "Tasks Performance Chart" ); -// QT5TODO: reenable reports -#if 0 + << i18n( "Tasks Performance Chart" ) << i18n( "Report" ); -#endif = widget.viewtype->addItems( lst ); = @@ -263,12 +254,9 @@ bool AddViewPanel::ok() case 16: { // Task Performance Chart v =3D m_view->createPerformanceStatusView( cat, m_viewtypes.va= lue( viewtype ), widget.viewname->text(), widget.tooltip->text(), index ); break; } -// QT5TODO: reenable reports -#if 0 case 17: { // Report view v =3D m_view->createReportView( cat, m_viewtypes.value( viewty= pe ), widget.viewname->text(), widget.tooltip->text(), index ); break; } -#endif default: kError()<<"Unknown view type!"; break; diff --git a/plan/libs/ui/CMakeLists.txt b/plan/libs/ui/CMakeLists.txt index 535a22d..efc654b 100644 --- a/plan/libs/ui/CMakeLists.txt +++ b/plan/libs/ui/CMakeLists.txt @@ -23,12 +23,11 @@ include_directories( ########### KPlato private library ############### = set(kplatoui_LIB_SRCS -# QT5TODO: reenable reports -# reports/reportview.cpp -# reports/reportdata.cpp -# reports/reportsourceeditor.cpp -# reports/reportscripts.cpp -# reports/reportexportpanel.cpp + reports/reportview.cpp + reports/reportdata.cpp + reports/reportsourceeditor.cpp + reports/reportscripts.cpp + reports/reportexportpanel.cpp = kptganttitemdelegate.cpp = @@ -87,13 +86,12 @@ set(kplatoui_LIB_SRCS kptlocaleconfigmoneydialog.cpp ) ki18n_wrap_ui(kplatoui_LIB_SRCS -# QT5TODO: reenable reports -# reports/reportsourceeditor.ui -# reports/reportnavigator.ui -# reports/reportexportpanel.ui -# reports/reportsectionswidget.ui -# reports/reportgroupsectionswidget.ui -# reports/reporttoolswidget.ui + reports/reportsourceeditor.ui + reports/reportnavigator.ui + reports/reportexportpanel.ui + reports/reportsectionswidget.ui + reports/reportgroupsectionswidget.ui + reports/reporttoolswidget.ui = kptresourceappointmentsdisplayoptions.ui kptganttchartdisplayoptions.ui @@ -136,9 +134,7 @@ ki18n_wrap_ui(kplatoui_LIB_SRCS add_library(kplatoui SHARED ${kplatoui_LIB_SRCS}) generate_export_header(kplatoui) = -# QT5TODO: reenable reports -# set(KPLATO_REPORTS_LIBS KProperty KReport) -target_link_libraries(kplatoui ${KPLATO_REPORTS_LIBS} komain kplatokernel= kplatomodels KChart KGantt KF5::KHtml ) +target_link_libraries(kplatoui komain kplatokernel kplatomodels KProperty = KReport KChart KGantt KF5::KHtml ) if(KF5AkonadiContact_FOUND) target_link_libraries(kplatoui KF5::AkonadiContact) endif() diff --git a/plan/libs/ui/reports/reportdata.cpp b/plan/libs/ui/reports/rep= ortdata.cpp index 1241cc3..133eb10 100644 --- a/plan/libs/ui/reports/reportdata.cpp +++ b/plan/libs/ui/reports/reportdata.cpp @@ -713,7 +713,7 @@ QStringList ChartReportData::fieldNames() const return names; } = -void ChartReportData::addExpression( const QString &field, const QVariant = &/*value*/, int /*relation*/ ) +void ChartReportData::addExpression( const QString &field, const QVariant = &/*value*/, char /*relation*/ ) { // kDebug(planDbg())<