Refactoring patches
Yuriy Skalko
yuriy.skalko at gmail.com
Mon Oct 12 12:33:45 UTC 2020
I've continued with refactoring of LyX codebase. Here are my new patches.
Yuriy
-------------- next part --------------
From 942ddea047c807b1f0fed82f089847be6543ddaa Mon Sep 17 00:00:00 2001
From: Yuriy Skalko <yuriy.skalko at gmail.com>
Date: Fri, 9 Oct 2020 18:50:24 +0300
Subject: [PATCH 1/4] Constify
---
src/Counters.cpp | 2 +-
src/Counters.h | 2 +-
src/Text.h | 4 ++--
src/Text2.cpp | 4 ++--
src/Text3.cpp | 2 +-
src/frontends/qt/Menus.cpp | 3 +--
src/insets/InsetFloat.cpp | 2 +-
src/lyxfind.cpp | 18 +++++++++---------
src/mathed/InsetMathSideset.cpp | 4 ++--
src/tex2lyx/table.cpp | 2 +-
src/tex2lyx/tex2lyx.h | 2 +-
11 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/src/Counters.cpp b/src/Counters.cpp
index 144f5abbb3..32968fca66 100644
--- a/src/Counters.cpp
+++ b/src/Counters.cpp
@@ -412,7 +412,7 @@ bool Counters::remove(docstring const & cnt)
}
-void Counters::copy(Counters & from, Counters & to, docstring const & match)
+void Counters::copy(Counters const & from, Counters & to, docstring const & match)
{
for (auto const & ctr : counterList_) {
if (ctr.first.find(match) != string::npos || match == "") {
diff --git a/src/Counters.h b/src/Counters.h
index ffc091b2ad..959a2f4133 100644
--- a/src/Counters.h
+++ b/src/Counters.h
@@ -162,7 +162,7 @@ public:
bool remove(docstring const & cnt);
/// Copy counters whose name matches match from the &from to
/// the &to array of counters. Empty string matches all.
- void copy(Counters & from, Counters & to,
+ void copy(Counters const & from, Counters & to,
docstring const & match = docstring());
/** returns the expanded string representation of counter \c
* c. The \c lang code is used to translate the string.
diff --git a/src/Text.h b/src/Text.h
index 8209b09f1f..723e66b80d 100644
--- a/src/Text.h
+++ b/src/Text.h
@@ -258,9 +258,9 @@ public:
settings are given to the new one.
This function will handle a multi-paragraph selection.
*/
- void setParagraphs(Cursor & cur, docstring const & arg, bool modify = false);
+ void setParagraphs(Cursor const & cur, docstring const & arg, bool modify = false);
/// Sets parameters for current or selected paragraphs
- void setParagraphs(Cursor & cur, ParagraphParameters const & p);
+ void setParagraphs(Cursor const & cur, ParagraphParameters const & p);
/* these things are for search and replace */
diff --git a/src/Text2.cpp b/src/Text2.cpp
index a78700c686..ad5b8aaaa5 100644
--- a/src/Text2.cpp
+++ b/src/Text2.cpp
@@ -487,7 +487,7 @@ void Text::setLabelWidthStringToSequence(Cursor const & cur,
}
-void Text::setParagraphs(Cursor & cur, docstring const & arg, bool merge)
+void Text::setParagraphs(Cursor const & cur, docstring const & arg, bool merge)
{
LBUFERR(cur.text());
@@ -515,7 +515,7 @@ void Text::setParagraphs(Cursor & cur, docstring const & arg, bool merge)
}
-void Text::setParagraphs(Cursor & cur, ParagraphParameters const & p)
+void Text::setParagraphs(Cursor const & cur, ParagraphParameters const & p)
{
LBUFERR(cur.text());
diff --git a/src/Text3.cpp b/src/Text3.cpp
index af904041c2..10400f92ef 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -369,7 +369,7 @@ enum OutlineOp {
};
-static void insertSeparator(Cursor & cur, depth_type const depth)
+static void insertSeparator(Cursor const & cur, depth_type const depth)
{
Buffer & buf = *cur.buffer();
lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK));
diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp
index 5098994d62..5bf058f8b0 100644
--- a/src/frontends/qt/Menus.cpp
+++ b/src/frontends/qt/Menus.cpp
@@ -1929,12 +1929,11 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv,
docstring prevlayout;
depth_type current_depth = par.params().depth();
// check if we have an environment in our scope
- Paragraph cpar = par;
while (true) {
if (pit == 0)
break;
--pit;
- cpar = text->getPar(pit);
+ Paragraph cpar = text->getPar(pit);
if (cpar.layout().isEnvironment() && prevlayout.empty()
&& cpar.params().depth() <= current_depth)
prevlayout = cpar.layout().name();
diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp
index 4e7db11901..92397dd7a4 100644
--- a/src/insets/InsetFloat.cpp
+++ b/src/insets/InsetFloat.cpp
@@ -627,7 +627,7 @@ std::tuple<InsetCode, const Inset *, const InsetCaption *, const InsetLabel *> d
void docbookSubfigures(XMLStream & xs, OutputParams const & runparams, const InsetCaption * caption,
- const InsetLabel * label, std::vector<const InsetCollapsible *> & subfigures)
+ const InsetLabel * label, std::vector<const InsetCollapsible *> const & subfigures)
{
// Ensure there is no label output, it is supposed to be handled as xml:id.
OutputParams rpNoLabel = runparams;
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 5d336b0abc..5b4bd3a15d 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -1134,7 +1134,7 @@ public:
void addIntervall(int upper);
void addIntervall(int low, int upper); /* if explicit */
void removeAccents();
- void setForDefaultLang(KeyInfo &defLang);
+ void setForDefaultLang(KeyInfo const & defLang);
int findclosing(int start, int end, char up, char down, int repeat);
void handleParentheses(int lastpos, bool closingAllowed);
bool hasTitle;
@@ -1162,7 +1162,7 @@ int Intervall::isOpeningPar(int pos)
return 1;
}
-void Intervall::setForDefaultLang(KeyInfo &defLang)
+void Intervall::setForDefaultLang(KeyInfo const & defLang)
{
// Enable the use of first token again
if (ignoreidx >= 0) {
@@ -1475,7 +1475,7 @@ class LatexInfo {
void buildEntries(bool);
void makeKey(const string &, KeyInfo, bool isPatternString);
void processRegion(int start, int region_end); /* remove {} parts */
- void removeHead(KeyInfo&, int count=0);
+ void removeHead(KeyInfo const &, int count=0);
public:
LatexInfo(string const & par, bool isPatternString)
@@ -1535,8 +1535,8 @@ class LatexInfo {
}
return -1;
};
- int process(ostringstream &os, KeyInfo &actual);
- int dispatch(ostringstream &os, int previousStart, KeyInfo &actual);
+ int process(ostringstream & os, KeyInfo const & actual);
+ int dispatch(ostringstream & os, int previousStart, KeyInfo & actual);
// string show(int lastpos) { return interval.show(lastpos);};
int nextNotIgnored(int start) { return interval_.nextNotIgnored(start);};
KeyInfo &getKeyInfo(int keyinfo) {
@@ -2220,7 +2220,7 @@ void LatexInfo::processRegion(int start, int region_end)
}
}
-void LatexInfo::removeHead(KeyInfo &actual, int count)
+void LatexInfo::removeHead(KeyInfo const & actual, int count)
{
if (actual.parenthesiscount == 0) {
// "{\tiny{} ...}" ==> "{{} ...}"
@@ -2504,7 +2504,7 @@ int LatexInfo::dispatch(ostringstream &os, int previousStart, KeyInfo &actual)
return nextKeyIdx;
}
-int LatexInfo::process(ostringstream &os, KeyInfo &actual )
+int LatexInfo::process(ostringstream & os, KeyInfo const & actual )
{
int end = interval_.nextNotIgnored(actual._dataEnd);
int oldStart = actual._dataStart;
@@ -3349,7 +3349,7 @@ int findAdvFinalize(DocIterator & cur, MatchStringAdv const & match)
/// Finds forward
-int findForwardAdv(DocIterator & cur, MatchStringAdv & match)
+int findForwardAdv(DocIterator & cur, MatchStringAdv const & match)
{
if (!cur)
return 0;
@@ -3627,7 +3627,7 @@ static int findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, Ma
return 0;
// Build a copy of the replace buffer, adapted to the KeepCase option
- Buffer & repl_buffer_orig = *theBufferList().getBuffer(FileName(to_utf8(opt.repl_buf_name)), true);
+ Buffer const & repl_buffer_orig = *theBufferList().getBuffer(FileName(to_utf8(opt.repl_buf_name)), true);
ostringstream oss;
repl_buffer_orig.write(oss);
string lyx = oss.str();
diff --git a/src/mathed/InsetMathSideset.cpp b/src/mathed/InsetMathSideset.cpp
index 642e07c16a..7dccfc1727 100644
--- a/src/mathed/InsetMathSideset.cpp
+++ b/src/mathed/InsetMathSideset.cpp
@@ -194,7 +194,7 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
tr().metrics(mi, dimtr);
}
- BufferView & bv = *mi.base.bv;
+ BufferView const & bv = *mi.base.bv;
// FIXME: data copying... not very efficient.
dim.wid = nwid(bv) + nker(mi.base.bv) + 2 * dx;
@@ -212,7 +212,7 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const
{
Changer dummy2 = pi.base.changeEnsureMath();
- BufferView & bv = *pi.base.bv;
+ BufferView const & bv = *pi.base.bv;
nuc().draw(pi, x + dxn(bv), y);
if (!scriptl_)
bl().draw(pi, x , y);
diff --git a/src/tex2lyx/table.cpp b/src/tex2lyx/table.cpp
index c9f910f709..8196267be5 100644
--- a/src/tex2lyx/table.cpp
+++ b/src/tex2lyx/table.cpp
@@ -939,7 +939,7 @@ void handle_hline_below(RowInfo & ri, vector<CellInfo> & ci)
void handle_tabular(Parser & p, ostream & os, string const & name,
string const & tabularwidth, string const & halign,
- Context & context)
+ Context const & context)
{
bool const is_long_tabular(name == "longtable" || name == "xltabular");
bool booktabs = false;
diff --git a/src/tex2lyx/tex2lyx.h b/src/tex2lyx/tex2lyx.h
index 8ce7295c29..c73785ee88 100644
--- a/src/tex2lyx/tex2lyx.h
+++ b/src/tex2lyx/tex2lyx.h
@@ -82,7 +82,7 @@ void parse_math(Parser & p, std::ostream & os, unsigned flags, mode_type mode);
/// in table.cpp
void handle_tabular(Parser & p, std::ostream & os, std::string const & name,
std::string const & width, std::string const & halign,
- Context & context);
+ Context const & context);
/// in tex2lyx.cpp
--
2.28.0.windows.1
-------------- next part --------------
From d1084ed46a5f736f4923c28c836c1e5479cff6d2 Mon Sep 17 00:00:00 2001
From: Yuriy Skalko <yuriy.skalko at gmail.com>
Date: Fri, 9 Oct 2020 20:42:51 +0300
Subject: [PATCH 2/4] Right exception rethrowing
---
src/Paragraph.cpp | 4 ++--
src/frontends/qt/GuiSpellchecker.cpp | 2 +-
src/frontends/qt/GuiView.cpp | 4 ++--
src/mathed/MathExtern.cpp | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 707e770164..9cd9b8b385 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1103,7 +1103,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
// add location information and throw again.
e.par_id = id_;
e.pos = i;
- throw(e);
+ throw;
}
if (close)
@@ -2878,7 +2878,7 @@ void Paragraph::latex(BufferParams const & bparams,
// add location information and throw again.
e.par_id = id();
e.pos = i;
- throw(e);
+ throw;
}
}
}
diff --git a/src/frontends/qt/GuiSpellchecker.cpp b/src/frontends/qt/GuiSpellchecker.cpp
index f210013698..16df37820b 100644
--- a/src/frontends/qt/GuiSpellchecker.cpp
+++ b/src/frontends/qt/GuiSpellchecker.cpp
@@ -557,7 +557,7 @@ void SpellcheckerWidget::Private::check()
Alert::warning(message.title_, message.details_);
return;
}
- throw message;
+ throw;
}
// end of document or selection?
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 00f3b96ea4..2da9ce39c9 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -2412,7 +2412,7 @@ Buffer * GuiView::loadDocument(FileName const & filename, bool tolastfiles)
newBuffer = checkAndLoadLyXFile(filename);
} catch (ExceptionMessage const & e) {
setBusy(false);
- throw(e);
+ throw;
}
setBusy(false);
@@ -4878,7 +4878,7 @@ void GuiView::doShowDialog(QString const & qname, QString const & qdata,
}
catch (ExceptionMessage const & ex) {
d.in_show_ = false;
- throw ex;
+ throw;
}
d.in_show_ = false;
}
diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp
index 092de56ee5..4d53b28245 100644
--- a/src/mathed/MathExtern.cpp
+++ b/src/mathed/MathExtern.cpp
@@ -1454,7 +1454,7 @@ void writeString(docstring const & s, WriteStream & os)
case WriteStream::wsDefault:
default:
// throw again
- throw(e);
+ throw;
}
}
}
@@ -1528,7 +1528,7 @@ void writeString(docstring const & s, WriteStream & os)
case WriteStream::wsDefault:
default:
// throw again
- throw(e);
+ throw;
}
}
}
--
2.28.0.windows.1
-------------- next part --------------
From 584f600bd24d61475481a6f4bd083ddac1a25bc6 Mon Sep 17 00:00:00 2001
From: Yuriy Skalko <yuriy.skalko at gmail.com>
Date: Fri, 9 Oct 2020 23:27:50 +0300
Subject: [PATCH 3/4] Add `override` in VCBackend
---
src/VCBackend.h | 230 ++++++++++++++++++++++++------------------------
1 file changed, 115 insertions(+), 115 deletions(-)
diff --git a/src/VCBackend.h b/src/VCBackend.h
index 2ee076f2e1..6d4743b35f 100644
--- a/src/VCBackend.h
+++ b/src/VCBackend.h
@@ -152,61 +152,61 @@ public:
/// get file from repo, the caller must ensure that it does not exist locally
static bool retrieve(support::FileName const & file);
- virtual std::string vcname() const { return "RCS"; };
+ std::string vcname() const override { return "RCS"; };
- virtual void registrer(std::string const & msg);
+ void registrer(std::string const & msg) override;
- virtual bool renameEnabled();
+ bool renameEnabled() override;
- virtual std::string rename(support::FileName const &, std::string const &);
+ std::string rename(support::FileName const &, std::string const &) override;
- virtual bool copyEnabled();
+ bool copyEnabled() override;
- virtual std::string copy(support::FileName const &, std::string const &);
+ std::string copy(support::FileName const &, std::string const &) override;
- virtual LyXVC::CommandResult
- checkIn(std::string const & msg, std::string & log);
+ LyXVC::CommandResult
+ checkIn(std::string const & msg, std::string & log) override;
- virtual bool checkInEnabled();
+ bool checkInEnabled() override;
- virtual bool isCheckInWithConfirmation();
+ bool isCheckInWithConfirmation() override;
- virtual std::string checkOut();
+ std::string checkOut() override;
- virtual bool checkOutEnabled();
+ bool checkOutEnabled() override;
- virtual std::string repoUpdate();
+ std::string repoUpdate() override;
- virtual bool repoUpdateEnabled();
+ bool repoUpdateEnabled() override;
- virtual std::string lockingToggle();
+ std::string lockingToggle() override;
- virtual bool lockingToggleEnabled();
+ bool lockingToggleEnabled() override;
- virtual bool revert();
+ bool revert() override;
- virtual bool isRevertWithConfirmation();
+ bool isRevertWithConfirmation() override;
- virtual void undoLast();
+ void undoLast() override;
- virtual bool undoLastEnabled();
+ bool undoLastEnabled() override;
- virtual void getLog(support::FileName const &);
+ void getLog(support::FileName const &) override;
- virtual std::string const versionString() const {
+ std::string const versionString() const override {
return "RCS: " + version_;
}
- virtual bool toggleReadOnlyEnabled();
+ bool toggleReadOnlyEnabled() override;
- virtual std::string revisionInfo(LyXVC::RevisionInfo const info);
+ std::string revisionInfo(LyXVC::RevisionInfo const info) override;
- virtual bool prepareFileRevision(std::string const & rev, std::string & f);
+ bool prepareFileRevision(std::string const & rev, std::string & f) override;
- virtual bool prepareFileRevisionEnabled();
+ bool prepareFileRevisionEnabled() override;
protected:
- virtual void scanMaster();
+ void scanMaster() override;
private:
bool getRevisionInfo();
/**
@@ -238,65 +238,65 @@ public:
/// get file from repo, the caller must ensure that it does not exist locally
static bool retrieve(support::FileName const & file);
- virtual std::string vcname() const { return "CVS"; };
+ std::string vcname() const override { return "CVS"; };
- virtual void registrer(std::string const & msg);
+ void registrer(std::string const & msg) override;
- virtual bool renameEnabled();
+ bool renameEnabled() override;
- virtual std::string rename(support::FileName const &, std::string const &);
+ std::string rename(support::FileName const &, std::string const &) override;
- virtual bool copyEnabled();
+ bool copyEnabled() override;
- virtual std::string copy(support::FileName const &, std::string const &);
+ std::string copy(support::FileName const &, std::string const &) override;
- virtual LyXVC::CommandResult
- checkIn(std::string const & msg, std::string & log);
+ LyXVC::CommandResult
+ checkIn(std::string const & msg, std::string & log) override;
- virtual bool checkInEnabled();
+ bool checkInEnabled() override;
- virtual bool isCheckInWithConfirmation();
+ bool isCheckInWithConfirmation() override;
- virtual std::string checkOut();
+ std::string checkOut() override;
- virtual bool checkOutEnabled();
+ bool checkOutEnabled() override;
- virtual std::string repoUpdate();
+ std::string repoUpdate() override;
- virtual bool repoUpdateEnabled();
+ bool repoUpdateEnabled() override;
- virtual std::string lockingToggle();
+ std::string lockingToggle() override;
- virtual bool lockingToggleEnabled();
+ bool lockingToggleEnabled() override;
- virtual bool isRevertWithConfirmation();
+ bool isRevertWithConfirmation() override;
- virtual bool revert();
+ bool revert() override;
- virtual void undoLast();
+ void undoLast() override;
- virtual bool undoLastEnabled();
+ bool undoLastEnabled() override;
- virtual void getLog(support::FileName const &);
+ void getLog(support::FileName const &) override;
/// Check for messages in cvs output.
/// Returns conflict line.
std::string scanLogFile(support::FileName const & f, std::string & status);
- virtual std::string const versionString() const {
+ std::string const versionString() const override {
return "CVS: " + version_;
}
- virtual bool toggleReadOnlyEnabled();
+ bool toggleReadOnlyEnabled() override;
- virtual std::string revisionInfo(LyXVC::RevisionInfo const info);
+ std::string revisionInfo(LyXVC::RevisionInfo const info) override;
- virtual bool prepareFileRevision(std::string const & rev, std::string & f);
+ bool prepareFileRevision(std::string const & rev, std::string & f) override;
- virtual bool prepareFileRevisionEnabled();
+ bool prepareFileRevisionEnabled() override;
protected:
- virtual void scanMaster();
+ void scanMaster() override;
/// the mode of operation for some VC commands
enum OperationMode {
Directory = 0,
@@ -336,24 +336,24 @@ private:
support::FileName const & output);
/// return the quoted pathname if Directory or filename if File
- virtual std::string const getTarget(OperationMode opmode) const;
+ std::string const getTarget(OperationMode opmode) const;
/// collect the diff of file or directory against repository
/// result is placed in temporary file
void getDiff(OperationMode opmode, support::FileName const & tmpf);
/// make the file ready for editing:
/// save a copy in CVS/Base and change file permissions to rw if needed
- virtual int edit();
+ int edit();
/// revert the edit operation
- virtual int unedit();
+ int unedit();
/// retrieve repository changes into working copy
- virtual int update(OperationMode opmode, support::FileName const & tmpf);
+ int update(OperationMode opmode, support::FileName const & tmpf);
/// check readonly state for file
/// assume true when file is writable
- virtual bool isLocked() const;
+ bool isLocked() const;
/// query and parse the cvs status of file
- virtual CvsStatus getStatus();
+ CvsStatus getStatus();
/// convert enum to string
- virtual docstring toString(CvsStatus status) const;
+ docstring toString(CvsStatus status) const;
/// cache the info values of current file revision
/// author, date and time of commit
@@ -379,61 +379,61 @@ public:
/// get file from repo, the caller must ensure that it does not exist locally
static bool retrieve(support::FileName const & file);
- virtual std::string vcname() const { return "SVN"; };
+ std::string vcname() const override { return "SVN"; };
- virtual void registrer(std::string const & msg);
+ void registrer(std::string const & msg) override;
- virtual bool renameEnabled();
+ bool renameEnabled() override;
- virtual std::string rename(support::FileName const &, std::string const &);
+ std::string rename(support::FileName const &, std::string const &) override;
- virtual bool copyEnabled();
+ bool copyEnabled() override;
- virtual std::string copy(support::FileName const &, std::string const &);
+ std::string copy(support::FileName const &, std::string const &) override;
- virtual LyXVC::CommandResult
- checkIn(std::string const & msg, std::string & log);
+ LyXVC::CommandResult
+ checkIn(std::string const & msg, std::string & log) override;
- virtual bool checkInEnabled();
+ bool checkInEnabled() override;
- virtual bool isCheckInWithConfirmation();
+ bool isCheckInWithConfirmation() override;
- virtual std::string checkOut();
+ std::string checkOut() override;
- virtual bool checkOutEnabled();
+ bool checkOutEnabled() override;
- virtual std::string repoUpdate();
+ std::string repoUpdate() override;
- virtual bool repoUpdateEnabled();
+ bool repoUpdateEnabled() override;
- virtual std::string lockingToggle();
+ std::string lockingToggle() override;
- virtual bool lockingToggleEnabled();
+ bool lockingToggleEnabled() override;
- virtual bool revert();
+ bool revert() override;
- virtual bool isRevertWithConfirmation();
+ bool isRevertWithConfirmation() override;
- virtual void undoLast();
+ void undoLast() override;
- virtual bool undoLastEnabled();
+ bool undoLastEnabled() override;
- virtual void getLog(support::FileName const &);
+ void getLog(support::FileName const &) override;
- virtual std::string const versionString() const {
+ std::string const versionString() const override {
return "SVN: " + rev_file_cache_;
}
- virtual bool toggleReadOnlyEnabled();
+ bool toggleReadOnlyEnabled() override;
- virtual std::string revisionInfo(LyXVC::RevisionInfo const info);
+ std::string revisionInfo(LyXVC::RevisionInfo const info) override;
- virtual bool prepareFileRevision(std::string const & rev, std::string & f);
+ bool prepareFileRevision(std::string const & rev, std::string & f) override;
- virtual bool prepareFileRevisionEnabled();
+ bool prepareFileRevisionEnabled() override;
protected:
- virtual void scanMaster();
+ void scanMaster() override;
/// Check for messages in svn output. Returns error.
std::string scanLogFile(support::FileName const & f, std::string & status);
/// checks locking policy and setup locked_mode_
@@ -489,61 +489,61 @@ public:
/// get file from repo, the caller must ensure that it does not exist locally
static bool retrieve(support::FileName const & file);
- virtual std::string vcname() const { return "GIT"; };
+ std::string vcname() const override { return "GIT"; };
- virtual void registrer(std::string const & msg);
+ void registrer(std::string const & msg) override;
- virtual bool renameEnabled();
+ bool renameEnabled() override;
- virtual std::string rename(support::FileName const &, std::string const &);
+ std::string rename(support::FileName const &, std::string const &) override;
- virtual bool copyEnabled();
+ bool copyEnabled() override;
- virtual std::string copy(support::FileName const &, std::string const &);
+ std::string copy(support::FileName const &, std::string const &) override;
- virtual LyXVC::CommandResult
- checkIn(std::string const & msg, std::string & log);
+ LyXVC::CommandResult
+ checkIn(std::string const & msg, std::string & log) override;
- virtual bool checkInEnabled();
+ bool checkInEnabled() override;
- virtual bool isCheckInWithConfirmation();
+ bool isCheckInWithConfirmation() override;
- virtual std::string checkOut();
+ std::string checkOut() override;
- virtual bool checkOutEnabled();
+ bool checkOutEnabled() override;
- virtual std::string repoUpdate();
+ std::string repoUpdate() override;
- virtual bool repoUpdateEnabled();
+ bool repoUpdateEnabled() override;
- virtual std::string lockingToggle();
+ std::string lockingToggle() override;
- virtual bool lockingToggleEnabled();
+ bool lockingToggleEnabled() override;
- virtual bool revert();
+ bool revert() override;
- virtual bool isRevertWithConfirmation();
+ bool isRevertWithConfirmation() override;
- virtual void undoLast();
+ void undoLast() override;
- virtual bool undoLastEnabled();
+ bool undoLastEnabled() override;
- virtual void getLog(support::FileName const &);
+ void getLog(support::FileName const &) override;
- virtual std::string const versionString() const {
+ std::string const versionString() const override {
return "GIT: ?";
}
- virtual bool toggleReadOnlyEnabled();
+ bool toggleReadOnlyEnabled() override;
- virtual std::string revisionInfo(LyXVC::RevisionInfo const info);
+ std::string revisionInfo(LyXVC::RevisionInfo const info) override;
- virtual bool prepareFileRevision(std::string const & rev, std::string & f);
+ bool prepareFileRevision(std::string const & rev, std::string & f) override;
- virtual bool prepareFileRevisionEnabled();
+ bool prepareFileRevisionEnabled() override;
protected:
- virtual void scanMaster();
+ void scanMaster() override;
/// Check for messages in svn output. Returns error.
std::string scanLogFile(support::FileName const & f, std::string & status);
/// Check in files \p f with log \p msg
--
2.28.0.windows.1
-------------- next part --------------
From 7081d5c9f2e441fdce68d672fd07da6f1c121bfc Mon Sep 17 00:00:00 2001
From: Yuriy Skalko <yuriy.skalko at gmail.com>
Date: Mon, 12 Oct 2020 15:30:07 +0300
Subject: [PATCH 4/4] Remove unused forward declarations and header includes
---
src/Buffer.h | 4 ----
src/BufferView.h | 3 ---
src/Citation.h | 2 --
src/CoordCache.h | 2 --
src/CutAndPaste.h | 1 -
src/LayoutFile.h | 2 --
src/ParIterator.h | 1 -
src/Paragraph.h | 6 ------
src/ParagraphMetrics.h | 6 ------
src/buffer_funcs.h | 2 --
src/frontends/Application.h | 7 -------
src/frontends/Delegates.h | 1 -
src/frontends/WorkArea.h | 3 ---
src/frontends/qt/GuiApplication.h | 6 +++---
src/frontends/qt/GuiCharacter.cpp | 1 -
src/frontends/qt/GuiCitation.cpp | 4 ----
src/frontends/qt/GuiCitation.h | 2 --
src/frontends/qt/GuiCompleter.h | 2 --
src/frontends/qt/GuiCounter.cpp | 2 --
src/frontends/qt/GuiDocument.cpp | 1 -
src/frontends/qt/GuiDocument.h | 2 --
src/frontends/qt/GuiErrorList.h | 2 --
src/frontends/qt/GuiExternal.cpp | 1 -
src/frontends/qt/GuiIndex.cpp | 2 --
src/frontends/qt/GuiLog.cpp | 1 -
src/frontends/qt/GuiLyXFiles.h | 4 ----
src/frontends/qt/GuiNote.cpp | 2 --
src/frontends/qt/GuiPainter.h | 2 --
src/frontends/qt/GuiPhantom.cpp | 2 --
src/frontends/qt/GuiPrefs.cpp | 2 --
src/frontends/qt/GuiPrefs.h | 4 ----
src/frontends/qt/GuiSelectionManager.h | 2 --
src/frontends/qt/GuiSpellchecker.h | 2 --
src/frontends/qt/GuiTabular.cpp | 2 --
src/frontends/qt/GuiToc.cpp | 1 -
src/frontends/qt/GuiToc.h | 1 -
src/frontends/qt/GuiToolbar.h | 5 -----
src/frontends/qt/GuiView.cpp | 2 --
src/frontends/qt/GuiWorkArea.h | 3 +--
src/frontends/qt/GuiWorkArea_Private.h | 2 --
src/frontends/qt/LayoutBox.h | 3 ---
src/frontends/qt/LyXFileDialog.h | 2 --
src/frontends/qt/Menus.cpp | 1 -
src/frontends/qt/PanelStack.h | 3 ---
src/frontends/qt/TocModel.h | 1 -
src/frontends/qt/qt_helpers.h | 4 ----
src/graphics/GraphicsCacheItem.h | 1 -
src/graphics/PreviewImage.h | 1 -
src/insets/ExternalTransforms.h | 2 --
src/insets/Inset.h | 3 ---
src/insets/InsetBibitem.h | 2 --
src/insets/InsetBibtex.h | 1 -
src/insets/InsetCaptionable.h | 2 ++
src/insets/InsetCollapsible.h | 2 --
src/insets/InsetERT.h | 2 --
src/insets/InsetInclude.h | 1 -
src/insets/InsetLabel.h | 2 --
src/insets/InsetLayout.cpp | 1 -
src/insets/InsetLine.h | 2 --
src/insets/InsetPhantom.cpp | 1 -
src/insets/InsetTabular.h | 1 -
src/insets/InsetText.h | 3 ---
src/mathed/InsetMath.h | 1 -
src/mathed/InsetMathComment.h | 2 --
src/mathed/InsetMathEnv.cpp | 1 -
src/mathed/InsetMathExInt.cpp | 1 -
src/mathed/InsetMathGrid.h | 1 -
src/mathed/InsetMathHull.cpp | 1 -
src/mathed/InsetMathMacroTemplate.cpp | 1 -
src/mathed/InsetMathNest.cpp | 1 -
src/mathed/InsetMathNumber.cpp | 1 -
src/mathed/InsetMathTabular.cpp | 1 -
src/mathed/InsetMathXArrow.cpp | 1 -
src/mathed/MacroTable.cpp | 1 -
src/mathed/MacroTable.h | 1 -
src/mathed/MathAtom.h | 1 -
src/mathed/MathRow.cpp | 2 --
src/support/SystemcallPrivate.h | 2 --
78 files changed, 6 insertions(+), 156 deletions(-)
diff --git a/src/Buffer.h b/src/Buffer.h
index e8f0aea875..8aa8478500 100644
--- a/src/Buffer.h
+++ b/src/Buffer.h
@@ -39,9 +39,6 @@ class FuncRequest;
class FuncStatus;
class Inset;
class InsetLabel;
-class InsetRef;
-class Font;
-class Format;
class Lexer;
class Text;
class LyXVC;
@@ -52,7 +49,6 @@ class MacroNameSet;
class MacroSet;
class OutputParams;
class otexstream;
-class Paragraph;
class ParConstIterator;
class ParIterator;
class ParagraphList;
diff --git a/src/BufferView.h b/src/BufferView.h
index 2f6e429dd0..4a020eb3b2 100644
--- a/src/BufferView.h
+++ b/src/BufferView.h
@@ -37,7 +37,6 @@ class CursorSlice;
class Dimension;
class DispatchResult;
class DocIterator;
-class DocumentClass;
class FuncRequest;
class FuncStatus;
class Intl;
@@ -45,10 +44,8 @@ class Inset;
class Length;
class MathData;
class MathRow;
-class ParIterator;
class ParagraphMetrics;
class Point;
-class Row;
class TexRow;
class Text;
class TextMetrics;
diff --git a/src/Citation.h b/src/Citation.h
index 8aeb56c3e5..b7af22b751 100644
--- a/src/Citation.h
+++ b/src/Citation.h
@@ -18,8 +18,6 @@
namespace lyx {
-class Buffer;
-
enum CiteEngineType {
ENGINE_TYPE_AUTHORYEAR = 1,
diff --git a/src/CoordCache.h b/src/CoordCache.h
index 9871819c10..38842be83c 100644
--- a/src/CoordCache.h
+++ b/src/CoordCache.h
@@ -21,9 +21,7 @@
namespace lyx {
class Inset;
-class Text;
class MathData;
-class Paragraph;
void lyxbreaker(void const * data, const char * hint, int size);
diff --git a/src/CutAndPaste.h b/src/CutAndPaste.h
index a6ce3fc74d..54ca4e3dfd 100644
--- a/src/CutAndPaste.h
+++ b/src/CutAndPaste.h
@@ -25,7 +25,6 @@
namespace lyx {
-class DocumentClass;
class ErrorList;
class InsetText;
class Cursor;
diff --git a/src/LayoutFile.h b/src/LayoutFile.h
index 7fcc820bbf..fe86532266 100644
--- a/src/LayoutFile.h
+++ b/src/LayoutFile.h
@@ -24,8 +24,6 @@
namespace lyx {
-class Layout;
-
/// Index into LayoutFileList. Basically a 'strong typedef'.
class LayoutFileIndex {
public:
diff --git a/src/ParIterator.h b/src/ParIterator.h
index a763183838..a4e410b7e2 100644
--- a/src/ParIterator.h
+++ b/src/ParIterator.h
@@ -21,7 +21,6 @@ namespace lyx {
class Buffer;
class Inset;
-class Text;
class ParagraphList;
diff --git a/src/Paragraph.h b/src/Paragraph.h
index 597a10b764..0752dfeb0a 100644
--- a/src/Paragraph.h
+++ b/src/Paragraph.h
@@ -32,22 +32,16 @@ class AuthorList;
class Buffer;
class BufferParams;
class Change;
-class Counters;
-class Cursor;
-class CursorSlice;
class DocIterator;
class docstring_list;
class DocumentClass;
class Inset;
-class InsetBibitem;
class LaTeXFeatures;
class InsetList;
class Language;
class Layout;
class Font;
-class MetricsInfo;
class OutputParams;
-class PainterInfo;
class ParagraphParameters;
class TocBackend;
class WordLangTuple;
diff --git a/src/ParagraphMetrics.h b/src/ParagraphMetrics.h
index 9ddc1b0211..17d68b5ba8 100644
--- a/src/ParagraphMetrics.h
+++ b/src/ParagraphMetrics.h
@@ -32,14 +32,8 @@ namespace lyx {
*/
typedef std::vector<Row> RowList;
-class Buffer;
class BufferView;
-class BufferParams;
-class Font;
-class Inset;
class Paragraph;
-class MetricsInfo;
-class PainterInfo;
/// Helper class for paragraph metrics.
class ParagraphMetrics {
diff --git a/src/buffer_funcs.h b/src/buffer_funcs.h
index 12aa84123e..7d0bd07f84 100644
--- a/src/buffer_funcs.h
+++ b/src/buffer_funcs.h
@@ -19,8 +19,6 @@ namespace lyx {
namespace support { class FileName; }
class Buffer;
-class DocIterator;
-class ParIterator;
/**
* Checks and loads a LyX file \param filename.
diff --git a/src/frontends/Application.h b/src/frontends/Application.h
index 49bf68ddd0..5e3b37a7f1 100644
--- a/src/frontends/Application.h
+++ b/src/frontends/Application.h
@@ -25,22 +25,15 @@
namespace lyx {
-class BufferView;
class Buffer;
class DispatchResult;
class docstring_list;
class FuncRequest;
class FuncStatus;
class Inset;
-class Lexer;
-struct RGBColor;
namespace frontend {
-class Clipboard;
-class FontLoader;
-class Selection;
-
/// The main application class
/**
There should be only one instance of this class. No Qt object
diff --git a/src/frontends/Delegates.h b/src/frontends/Delegates.h
index b5844470e1..c50df6b33f 100644
--- a/src/frontends/Delegates.h
+++ b/src/frontends/Delegates.h
@@ -16,7 +16,6 @@
namespace lyx {
-class Buffer;
class DocIterator;
class Inset;
diff --git a/src/frontends/WorkArea.h b/src/frontends/WorkArea.h
index 743c1145a5..d6912fc7fa 100644
--- a/src/frontends/WorkArea.h
+++ b/src/frontends/WorkArea.h
@@ -18,9 +18,6 @@
namespace lyx {
-class BufferView;
-class KeySymbol;
-
namespace frontend {
/**
diff --git a/src/frontends/qt/GuiApplication.h b/src/frontends/qt/GuiApplication.h
index 4e0983b134..a121b957a6 100644
--- a/src/frontends/qt/GuiApplication.h
+++ b/src/frontends/qt/GuiApplication.h
@@ -29,7 +29,6 @@ class QFont;
namespace lyx {
-class BufferView;
class ColorCache;
class KeySymbol;
@@ -39,10 +38,11 @@ class FileName;
namespace frontend {
+class Clipboard;
+class FontLoader;
class GuiView;
-class GuiWorkArea;
class Menus;
-class SocketNotifier;
+class Selection;
class Toolbars;
/// The Qt main application class
diff --git a/src/frontends/qt/GuiCharacter.cpp b/src/frontends/qt/GuiCharacter.cpp
index d1d4336fc2..cfa481c832 100644
--- a/src/frontends/qt/GuiCharacter.cpp
+++ b/src/frontends/qt/GuiCharacter.cpp
@@ -18,7 +18,6 @@
#include "GuiApplication.h"
#include "qt_helpers.h"
-#include "Font.h"
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
diff --git a/src/frontends/qt/GuiCitation.cpp b/src/frontends/qt/GuiCitation.cpp
index 951bad8612..d7e5ae0199 100644
--- a/src/frontends/qt/GuiCitation.cpp
+++ b/src/frontends/qt/GuiCitation.cpp
@@ -22,7 +22,6 @@
#include "Buffer.h"
#include "BufferView.h"
-#include "BiblioInfo.h"
#include "BufferParams.h"
#include "TextClass.h"
#include "FuncRequest.h"
@@ -42,9 +41,6 @@
#include <QStandardItemModel>
#include <QVariant>
-#include <vector>
-#include <string>
-
#undef KeyPress
#include "support/regex.h"
diff --git a/src/frontends/qt/GuiCitation.h b/src/frontends/qt/GuiCitation.h
index db7ac31249..7e65fe64cb 100644
--- a/src/frontends/qt/GuiCitation.h
+++ b/src/frontends/qt/GuiCitation.h
@@ -31,8 +31,6 @@
namespace lyx {
-class BiblioInfo;
-
namespace frontend {
class GuiSelectionManager;
diff --git a/src/frontends/qt/GuiCompleter.h b/src/frontends/qt/GuiCompleter.h
index 54ea5f0559..9cf5ad96d6 100644
--- a/src/frontends/qt/GuiCompleter.h
+++ b/src/frontends/qt/GuiCompleter.h
@@ -20,8 +20,6 @@
namespace lyx {
-class Buffer;
-
namespace frontend {
class GuiWorkArea;
diff --git a/src/frontends/qt/GuiCounter.cpp b/src/frontends/qt/GuiCounter.cpp
index db081a46c5..d7685bc7bb 100644
--- a/src/frontends/qt/GuiCounter.cpp
+++ b/src/frontends/qt/GuiCounter.cpp
@@ -25,8 +25,6 @@
#include "support/gettext.h"
#include "support/lstrings.h"
-#include "qt_helpers.h"
-
#include <map>
//#include <vector>
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index d776ad5e3b..42b1932ac0 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -27,7 +27,6 @@
#include "BranchList.h"
#include "buffer_funcs.h"
#include "Buffer.h"
-#include "BufferParams.h"
#include "BufferView.h"
#include "CiteEnginesList.h"
#include "Color.h"
diff --git a/src/frontends/qt/GuiDocument.h b/src/frontends/qt/GuiDocument.h
index 2ef9d250f9..73cc4d6b8b 100644
--- a/src/frontends/qt/GuiDocument.h
+++ b/src/frontends/qt/GuiDocument.h
@@ -42,10 +42,8 @@
namespace lyx {
-class BufferParams;
class LayoutModuleList;
class LyXModule;
-class TextClass;
namespace support {
class TempFile;
diff --git a/src/frontends/qt/GuiErrorList.h b/src/frontends/qt/GuiErrorList.h
index 30d9e44350..bc84888253 100644
--- a/src/frontends/qt/GuiErrorList.h
+++ b/src/frontends/qt/GuiErrorList.h
@@ -16,8 +16,6 @@
#include "ErrorList.h"
#include "ui_ErrorListUi.h"
-class QListWidgetItem;
-
namespace lyx {
namespace frontend {
diff --git a/src/frontends/qt/GuiExternal.cpp b/src/frontends/qt/GuiExternal.cpp
index eb71aad4d1..3a4ab2c91e 100644
--- a/src/frontends/qt/GuiExternal.cpp
+++ b/src/frontends/qt/GuiExternal.cpp
@@ -21,7 +21,6 @@
#include "insets/ExternalSupport.h"
#include "insets/ExternalTemplate.h"
-#include "insets/InsetExternal.h"
#include "graphics/epstools.h"
#include "graphics/GraphicsCache.h"
diff --git a/src/frontends/qt/GuiIndex.cpp b/src/frontends/qt/GuiIndex.cpp
index 7800bad2d4..a59ac3953f 100644
--- a/src/frontends/qt/GuiIndex.cpp
+++ b/src/frontends/qt/GuiIndex.cpp
@@ -21,8 +21,6 @@
#include "FuncRequest.h"
#include "IndicesList.h"
-#include "insets/InsetIndex.h"
-
#include <QPushButton>
using namespace std;
diff --git a/src/frontends/qt/GuiLog.cpp b/src/frontends/qt/GuiLog.cpp
index 6851994701..16979138d8 100644
--- a/src/frontends/qt/GuiLog.cpp
+++ b/src/frontends/qt/GuiLog.cpp
@@ -21,7 +21,6 @@
#include "frontends/Clipboard.h"
#include "support/docstring.h"
-#include "support/FileName.h"
#include "support/gettext.h"
#include "support/lstrings.h"
diff --git a/src/frontends/qt/GuiLyXFiles.h b/src/frontends/qt/GuiLyXFiles.h
index 4d762fc20c..e22dafc2ef 100644
--- a/src/frontends/qt/GuiLyXFiles.h
+++ b/src/frontends/qt/GuiLyXFiles.h
@@ -18,12 +18,8 @@
#include <vector>
-class QListWidgetItem;
-
namespace lyx {
-class Format;
-
namespace frontend {
class GuiLyXFiles : public GuiDialog, public Ui::LyXFilesUi
diff --git a/src/frontends/qt/GuiNote.cpp b/src/frontends/qt/GuiNote.cpp
index 6c87850d40..a70a809dfa 100644
--- a/src/frontends/qt/GuiNote.cpp
+++ b/src/frontends/qt/GuiNote.cpp
@@ -15,8 +15,6 @@
#include "FuncRequest.h"
#include "support/gettext.h"
-#include "insets/InsetNote.h"
-
using namespace std;
namespace lyx {
diff --git a/src/frontends/qt/GuiPainter.h b/src/frontends/qt/GuiPainter.h
index 22d69a7fe3..2e2a7f2ec8 100644
--- a/src/frontends/qt/GuiPainter.h
+++ b/src/frontends/qt/GuiPainter.h
@@ -21,8 +21,6 @@
#include <QPainterPath>
#include <stack>
-class QString;
-
namespace lyx {
class FontInfo;
diff --git a/src/frontends/qt/GuiPhantom.cpp b/src/frontends/qt/GuiPhantom.cpp
index 973ec823c0..1aff3afd3c 100644
--- a/src/frontends/qt/GuiPhantom.cpp
+++ b/src/frontends/qt/GuiPhantom.cpp
@@ -14,8 +14,6 @@
#include "FuncRequest.h"
#include "support/gettext.h"
-#include "insets/InsetPhantom.h"
-
using namespace std;
namespace lyx {
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 01d7d9bf9d..4d433ef688 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -19,7 +19,6 @@
#include "GuiFontExample.h"
#include "GuiFontLoader.h"
#include "GuiKeySymbol.h"
-#include "GuiLyXFiles.h"
#include "GuiView.h"
#include "qt_helpers.h"
#include "Validator.h"
@@ -31,7 +30,6 @@
#include "ConverterCache.h"
#include "FontEnums.h"
#include "FuncRequest.h"
-#include "KeyMap.h"
#include "KeySequence.h"
#include "Language.h"
#include "LyXAction.h"
diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h
index cb810c57f7..90cf142185 100644
--- a/src/frontends/qt/GuiPrefs.h
+++ b/src/frontends/qt/GuiPrefs.h
@@ -50,10 +50,6 @@
namespace lyx {
-class Converters;
-class Formats;
-class Movers;
-
namespace frontend {
class PrefModule;
diff --git a/src/frontends/qt/GuiSelectionManager.h b/src/frontends/qt/GuiSelectionManager.h
index 7a7d71d7e7..dbf93893e9 100644
--- a/src/frontends/qt/GuiSelectionManager.h
+++ b/src/frontends/qt/GuiSelectionManager.h
@@ -15,9 +15,7 @@
#include <QObject>
class QAbstractItemModel;
-class QAbstractListModel;
class QModelIndex;
-class QListView;
class QPushButton;
class QVariant;
class QAbstractItemView;
diff --git a/src/frontends/qt/GuiSpellchecker.h b/src/frontends/qt/GuiSpellchecker.h
index 79c70880f0..b113e75513 100644
--- a/src/frontends/qt/GuiSpellchecker.h
+++ b/src/frontends/qt/GuiSpellchecker.h
@@ -22,8 +22,6 @@ class QListWidgetItem;
namespace lyx {
-class docstring_list;
-
namespace frontend {
class SpellcheckerWidget : public QTabWidget
diff --git a/src/frontends/qt/GuiTabular.cpp b/src/frontends/qt/GuiTabular.cpp
index 1df93d86ab..ce28491b34 100644
--- a/src/frontends/qt/GuiTabular.cpp
+++ b/src/frontends/qt/GuiTabular.cpp
@@ -31,8 +31,6 @@
#include "LyX.h"
#include "LyXRC.h"
-#include "insets/InsetTabular.h"
-
#include "support/convert.h"
#include "support/debug.h"
#include "support/lstrings.h"
diff --git a/src/frontends/qt/GuiToc.cpp b/src/frontends/qt/GuiToc.cpp
index 793ee1efd2..e9ee840fd8 100644
--- a/src/frontends/qt/GuiToc.cpp
+++ b/src/frontends/qt/GuiToc.cpp
@@ -14,7 +14,6 @@
#include "GuiToc.h"
#include "GuiView.h"
-#include "DockView.h"
#include "TocWidget.h"
#include "qt_helpers.h"
diff --git a/src/frontends/qt/GuiToc.h b/src/frontends/qt/GuiToc.h
index 7e6df1db1b..7add981050 100644
--- a/src/frontends/qt/GuiToc.h
+++ b/src/frontends/qt/GuiToc.h
@@ -20,7 +20,6 @@
namespace lyx {
namespace frontend {
-class TocModel;
class TocWidget;
class GuiToc : public DockView
diff --git a/src/frontends/qt/GuiToolbar.h b/src/frontends/qt/GuiToolbar.h
index 8f4d4d927f..53f3c9a454 100644
--- a/src/frontends/qt/GuiToolbar.h
+++ b/src/frontends/qt/GuiToolbar.h
@@ -26,17 +26,12 @@ class QSettings;
namespace lyx {
-class DocumentClass;
-class Inset;
-
namespace frontend {
class Action;
class GuiCommandBuffer;
-class GuiLayoutFilterModel;
class GuiToolbar;
class GuiView;
-class LayoutBox;
class ToolbarInfo;
class ToolbarItem;
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 2da9ce39c9..24a7eb809e 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -73,9 +73,7 @@
#include "support/debug.h"
#include "support/ExceptionMessage.h"
#include "support/FileName.h"
-#include "support/filetools.h"
#include "support/gettext.h"
-#include "support/filetools.h"
#include "support/ForkedCalls.h"
#include "support/lassert.h"
#include "support/lstrings.h"
diff --git a/src/frontends/qt/GuiWorkArea.h b/src/frontends/qt/GuiWorkArea.h
index d64dfe85ce..2f155bf7c1 100644
--- a/src/frontends/qt/GuiWorkArea.h
+++ b/src/frontends/qt/GuiWorkArea.h
@@ -22,14 +22,13 @@
#include <QTabBar>
#include <QTabWidget>
-class QDragEnterEvent;
-class QDropEvent;
class QToolButton;
class QWidget;
namespace lyx {
class Buffer;
+class BufferView;
class FuncRequest;
namespace frontend {
diff --git a/src/frontends/qt/GuiWorkArea_Private.h b/src/frontends/qt/GuiWorkArea_Private.h
index 39130162ad..e716323916 100644
--- a/src/frontends/qt/GuiWorkArea_Private.h
+++ b/src/frontends/qt/GuiWorkArea_Private.h
@@ -22,8 +22,6 @@
namespace lyx {
-class Buffer;
-
namespace frontend {
class GuiCompleter;
diff --git a/src/frontends/qt/LayoutBox.h b/src/frontends/qt/LayoutBox.h
index 3980b6f0e6..a3d174e01a 100644
--- a/src/frontends/qt/LayoutBox.h
+++ b/src/frontends/qt/LayoutBox.h
@@ -22,9 +22,6 @@
namespace lyx {
-class DocumentClass;
-class Inset;
-
namespace frontend {
class GuiView;
diff --git a/src/frontends/qt/LyXFileDialog.h b/src/frontends/qt/LyXFileDialog.h
index 60d7fd2d6d..769dc60d8c 100644
--- a/src/frontends/qt/LyXFileDialog.h
+++ b/src/frontends/qt/LyXFileDialog.h
@@ -16,8 +16,6 @@
#include <QFileDialog>
-class QToolButton;
-
namespace lyx {
class LyXFileDialog : public QFileDialog
diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp
index 5bf058f8b0..03fed5cda6 100644
--- a/src/frontends/qt/Menus.cpp
+++ b/src/frontends/qt/Menus.cpp
@@ -29,7 +29,6 @@
#include "Buffer.h"
#include "BufferList.h"
#include "BufferParams.h"
-#include "BufferView.h"
#include "Converter.h"
#include "CutAndPaste.h"
#include "Floating.h"
diff --git a/src/frontends/qt/PanelStack.h b/src/frontends/qt/PanelStack.h
index 5c470aae21..220afeec79 100644
--- a/src/frontends/qt/PanelStack.h
+++ b/src/frontends/qt/PanelStack.h
@@ -18,10 +18,7 @@
#include <QHash>
#include <QWidget>
-class QAbstractButton;
class QHideEvent;
-class QLineEdit;
-class QPushButton;
class QStackedWidget;
class QTimer;
class QTreeWidget;
diff --git a/src/frontends/qt/TocModel.h b/src/frontends/qt/TocModel.h
index ad65cdc288..b2d74a2b51 100644
--- a/src/frontends/qt/TocModel.h
+++ b/src/frontends/qt/TocModel.h
@@ -19,7 +19,6 @@
namespace lyx {
-class Buffer;
class BufferView;
class DocIterator;
class FuncRequest;
diff --git a/src/frontends/qt/qt_helpers.h b/src/frontends/qt/qt_helpers.h
index f0e535fe81..aff144b055 100644
--- a/src/frontends/qt/qt_helpers.h
+++ b/src/frontends/qt/qt_helpers.h
@@ -25,17 +25,13 @@
class QComboBox;
class QLineEdit;
-class QCheckBox;
class QString;
class QWidget;
-template <class T> class QList;
namespace lyx {
namespace support { class FileName; }
-class BufferParams;
-
namespace frontend {
class LengthCombo;
diff --git a/src/graphics/GraphicsCacheItem.h b/src/graphics/GraphicsCacheItem.h
index 6f7f968bc6..ba5efe6b2a 100644
--- a/src/graphics/GraphicsCacheItem.h
+++ b/src/graphics/GraphicsCacheItem.h
@@ -40,7 +40,6 @@ namespace support { class FileName; }
namespace graphics {
class Image;
-class Converter;
/// A graphics::Cache item holder.
class CacheItem {
diff --git a/src/graphics/PreviewImage.h b/src/graphics/PreviewImage.h
index 6b5ac7e66c..bea2553eeb 100644
--- a/src/graphics/PreviewImage.h
+++ b/src/graphics/PreviewImage.h
@@ -22,7 +22,6 @@ class Dimension;
namespace graphics {
-class Cache;
class PreviewLoader;
class Image;
diff --git a/src/insets/ExternalTransforms.h b/src/insets/ExternalTransforms.h
index e880158dc1..10c3dccd12 100644
--- a/src/insets/ExternalTransforms.h
+++ b/src/insets/ExternalTransforms.h
@@ -27,8 +27,6 @@
namespace lyx {
-class Lexer;
-
namespace external {
/*
diff --git a/src/insets/Inset.h b/src/insets/Inset.h
index 5557e25fc9..d2be340195 100644
--- a/src/insets/Inset.h
+++ b/src/insets/Inset.h
@@ -31,7 +31,6 @@
namespace lyx {
-class BiblioInfo;
class Buffer;
class BufferView;
class Change;
@@ -59,11 +58,9 @@ class MathAtom;
class MetricsInfo;
class OutputParams;
class PainterInfo;
-class ParConstIterator;
class ParIterator;
class Text;
class TocBackend;
-class TocList;
class XMLStream;
class otexstream;
diff --git a/src/insets/InsetBibitem.h b/src/insets/InsetBibitem.h
index 6eae701f27..2a210e8c90 100644
--- a/src/insets/InsetBibitem.h
+++ b/src/insets/InsetBibitem.h
@@ -18,8 +18,6 @@
namespace lyx {
-class BiblioInfo;
-
/////////////////////////////////////////////////////////////////////////
//
// InsetBibItem
diff --git a/src/insets/InsetBibtex.h b/src/insets/InsetBibtex.h
index d82d8adab4..be7659f223 100644
--- a/src/insets/InsetBibtex.h
+++ b/src/insets/InsetBibtex.h
@@ -16,7 +16,6 @@
namespace lyx {
-class BiblioInfo;
class docstring_list;
namespace support {
diff --git a/src/insets/InsetCaptionable.h b/src/insets/InsetCaptionable.h
index 2d5175ffd9..aa9a4cc426 100644
--- a/src/insets/InsetCaptionable.h
+++ b/src/insets/InsetCaptionable.h
@@ -20,6 +20,8 @@
namespace lyx {
+class InsetCaption;
+
class InsetCaptionable : public InsetCollapsible
{
public:
diff --git a/src/insets/InsetCollapsible.h b/src/insets/InsetCollapsible.h
index f07aec09f7..55044b47de 100644
--- a/src/insets/InsetCollapsible.h
+++ b/src/insets/InsetCollapsible.h
@@ -27,8 +27,6 @@ class InsetLayout;
namespace support { class TempFile; }
-namespace frontend { class Painter; }
-
/** A collapsible text inset
*/
diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h
index 1e127fc095..72220d07d0 100644
--- a/src/insets/InsetERT.h
+++ b/src/insets/InsetERT.h
@@ -26,8 +26,6 @@ namespace lyx {
versions of this inset.
*/
-class Language;
-
class InsetERT : public InsetCollapsible {
public:
///
diff --git a/src/insets/InsetInclude.h b/src/insets/InsetInclude.h
index 5a9958cec8..a2542543e3 100644
--- a/src/insets/InsetInclude.h
+++ b/src/insets/InsetInclude.h
@@ -22,7 +22,6 @@
namespace lyx {
-class BiblioInfo;
class Buffer;
class Dimension;
class InsetCommandParams;
diff --git a/src/insets/InsetLabel.h b/src/insets/InsetLabel.h
index a5b9fefd82..54bfa07141 100644
--- a/src/insets/InsetLabel.h
+++ b/src/insets/InsetLabel.h
@@ -17,8 +17,6 @@
namespace lyx {
-class Counter;
-
class InsetLabel : public InsetCommand
{
public:
diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp
index d758a1c3a4..51456c5eca 100644
--- a/src/insets/InsetLayout.cpp
+++ b/src/insets/InsetLayout.cpp
@@ -15,7 +15,6 @@
#include "InsetLayout.h"
#include "ColorSet.h"
-#include "Layout.h"
#include "Lexer.h"
#include "TextClass.h"
diff --git a/src/insets/InsetLine.h b/src/insets/InsetLine.h
index a6935445f2..361fbe5d6d 100644
--- a/src/insets/InsetLine.h
+++ b/src/insets/InsetLine.h
@@ -20,8 +20,6 @@
namespace lyx {
-class LaTeXFeatures;
-
class InsetLine : public InsetCommand
{
public:
diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp
index 37367add2c..24ad8e9118 100644
--- a/src/insets/InsetPhantom.cpp
+++ b/src/insets/InsetPhantom.cpp
@@ -15,7 +15,6 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
-#include "BufferParams.h"
#include "Cursor.h"
#include "Dimension.h"
#include "DispatchResult.h"
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index d71c25bd71..2ee107a192 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -44,7 +44,6 @@ class CursorSlice;
class FuncStatus;
class Lexer;
class OutputParams;
-class Paragraph;
class XMLStream;
diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h
index 2f32bd2539..6ce6b5af07 100644
--- a/src/insets/InsetText.h
+++ b/src/insets/InsetText.h
@@ -23,9 +23,6 @@ class CompletionList;
class CursorSlice;
class Dimension;
class ParagraphList;
-class InsetCaption;
-class InsetTabular;
-class TocBuilder;
/**
A text inset is like a TeX box to write full text
diff --git a/src/mathed/InsetMath.h b/src/mathed/InsetMath.h
index 157fcb1a9b..3eae9295a4 100644
--- a/src/mathed/InsetMath.h
+++ b/src/mathed/InsetMath.h
@@ -64,7 +64,6 @@ inclusion in the "real LyX insets" FormulaInset and FormulaMacroInset.
*/
-class Cursor;
class OutputParams;
class MetricsInfo;
diff --git a/src/mathed/InsetMathComment.h b/src/mathed/InsetMathComment.h
index e4dcf65869..0134f6cfa9 100644
--- a/src/mathed/InsetMathComment.h
+++ b/src/mathed/InsetMathComment.h
@@ -17,8 +17,6 @@
namespace lyx {
-class latexkeys;
-
/// Inset for end-of-line comments
class InsetMathComment : public InsetMathNest {
public:
diff --git a/src/mathed/InsetMathEnv.cpp b/src/mathed/InsetMathEnv.cpp
index 2eea5ac418..dd2c391681 100644
--- a/src/mathed/InsetMathEnv.cpp
+++ b/src/mathed/InsetMathEnv.cpp
@@ -14,7 +14,6 @@
#include "MathData.h"
#include "MathStream.h"
-#include "MathStream.h"
#include "MetricsInfo.h"
diff --git a/src/mathed/InsetMathExInt.cpp b/src/mathed/InsetMathExInt.cpp
index 537870fd91..f0242c0bdb 100644
--- a/src/mathed/InsetMathExInt.cpp
+++ b/src/mathed/InsetMathExInt.cpp
@@ -15,7 +15,6 @@
#include "LaTeXFeatures.h"
#include "MathData.h"
#include "MathStream.h"
-#include "MathStream.h"
#include "InsetMathSymbol.h"
#include "support/debug.h"
diff --git a/src/mathed/InsetMathGrid.h b/src/mathed/InsetMathGrid.h
index d78e0891a5..87f781aa7a 100644
--- a/src/mathed/InsetMathGrid.h
+++ b/src/mathed/InsetMathGrid.h
@@ -20,7 +20,6 @@
namespace lyx {
-class BufferParams;
class BufferView;
/** Gridded math inset base class.
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index ebf8843d79..93c86c781f 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -38,7 +38,6 @@
#include "InsetMathMacro.h"
#include "InsetMathMacroTemplate.h"
#include "MetricsInfo.h"
-#include "xml.h"
#include "Paragraph.h"
#include "ParIterator.h"
#include "xml.h"
diff --git a/src/mathed/InsetMathMacroTemplate.cpp b/src/mathed/InsetMathMacroTemplate.cpp
index a152222cb6..294e24b073 100644
--- a/src/mathed/InsetMathMacroTemplate.cpp
+++ b/src/mathed/InsetMathMacroTemplate.cpp
@@ -22,7 +22,6 @@
#include "MathStream.h"
#include "MathParser.h"
#include "MathSupport.h"
-#include "InsetMathMacroArgument.h"
#include "Buffer.h"
#include "BufferView.h"
diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index 9d88b1337b..ada0400f18 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -30,7 +30,6 @@
#include "InsetMathUnknown.h"
#include "MathAutoCorrect.h"
#include "MathCompletionList.h"
-#include "MathData.h"
#include "MathFactory.h"
#include "InsetMathMacro.h"
#include "InsetMathMacroArgument.h"
diff --git a/src/mathed/InsetMathNumber.cpp b/src/mathed/InsetMathNumber.cpp
index 5a35415786..593da68d97 100644
--- a/src/mathed/InsetMathNumber.cpp
+++ b/src/mathed/InsetMathNumber.cpp
@@ -12,7 +12,6 @@
#include "InsetMathNumber.h"
#include "MathStream.h"
-#include "MathStream.h"
#include "MathSupport.h"
#include "MetricsInfo.h"
diff --git a/src/mathed/InsetMathTabular.cpp b/src/mathed/InsetMathTabular.cpp
index e4123a5655..565a71fb18 100644
--- a/src/mathed/InsetMathTabular.cpp
+++ b/src/mathed/InsetMathTabular.cpp
@@ -14,7 +14,6 @@
#include "MathData.h"
#include "MathStream.h"
-#include "MathStream.h"
#include "MetricsInfo.h"
diff --git a/src/mathed/InsetMathXArrow.cpp b/src/mathed/InsetMathXArrow.cpp
index 2ea3b71b50..37445da1d8 100644
--- a/src/mathed/InsetMathXArrow.cpp
+++ b/src/mathed/InsetMathXArrow.cpp
@@ -16,7 +16,6 @@
#include "MathData.h"
#include "MathStream.h"
-#include "MathStream.h"
#include "MathSupport.h"
#include "LaTeXFeatures.h"
diff --git a/src/mathed/MacroTable.cpp b/src/mathed/MacroTable.cpp
index 2a4899a258..19d45d2069 100644
--- a/src/mathed/MacroTable.cpp
+++ b/src/mathed/MacroTable.cpp
@@ -20,7 +20,6 @@
#include "InsetMathNest.h"
#include "Buffer.h"
-#include "DocIterator.h"
#include "InsetList.h"
#include "Text.h"
diff --git a/src/mathed/MacroTable.h b/src/mathed/MacroTable.h
index acc4004109..e83be84b75 100644
--- a/src/mathed/MacroTable.h
+++ b/src/mathed/MacroTable.h
@@ -26,7 +26,6 @@ namespace lyx {
class Buffer;
class MathData;
class InsetMathMacroTemplate;
-class Paragraph;
class latexkeys;
enum MacroType {
diff --git a/src/mathed/MathAtom.h b/src/mathed/MathAtom.h
index 5d20e69bbf..aa6e317f89 100644
--- a/src/mathed/MathAtom.h
+++ b/src/mathed/MathAtom.h
@@ -44,7 +44,6 @@ Andre'
namespace lyx {
-class Inset;
class InsetMath;
class MathAtom {
diff --git a/src/mathed/MathRow.cpp b/src/mathed/MathRow.cpp
index be61c8a39c..16b64c6b7f 100644
--- a/src/mathed/MathRow.cpp
+++ b/src/mathed/MathRow.cpp
@@ -12,8 +12,6 @@
#include "MathRow.h"
-#include "InsetMath.h"
-#include "MathClass.h"
#include "MathData.h"
#include "MathSupport.h"
diff --git a/src/support/SystemcallPrivate.h b/src/support/SystemcallPrivate.h
index 6ab479f73c..19771dfc73 100644
--- a/src/support/SystemcallPrivate.h
+++ b/src/support/SystemcallPrivate.h
@@ -20,8 +20,6 @@
namespace lyx {
namespace support {
-class Systemcall;
-
/**
* Outputs to the console terminal the line buffered standard output and
* error of a spawned process when there is a controlling terminal and
--
2.28.0.windows.1
More information about the lyx-devel
mailing list