[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdesdk/kbabel/kbabeldict
From: Laurent Montel <montel () kde ! org>
Date: 2006-05-26 7:05:13
Message-ID: 1148627113.199962.29425.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 544804 by mlaurent:
Fix other error
M +7 -3 CMakeLists.txt
M +25 -15 kbabeldictbox.cpp
--- trunk/KDE/kdesdk/kbabel/kbabeldict/CMakeLists.txt #544803:544804
@@ -1,4 +1,6 @@
+include_directories (${CMAKE_SOURCE_DIR}/kbabel/common/)
+
add_subdirectory( modules )
@@ -6,17 +8,19 @@
########### next target ###############
+set(libkbabeldict_SRCS kbabeldictbox.cpp dictionarymenu.cpp dictchooser.cpp aboutmoduledlg.cpp)
########### next target ###############
-set(kbabeldict_SRCS dummy.cpp )
+set(kbabeldict_SRCS main.cpp kbabeldictview.cpp kbabeldict.cpp kbabelsplash.cpp ${libkbabeldict_SRCS})
kde4_automoc(${kbabeldict_SRCS})
-file(WRITE dummy.cpp "//autogenerated file by cmake\n")
+kde4_add_dcop_skels(kbabeldict_SRCS kbabeldictiface.h)
+
kde4_add_executable(kbabeldict ${kbabeldict_SRCS})
-target_link_libraries(kbabeldict ${KDE4_KDECORE_LIBS} )
+target_link_libraries(kbabeldict ${KDE4_KDECORE_LIBS} kbabeldictplugin kbabelcommon)
install_targets(/bin kbabeldict )
--- trunk/KDE/kdesdk/kbabel/kbabeldict/kbabeldictbox.cpp #544803:544804
@@ -46,7 +46,6 @@
#include <kaboutdialog.h>
#include <kapplication.h>
#include <kconfig.h>
-#include <kcmenumngr.h>
#include <kdialogbase.h>
#include <klibloader.h>
#include <k3listview.h>
@@ -55,8 +54,8 @@
#include <kstandarddirs.h>
#include <kglobal.h>
#include <kdebug.h>
-#include <ktrader.h>
#include <kwin.h>
+#include <kservicetypetrader.h>
#include <qclipboard.h>
#include <qdir.h>
@@ -401,7 +400,7 @@
if(factory)
{
SearchEngine *e = (SearchEngine *)factory->create(this
- , "searchengine", "SearchEngine");
+ , "searchengine", QStringList("SearchEngine"));
if(!e)
{
kError() << "searchengine not initialized" << endl;
@@ -422,17 +421,17 @@
kDebug(KBABEL_SEARCH) << "Now using trader for " << KGlobal::instance()->instanceName() << endl;
// try to find installed modules by KTrader
- KTrader::OfferList offers = KTrader::self()->query("KBabelDictModule",
+ KService::List offers = KServiceTypeTrader::self()->query("KBabelDictModule",
"('"+KGlobal::instance()->instanceName()+"' in [Applications])");
- for(KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it )
+ for(KService::List::ConstIterator it = offers.begin(); it != offers.end(); ++it )
{
KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().local8Bit() );
if(factory)
{
SearchEngine *e = (SearchEngine *)factory->create(this
- , "searchengine", "SearchEngine");
+ , "searchengine", QStringList("SearchEngine"));
if(!e)
{
kError() << "searchengine not initialized" << endl;
@@ -450,17 +449,17 @@
kDebug(KBABEL_SEARCH) << "Now for any application" << endl;
- offers = KTrader::self()->query("KBabelDictModule",
+ offers = KServiceTypeTrader::self()->query("KBabelDictModule",
"not ( exist Applications)");
- for(KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it )
+ for(KService::List::ConstIterator it = offers.begin(); it != offers.end(); ++it )
{
KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().local8Bit() );
if(factory)
{
SearchEngine *e = (SearchEngine *)factory->create(this
- , "searchengine", "SearchEngine");
+ , "searchengine", QStringList("SearchEngine"));
if(!e)
{
kError() << "searchengine not initialized" << endl;
@@ -1457,12 +1456,23 @@
editFileIndex = popup->insertItem(i18n("Edit File")
, this, SLOT(editFile()));
popup->setItemEnabled(editFileIndex,false);
-
- KContextMenuManager::insert(origView,popup);
- KContextMenuManager::insert(origView->viewport(),popup);
- KContextMenuManager::insert(translationView,popup);
- KContextMenuManager::insert(translationView->viewport(),popup);
- KContextMenuManager::insert(this,popup);
+
+ origView->setContextMenuPolicy(Qt::ActionsContextMenu);
+ origView->addActions(popup->actions());
+
+ origView->viewport()->setContextMenuPolicy(Qt::ActionsContextMenu);
+ origView->viewport()->addActions(popup->actions());
+
+ translationView->setContextMenuPolicy(Qt::ActionsContextMenu);
+ translationView->addActions(popup->actions());
+
+ translationView->viewport()->setContextMenuPolicy(Qt::ActionsContextMenu);
+ translationView->viewport()->addActions(popup->actions());
+
+ this->setContextMenuPolicy(Qt::ActionsContextMenu);
+ this->addActions(popup->actions());
+
+
//KContextMenuManager::insert(resultListView->viewport(),popup);
rmbPopup = popup;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic