1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
|
From 3097da1c42ba7fe3b6a26ccb64df64db9c5588b7 Mon Sep 17 00:00:00 2001
From: Dag Andersen <dag.andersen@kdemail.net>
Date: Mon, 26 Oct 2020 13:46:06 +0100
Subject: [PATCH 1/2] Remove dependency on KHtml
This also removes the introductory pages,
but these should be cver by the documentation.
---
CMakeLists.txt | 10 +++----
src/CMakeLists.txt | 2 --
src/kptmaindocument.cpp | 1 -
src/kptmaindocument.h | 5 ----
src/kptpart.cpp | 47 --------------------------------
src/kptpart.h | 4 ---
src/kptview.cpp | 53 -------------------------------------
src/kptview.h | 10 -------
src/libs/ui/CMakeLists.txt | 5 +---
src/welcome/WelcomeView.cpp | 9 -------
src/welcome/WelcomeView.h | 1 -
src/welcome/WelcomeView.ui | 6 +----
12 files changed, 7 insertions(+), 146 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4348601c..13ac4d24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,11 +150,11 @@ if(KF5Activities_FOUND)
set(HAVE_KACTIVITIES TRUE)
endif()
-find_package(KF5KHtml)
-set_package_properties(KF5KHtml PROPERTIES
- PURPOSE "Required for rich text support"
- TYPE REQUIRED
-)
+#find_package(KF5KHtml)
+#set_package_properties(KF5KHtml PROPERTIES
+ #PURPOSE "Required for rich text support"
+ #TYPE REQUIRED
+#)
find_package(KF5Holidays)
set_package_properties(KF5Holidays PROPERTIES
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 54f1df57..ee1a6137 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -145,8 +145,6 @@ set(planprivate_LIB_SRCS
kptinsertfiledlg.cpp
kptloadsharedprojectsdialog.cpp
- about/aboutpage.cpp
-
KPlatoXmlLoader.cpp
)
diff --git a/src/kptmaindocument.cpp b/src/kptmaindocument.cpp
index b4fe670f..f65f2eb0 100644
--- a/src/kptmaindocument.cpp
+++ b/src/kptmaindocument.cpp
@@ -257,7 +257,6 @@ void MainDocument::setProject(Project *project)
connect(m_project, &Project::nodeChanged, this, &MainDocument::slotNodeChanged);
connect(m_project, &Project::sigCalculationFinished, this, &MainDocument::slotCalculationFinished);
}
- m_aboutPage.setProject(project);
QString dir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
if (!dir.isEmpty()) {
diff --git a/src/kptmaindocument.h b/src/kptmaindocument.h
index 44ab931c..01ad942d 100644
--- a/src/kptmaindocument.h
+++ b/src/kptmaindocument.h
@@ -31,7 +31,6 @@
#include "kptconfig.h"
#include "kptwbsdefinition.h"
#include "kptxmlloaderobject.h"
-#include "about/aboutpage.h"
#include "KoDocument.h"
@@ -130,8 +129,6 @@ public:
bool insertProject(Project &project, Node *parent, Node *after);
bool mergeResources(Project &project);
- KPlatoAboutPage &aboutPage() { return m_aboutPage; }
-
bool extractFiles(KoStore *store, Package *package);
bool extractFile(KoStore *store, Package *package, const Document *doc);
@@ -254,8 +251,6 @@ private:
QList<QUrl> m_skipUrls;
QMap<QDateTime, Project*> m_mergedPackages;
- KPlatoAboutPage m_aboutPage;
-
QDomDocument m_reports;
bool m_viewlistModified;
diff --git a/src/kptpart.cpp b/src/kptpart.cpp
index cd31b6ce..d498f5e1 100644
--- a/src/kptpart.cpp
+++ b/src/kptpart.cpp
@@ -25,7 +25,6 @@
#include "kptmaindocument.h"
#include "kptfactory.h"
#include "welcome/WelcomeView.h"
-#include "kpthtmlview.h"
#include "Help.h"
#include "calligraplansettings.h"
#include "kptdebug.h"
@@ -163,7 +162,6 @@ void Part::createStarUpWidget(KoMainWindow *parent)
startUpWidget = new QStackedWidget(parent);
startUpWidget->addWidget(createWelcomeView(parent));
- startUpWidget->addWidget(createIntroductionView());
}
void Part::finish()
@@ -188,7 +186,6 @@ QWidget *Part::createWelcomeView(KoMainWindow *mw)
connect(v, &WelcomeView::loadSharedResources, doc, &MainDocument::insertResourcesFile);
connect(v, &WelcomeView::recentProject, mw, &KoMainWindow::slotFileOpenRecent);
- connect(v, &WelcomeView::showIntroduction, this, &Part::slotShowIntroduction);
connect(v, &WelcomeView::projectCreated, doc, &MainDocument::slotProjectCreated);
connect(v, &WelcomeView::finished, this, &Part::finish);
@@ -197,50 +194,6 @@ QWidget *Part::createWelcomeView(KoMainWindow *mw)
return v;
}
-void Part::slotShowIntroduction()
-{
- startUpWidget->setCurrentIndex(1);
- slotOpenUrlRequest(static_cast<HtmlView*>(startUpWidget->currentWidget()), QUrl("about:plan/main"));
-}
-
-void Part::slotOpenUrlRequest(HtmlView *v, const QUrl &url)
-{
- debugPlan<<url;
- if (url.scheme() == QLatin1String("about")) {
- if (url.url() == QLatin1String("about:close")) {
- startUpWidget->setCurrentIndex(0);
- return;
- }
- if (url.url().startsWith(QLatin1String("about:plan"))) {
- MainDocument *doc = static_cast<MainDocument*>(document());
- doc->aboutPage().generatePage(v->htmlPart(), url);
- return;
- }
- }
- if (url.scheme() == QLatin1String("help")) {
- KHelpClient::invokeHelp("", url.fileName());
- return;
- }
- // try to open the url
- debugPlan<<url<<"is external, discard";
- new KRun(url, currentMainwindow());
-}
-
-QWidget *Part::createIntroductionView()
-{
- HtmlView *v = new HtmlView(this, document(), startUpWidget);
- v->htmlPart().setJScriptEnabled(false);
- v->htmlPart().setJavaEnabled(false);
- v->htmlPart().setMetaRefreshEnabled(false);
- v->htmlPart().setPluginsEnabled(false);
-
- slotOpenUrlRequest(v, QUrl("about:plan/main"));
-
- connect(v, &KPlato::HtmlView::openUrlRequest, this, &KPlato::Part::slotOpenUrlRequest);
-
- return v;
-}
-
void Part::configure(KoMainWindow *mw)
{
//debugPlan;
diff --git a/src/kptpart.h b/src/kptpart.h
index 90f50257..20429fe2 100644
--- a/src/kptpart.h
+++ b/src/kptpart.h
@@ -33,7 +33,6 @@ class QStackedWidget;
namespace KPlato
{
class MainDocument;
-class HtmlView;
class PLAN_EXPORT Part : public KoPart
{
@@ -63,8 +62,6 @@ public Q_SLOTS:
void finish();
protected Q_SLOTS:
- void slotShowIntroduction();
- void slotOpenUrlRequest(KPlato::HtmlView *v, const QUrl &url);
void openTemplate(const QUrl& url) override;
void slotOpenTemplate(const QUrl& url);
@@ -74,7 +71,6 @@ protected Q_SLOTS:
protected:
void createStarUpWidget(KoMainWindow *parent);
QWidget *createWelcomeView(KoMainWindow *parent);
- QWidget *createIntroductionView();
private:
KPlato::MainDocument *m_document;
diff --git a/src/kptview.cpp b/src/kptview.cpp
index aa2c3dd7..7af53136 100644
--- a/src/kptview.cpp
+++ b/src/kptview.cpp
@@ -103,7 +103,6 @@
#include "kptpertresult.h"
#include "kptinsertfiledlg.h"
#include "kptloadsharedprojectsdialog.h"
-#include "kpthtmlview.h"
#include "about/aboutpage.h"
#include "kptlocaleconfigmoneydialog.h"
#include "kptflatproxymodel.h"
@@ -196,7 +195,6 @@ View::View(KoPart *part, MainDocument *doc, QWidget *parent)
////////////////////////////////////////////////////////////////////////////////////////////////////
// Add sub views
- createIntroductionView();
// The menu items
// ------ File
@@ -258,11 +256,6 @@ View::View(KoPart *part, MainDocument *doc, QWidget *parent)
connect(actionOpenReportFile, QAction::triggered, this, &View::slotOpenReportFile);
#endif
- // ------ Help
- actionIntroduction = new QAction(koIcon("dialog-information"), i18n("Introduction to Plan"), this);
- actionCollection()->addAction("plan_introduction", actionIntroduction);
- connect(actionIntroduction, &QAction::triggered, this, &View::slotIntroduction);
-
// ------ Popup
actionOpenNode = new QAction(koIcon("document-edit"), i18n("Edit..."), this);
actionCollection()->addAction("node_properties", actionOpenNode);
@@ -762,46 +755,6 @@ ViewInfo View::defaultCategoryInfo(const QString &type) const
return vi;
}
-void View::slotOpenUrlRequest(HtmlView *v, const QUrl &url)
-{
- debugPlan<<url;
- if (url.scheme() == QLatin1String("about")) {
- if (url.url() == QLatin1String("about:close")) {
- int view = m_visitedViews.count() < 2 ? qMin(m_defaultView, m_tab->count()-1) : m_visitedViews.at(m_visitedViews.count() - 2);
- debugPlan<<"Prev:"<<view<<m_visitedViews;
- m_tab->setCurrentIndex(view);
- return;
- }
- if (url.url().startsWith(QLatin1String("about:plan"))) {
- getPart()->aboutPage().generatePage(v->htmlPart(), url);
- return;
- }
- }
- if (url.scheme() == QLatin1String("help")) {
- KHelpClient::invokeHelp("", url.fileName());
- return;
- }
- // try to open the url
- debugPlan<<url<<"is external, try to open";
- new KRun(url, mainWindow());
-}
-
-ViewBase *View::createIntroductionView()
-{
- HtmlView *v = new HtmlView(getKoPart(), getPart(), m_tab);
- v->htmlPart().setJScriptEnabled(false);
- v->htmlPart().setJavaEnabled(false);
- v->htmlPart().setMetaRefreshEnabled(false);
- v->htmlPart().setPluginsEnabled(false);
-
- slotOpenUrlRequest(v, QUrl("about:plan/main"));
-
- connect(v, &HtmlView::openUrlRequest, this, &View::slotOpenUrlRequest);
-
- m_tab->addWidget(v);
- return v;
-}
-
ViewBase *View::createResourceAppointmentsGanttView(ViewListItem *cat, const QString &tag, const QString &name, const QString &tip, int index)
{
ResourceAppointmentsGanttView *v = new ResourceAppointmentsGanttView(getKoPart(), getPart(), m_tab);
@@ -1966,12 +1919,6 @@ void View::slotDefineWBSFinished(int result)
dia->deleteLater();
}
-void View::slotIntroduction()
-{
- m_tab->setCurrentIndex(0);
-}
-
-
Calendar *View::currentCalendar()
{
ViewBase *v = dynamic_cast<ViewBase*>(m_tab->currentWidget());
diff --git a/src/kptview.h b/src/kptview.h
index b9242811..33b9a198 100644
--- a/src/kptview.h
+++ b/src/kptview.h
@@ -84,7 +84,6 @@ class ResourceGroup;
class Relation;
class Context;
class ViewAdaptor;
-class HtmlView;
class ReportView;
class ReportDesignDialog;
@@ -179,8 +178,6 @@ public Q_SLOTS:
void slotCreateView();
- void slotIntroduction();
-
void openRelationDialog(KPlato::Node *par, KPlato::Node *child);
void slotEditRelation(KPlato::Relation *rel);
void slotAddRelation(KPlato::Node *par, KPlato::Node *child, int linkType);
@@ -258,8 +255,6 @@ protected Q_SLOTS:
void slotMailWorkpackage(KPlato::Node *node, KPlato::Resource *resource = nullptr);
void slotPublishWorkpackages(const QList<KPlato::Node*> &nodes, KPlato::Resource *resource, bool mailTo);
- void slotOpenUrlRequest(KPlato::HtmlView *v, const QUrl &url);
-
void createReportView(const QDomDocument &doc);
void saveTaskModule(const QUrl &url, KPlato::Project *project);
@@ -281,8 +276,6 @@ protected:
ViewBase *currentView() const;
- ViewBase *createIntroductionView();
-
private Q_SLOTS:
void slotActionDestroyed(QObject *o);
void slotViewListItemRemoved(KPlato::ViewListItem *item);
@@ -383,9 +376,6 @@ private:
// ------ Settings
QAction *actionConfigure;
- // ------ Help
- QAction *actionIntroduction;
-
// ------ Popup
QAction *actionOpenNode;
QAction *actionTaskProgress;
diff --git a/src/libs/ui/CMakeLists.txt b/src/libs/ui/CMakeLists.txt
index ca22f77f..15d8087c 100644
--- a/src/libs/ui/CMakeLists.txt
+++ b/src/libs/ui/CMakeLists.txt
@@ -96,8 +96,6 @@ set(planui_LIB_SRCS
kptworkpackagemergedialog.cpp
kptrecalculatedialog.cpp
- kpthtmlview.cpp
-
locale/localemon.cpp
kptlocaleconfigmoneydialog.cpp
@@ -166,13 +164,12 @@ target_link_libraries(planui
PUBLIC
planmain
planmodels
- KF5::KHtml
+ KF5::TextWidgets
PRIVATE
KChart
KF5::ItemViews
KF5::IconThemes
KF5::Archive
- KF5::TextWidgets
KF5::KIOCore
KF5::KIOFileWidgets
KF5::KIOWidgets
diff --git a/src/welcome/WelcomeView.cpp b/src/welcome/WelcomeView.cpp
index bede7f4f..b6115fd7 100644
--- a/src/welcome/WelcomeView.cpp
+++ b/src/welcome/WelcomeView.cpp
@@ -156,14 +156,6 @@ WelcomeView::WelcomeView(KoPart *part, KoDocument *doc, QWidget *parent)
"<nl/>This enables you to quickly open projects you have worked on recently."
"</para>"));
- Help::add(ui.introductionBtn,
- xi18nc("@info:whatsthis",
- "<title>Introduction to <application>Plan</application></title>"
- "<para>"
- "These introductory pages gives you hints and tips on what"
- " you can use <application>Plan</application> for, and how to use it."
- "</para>"));
-
Help::add(ui.contextHelp,
xi18nc("@info:whatsthis",
"<title>Context help</title>"
@@ -199,7 +191,6 @@ WelcomeView::WelcomeView(KoPart *part, KoDocument *doc, QWidget *parent)
connect(ui.newProjectBtn, &QAbstractButton::clicked, this, &WelcomeView::slotNewProject);
connect(ui.createResourceFileBtn, &QAbstractButton::clicked, this, &WelcomeView::slotCreateResourceFile);
connect(ui.openProjectBtn, &QAbstractButton::clicked, this, &WelcomeView::slotOpenProject);
- connect(ui.introductionBtn, &QAbstractButton::clicked, this, &WelcomeView::showIntroduction);
connect(ui.recentProjects, &QAbstractItemView::activated, this, &WelcomeView::slotRecentFileSelected);
diff --git a/src/welcome/WelcomeView.h b/src/welcome/WelcomeView.h
index a09ebe2d..be604de7 100644
--- a/src/welcome/WelcomeView.h
+++ b/src/welcome/WelcomeView.h
@@ -64,7 +64,6 @@ Q_SIGNALS:
void newProject();
void openProject();
void recentProject(const QUrl &file, KoPart *part);
- void showIntroduction();
void selectDefaultView();
void loadSharedResources(const QUrl &url, const QUrl &projects);
void openExistingFile(const QUrl &url);
diff --git a/src/welcome/WelcomeView.ui b/src/welcome/WelcomeView.ui
index 7317214b..9b3363db 100644
--- a/src/welcome/WelcomeView.ui
+++ b/src/welcome/WelcomeView.ui
@@ -231,14 +231,10 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="introductionBtn">
+ <widget class="QLabel" name="label_6">
<property name="text">
<string>Introduction</string>
</property>
- <property name="icon">
- <iconset theme="help-hint">
- <normaloff>.</normaloff>.</iconset>
- </property>
</widget>
</item>
<item>
--
2.29.1
From 8aec5de56c525e71ae650abd4abfba756f5e5724 Mon Sep 17 00:00:00 2001
From: Dag Andersen <dag.andersen@kdemail.net>
Date: Mon, 26 Oct 2020 14:17:48 +0100
Subject: [PATCH 2/2] User docs now on docs.kde.org
---
src/welcome/WelcomeView.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/welcome/WelcomeView.ui b/src/welcome/WelcomeView.ui
index 9b3363db..741913b3 100644
--- a/src/welcome/WelcomeView.ui
+++ b/src/welcome/WelcomeView.ui
@@ -307,7 +307,7 @@
<string>https://userbase.kde.org/Plan</string>
</property>
<property name="text">
- <string comment="@action:button"><a href="https://userbase.kde.org/Plan">Plan user documentation</a></string>
+ <string comment="@action:button"><a href="https://docs.kde.org/index.php?application=calligraplan">Plan user documentation</a></string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
--
2.29.1
|