Commit 137b7998 authored by Luigi Toscano's avatar Luigi Toscano

man: remove dead code which looked for css

Summary:
This code is not used apparently anymore. The URLs of the two
css files used in the output are either:
- discovered directly (kio_docfilter.css)
- invoked indirectly through help: (kde-default.css)
in the output is discovered separately).

Reviewers: mkoller, marten

Reviewed By: marten

Differential Revision: https://phabricator.kde.org/D6330
parent 13941d36
......@@ -129,9 +129,6 @@ MANProtocol::MANProtocol(const QByteArray &pool_socket, const QByteArray &app_so
{
assert(!_self);
_self = this;
const QString common_dir = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "doc/HTML/en/kdoctools5-common/kde-default.css" );
const QString strPath=QString( "file:%1/en/kdoctools5-common" ).arg( common_dir );
m_cssPath=strPath.toLocal8Bit(); // ### TODO encode for CSS
section_names << "0" << "0p" << "1" << "1p" << "2" << "3" << "3n" << "3p" << "4" << "5" << "6" << "7"
<< "8" << "9" << "l" << "n";
......@@ -501,7 +498,6 @@ void MANProtocol::get(const QUrl& url )
if (pageFound)
{
setResourcePath(m_cssPath);
setCssFile(m_manCSSFile);
m_outputBuffer.open(QIODevice::WriteOnly);
const QByteArray filename=QFile::encodeName(foundPages[0]);
......
......@@ -79,7 +79,6 @@ private:
QString mySgml2RoffPath;
void getProgramPath();
QByteArray m_cssPath; ///< Path to KDE resources, encoded for CSS
QBuffer m_outputBuffer; ///< Buffer for the output
QByteArray m_manCSSFile; ///< Path to kio_man.css
};
......
......@@ -619,15 +619,10 @@ static int getNumberRegisterValue(const QByteArray &name, int sign = 0);
static QList<QByteArray> s_argumentList;
static QByteArray cssPath, cssFile;
static QByteArray cssFile;
static QByteArray s_dollarZero; // Value of $0
void setResourcePath(const QByteArray& _cssPath)
{
cssPath = _cssPath;
}
void setCssFile(const QByteArray& _cssFile)
{
cssFile = _cssFile;
......@@ -6103,7 +6098,6 @@ char *read_man_page(const char *filename)
#ifndef KIO_MAN_TEST
int main(int argc, char **argv)
{
cssPath = "."; // krazy:exclude=doublequote_chars
if (argc < 2)
{
std::cerr << "call: " << argv[0] << " <filename>\n";
......
......@@ -14,15 +14,6 @@ class QByteArray;
/** call this with the buffer you have */
void scan_man_page(const char *man_page);
/**
* Set the paths to KDE resources
*
* \param cssPath Path to the KDE resources, encoded for CSS
* \since 3.5
*
*/
extern void setResourcePath(const QByteArray& _cssPath);
/*
* Sets the path to a CSS file that should be included with the generated
* HTML output.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment