mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: remove the unused "html" and hidden "home" standard directory resources
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
056a8f184e
commit
55699fc8a3
6 changed files with 3 additions and 24 deletions
|
@ -407,8 +407,6 @@ static QString translatePath( QString path ) // krazy:exclude=passbyvalue
|
|||
while (path[0] == QLatin1Char('/') && path[1] == QLatin1Char('/'))
|
||||
path.remove(0,1);
|
||||
|
||||
// we can not use KGlobal::dirs()->relativeLocation("home", path) here,
|
||||
// since it would not recognize paths without a trailing '/'.
|
||||
// All of the 3 following functions to return the user's home directory
|
||||
// can return different paths. We have to test all them.
|
||||
const QString homeDir0 = QFile::decodeName(qgetenv("HOME"));
|
||||
|
|
|
@ -119,7 +119,6 @@ int main(int argc, char **argv)
|
|||
"config", I18N_NOOP("Configuration files"),
|
||||
"data", I18N_NOOP("Where applications store data"),
|
||||
"exe", I18N_NOOP("Executables in $prefix/bin"),
|
||||
"html", I18N_NOOP("HTML documentation"),
|
||||
"icon", I18N_NOOP("Icons"),
|
||||
"kcfg", I18N_NOOP("Configuration description files"),
|
||||
"lib", I18N_NOOP("Libraries"),
|
||||
|
|
|
@ -321,7 +321,6 @@ static const struct ResourcesTblData {
|
|||
const char* const relativename;
|
||||
} ResourcesTbl[] = {
|
||||
{ "data\0", "share/apps\0" },
|
||||
{ "html\0", "share/doc/HTML\0" },
|
||||
{ "icon\0", "share/icons\0" },
|
||||
{ "config\0", "share/config\0" },
|
||||
{ "pixmap\0", "share/pixmaps\0" },
|
||||
|
@ -466,8 +465,6 @@ KStandardDirs::KStandardDirs()
|
|||
addResourceType(ResourcesTbl[i].type, nullptr, QString::fromLatin1(ResourcesTbl[i].relativename), true);
|
||||
}
|
||||
|
||||
addResourceDir("home", QDir::homePath(), false);
|
||||
|
||||
addResourceType("autostart", "xdgconf-autostart", QString::fromLatin1("/")); // merge them, start with xdg autostart
|
||||
addResourceType("autostart", nullptr, QString::fromLatin1("share/autostart")); // KDE ones are higher priority
|
||||
}
|
||||
|
@ -486,7 +483,6 @@ QStringList KStandardDirs::allTypes() const
|
|||
}
|
||||
// Those are added manually by the constructor
|
||||
list.append(QString::fromLatin1("lib"));
|
||||
//list.append(QString::fromLatin1("home")); // undocumented on purpose, said Waldo in r113855.
|
||||
|
||||
// Those are handled by resourceDirs() itself
|
||||
list.append(QString::fromLatin1("tmp"));
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
* install location, and one is <tt>$KDEHOME</tt>.
|
||||
* Under these toplevel prefixes there are several well-defined suffixes
|
||||
* where specific resource types can be found.
|
||||
* For example, for the resource type @c "html" the suffixes could be
|
||||
* @c share/doc/HTML and @c share/doc/kde/HTML.
|
||||
* For example, for the resource type @c "services" the suffixes could be
|
||||
* @c share/services and @c share/kde4/services.
|
||||
* The search algorithm tries to locate the file under each prefix-suffix
|
||||
* combination.
|
||||
*
|
||||
|
@ -65,7 +65,6 @@
|
|||
* @li @c config - Configuration files.
|
||||
* @li @c data - Where applications store data.
|
||||
* @li @c exe - Executables in $prefix/bin. findExe() for a function that takes $PATH into account.
|
||||
* @li @c html - HTML documentation.
|
||||
* @li @c icon - Icons, see KIconLoader.
|
||||
* @li @c kcfg - KConfigXT config files.
|
||||
* @li @c lib - Libraries.
|
||||
|
@ -571,7 +570,6 @@ public:
|
|||
* of what this is all about.
|
||||
*
|
||||
* @li @c data - @c share/apps
|
||||
* @li @c html - @c share/doc/HTML
|
||||
* @li @c icon - @c share/icon
|
||||
* @li @c config - @c share/config
|
||||
* @li @c pixmap - @c share/pixmaps
|
||||
|
|
|
@ -157,18 +157,6 @@ void KStandarddirsTest::testFindAllResources()
|
|||
QVERIFY( !oneEndsWith( configFilesWithFilter, "share/config/accept-languages.codes" ) ); // didn't match the filter
|
||||
QCOMPARE(fileNames.count(), configFilesWithFilter.count());
|
||||
QVERIFY(fileNames.contains("kdebugrc"));
|
||||
|
||||
#if 0
|
||||
list = t.findAllResources("html", "en/*/index.html", false);
|
||||
for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
|
||||
kDebug() << "docs " << (*it).toLatin1().constData();
|
||||
}
|
||||
|
||||
list = t.findAllResources("html", "*/*/*.html", false);
|
||||
for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
|
||||
kDebug() << "docs " << (*it).toLatin1().constData();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void KStandarddirsTest::testFindAllResourcesNewDir()
|
||||
|
|
|
@ -17,7 +17,7 @@ PreviewTest::PreviewTest()
|
|||
{
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
m_url = new KLineEdit(this);
|
||||
m_url->setText(KDEDIR"/share/doc/HTML/en/common/top-kde.jpg");
|
||||
m_url->setText(KDEDIR "/share/apps/kdeui/pics/aboutkde.png");
|
||||
layout->addWidget(m_url, 0, 0);
|
||||
QPushButton *btn = new QPushButton("Generate", this);
|
||||
connect(btn, SIGNAL(clicked()), SLOT(slotGenerate()));
|
||||
|
|
Loading…
Add table
Reference in a new issue