Fix servicemenus now that they are parsed by KService: they need Type=Service.

svn path=/trunk/KDE/kdebase/apps/; revision=725978
This commit is contained in:
David Faure 2007-10-16 19:18:42 +00:00
parent b1cbcdbe52
commit e90260c43a
20 changed files with 26 additions and 6 deletions

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-adasrc
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-c++src
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-c++hdr
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-csrc
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-chdr
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/css
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-patch
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/html
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-java
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-log
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-makefile
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-pascal
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-perl
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/plain
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-python
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-tcl
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-tex
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=text/x-xml
Actions=Print;

View file

@ -1,5 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=application/xslt+xml
Actions=Print;

View file

@ -41,6 +41,7 @@ static QStringList extractActionNames(const QMenu& menu)
if (action->isSeparator()) {
ret.append("separator");
} else if (action->objectName().isEmpty()) {
//qDebug() << action->metaObject()->className();
Q_ASSERT(action->menu());
ret.append("submenu");
} else {
@ -66,11 +67,11 @@ void KonqPopupMenuTest::initTestCase()
m_pasteTo = KStandardAction::paste(0, 0, this);
m_actionCollection.addAction("pasteto", m_pasteTo);
m_back = new QAction(this);
m_actionCollection.addAction("back", m_back);
m_actionCollection.addAction("go_back", m_back);
m_forward = new QAction(this);
m_actionCollection.addAction("forward", m_forward);
m_actionCollection.addAction("go_forward", m_forward);
m_up = new QAction(this);
m_actionCollection.addAction("up", m_up);
m_actionCollection.addAction("go_up", m_up);
m_reload = new QAction(this);
m_actionCollection.addAction("reload", m_reload);
m_properties = new QAction(this);
@ -122,7 +123,7 @@ void KonqPopupMenuTest::initTestCase()
subMenu->addAction(m_up);
QStringList actions = extractActionNames(popup);
kDebug() << actions;
QCOMPARE(actions, QStringList() << "back" << "submenu");
QCOMPARE(actions, QStringList() << "go_back" << "submenu");
}
void KonqPopupMenuTest::testFile()
@ -237,7 +238,7 @@ void KonqPopupMenuTest::testViewDirectory()
actions.replaceInStrings("openwith", "openWith_submenu");
QCOMPARE(actions, QStringList()
<< "newmenu" << "separator"
<< "up" << "back" << "forward" << "separator"
<< "go_up" << "go_back" << "go_forward" << "separator"
<< "paste" << "separator"
<< "openWith_submenu"
<< "preview_submenu"
@ -307,7 +308,7 @@ void KonqPopupMenuTest::testHtmlPage()
QStringList actions = extractActionNames(popup);
kDebug() << actions;
QCOMPARE(actions, QStringList()
<< "back" << "forward" << "reload" << "separator"
<< "go_back" << "go_forward" << "reload" << "separator"
<< "bookmark_add"
<< "separator"
<< "openWith_submenu"