Tuesday, 5 March 2013

[kdelibs/frameworks] /: Remove usage of KComponentData

Git commit d16d8b28abc197efb4bef198e9f2ed714989b471 by David Faure.
Committed on 04/03/2013 at 23:58.
Pushed by dfaure into branch 'frameworks'.

Remove usage of KComponentData

M +1 -0 KDE5PORTING.html
M +0 -2 kded/kbuildsycoca.cpp
M +2 -1 kdeui/actions/kactioncollection.cpp
M +10 -10 kdeui/notifications/knotification.cpp
M +6 -7 kdeui/notifications/knotification.h
M +0 -2 kdeui/shortcuts/kglobalaccel.h
M +0 -2 kdeui/shortcuts/kglobalaccel_p.h
M +1 -1 kdeui/tests/kglobalshortcuttest.cpp
M +1 -0 kdeui/tests/kxmlgui_unittest.cpp
M +0 -1 kdeui/tests/testguiclient.h
M +0 -8 kdeui/util/kwallet_mac.cpp
M +1 -1 kdeui/xmlgui/kxmlguifactory.cpp
M +0 -2 kdeui/xmlgui/kxmlguifactory.h
M +1 -0 kdeui/xmlgui/kxmlguiwindow.cpp
M +2 -2 kdewidgets/kde.widgets
M +2 -2 kdewidgets/kdedeprecated.widgets
M +2 -2 kdewidgets/kdewebkit.widgets
M +0 -1 kdewidgets/makekdewidgets.cpp
M +2 -2 kdewidgets/tests/test.widgets
M +0 -2 kdoctools/genshortcutents.cpp
M +0 -4 kdoctools/main.cpp
M +0 -3 kdoctools/main_ghelp.cpp
M +0 -2 kdoctools/meinproc.cpp
M +0 -1 kfile/kfileplaceeditdialog.cpp
M +0 -1 kfile/kfileplacesmodel.cpp
M +1 -1 kfile/kfileplacesview.cpp
M +1 -0 khtml/khtml_part.cpp
M +1 -1 khtml/test_regression.cpp
M +1 -0 khtml/testkhtml.cpp
M +0 -4 kinit/kinit.cpp
M +0 -6 kinit/kinit_win.cpp
M +2 -5 kinit/klauncher_main.cpp
M +0 -1 kio/kfile/krecentdocument.cpp
M +0 -2 kio/kio/dataprotocol.cpp
M +19 -20 kio/kio/kdatatool.cpp
M +8 -9 kio/kio/kdatatool.h
M +7 -7 kio/misc/kpac/proxyscout.cpp
M +3 -4 kio/misc/kpac/proxyscout.h
M +0 -2 kio/tests/kmfitest.cpp
M +0 -2 kio/tests/kmimetypechoosertest_gui.cpp
M +0 -2 kio/tests/ksslkeygentest.cpp
M +1 -2 kioslave/http/kcookiejar/main.cpp
M +1 -1 knewstuff/knewstuff3/downloadmanager.h
M +0 -2 knewstuff/knewstuff3/downloadwidget_p.h
M +1 -1 knotify/config/knotifyconfigactionswidget.cpp
M +1 -0 kparts/mainwindow.cpp
M +0 -1 kross/test/main.cpp
M +1 -4 kutils/kcmodulecontainer.cpp
M +0 -1 kutils/kcmoduleproxy.h
M +1 -1 kutils/kpluginselector.cpp
M +1 -2 kutils/kpluginselector.h
M +7 -25 kutils/ksettings/dispatcher.cpp
M +6 -7 kutils/ksettings/dispatcher.h
M +0 -2 kutils/ksettings/dispatcher_p.h
M +0 -1 security/kcert/kcertpart.cc
M +1 -2 staging/kservice/src/services/kplugininfo.h
M +3 -5 staging/kwidgets/src/icons/kiconloader.h
M +1 -1 staging/kwidgets/src/icons/kicontheme.cpp

http://commits.kde.org/kdelibs/d16d8b28abc197efb4bef198e9f2ed714989b471

diff --git a/KDE5PORTING.html b/KDE5PORTING.html
index e8f54608..c1a0a09 100644
--- a/KDE5PORTING.html
+++ b/KDE5PORTING.html
@@ -292,6 +292,7 @@ A script is available in kdesdk/scripts/kf5/convert-kstandarddirs.pl to port som
</ul>
</li>
<li>KMessageBoxMessageHandler moved to kde4support</li>
+<li>KNotification: setComponentData(KComponentData) is now setComponentName(QString), only the component name was used.</li>
<li>KActionCollection and KXMLGUIClient: replace setComponentData with setComponentName and setComponentDisplayName</li>
<li>KAction changes
<ul>
diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp
index 8d9b6c1..7f148fd 100644
--- a/kded/kbuildsycoca.cpp
+++ b/kded/kbuildsycoca.cpp
@@ -25,7 +25,6 @@
#include <config-kded.h>

#include <kservice.h>
-#include <kcomponentdata.h>
#include "kbuildservicetypefactory.h"
#include "kbuildmimetypefactory.h"
#include "kbuildservicefactory.h"
@@ -653,7 +652,6 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
}

QCoreApplication k(argc, argv);
- KComponentData mainComponent(d);

#if !KBUILDSYCOCA_NO_KCRASH
KCrash::setCrashHandler(KCrash::defaultCrashHandler);
diff --git a/kdeui/actions/kactioncollection.cpp b/kdeui/actions/kactioncollection.cpp
index 59868c6..fb4f09e 100644
--- a/kdeui/actions/kactioncollection.cpp
+++ b/kdeui/actions/kactioncollection.cpp
@@ -32,6 +32,8 @@
#include "kxmlguifactory.h"

#include "kdebug.h"
+#include <kconfiggroup.h>
+#include <ksharedconfig.h>

#include <QtXml/QDomDocument>
#include <QtCore/QSet>
@@ -42,7 +44,6 @@
#include <QMetaMethod>

#include <stdio.h>
-#include "kconfiggroup.h"

class KActionCollectionPrivate
{
diff --git a/kdeui/notifications/knotification.cpp b/kdeui/notifications/knotification.cpp
index 6f29025..c203721 100644
--- a/kdeui/notifications/knotification.cpp
+++ b/kdeui/notifications/knotification.cpp
@@ -60,7 +60,7 @@ struct KNotification::Private
QPixmap pixmap;
ContextList contexts;
NotificationFlags flags;
- KComponentData componentData;
+ QString componentName;

QTimer updateTimer;
bool needUpdate;
@@ -209,9 +209,9 @@ void KNotification::setFlags(const NotificationFlags & flags)
}


-void KNotification::setComponentData(const KComponentData &c)
+void KNotification::setComponentName(const QString &c)
{
- d->componentData = c;
+ d->componentName = c;
}

void KNotification::activate(unsigned int action)
@@ -284,13 +284,13 @@ void KNotification::Private::raiseWidget(QWidget *w)
}

KNotification *KNotification::event( const QString& eventid , const QString& title, const QString& text,
- const QPixmap& pixmap, QWidget *widget, const NotificationFlags &flags, const KComponentData &componentData)
+ const QPixmap& pixmap, QWidget *widget, const NotificationFlags &flags, const QString &componentName)
{
KNotification *notify=new KNotification(eventid, widget, flags);
notify->setTitle(title);
notify->setText(text);
notify->setPixmap(pixmap);
- notify->setComponentData(componentData);
+ notify->setComponentName(componentName);

QTimer::singleShot(0,notify,SLOT(sendEvent()));

@@ -298,9 +298,9 @@ KNotification *KNotification::event( const QString& eventid , const QString& tit
}

KNotification *KNotification::event( const QString& eventid , const QString& text,
- const QPixmap& pixmap, QWidget *widget, const NotificationFlags &flags, const KComponentData &componentData)
+ const QPixmap& pixmap, QWidget *widget, const NotificationFlags &flags, const QString &componentName)
{
- return event( eventid, QString(), text, pixmap, widget, flags, componentData );
+ return event( eventid, QString(), text, pixmap, widget, flags, componentName);
}


@@ -356,10 +356,10 @@ void KNotification::sendEvent()
{
QString appname;

- if(d->flags & DefaultEvent)
+ if (d->flags & DefaultEvent)
appname = QLatin1String("kde");
- else if(d->componentData.isValid()) {
- appname = d->componentData.componentName();
+ else if (!d->componentName.isEmpty()) {
+ appname = d->componentName;
} else {
appname = QCoreApplication::applicationName();
}
diff --git a/kdeui/notifications/knotification.h b/kdeui/notifications/knotification.h
index 894cb35..741dd98 100644
--- a/kdeui/notifications/knotification.h
+++ b/kdeui/notifications/knotification.h
@@ -21,7 +21,6 @@
#define KNOTIFICATION_H

#include <kdeui_export.h>
-#include <kcomponentdata.h>

#include <QPixmap>
#include <QtCore/QObject>
@@ -412,10 +411,10 @@ public:
void setFlags(const NotificationFlags &flags);

/**
- * The componentData is used to determine the location of the config file. By default, kapp is used
- * @param componentData the new componentData
+ * The componentData is used to determine the location of the config file. By default, the app name is used
+ * @param componentName the new component name
*/
- void setComponentData(const KComponentData &componentData);
+ void setComponentName(const QString &componentName);

Q_SIGNALS:
/**
@@ -538,13 +537,13 @@ public:
* @param pixmap is a picture which may be shown in the popup.
* @param widget is a widget where the notification reports to
* @param flags is a bitmask of NotificationFlag
- * @param componentData used to determine the location of the config file. by default, kapp is used
+ * @param componentName used to determine the location of the config file. by default, appname is used
* @since 4.4
*/
static KNotification *event(const QString &eventId , const QString &title, const QString &text,
const QPixmap &pixmap = QPixmap(), QWidget *widget = 0L,
const NotificationFlags &flags = CloseOnTimeout,
- const KComponentData &componentData = KComponentData());
+ const QString &componentName = QString());

/**
* @brief emit a standard event
@@ -563,7 +562,7 @@ public:
static KNotification *event(const QString &eventId , const QString &text = QString(),
const QPixmap &pixmap = QPixmap(), QWidget *widget = 0L,
const NotificationFlags &flags = CloseOnTimeout,
- const KComponentData &componentData = KComponentData());
+ const QString &componentName = QString());

/**
* @brief emit a standard event
diff --git a/kdeui/shortcuts/kglobalaccel.h b/kdeui/shortcuts/kglobalaccel.h
index af4d04d..6a52581 100644
--- a/kdeui/shortcuts/kglobalaccel.h
+++ b/kdeui/shortcuts/kglobalaccel.h
@@ -24,14 +24,12 @@

#include "kdeui_export.h"
#include "kglobalshortcutinfo.h"
-#include "kcomponentdata.h"

#include <QtCore/QObject>

class QAction;
class QWidget;
class KShortcut;
-class KComponentData;
class OrgKdeKglobalaccelComponentInterface;

/**
diff --git a/kdeui/shortcuts/kglobalaccel_p.h b/kdeui/shortcuts/kglobalaccel_p.h
index db19e56..ebd178b 100644
--- a/kdeui/shortcuts/kglobalaccel_p.h
+++ b/kdeui/shortcuts/kglobalaccel_p.h
@@ -26,7 +26,6 @@
#include <QtCore/QStringList>
#include <QWidget>

-#include "kcomponentdata.h"
#include "kglobalaccel.h"
#include "kglobalaccel_interface.h"
#include "kglobalaccel_component_interface.h"
@@ -74,7 +73,6 @@ public:
QStringList makeActionId(const QAction *action);
QList<int> intListFromShortcut(const KShortcut &cut);
KShortcut shortcutFromIntList(const QList<int> &list);
- void readComponentData(const KComponentData &component);

//private slot implementations
void _k_invokeAction(const QString &, const QString &,qlonglong);
diff --git a/kdeui/tests/kglobalshortcuttest.cpp b/kdeui/tests/kglobalshortcuttest.cpp
index e8c4e22..f9f171b 100644
--- a/kdeui/tests/kglobalshortcuttest.cpp
+++ b/kdeui/tests/kglobalshortcuttest.cpp
@@ -46,7 +46,7 @@ const QKeySequence sequenceF = QKeySequence(Qt::META + Qt::Key_F27);
and we just choose very improbable shortcuts to avoid conflicts with real
applications' shortcuts. */

-//we need a KComponentData and a GUI so that the implementation can grab keys
+//we need a GUI so that the implementation can grab keys
QTEST_MAIN( KGlobalShortcutTest)

void KGlobalShortcutTest::initTestCase()
diff --git a/kdeui/tests/kxmlgui_unittest.cpp b/kdeui/tests/kxmlgui_unittest.cpp
index 07db0fe..26a9285 100644
--- a/kdeui/tests/kxmlgui_unittest.cpp
+++ b/kdeui/tests/kxmlgui_unittest.cpp
@@ -27,6 +27,7 @@
#include <QMenuBar>
#include <QPushButton>
#include <kedittoolbar.h>
+#include <ksharedconfig.h>
#include <kconfiggroup.h>
#include <kxmlguibuilder.h>
#include <kxmlguiclient.h>
diff --git a/kdeui/tests/testguiclient.h b/kdeui/tests/testguiclient.h
index b698b9f..f10207e 100644
--- a/kdeui/tests/testguiclient.h
+++ b/kdeui/tests/testguiclient.h
@@ -22,7 +22,6 @@
#define TESTGUICLIENT_H

#include <qstandardpaths.h>
-#include <kcomponentdata.h>
#include <kxmlguiclient.h>

// because setDOMDocument and setXML are protected
diff --git a/kdeui/util/kwallet_mac.cpp b/kdeui/util/kwallet_mac.cpp
index 74a0326..ce09f93 100644
--- a/kdeui/util/kwallet_mac.cpp
+++ b/kdeui/util/kwallet_mac.cpp
@@ -72,14 +72,6 @@ static bool isError( OSStatus s, QString* errMsg ) {

static QString appid()
{
- KComponentData cData = KComponentData::mainComponent();
- if (cData.isValid()) {
- const KAboutData* aboutData = cData.aboutData();
- if (aboutData) {
- return aboutData->programName();
- }
- return cData.componentName();
- }
return qApp->applicationName();
}

diff --git a/kdeui/xmlgui/kxmlguifactory.cpp b/kdeui/xmlgui/kxmlguifactory.cpp
index 7b3c9a7..d72af8c 100644
--- a/kdeui/xmlgui/kxmlguifactory.cpp
+++ b/kdeui/xmlgui/kxmlguifactory.cpp
@@ -24,7 +24,7 @@
#include "kxmlguiclient.h"
#include "kxmlguibuilder.h"

-#include <assert.h>
+#include <ksharedconfig.h>

#include <QAction>
#include <QtCore/QDir>
diff --git a/kdeui/xmlgui/kxmlguifactory.h b/kdeui/xmlgui/kxmlguifactory.h
index fe2b56a..c6e853b 100644
--- a/kdeui/xmlgui/kxmlguifactory.h
+++ b/kdeui/xmlgui/kxmlguifactory.h
@@ -21,7 +21,6 @@
#define kxmlguifactory_h

#include <kdeui_export.h>
-#include <kcomponentdata.h>

#include <QtCore/QObject>

@@ -29,7 +28,6 @@ class QAction;
class KXMLGUIFactoryPrivate;
class KXMLGUIClient;
class KXMLGUIBuilder;
-class KComponentData;

class QDomAttr;
class QDomDocument;
diff --git a/kdeui/xmlgui/kxmlguiwindow.cpp b/kdeui/xmlgui/kxmlguiwindow.cpp
index 23ffaaf..3518785 100644
--- a/kdeui/xmlgui/kxmlguiwindow.cpp
+++ b/kdeui/xmlgui/kxmlguiwindow.cpp
@@ -49,6 +49,7 @@
#include <ktoolbar.h>
#include <kaboutdata.h>
#include <kwindowsystem.h>
+#include <ksharedconfig.h>
#include <kconfiggroup.h>

#include <stdlib.h>
diff --git a/kdewidgets/kde.widgets b/kdewidgets/kde.widgets
index 04cc1dd..e48db46 100644
--- a/kdewidgets/kde.widgets
+++ b/kdewidgets/kde.widgets
@@ -1,7 +1,7 @@
[Global]
PluginName=KDEWidgets
-Includes=kcomponentdata.h,classpreviews.h,ktimezone.h
-Init=new KComponentData("kdewidgets");
+Includes=classpreviews.h,ktimezone.h
+Init=

[KActionSelector]
IncludeFile=kactionselector.h
diff --git a/kdewidgets/kdedeprecated.widgets b/kdewidgets/kdedeprecated.widgets
index db13a4e..4617fdf 100644
--- a/kdewidgets/kdedeprecated.widgets
+++ b/kdewidgets/kdedeprecated.widgets
@@ -1,7 +1,7 @@
[Global]
PluginName=KDE3SupportWidgets
-Includes=kcomponentdata.h,classpreviews.h,ktimezone.h
-Init=new KComponentData("kdewidgets");
+Includes=classpreviews.h,ktimezone.h
+Init=

[KArrowButton]
IncludeFile=karrowbutton.h
diff --git a/kdewidgets/kdewebkit.widgets b/kdewidgets/kdewebkit.widgets
index ed9acc8..9f07307 100644
--- a/kdewidgets/kdewebkit.widgets
+++ b/kdewidgets/kdewebkit.widgets
@@ -1,7 +1,7 @@
[Global]
PluginName=KDEWebKitWidgets
-Includes=kcomponentdata.h,classpreviews.h
-Init=new KComponentData("kdewidgets");
+Includes=classpreviews.h
+Init=

[KWebView]
IncludeFile=kwebview.h
diff --git a/kdewidgets/makekdewidgets.cpp b/kdewidgets/makekdewidgets.cpp
index 08a8038..c876ac4 100644
--- a/kdewidgets/makekdewidgets.cpp
+++ b/kdewidgets/makekdewidgets.cpp
@@ -43,7 +43,6 @@ static const char collClassDef[] = "class %CollName : public QObject, public QDe
static const char collClassImpl[] = "%CollName::%CollName(QObject *parent)\n"
" : QObject(parent)"
"{\n"
- " (void) new KComponentData(\"makekdewidgets\");\n"
"%CollectionAdd\n"
"}\n\n";

diff --git a/kdewidgets/tests/test.widgets b/kdewidgets/tests/test.widgets
index 58e5e7b..c3329ec 100644
--- a/kdewidgets/tests/test.widgets
+++ b/kdewidgets/tests/test.widgets
@@ -1,7 +1,7 @@
[Global]
PluginName=KDEWidgets
-Includes=kcomponentdata.h,classpreviews.h
-Init=new KComponentData("kdewidgets");
+Includes=classpreviews.h
+Init=

[KActiveLabel]
ToolTip=Active Label (KDE)
diff --git a/kdoctools/genshortcutents.cpp b/kdoctools/genshortcutents.cpp
index fd2c6bd..d1008be 100644
--- a/kdoctools/genshortcutents.cpp
+++ b/kdoctools/genshortcutents.cpp
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "k4aboutdata.h"
-#include "kcomponentdata.h"
#include "kcmdlineargs.h"
#include "klocalizedstring.h"
#include "kstandardshortcut.h"
@@ -344,7 +343,6 @@ int main( int argc, char **argv )
KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( cmdLineOptions );

- KComponentData componentData( &aboutData );
QCoreApplication app( KCmdLineArgs::qtArgc(), KCmdLineArgs::qtArgv() );

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
diff --git a/kdoctools/main.cpp b/kdoctools/main.cpp
index 1b5ab3e..676025c 100644
--- a/kdoctools/main.cpp
+++ b/kdoctools/main.cpp
@@ -8,7 +8,6 @@ extern "C" int xmlLoadExtDtdDefaultValue;
#include "xslt.h"


-#include <kcomponentdata.h>
#include <kdebug.h>

#include <QtCore/QString>
@@ -35,10 +34,7 @@ extern "C"
{
Q_DECL_EXPORT int kdemain( int argc, char **argv )
{
- Q_ASSERT(!KComponentData::hasMainComponent()); // kdeinit is messed up if this is the case.
- KComponentData componentData( "kio_help", "kio_help4" );
setupStandardDirs();
- (void)componentData.config(); // we need this one to make sure system globals are read

kDebug(7101) << "Starting " << getpid();

diff --git a/kdoctools/main_ghelp.cpp b/kdoctools/main_ghelp.cpp
index 75dde37..4a3e320 100644
--- a/kdoctools/main_ghelp.cpp
+++ b/kdoctools/main_ghelp.cpp
@@ -10,7 +10,6 @@ extern "C" int xmlLoadExtDtdDefaultValue;

#include <kdebug.h>

-#include <kcomponentdata.h>

#include <QtCore/QString>

@@ -36,9 +35,7 @@ extern "C"
{
Q_DECL_EXPORT int kdemain( int argc, char **argv )
{
- KComponentData componentData( "kio_ghelp" );
setupStandardDirs();
- (void)componentData.config(); // we need this one to make sure system globals are read

kDebug(7101) << "Starting " << getpid();

diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp
index 69edef5..272f019 100644
--- a/kdoctools/meinproc.cpp
+++ b/kdoctools/meinproc.cpp
@@ -13,7 +13,6 @@
#include <qstandardpaths.h>

#include <k4aboutdata.h>
-#include <kcomponentdata.h>
#include <kcmdlineargs.h>
#include <kdebug.h>
#include <klocale.h>
@@ -104,7 +103,6 @@ int main(int argc, char **argv) {
KCmdLineArgs::addCmdLineOptions( options );

QCoreApplication app( argc, argv );
- KComponentData ins("kio_help4");
KLocale::global();

KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
diff --git a/kfile/kfileplaceeditdialog.cpp b/kfile/kfileplaceeditdialog.cpp
index 06acf87..cd2d117 100644
--- a/kfile/kfileplaceeditdialog.cpp
+++ b/kfile/kfileplaceeditdialog.cpp
@@ -24,7 +24,6 @@
#include <kdebug.h>
#include <kiconbutton.h>
#include <kiconloader.h>
-#include <kcomponentdata.h>
#include <klineedit.h>
#include <klocalizedstring.h>
#include <kio/global.h>
diff --git a/kfile/kfileplacesmodel.cpp b/kfile/kfileplacesmodel.cpp
index 1f26285..b3687e4 100644
--- a/kfile/kfileplacesmodel.cpp
+++ b/kfile/kfileplacesmodel.cpp
@@ -40,7 +40,6 @@
#include <klocalizedstring.h>
#include <kuser.h>

-#include <kcomponentdata.h>
#include <kdebug.h>
#include <kurlmimedata.h>

diff --git a/kfile/kfileplacesview.cpp b/kfile/kfileplacesview.cpp
index be9f618..f1ce090 100644
--- a/kfile/kfileplacesview.cpp
+++ b/kfile/kfileplacesview.cpp
@@ -32,8 +32,8 @@
#include <kdebug.h>

#include <kmenu.h>
+#include <kconfig.h>
#include <kconfiggroup.h>
-#include <kcomponentdata.h>
#include <kdirnotify.h>
#include <klocalizedstring.h>
#include <kmessagebox.h>
diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp
index 0fefed3..bb31709 100644
--- a/khtml/khtml_part.cpp
+++ b/khtml/khtml_part.cpp
@@ -103,6 +103,7 @@ using namespace DOM;
#include <ktoggleaction.h>
#include <kcodecaction.h>
#include <kselectaction.h>
+#include <kcomponentdata.h>

#include <ksslinfodialog.h>
#include <ksslsettings.h>
diff --git a/khtml/test_regression.cpp b/khtml/test_regression.cpp
index b51182c..7edeb2e 100644
--- a/khtml/test_regression.cpp
+++ b/khtml/test_regression.cpp
@@ -703,7 +703,7 @@ int main(int argc, char *argv[])
KConfig sc1( "cryptodefaults", KConfig::SimpleConfig );
KConfigGroup grp = sc1.group("Warnings");
grp.writeEntry( "OnUnencrypted", false );
- KSharedConfigPtr config = KComponentData::mainComponent().config();
+ KSharedConfigPtr config = KSharedConfig::openConfig();
grp = config->group("Notification Messages" );
grp.writeEntry( "kjscupguard_alarmhandler", true );
grp.writeEntry("ReportJSErrors", false);
diff --git a/khtml/testkhtml.cpp b/khtml/testkhtml.cpp
index 011fa09..9438847 100644
--- a/khtml/testkhtml.cpp
+++ b/khtml/testkhtml.cpp
@@ -31,6 +31,7 @@
#include <kactioncollection.h>
#include "kxmlguifactory.h"
#include <kfiledialog.h>
+#include <ksharedconfig.h>
#include <kconfiggroup.h>

int main(int argc, char *argv[])
diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp
index 58fb8df..d95f3a4 100644
--- a/kinit/kinit.cpp
+++ b/kinit/kinit.cpp
@@ -54,7 +54,6 @@
#include <QtCore/QRegExp>
#include <QFont>
#include <kcrash.h>
-#include <kcomponentdata.h>
#include <klibrary.h>
#include <kconfig.h>
#include <kapplication.h>
@@ -1776,9 +1775,6 @@ int main(int argc, char **argv, char **envp)
if(keep_running)
setsid();

- /** Create our instance **/
- //s_instance = new KComponentData("kdeinit5", QByteArray(), KComponentData::SkipMainComponentRegistration);
-
/** Prepare to change process name **/
#ifndef SKIP_PROCTITLE
proctitle_init(argc, argv, envp);
diff --git a/kinit/kinit_win.cpp b/kinit/kinit_win.cpp
index 0c48fb3..e46378b 100644
--- a/kinit/kinit_win.cpp
+++ b/kinit/kinit_win.cpp
@@ -40,7 +40,6 @@
#undef interface
#include <QtDBus/QtDBus>

-#include <kcomponentdata.h>
#include <kstandarddirs.h> // TODO REMOVE
#include <kdeversion.h>

@@ -49,8 +48,6 @@

#define KDED_EXENAME "kded5"

-static KComponentData *s_instance = 0;
-
// print verbose messages
int verbose=0;

@@ -577,9 +574,6 @@ int main(int argc, char **argv, char **envp)
terminateAllRunningKDEProcesses(processList);
}

- /** Create our instance **/
- s_instance = new KComponentData("kdeinit5", QByteArray(), KComponentData::SkipMainComponentRegistration);
-
#ifdef _DEBUG
// first try to launch dbus-daemond in debug mode
if (launch_dbus && processList.find("dbus-daemond"))
diff --git a/kinit/klauncher_main.cpp b/kinit/klauncher_main.cpp
index 0798e5d..1c44350 100644
--- a/kinit/klauncher_main.cpp
+++ b/kinit/klauncher_main.cpp
@@ -23,7 +23,6 @@
#include <fcntl.h>

#include "klauncher.h"
-#include <kcomponentdata.h>
#include "kcrash.h"
#include "kdebug.h"
#include <stdio.h>
@@ -70,16 +69,14 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char**argv )
mac_initialize_dbus();

Monday, 4 March 2013

[kdelibs/KDE/4.10] khtml/rendering: Take into account the clearButton width, that already takes some room of

Git commit d81b00e9a0f67ac992df1034d920477b5f8b7c1c by Andrea Iacovitti.
Committed on 04/03/2013 at 17:07.
Pushed by aiacovitti into branch 'KDE/4.10'.

Take into account the clearButton width, that already takes some room of
lineedit's contents, when rendering lineedit's padding.

BUG: 316117
FIXED-IN: 4.10.2

M +7 -1 khtml/rendering/render_form.cpp

http://commits.kde.org/kdelibs/d81b00e9a0f67ac992df1034d920477b5f8b7c1c

diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index 2894b84..a5fce8e 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -91,6 +91,7 @@ using namespace DOM;
{
noBorder = false;
left = right = top = bottom = 0;
+ clearButtonOverlay = 0;
setParent(parent);
}

@@ -101,7 +102,7 @@ using namespace DOM;
case QStyle::SE_PushButtonContents:
case QStyle::SE_LineEditContents:
case QStyle::SE_ShapedFrameContents:
- r.adjust(left, top, -right, -bottom);
+ r.adjust(left, top, -qMax(0, right - clearButtonOverlay), -bottom);
default:
break;
}
@@ -224,6 +225,7 @@ using namespace DOM;
}

int left, right, top, bottom;
+ int clearButtonOverlay;
bool noBorder;
};

@@ -1122,6 +1124,10 @@ void RenderLineEdit::setStyle(RenderStyle* _style)
}
}
}
+
+ if (m_proxyStyle) {
+ static_cast<KHTMLProxyStyle*>(m_proxyStyle)->clearButtonOverlay = qMax(0, widget()->clearButtonUsedSize().width());
+ }
}

void RenderLineEdit::highLightWord( unsigned int length, unsigned int pos )

[kdelibs/frameworks] /: Clean up the KAboutData/K4AboutData/KComponentData situation:

Git commit 769747f666cc32c09ca9a8d70019150fc0944b6e by David Faure.
Committed on 03/03/2013 at 23:14.
Pushed by dfaure into branch 'frameworks'.

Clean up the KAboutData/K4AboutData/KComponentData situation:

* new class KPluginData represents the data for a plugin (was: KComponentData)
(the difference is that it doesn't use delayed-translations like KComponentData did)
* KAboutData is now in kcoreaddons, used by kservice (KPluginData) and by
kdeui (KAboutApplicationDialog, KBugReport, KCrash, etc. etc.)
KAboutData now provides a "singleton" accessor, the application data.

K4AboutData (with its delayed translation stuff) is now only used by KCmdLineArgs.
QLocalizedString/qi18n is gone, K4AboutData is back to KLocalizedString/ki18n

M +1 -0 CMakeLists.txt
M +9 -9 kconf_update/kconf_update.cpp
M +8 -0 kdecore/CMakeLists.txt
R +12 -5 kdecore/kernel/k4aboutdata.cpp [from: staging/kde4support/src/kdecore/k4aboutdata.cpp - 098% similarity]
R +7 -4 kdecore/kernel/k4aboutdata.h [from: staging/kde4support/src/kdecore/k4aboutdata.h - 099% similarity]
M +55 -58 kdecore/kernel/kcmdlineargs.cpp
M +16 -18 kdecore/kernel/kcmdlineargs.h
R +13 -5 kdecore/kernel/kcomponentdata.cpp [from: staging/kservice/src/plugin/kcomponentdata.cpp - 092% similarity]
R +15 -8 kdecore/kernel/kcomponentdata.h [from: staging/kservice/src/plugin/kcomponentdata.h - 089% similarity]
R +3 -3 kdecore/kernel/kcomponentdata_p.h [from: staging/kservice/src/plugin/kcomponentdata_p.h - 096% similarity]
M +0 -3 kdecore/tests/kdatetimeformattertest.cpp
M +2 -3 kdecore/util/kautostart.cpp
M +15 -14 kded/kbuildsycoca.cpp
M +4 -12 kdeui/actions/kstandardaction.cpp
M +45 -66 kdeui/dialogs/kaboutapplicationdialog.cpp
M +3 -3 kdeui/dialogs/kaboutapplicationdialog.h
M +15 -24 kdeui/dialogs/kbugreport.cpp
M +1 -2 kdeui/dialogs/kbugreport.h
M +1 -2 kdeui/dialogs/kshortcutseditor.cpp
M +3 -4 kdeui/dialogs/ktip.cpp
M +6 -7 kdeui/jobs/kuiserverjobtracker.cpp
M +4 -9 kdeui/notifications/knotificationrestrictions.cpp
M +2 -2 kdeui/shortcuts/kglobalaccel.cpp
M +1 -2 kdeui/shortcuts/kglobalaccel.h
M +12 -13 kdeui/tests/kbugreporttest.cpp
M +5 -4 kdeui/tests/kstatusnotifieritemtest.cpp
M +6 -5 kdeui/tests/testqtargs.cpp
M +1 -2 kdeui/util/kcrash.cpp
M +0 -12 kdeui/util/kwallet.cpp
M +13 -32 kdeui/widgets/kcmodule.cpp
M +13 -10 kdeui/widgets/kcmodule.h
M +10 -9 kdeui/widgets/khelpmenu.cpp
M +1 -1 kdeui/widgets/khelpmenu.h
M +2 -2 kdeui/widgets/kmainwindow.cpp
M +2 -1 kdeui/xmlgui/kxmlguiwindow.cpp
M +9 -9 kdewidgets/makekdewidgets.cpp
M +4 -4 kdoctools/genshortcutents.cpp
M +13 -13 kdoctools/meinproc.cpp
M +1 -1 khtml/java/kjavaappletviewer.cpp
M +4 -4 khtml/khtml_global.cpp
M +2 -2 khtml/khtml_global.h
M +5 -5 khtml/kmultipart/kmultipart.cpp
M +1 -4 khtml/misc/kencodingdetector.cpp
M +1 -0 kio/kfile/kfiledialog.cpp
M +8 -10 kio/kfile/kfilemetadatareaderprocess.cpp
M +2 -0 kio/kio/krun.cpp
M +0 -2 kio/kio/kscan.h
M +2 -0 kio/kio/previewjob.cpp
M +5 -5 kio/kssl/kcm/kcmssl.cpp
M +6 -13 kio/misc/kmailservice.cpp
M +7 -7 kio/misc/ksendbugmail/main.cpp
M +8 -16 kio/misc/ktelnetservice.cpp
M +0 -12 kio/tests/kfiledialogtest.cpp
M +5 -5 kio/tests/kioslavetest.cpp
M +1 -0 kio/tests/krununittest.cpp
M +4 -4 kioslave/http/http_cache_cleaner.cpp
M +6 -6 kioslave/http/kcookiejar/main.cpp
M +4 -67 kjsembed/kjscmd/kjscmd.cpp
M +0 -2 knewstuff/knewstuff3/core/engine.cpp
M +1 -2 kparts/CMakeLists.txt
M +1 -1 kparts/browserrun.cpp
M +7 -7 kparts/mainwindow.cpp
M +16 -15 kparts/part.cpp
M +9 -8 kparts/part.h
M +1 -8 kparts/partmanager.cpp
M +0 -8 kparts/partmanager.h
M +22 -25 kparts/plugin.cpp
M +7 -6 kparts/plugin.h
M +3 -2 kparts/tests/notepad.cpp
M +2 -2 kparts/tests/parts.cpp
M +3 -3 kparts/tests/parts.h
M +11 -12 kross/console/main.cpp
M +8 -9 kross/qts/main.cpp
M +13 -13 kross/test/main.cpp
M +4 -3 kutils/kcmodulecontainer.cpp
M +2 -1 kutils/kcmoduleloader.cpp
M +1 -6 kutils/kcmoduleproxy.cpp
M +0 -9 kutils/kcmoduleproxy.h
M +8 -16 kutils/kpluginselector.cpp
M +0 -9 kutils/kpluginselector.h
M +3 -3 kutils/ksettings/pluginpage.cpp
M +1 -1 kutils/ksettings/pluginpage.h
M +3 -3 staging/kde4support/autotests/kuniqueapptest.cpp
M +20 -20 staging/kde4support/kde-config.cpp
M +3 -2 staging/kde4support/src/CMakeLists.txt
M +1 -0 staging/kde4support/src/kdecore/k3socks.cpp
M +2 -1 staging/kde4support/src/kdecore/kgenericfactory.h
M +1 -1 staging/kde4support/src/kdecore/kglobal.cpp
M +5 -4 staging/kde4support/src/kdecore/qtest_kde.h
M +1 -1 staging/kde4support/src/kdeui/kapplication.cpp
M +1 -1 staging/kde4support/src/kdeui/ksystemtrayicon.cpp
M +4 -4 staging/kde4support/src/kdeui/kuniqueapplication.cpp
R +1 -2 staging/kde4support/src/kparts/factory.cpp [from: kparts/factory.cpp - 097% similarity]
R +3 -2 staging/kde4support/src/kparts/factory.h [from: kparts/factory.h - 097% similarity]
M +5 -6 staging/kde4support/tests/kcmdlineargstest.cpp
M +17 -17 staging/kde4support/tests/kmdcodectest.cpp
M +0 -1 staging/ki18n/src/CMakeLists.txt
M +0 -4 staging/ki18n/src/klocalizedstring.h
D +0 -76 staging/ki18n/src/qlocalizedstring_porting.h
M +0 -1 staging/kservice/autotests/CMakeLists.txt
M +2 -4 staging/kservice/src/CMakeLists.txt
D +0 -955 staging/kservice/src/plugin/kaboutdata.cpp
D +0 -981 staging/kservice/src/plugin/kaboutdata.h
M +10 -46 staging/kservice/src/plugin/kpluginfactory.cpp
M +11 -86 staging/kservice/src/plugin/kpluginfactory.h
M +2 -5 staging/kservice/src/plugin/kpluginfactory_p.h
M +2 -0 tier1/kcoreaddons/autotests/CMakeLists.txt
R +30 -30 tier1/kcoreaddons/autotests/kaboutdatatest.cpp [from: staging/kservice/autotests/kaboutdatatest.cpp - 084% similarity]
M +2 -0 tier1/kcoreaddons/src/CMakeLists.txt

http://commits.kde.org/kdelibs/769747f666cc32c09ca9a8d70019150fc0944b6e

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7bd1afe..a0d92b3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,6 +93,7 @@ set(KCoreAddons_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/tier1/kcoreaddons/src/io
${CMAKE_SOURCE_DIR}/tier1/kcoreaddons/src/kernel
${CMAKE_SOURCE_DIR}/tier1/kcoreaddons/src/text
${CMAKE_SOURCE_DIR}/tier1/kcoreaddons/src/randomness
+ ${CMAKE_SOURCE_DIR}/tier1/kcoreaddons/src
${CMAKE_BINARY_DIR}/tier1/kcoreaddons/src
)
set(KCoreAddons_LIBRARIES KCoreAddons)
diff --git a/kconf_update/kconf_update.cpp b/kconf_update/kconf_update.cpp
index 7a5a33e..e6b50af 100644
--- a/kconf_update/kconf_update.cpp
+++ b/kconf_update/kconf_update.cpp
@@ -34,7 +34,7 @@
#include <kdebug.h>
#include <klocalizedstring.h>
#include <kcmdlineargs.h>
-#include <kaboutdata.h>
+#include <k4aboutdata.h>
#include <qstandardpaths.h>

#include "kconfigutils.h"
@@ -956,17 +956,17 @@ void KonfUpdate::resetOptions()
extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
{
KCmdLineOptions options;
- options.add("debug", qi18n("Keep output results from scripts"));
- options.add("check <update-file>", qi18n("Check whether config file itself requires updating"));
- options.add("+[file]", qi18n("File to read update instructions from"));
+ options.add("debug", ki18n("Keep output results from scripts"));
+ options.add("check <update-file>", ki18n("Check whether config file itself requires updating"));
+ options.add("+[file]", ki18n("File to read update instructions from"));

- KAboutData aboutData("kconf_update", 0, qi18n("KConf Update"),
+ K4AboutData aboutData("kconf_update", 0, ki18n("KConf Update"),
"1.0.2",
- qi18n("KDE Tool for updating user configuration files"),
- KAboutData::License_GPL,
- qi18n("(c) 2001, Waldo Bastian"));
+ ki18n("KDE Tool for updating user configuration files"),
+ K4AboutData::License_GPL,
+ ki18n("(c) 2001, Waldo Bastian"));

- aboutData.addAuthor(qi18n("Waldo Bastian"), QLocalizedString(), "bastian@kde.org");
+ aboutData.addAuthor(ki18n("Waldo Bastian"), KLocalizedString(), "bastian@kde.org");

KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions(options);
diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt
index 52f5f78..0827dc6 100644
--- a/kdecore/CMakeLists.txt
+++ b/kdecore/CMakeLists.txt
@@ -169,7 +169,11 @@ set(kdecore_LIB_SRCS
io/kmountpoint.cpp
io/kprocess.cpp
io/kurl.cpp
+
kernel/kcmdlineargs.cpp
+ kernel/k4aboutdata.cpp
+ kernel/kcomponentdata.cpp
+
kernel/ktoolinvocation.cpp
)

@@ -247,7 +251,11 @@ install( FILES
io/kprocess.h
io/kmountpoint.h
io/kurl.h
+
kernel/kcmdlineargs.h
+ kernel/k4aboutdata.h
+ kernel/kcomponentdata.h
+
kernel/ktoolinvocation.h
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
)
diff --git a/staging/kde4support/src/kdecore/k4aboutdata.cpp b/kdecore/kernel/k4aboutdata.cpp
similarity index 98%
rename from staging/kde4support/src/kdecore/k4aboutdata.cpp
rename to kdecore/kernel/k4aboutdata.cpp
index 6bc87e4..76b274d 100644
--- a/staging/kde4support/src/kdecore/k4aboutdata.cpp
+++ b/kdecore/kernel/k4aboutdata.cpp
@@ -23,6 +23,7 @@
*/

#include "k4aboutdata.h"
+#include "kaboutdata.h"

#include "qstandardpaths.h"
#include <QtCore/QFile>
@@ -32,9 +33,6 @@
#include <QtCore/QList>
#include <QHash>

-// PORTING HACK (KDE5 TODO: clean up)
-#define i18nc(a,b) QObject::tr(b, a)
-
// -----------------------------------------------------------------------------
// Design notes:
//
@@ -503,6 +501,15 @@ K4AboutData &K4AboutData::operator=(const K4AboutData& other)
return *this;
}

+K4AboutData::operator KAboutData() const
+{
+ KAboutData aboutData(appName(), catalogName(), programName(), version(), shortDescription(),
+ KAboutData::License_Unknown, copyrightStatement(),
+ otherText(), d->_homepageAddress, bugAddress());
+ // TODO K4AboutLicense -> KAboutLicense conversion, using licenses()
+ return aboutData;
+}
+
K4AboutData &K4AboutData::addAuthor( const KLocalizedString &name,
const KLocalizedString &task,
const QByteArray &emailAddress,
@@ -832,7 +839,7 @@ QList<K4AboutPerson> K4AboutData::translators() const
translatorName = d->translatorName.toString();
}
else {
- translatorName = qi18nc("NAME OF TRANSLATORS", NAME_OF_TRANSLATORS).toString(); //toString(tmpLocale);
+ translatorName = ki18nc("NAME OF TRANSLATORS", NAME_OF_TRANSLATORS).toString(); //toString(tmpLocale);
}

QString translatorEmail;
@@ -840,7 +847,7 @@ QList<K4AboutPerson> K4AboutData::translators() const
translatorEmail = d->translatorEmail.toString();
}
else {
- translatorEmail = qi18nc("EMAIL OF TRANSLATORS", EMAIL_OF_TRANSLATORS).toString(); //toString(tmpLocale);
+ translatorEmail = ki18nc("EMAIL OF TRANSLATORS", EMAIL_OF_TRANSLATORS).toString(); //toString(tmpLocale);
}
#if 0
delete tmpLocale;
diff --git a/staging/kde4support/src/kdecore/k4aboutdata.h b/kdecore/kernel/k4aboutdata.h
similarity index 99%
rename from staging/kde4support/src/kdecore/k4aboutdata.h
rename to kdecore/kernel/k4aboutdata.h
index 42d5ddc..f50e750 100644
--- a/staging/kde4support/src/kdecore/k4aboutdata.h
+++ b/kdecore/kernel/k4aboutdata.h
@@ -24,7 +24,7 @@
#ifndef K4ABOUTDATA_H
#define K4ABOUTDATA_H

-#include <kde4support_export.h>
+#include <kdecore_export.h>
#include <klocalizedstring.h>
// Qt
#include <QtCore/QString>
@@ -32,6 +32,7 @@

template <class T> class QList;
class QVariant;
+class KAboutData;
class K4AboutData;

/**
@@ -65,7 +66,7 @@ class K4AboutData;
*
* @bc KDE4
*/
-class KDE4SUPPORT_EXPORT K4AboutPerson
+class KDECORE_EXPORT K4AboutPerson
{
friend class K4AboutData;
public:
@@ -189,7 +190,7 @@ class K4AboutLicense;
* classes.
* @author Espen Sand (espen@kde.org), David Faure (faure@kde.org)
*/
-class KDE4SUPPORT_EXPORT K4AboutData
+class KDECORE_EXPORT K4AboutData
{
public:
/**
@@ -289,6 +290,8 @@ class KDE4SUPPORT_EXPORT K4AboutData

~K4AboutData();

+ operator KAboutData() const;
+
/**
* Defines an author.
*
@@ -891,7 +894,7 @@ class KDE4SUPPORT_EXPORT K4AboutData
* lookup. This is necessary because the translation catalogs are usually not
* yet initialized at the point where K4AboutData is constructed.
*/
-class KDE4SUPPORT_EXPORT K4AboutLicense
+class KDECORE_EXPORT K4AboutLicense
{
friend class K4AboutData;
public:
diff --git a/kdecore/kernel/kcmdlineargs.cpp b/kdecore/kernel/kcmdlineargs.cpp
index 2634ac6..f03dccb 100644
--- a/kdecore/kernel/kcmdlineargs.cpp
+++ b/kdecore/kernel/kcmdlineargs.cpp
@@ -41,10 +41,7 @@
#include <QtCore/QTextCodec>
#include <QtCore/QUrl>

-#include "kaboutdata.h"
-
-// PORTING HACK (KDE5 TODO: clean up)
-#define i18nc(a,b) QObject::tr(b, a)
+#include "k4aboutdata.h"

// -----------------------------------------------------------------------------
// Design notes:
@@ -52,13 +49,13 @@
// These classes deal with a lot of text, some of which needs to be
// marked for translation. Since at the time when these object and calls are
// made the translation catalogs are usually still not initialized, the
-// translation has to be delayed. This is achieved by using QLocalizedString
-// for translatable strings. QLocalizedStrings are produced by qi18n* calls,
+// translation has to be delayed. This is achieved by using KLocalizedString
+// for translatable strings. KLocalizedStrings are produced by ki18n* calls,
// instead of the more usuall i18n* calls which produce QString by trying to
// translate immediately.
//
// All the non-translatable string arguments to methods are taken QByteArray,
-// all the translatable are QLocalizedString. The getter methods always return
+// all the translatable are KLocalizedString. The getter methods always return
// proper QString: the non-translatable strings supplied by the code are
// treated with QString::fromUtf8(), those coming from the outside with
// QTextCodec::toUnicode(), and translatable strings are finalized to QStrings
@@ -109,7 +106,7 @@ public:
class KCmdLineOptionsPrivate {
public:
QList<QByteArray> names;
- QList<QLocalizedString> descriptions;
+ QList<KLocalizedString> descriptions;
QStringList defaults;
};

@@ -136,7 +133,7 @@ KCmdLineOptions& KCmdLineOptions::operator= (const KCmdLineOptions &options)
}

KCmdLineOptions &KCmdLineOptions::add (const QByteArray &name,
- const QLocalizedString &description,
+ const KLocalizedString &description,
const QByteArray &defaultValue)
{
d->names.append(name);
@@ -161,7 +158,7 @@ class KCmdLineArgsStatic {
public:

KCmdLineArgsList *argsList; // All options.
- const KAboutData *about;
+ const K4AboutData *about;

int all_argc; // The original argc
char **all_argv; // The original argv
@@ -273,46 +270,46 @@ KCmdLineArgsStatic::KCmdLineArgsStatic () {
// Qt options
//FIXME: Check if other options are specific to Qt/X11
#if HAVE_X11
- qt_options.add("display <displayname>", qi18n("Use the X-server display 'displayname'"));
+ qt_options.add("display <displayname>", ki18n("Use the X-server display 'displayname'"));
#else

Saturday, 2 March 2013

[kdelibs/frameworks] /: Port away from KAction

Git commit 5a1d7490f9f3b8a34e6854d31a857062b3779b05 by Kevin Ottens.
Committed on 03/03/2013 at 00:36.
Pushed by ervin into branch 'frameworks'.

Port away from KAction

M +0 -1 kfile/kdiroperator.h
M +5 -5 kfile/kfilewidget.cpp
M +6 -6 khtml/ecma/kjs_debugwin.h
M +4 -2 kio/bookmarks/kbookmarkmenu.cc
M +1 -5 kio/bookmarks/kbookmarkmenu.h
M +0 -2 kio/bookmarks/kbookmarkmenu_p.h
M +8 -9 kio/kio/kfileitemactions.cpp
M +2 -2 kio/kio/kfileitemactions.h
M +2 -2 kio/kio/kfileitemactions_p.h
M +5 -5 knewstuff/knewstuff3/knewstuffaction.cpp
M +3 -3 knewstuff/knewstuff3/knewstuffaction.h
M +5 -5 kparts/browseropenorsavequestion.cpp
M +6 -6 kparts/tests/normalktm.cpp
M +3 -3 kparts/tests/normalktm.h
M +2 -2 kparts/tests/notepad.cpp
M +3 -3 kparts/tests/parts.cpp
M +3 -3 kparts/tests/partviewer.cpp
M +2 -2 kparts/tests/plugin_spellcheck.cpp
M +8 -8 kparts/tests/testmainwindow.cpp
M +3 -3 kparts/tests/testmainwindow.h
M +2 -2 kross/ui/plugin.cpp
M +6 -6 kross/ui/view.cpp

http://commits.kde.org/kdelibs/5a1d7490f9f3b8a34e6854d31a857062b3779b05

diff --git a/kfile/kdiroperator.h b/kfile/kdiroperator.h
index 94e876c..3d38cf1 100644
--- a/kfile/kdiroperator.h
+++ b/kfile/kdiroperator.h
@@ -36,7 +36,6 @@ class QAbstractItemView;
class QModelIndex;
class QProgressBar;

-class KAction;
class KActionCollection;
class KActionMenu;
class KDirLister;
diff --git a/kfile/kfilewidget.cpp b/kfile/kfilewidget.cpp
index 5d8f28e..0ee5967 100644
--- a/kfile/kfilewidget.cpp
+++ b/kfile/kfilewidget.cpp
@@ -438,7 +438,7 @@ KFileWidget::KFileWidget( const QUrl& _startDir, QWidget *parent )
coll->action( "mkdir" )->setShortcut( QKeySequence(Qt::Key_F10) );
coll->action( "mkdir" )->setWhatsThis(i18n("Click this button to create a new folder."));

- KAction *goToNavigatorAction = coll->add<KAction>( "gotonavigator", this, SLOT(_k_activateUrlNavigator()) );
+ QAction *goToNavigatorAction = coll->addAction( "gotonavigator", this, SLOT(_k_activateUrlNavigator()) );
goToNavigatorAction->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_L) );

KToggleAction *showSidebarAction =
@@ -469,9 +469,9 @@ KFileWidget::KFileWidget( const QUrl& _startDir, QWidget *parent )
menu->addSeparator();
menu->addAction(coll->action("decoration menu"));
menu->addSeparator();
- KAction * showHidden = qobject_cast<KAction*>(coll->action( "show hidden" ));
+ QAction * showHidden = coll->action( "show hidden" );
if (showHidden) {
- showHidden->setShortcut(
+ showHidden->setShortcuts(
KShortcut( QKeySequence(Qt::ALT + Qt::Key_Period), QKeySequence(Qt::Key_F8) ) );
}
menu->addAction( showHidden );
@@ -499,9 +499,9 @@ KFileWidget::KFileWidget( const QUrl& _startDir, QWidget *parent )
connect(d->ops, SIGNAL(currentIconSizeChanged(int)),
d->iconSizeSlider, SLOT(setValue(int)));

- KAction *furtherAction = new KAction(QIcon::fromTheme("file-zoom-out"), i18n("Zoom out"), this);
+ QAction *furtherAction = new QAction(QIcon::fromTheme("file-zoom-out"), i18n("Zoom out"), this);
connect(furtherAction, SIGNAL(triggered()), SLOT(_k_zoomOutIconsSize()));
- KAction *closerAction = new KAction(QIcon::fromTheme("file-zoom-in"), i18n("Zoom in"), this);
+ QAction *closerAction = new QAction(QIcon::fromTheme("file-zoom-in"), i18n("Zoom in"), this);
connect(closerAction, SIGNAL(triggered()), SLOT(_k_zoomInIconsSize()));

QWidget *midSpacer = new QWidget(this);
diff --git a/khtml/ecma/kjs_debugwin.h b/khtml/ecma/kjs_debugwin.h
index 4663cb0..070906b 100644
--- a/khtml/ecma/kjs_debugwin.h
+++ b/khtml/ecma/kjs_debugwin.h
@@ -44,7 +44,7 @@

class QListWidget;
class QComboBox;
-class KAction;
+class QAction;

namespace KJS {
class List;
@@ -262,11 +262,11 @@ namespace KJS {
SourceDisplay *m_sourceDisplay;
QListWidget *m_contextList;

- KAction *m_stepAction;
- KAction *m_nextAction;
- KAction *m_continueAction;
- KAction *m_stopAction;
- KAction *m_breakAction;
+ QAction *m_stepAction;
+ QAction *m_nextAction;
+ QAction *m_continueAction;
+ QAction *m_stopAction;
+ QAction *m_breakAction;

QComboBox *m_sourceSel;
EvalMultiLineEdit *m_evalEdit;
diff --git a/kio/bookmarks/kbookmarkmenu.cc b/kio/bookmarks/kbookmarkmenu.cc
index 6242be3..2b3999e 100644
--- a/kio/bookmarks/kbookmarkmenu.cc
+++ b/kio/bookmarks/kbookmarkmenu.cc
@@ -724,13 +724,15 @@ void KBookmarkMenuImporter::endFolder()


KBookmarkAction::KBookmarkAction(const KBookmark &bk, KBookmarkOwner* owner, QObject *parent )
- : KAction( bk.text().replace('&', "&&"), parent),
+ : QAction( bk.text().replace('&', "&&"), parent),
KBookmarkActionInterface(bk),
m_pOwner(owner)
{
setIcon(QIcon::fromTheme(bookmark().icon()));
setIconText(text());
- setHelpText(bookmark().url().toDisplayString(QUrl::PreferLocalFile));
+ setToolTip(bookmark().url().toDisplayString(QUrl::PreferLocalFile));
+ setStatusTip(toolTip());
+ setWhatsThis(toolTip());
const QString description = bk.description();
if (!description.isEmpty())
setToolTip( description );
diff --git a/kio/bookmarks/kbookmarkmenu.h b/kio/bookmarks/kbookmarkmenu.h
index 20f3121..395c348 100644
--- a/kio/bookmarks/kbookmarkmenu.h
+++ b/kio/bookmarks/kbookmarkmenu.h
@@ -28,7 +28,6 @@
#include <QtCore/QObject>
#include <QtCore/QStack>

-#include <kaction.h>
#include <kactionmenu.h>
#include <krun.h>
#include <kmenu.h>
@@ -39,9 +38,6 @@
class QString;
class QMenu;
class KBookmark;
-class KAction;
-class QAction;
-class KActionMenu;
class KActionCollection;
class KBookmarkOwner;
class KBookmarkMenu;
@@ -249,7 +245,7 @@ public:
*
*/

-class KIO_EXPORT KBookmarkAction : public KAction, public KBookmarkActionInterface
+class KIO_EXPORT KBookmarkAction : public QAction, public KBookmarkActionInterface
{
Q_OBJECT
public:
diff --git a/kio/bookmarks/kbookmarkmenu_p.h b/kio/bookmarks/kbookmarkmenu_p.h
index 6a535aa..730dacf 100644
--- a/kio/bookmarks/kbookmarkmenu_p.h
+++ b/kio/bookmarks/kbookmarkmenu_p.h
@@ -24,7 +24,6 @@

#include <QtCore/QObject>

-#include <kaction.h>
#include <kactionmenu.h>
#include <QTreeWidget>

@@ -36,7 +35,6 @@ class QString;
class QMenu;
class KBookmark;
class KBookmarkGroup;
-class KAction;
class KBookmarkOwner;
class KBookmarkMenu;

diff --git a/kio/kio/kfileitemactions.cpp b/kio/kio/kfileitemactions.cpp
index bda77c1..d28ec25 100644
--- a/kio/kio/kfileitemactions.cpp
+++ b/kio/kio/kfileitemactions.cpp
@@ -20,7 +20,6 @@

#include "kfileitemactions.h"
#include "kfileitemactions_p.h"
-#include <kaction.h>
#include <krun.h>
#include <kmimetypetrader.h>
#include <kdesktopfileactions.h>
@@ -143,7 +142,7 @@ int KFileItemActionsPrivate::insertServices(const ServiceList& list,
}

if (isBuiltin || !(*it).noDisplay()) {
- KAction *act = new KAction(m_parentWidget);
+ QAction *act = new QAction(m_parentWidget);
m_ownActions.append(act);
act->setObjectName("menuaction"); // for the unittest
QString text = (*it).text();
@@ -513,7 +512,7 @@ void KFileItemActions::addOpenWithActionsTo(QMenu* topMenu, const QString& trade
topMenu->addSeparator();
}

- KAction *runAct = new KAction(d->m_parentWidget);
+ QAction *runAct = new QAction(d->m_parentWidget);
QString runActionName;


@@ -564,7 +563,7 @@ void KFileItemActions::addOpenWithActionsTo(QMenu* topMenu, const QString& trade

KService::List::ConstIterator it = offers.constBegin();
for(; it != offers.constEnd(); it++) {
- KAction* act = d->createAppAction(*it,
+ QAction* act = d->createAppAction(*it,
// no submenu -> prefix single offer
menu == topMenu);
menu->addAction(act);
@@ -577,7 +576,7 @@ void KFileItemActions::addOpenWithActionsTo(QMenu* topMenu, const QString& trade
} else {
openWithActionName = i18nc("@title:menu", "&Open With...");
}
- KAction *openWithAct = new KAction(d->m_parentWidget);
+ QAction *openWithAct = new QAction(d->m_parentWidget);
d->m_ownActions.append(openWithAct);
openWithAct->setText(openWithActionName);
QObject::connect(openWithAct, SIGNAL(triggered()), d, SLOT(slotOpenWithDialog()));
@@ -585,7 +584,7 @@ void KFileItemActions::addOpenWithActionsTo(QMenu* topMenu, const QString& trade
}
else // no app offers -> Open With...
{
- KAction *act = new KAction(d->m_parentWidget);
+ QAction *act = new QAction(d->m_parentWidget);
d->m_ownActions.append(act);
act->setText(i18nc("@title:menu", "&Open With..."));
QObject::connect(act, SIGNAL(triggered()), d, SLOT(slotOpenWithDialog()));
@@ -686,7 +685,7 @@ QStringList KFileItemActionsPrivate::listPreferredServiceIds(const QStringList&
return serviceIdList;
}

-KAction* KFileItemActionsPrivate::createAppAction(const KService::Ptr& service, bool singleOffer)
+QAction* KFileItemActionsPrivate::createAppAction(const KService::Ptr& service, bool singleOffer)
{
QString actionName(service->name().replace('&', "&&"));
if (singleOffer) {
@@ -695,7 +694,7 @@ KAction* KFileItemActionsPrivate::createAppAction(const KService::Ptr& service,
actionName = i18nc("@item:inmenu Open With, %1 is application name", "%1", actionName);
}

- KAction *act = new KAction(m_parentWidget);
+ QAction *act = new QAction(m_parentWidget);
m_ownActions.append(act);
act->setIcon(QIcon::fromTheme(service->icon()));
act->setText(actionName);
@@ -704,7 +703,7 @@ KAction* KFileItemActionsPrivate::createAppAction(const KService::Ptr& service,
return act;
}

-KAction* KFileItemActions::preferredOpenWithAction(const QString& traderConstraint)
+QAction* KFileItemActions::preferredOpenWithAction(const QString& traderConstraint)
{
const KService::List offers = associatedApplications(d->m_mimeTypeList, traderConstraint);
if (offers.isEmpty()) {
diff --git a/kio/kio/kfileitemactions.h b/kio/kio/kfileitemactions.h
index 581f2ac..07260b4 100644
--- a/kio/kio/kfileitemactions.h
+++ b/kio/kio/kfileitemactions.h
@@ -26,7 +26,7 @@
#include <kio/kio_export.h>

class KFileItemListProperties;
-class KAction;
+class QAction;
class QMenu;
class KFileItemActionsPrivate;

@@ -89,7 +89,7 @@ public:
* from the "open with" list. Example: "DesktopEntryName != 'kfmclient'".
* @return the action - or 0 if no application was found.
*/
- KAction* preferredOpenWithAction(const QString& traderConstraint);
+ QAction* preferredOpenWithAction(const QString& traderConstraint);

/**
* Helper method used internally, can also be used for similar GUIs that
diff --git a/kio/kio/kfileitemactions_p.h b/kio/kio/kfileitemactions_p.h
index 7c0f44a..bf356e9 100644
--- a/kio/kio/kfileitemactions_p.h
+++ b/kio/kio/kfileitemactions_p.h
@@ -44,7 +44,7 @@ public:

// For "open with"
KService::List associatedApplications(const QString& traderConstraint);
- KAction* createAppAction(const KService::Ptr& service, bool singleOffer);
+ QAction* createAppAction(const KService::Ptr& service, bool singleOffer);

struct ServiceRank
{
@@ -82,7 +82,7 @@ public:
KFileItemList m_fileOpenList;
QActionGroup m_executeServiceActionGroup;
QActionGroup m_runApplicationActionGroup;
- QList<KAction*> m_ownActions;
+ QList<QAction*> m_ownActions;
QWidget* m_parentWidget;
};

diff --git a/knewstuff/knewstuff3/knewstuffaction.cpp b/knewstuff/knewstuff3/knewstuffaction.cpp
index e8a06c5..a7bf34f 100644
--- a/knewstuff/knewstuff3/knewstuffaction.cpp
+++ b/knewstuff/knewstuff3/knewstuffaction.cpp
@@ -18,18 +18,18 @@

#include "knewstuffaction.h"

-#include <kaction.h>
+#include <QAction>
#include <klocalizedstring.h>
#include <kactioncollection.h>

using namespace KNS3;

-KAction *KNS3::standardAction(const QString &what,
+QAction *KNS3::standardAction(const QString &what,
const QObject *receiver,
const char *slot, KActionCollection *parent,
const char *name)
{
- KAction *action = new KAction(what, parent);
+ QAction *action = new QAction(what, parent);
parent->addAction(QString(name), action);
action->setIcon(QIcon::fromTheme("get-hot-new-stuff"));
QObject::connect(action, SIGNAL(triggered(bool)), receiver, slot);
@@ -37,12 +37,12 @@ KAction *KNS3::standardAction(const QString &what,
return action;
}

-KAction *KNS3::standardActionUpload(const QString &what,
+QAction *KNS3::standardActionUpload(const QString &what,
const QObject *receiver,
const char *slot, KActionCollection *parent,
const char *name)
{
- KAction *action = new KAction(what, parent);
+ QAction *action = new QAction(what, parent);
parent->addAction(QString(name), action);
// FIXME: Get a specific upload icon!
action->setIcon(QIcon::fromTheme("get-hot-new-stuff"));
diff --git a/knewstuff/knewstuff3/knewstuffaction.h b/knewstuff/knewstuff3/knewstuffaction.h
index ea40bd9..5c35494 100644
--- a/knewstuff/knewstuff3/knewstuffaction.h
+++ b/knewstuff/knewstuff3/knewstuffaction.h
@@ -22,7 +22,7 @@
#include <QtCore/QString>

class QObject;
-class KAction;
+class QAction;
class KActionCollection;

namespace KNS3
@@ -41,7 +41,7 @@ namespace KNS3
* @param name The name by which the action will be retrieved again from the collection.
* @since 4.4
*/
-KNEWSTUFF3_EXPORT KAction *standardAction(const QString &what,
+KNEWSTUFF3_EXPORT QAction *standardAction(const QString &what,
const QObject *receiver,
const char *slot,
KActionCollection *parent,
@@ -61,7 +61,7 @@ KNEWSTUFF3_EXPORT KAction *standardAction(const QString &what,
* @param name The name by which the action will be retrieved again from the collection.
* @since 4.5
*/
-KNEWSTUFF3_EXPORT KAction *standardActionUpload(const QString &what,
+KNEWSTUFF3_EXPORT QAction *standardActionUpload(const QString &what,
const QObject *receiver,
const char *slot,
KActionCollection *parent,
diff --git a/kparts/browseropenorsavequestion.cpp b/kparts/browseropenorsavequestion.cpp
index d61cc5a..13387ce 100644
--- a/kparts/browseropenorsavequestion.cpp
+++ b/kparts/browseropenorsavequestion.cpp
@@ -22,7 +22,6 @@
#include <kconfiggroup.h>
#include <kdebug.h>
#include <klocalizedstring.h>
-#include <kaction.h>
#include <kfileitemactions.h>
#include <kmenu.h>
#include <ksqueezedtextlabel.h>
@@ -32,6 +31,7 @@
#include <kguiitem.h>
#include <kmessagebox.h>
#include <qmimedatabase.h>
+#include <QAction>
#include <QDialog>
#include <QDialogButtonBox>
#include <QPushButton>
@@ -231,12 +231,12 @@ BrowserOpenOrSaveQuestion::~BrowserOpenOrSaveQuestion()
delete d;
}

-static KAction* createAppAction(const KService::Ptr& service, QObject* parent)
+static QAction* createAppAction(const KService::Ptr& service, QObject* parent)
{
QString actionName(service->name().replace('&', "&&"));
actionName = i18nc("@action:inmenu", "Open &with %1", actionName);

- KAction *act = new KAction(parent);
+ QAction *act = new QAction(parent);
act->setIcon(QIcon::fromTheme(service->icon()));
act->setText(actionName);
act->setData(QVariant::fromValue(service));
@@ -274,10 +274,10 @@ BrowserOpenOrSaveQuestion::Result BrowserOpenOrSaveQuestion::askOpenOrSave()
d->openWithButton->setMenu(menu);
QObject::connect(menu, SIGNAL(triggered(QAction*)), d, SLOT(slotAppSelected(QAction*)));
for (KService::List::const_iterator it = apps.begin(); it != apps.end(); ++it) {
- KAction* act = createAppAction(*it, d);
+ QAction* act = createAppAction(*it, d);
menu->addAction(act);
}
- KAction* openWithDialogAction = new KAction(d);
+ QAction* openWithDialogAction = new QAction(d);
openWithDialogAction->setIcon(QIcon::fromTheme("document-open"));
openWithDialogAction->setText(openWithDialogItem.text());
menu->addAction(openWithDialogAction);
diff --git a/kparts/tests/normalktm.cpp b/kparts/tests/normalktm.cpp
index 31f802c..dcc3a5e 100644
--- a/kparts/tests/normalktm.cpp
+++ b/kparts/tests/normalktm.cpp
@@ -30,9 +30,9 @@
#include <QMenu>
#include <QMenuBar>

+#include <QAction>
#include <QApplication>
#include <kmessagebox.h>
-#include <kaction.h>
#include <kactioncollection.h>
#include <klocalizedstring.h>
#include <qstandardpaths.h>
@@ -50,29 +50,29 @@ TestMainWindow::TestMainWindow()

QMenu * pFile = new QMenu( "File", menuBar() );
KActionCollection * coll = actionCollection();
- KAction * paLocal = new KAction( "&View local file", this );
+ QAction * paLocal = new QAction( "&View local file", this );
coll->addAction( "open_local_file", paLocal );
connect(paLocal, SIGNAL(triggered()), this, SLOT(slotFileOpen()));
// No XML: we need to add our actions to the menus ourselves
pFile->addAction(paLocal);

- KAction * paRemote = new KAction( "&View remote file", this );
+ QAction * paRemote = new QAction( "&View remote file", this );
coll->addAction( "open_remote_file", paRemote );
connect(paRemote, SIGNAL(triggered()), this, SLOT(slotFileOpenRemote()));
pFile->addAction(paRemote);

- m_paEditFile = new KAction( "&Edit file", this );
+ m_paEditFile = new QAction( "&Edit file", this );
coll->addAction( "edit_file", m_paEditFile );
connect(m_paEditFile, SIGNAL(triggered()), this, SLOT(slotFileEdit()));
pFile->addAction(m_paEditFile);

- m_paCloseEditor = new KAction( "&Close file editor", this );
+ m_paCloseEditor = new QAction( "&Close file editor", this );
coll->addAction( "close_editor", m_paCloseEditor );
connect(m_paCloseEditor, SIGNAL(triggered()), this, SLOT(slotFileCloseEditor()));
m_paCloseEditor->setEnabled(false);
pFile->addAction(m_paCloseEditor);

- KAction * paQuit = new KAction( "&Quit", this );
+ QAction * paQuit = new QAction( "&Quit", this );
coll->addAction( "shell_quit", paQuit );
connect(paQuit, SIGNAL(triggered()), this, SLOT(close()));
paQuit->setIcon(QIcon::fromTheme("application-exit"));
diff --git a/kparts/tests/normalktm.h b/kparts/tests/normalktm.h
index 7eb0f6b..997f9a1 100644
--- a/kparts/tests/normalktm.h
+++ b/kparts/tests/normalktm.h
@@ -25,7 +25,7 @@
#include <kparts/part.h>
#include <kxmlguiwindow.h>

-class KAction;
+class QAction;
class QWidget;

class TestMainWindow : public KXmlGuiWindow
@@ -46,8 +46,8 @@ protected:

private:

- KAction * m_paEditFile;
- KAction * m_paCloseEditor;
+ QAction * m_paEditFile;
+ QAction * m_paCloseEditor;

KParts::ReadOnlyPart *m_part1;
KParts::Part *m_part2;
diff --git a/kparts/tests/notepad.cpp b/kparts/tests/notepad.cpp
index 2b9dfce..7d99747 100644
--- a/kparts/tests/notepad.cpp
+++ b/kparts/tests/notepad.cpp
@@ -23,6 +23,7 @@
#include <kparts/partmanager.h>
#include <kparts/mainwindow.h>

+#include <QAction>
#include <QSplitter>
#include <QtCore/QFile>
#include <QtCore/QTextStream>
@@ -32,7 +33,6 @@

#include <kaboutdata.h>
#include <kdebug.h>
-#include <kaction.h>
#include <kactioncollection.h>
#include <klocalizedstring.h>
#include <kpluginfactory.h>
@@ -51,7 +51,7 @@ NotepadPart::NotepadPart( QWidget* parentWidget,
m_edit->setPlainText( "NotepadPart's multiline edit" );
setWidget( m_edit );

- KAction* searchReplace = new KAction( "Search and replace", this );
+ QAction* searchReplace = new QAction( "Search and replace", this );
actionCollection()->addAction( "searchreplace", searchReplace );
connect(searchReplace, SIGNAL(triggered()), this, SLOT(slotSearchReplace()));

diff --git a/kparts/tests/parts.cpp b/kparts/tests/parts.cpp
index 4579989..cafa2ea 100644
--- a/kparts/tests/parts.cpp
+++ b/kparts/tests/parts.cpp
@@ -25,6 +25,7 @@
#include <kactionmenu.h>
#include <kactioncollection.h>

+#include <QAction>
#include <QCheckBox>
#include <QtCore/QFile>
#include <QtCore/QDir>
@@ -35,7 +36,6 @@
#include <QtTest/QtTest>

#include <kdebug.h>
-#include <kaction.h>
#include <klocalizedstring.h>

Part1::Part1( QObject *parent, QWidget * parentWidget )
@@ -50,7 +50,7 @@ Part1::Part1( QObject *parent, QWidget * parentWidget )

// An action and an action menu (test code for #70459)

- KAction* testAction = actionCollection()->add<KAction>("p1_blah");
+ QAction* testAction = actionCollection()->addAction("p1_blah");
testAction->setText("Part1's action");
testAction->setShortcut(Qt::CTRL + Qt::Key_B);
connect(testAction, SIGNAL(triggered()), this, SLOT(slotBlah()));
@@ -58,7 +58,7 @@ Part1::Part1( QObject *parent, QWidget * parentWidget )
KActionMenu * menu = new KActionMenu(QIcon::fromTheme("mail_forward"), "Foo", this);
actionCollection()->addAction("p1_foo", menu);

- KAction* mailForward = new KAction(QIcon::fromTheme("mail_forward"), "Bar", this);
+ QAction* mailForward = new QAction(QIcon::fromTheme("mail_forward"), "Bar", this);
mailForward->setShortcut(Qt::CTRL + Qt::Key_F);
connect(mailForward, SIGNAL(triggered()), this, SLOT(slotFooBar()));
actionCollection()->addAction("p1_foo_bar", mailForward);
diff --git a/kparts/tests/partviewer.cpp b/kparts/tests/partviewer.cpp
index 0979c93..63ed1f2 100644
--- a/kparts/tests/partviewer.cpp
+++ b/kparts/tests/partviewer.cpp
@@ -19,12 +19,12 @@
Boston, MA 02110-1301, USA.
*/

-#include <kaction.h>
#include <kactioncollection.h>
#include <klocalizedstring.h>
#include <kfiledialog.h>
#include <qmimedatabase.h>

+#include <QAction>
#include <QApplication>
#include <QWidget>
#include <QtCore/QDir>
@@ -38,11 +38,11 @@ PartViewer::PartViewer()
{
setXMLFile(QFINDTESTDATA("partviewer_shell.rc"));

- KAction * paOpen = new KAction( QIcon::fromTheme("document-open"), "&Open file", this );
+ QAction * paOpen = new QAction( QIcon::fromTheme("document-open"), "&Open file", this );
actionCollection()->addAction( "file_open", paOpen );
connect( paOpen, SIGNAL(triggered()), this, SLOT(slotFileOpen()) );

- KAction * paQuit = new KAction( QIcon::fromTheme("application-exit"), "&Quit", this );
+ QAction * paQuit = new QAction( QIcon::fromTheme("application-exit"), "&Quit", this );
actionCollection()->addAction( "file_quit", paQuit );
connect(paQuit, SIGNAL(triggered()), this, SLOT(close()));

diff --git a/kparts/tests/plugin_spellcheck.cpp b/kparts/tests/plugin_spellcheck.cpp
index eda1215..f575808 100644
--- a/kparts/tests/plugin_spellcheck.cpp
+++ b/kparts/tests/plugin_spellcheck.cpp
@@ -21,7 +21,7 @@
#include "notepad.h" // this plugin applies to a notepad part
#include <QTextEdit>
#include "plugin_spellcheck.h"
-#include <kaction.h>
+#include <QAction>
#include <kactioncollection.h>
#include <kmessagebox.h>
#include <kpluginfactory.h>
@@ -32,7 +32,7 @@ PluginSpellCheck::PluginSpellCheck( QObject* parent,
const QVariantList& )
: Plugin( parent )
{
- KAction* act = new KAction( "&Select current line (plugin)", this );
+ QAction* act = new QAction( "&Select current line (plugin)", this );
actionCollection()->addAction( "spellcheck", act );
connect(act, SIGNAL(triggered()), this, SLOT(slotSpellCheck()));
}
diff --git a/kparts/tests/testmainwindow.cpp b/kparts/tests/testmainwindow.cpp
index b59b22d..fd77af0 100644
--- a/kparts/tests/testmainwindow.cpp
+++ b/kparts/tests/testmainwindow.cpp
@@ -23,6 +23,7 @@
#include "parts.h"
#include "notepad.h"

+#include <QAction>
#include <QSplitter>
#include <QCheckBox>
#include <QtCore/QDir>
@@ -30,7 +31,6 @@
#include <QApplication>
#include <kxmlguifactory.h>
#include <kmessagebox.h>
-#include <kaction.h>
#include <kactioncollection.h>
#include <klocalizedstring.h>
#include <kparts/partmanager.h>
@@ -58,27 +58,27 @@ TestMainWindow::TestMainWindow()

KActionCollection *coll = actionCollection();

- KAction* paOpen = new KAction( "&View local file", this );
+ QAction* paOpen = new QAction( "&View local file", this );
coll->addAction( "open_local_file", paOpen );
connect(paOpen, SIGNAL(triggered()), this, SLOT(slotFileOpen()));
- KAction* paOpenRemote = new KAction( "&View remote file", this );
+ QAction* paOpenRemote = new QAction( "&View remote file", this );
coll->addAction( "open_remote_file", paOpenRemote );
connect(paOpenRemote, SIGNAL(triggered()), this, SLOT(slotFileOpenRemote()));

- m_paEditFile = new KAction( "&Edit file", this );
+ m_paEditFile = new QAction( "&Edit file", this );
coll->addAction( "edit_file", m_paEditFile );
connect(m_paEditFile, SIGNAL(triggered()), this, SLOT(slotFileEdit()));
- m_paCloseEditor = new KAction( "&Close file editor", this );
+ m_paCloseEditor = new QAction( "&Close file editor", this );
coll->addAction( "close_editor", m_paCloseEditor );
connect(m_paCloseEditor, SIGNAL(triggered()), this, SLOT(slotFileCloseEditor()));
m_paCloseEditor->setEnabled(false);
- KAction * paQuit = new KAction( "&Quit", this );
+ QAction * paQuit = new QAction( "&Quit", this );
coll->addAction( "shell_quit", paQuit );
connect(paQuit, SIGNAL(triggered()), this, SLOT(close()));
paQuit->setIcon(QIcon::fromTheme("application-exit"));

-// (void)new KAction( "Yet another menu item", coll, "shell_yami" );
-// (void)new KAction( "Yet another submenu item", coll, "shell_yasmi" );
+// (void)new QAction( "Yet another menu item", coll, "shell_yami" );
+// (void)new QAction( "Yet another submenu item", coll, "shell_yasmi" );

KStandardAction::configureToolbars(this, SLOT(configureToolbars()), actionCollection());
KStandardAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection());
diff --git a/kparts/tests/testmainwindow.h b/kparts/tests/testmainwindow.h
index 9b8426d..f72828b 100644
--- a/kparts/tests/testmainwindow.h
+++ b/kparts/tests/testmainwindow.h
@@ -25,7 +25,7 @@
#include <kparts/mainwindow.h>

namespace KParts { class PartManager; }
-class KAction;
+class QAction;
class QWidget;

class TestMainWindow : public KParts::MainWindow
@@ -46,8 +46,8 @@ protected:

private:

- KAction * m_paEditFile;
- KAction * m_paCloseEditor;
+ QAction * m_paEditFile;
+ QAction * m_paCloseEditor;

KParts::ReadOnlyPart *m_part1;
KParts::Part *m_part2;
diff --git a/kross/ui/plugin.cpp b/kross/ui/plugin.cpp
index baaddda..70a32af 100644
--- a/kross/ui/plugin.cpp
+++ b/kross/ui/plugin.cpp
@@ -19,7 +19,6 @@

#include "plugin.h"

-#include <kaction.h>
#include <krun.h>
#include <kxmlguifactory.h>
#include <kactioncollection.h>
@@ -27,6 +26,7 @@
#include <kross/core/actioncollection.h>
#include <kio/netaccess.h>

+#include <QAction>
#include <QPointer>
#include <QTextStream>
#include <QDirIterator>
@@ -196,7 +196,7 @@ void ScriptingPlugin::buildDomDocument(QDomDocument& document,
menuElement.appendChild(newActionElement);


- KAction* adaptor=new KAction(action->text(), action);
+ QAction* adaptor = new QAction(action->text(), action);
connect (adaptor,SIGNAL(triggered()),action,SLOT(trigger()));
adaptor->setEnabled(action->isEnabled());
adaptor->setIcon(action->icon());
diff --git a/kross/ui/view.cpp b/kross/ui/view.cpp
index 3ca635b..405af33 100644
--- a/kross/ui/view.cpp
+++ b/kross/ui/view.cpp
@@ -28,6 +28,7 @@

#include <QtCore/QFileInfo>
#include <QtCore/QDir>
+#include <QAction>
#include <QBoxLayout>
#include <QHeaderView>
#include <QPushButton>
@@ -41,7 +42,6 @@
#include <kfiledialog.h>
#include <kmenu.h>
#include <kpagedialog.h>
-#include <kaction.h>
#include <kactioncollection.h>
#include <kcombobox.h>
#include <kiconbutton.h>
@@ -297,35 +297,35 @@ ActionCollectionView::ActionCollectionView(QWidget* parent)

d->collection = new KActionCollection(this);

- KAction* runaction = new KAction(QIcon::fromTheme("system-run"), i18n("Run"), this);
+ QAction* runaction = new QAction(QIcon::fromTheme("system-run"), i18n("Run"), this);
runaction->setObjectName("run");
runaction->setToolTip( i18n("Execute the selected script.") );
runaction->setEnabled(false);
d->collection->addAction("run", runaction);
connect(runaction, SIGNAL(triggered()), this, SLOT(slotRun()));

- KAction* stopaction = new KAction(QIcon::fromTheme("process-stop"), i18n("Stop"), this);
+ QAction* stopaction = new QAction(QIcon::fromTheme("process-stop"), i18n("Stop"), this);
stopaction->setObjectName("stop");
stopaction->setToolTip( i18n("Stop execution of the selected script.") );
stopaction->setEnabled(false);
d->collection->addAction("stop", stopaction);
connect(stopaction, SIGNAL(triggered()), this, SLOT(slotStop()));

- KAction* editaction = new KAction(QIcon::fromTheme("document-properties"), i18n("Edit..."), this);
+ QAction* editaction = new QAction(QIcon::fromTheme("document-properties"), i18n("Edit..."), this);
editaction->setObjectName("edit");
editaction->setToolTip( i18n("Edit selected script.") );
editaction->setEnabled(false);
d->collection->addAction("edit", editaction);
connect(editaction, SIGNAL(triggered()), this, SLOT(slotEdit()));

- KAction* addaction = new KAction(QIcon::fromTheme("list-add"), i18n("Add..."), this);
+ QAction* addaction = new QAction(QIcon::fromTheme("list-add"), i18n("Add..."), this);
addaction->setObjectName("add");
addaction->setToolTip( i18n("Add a new script.") );
//addaction->setEnabled(false);
d->collection->addAction("add", addaction);
connect(addaction, SIGNAL(triggered()), this, SLOT(slotAdd()) );

- KAction* removeaction = new KAction(QIcon::fromTheme("list-remove"), i18n("Remove"), this);
+ QAction* removeaction = new QAction(QIcon::fromTheme("list-remove"), i18n("Remove"), this);
removeaction->setObjectName("remove");
removeaction->setToolTip( i18n("Remove selected script.") );
removeaction->setEnabled(false);

[kdelibs/frameworks] /: Port away from KAction

Git commit d93f4ac92b9a171a790ba02671bbc4d6df0a8bb1 by Kevin Ottens.
Committed on 03/03/2013 at 00:05.
Pushed by ervin into branch 'frameworks'.

Port away from KAction

M +6 -7 kfile/kdiroperator.cpp
M +9 -10 kfile/kdirselectdialog.cpp
M +4 -5 khtml/ecma/debugger/debugwindow.cpp
M +7 -7 khtml/ecma/debugger/debugwindow.h
M +29 -29 khtml/khtml_ext.cpp
M +15 -15 khtml/khtml_part.cpp
M +1 -1 khtml/khtmlpart_p.h
M +3 -3 khtml/rendering/media_controls.cpp
M +4 -4 khtml/testkhtml.cpp
M +3 -3 khtml/tests/testkhtmlnew.cpp

http://commits.kde.org/kdelibs/d93f4ac92b9a171a790ba02671bbc4d6df0a8bb1

diff --git a/kfile/kdiroperator.cpp b/kfile/kdiroperator.cpp
index b6ecd80..0bcc956 100644
--- a/kfile/kdiroperator.cpp
+++ b/kfile/kdiroperator.cpp
@@ -52,7 +52,6 @@
#include <QWheelEvent>
#include <qurlpathinfo.h>

-#include <kaction.h>
#include <qapplication.h>
#include <kdebug.h>
#include <kdirlister.h>
@@ -1865,18 +1864,18 @@ void KDirOperator::setupActions()
reloadAction->setText(i18n("Reload"));
reloadAction->setShortcuts(KStandardShortcut::shortcut(KStandardShortcut::Reload));

- KAction* mkdirAction = new KAction(i18n("New Folder..."), this);
+ QAction* mkdirAction = new QAction(i18n("New Folder..."), this);
d->actionCollection->addAction("mkdir", mkdirAction);
mkdirAction->setIcon(QIcon::fromTheme(QLatin1String("folder-new")));
connect(mkdirAction, SIGNAL(triggered(bool)), this, SLOT(mkdir()));

- KAction* trash = new KAction(i18n("Move to Trash"), this);
+ QAction* trash = new QAction(i18n("Move to Trash"), this);
d->actionCollection->addAction("trash", trash);
trash->setIcon(QIcon::fromTheme("user-trash"));
trash->setShortcuts(KShortcut(Qt::Key_Delete));
connect(trash, SIGNAL(triggered(bool)), SLOT(trashSelected()));

- KAction* action = new KAction(i18n("Delete"), this);
+ QAction* action = new QAction(i18n("Delete"), this);
d->actionCollection->addAction("delete", action);
action->setIcon(QIcon::fromTheme("edit-delete"));
action->setShortcuts(KShortcut(Qt::SHIFT + Qt::Key_Delete));
@@ -1974,15 +1973,15 @@ void KDirOperator::setupActions()
d->actionCollection->addAction("inline preview", inlinePreview);
connect(inlinePreview, SIGNAL(toggled(bool)), SLOT(_k_toggleInlinePreviews(bool)));

- KAction *fileManager = new KAction(i18n("Open File Manager"), this);
+ QAction *fileManager = new QAction(i18n("Open File Manager"), this);
d->actionCollection->addAction("file manager", fileManager);
fileManager->setIcon(QIcon::fromTheme(QLatin1String("system-file-manager")));
connect(fileManager, SIGNAL(triggered()), SLOT(_k_slotOpenFileManager()));

- action = new KAction(i18n("Properties"), this);
+ action = new QAction(i18n("Properties"), this);
d->actionCollection->addAction("properties", action);
action->setIcon(QIcon::fromTheme("document-properties"));
- action->setShortcut(KShortcut(Qt::ALT + Qt::Key_Return));
+ action->setShortcuts(KShortcut(Qt::ALT + Qt::Key_Return));
connect(action, SIGNAL(triggered(bool)), this, SLOT(_k_slotProperties()));

// the view menu actions
diff --git a/kfile/kdirselectdialog.cpp b/kfile/kdirselectdialog.cpp
index a5dabce..62fafec 100644
--- a/kfile/kdirselectdialog.cpp
+++ b/kfile/kdirselectdialog.cpp
@@ -28,7 +28,6 @@
#include <qpushbutton.h>
#include <qurlpathinfo.h>

-#include <kaction.h>
#include <kactioncollection.h>
#include <kcoreauthorized.h>
#include <kconfig.h>
@@ -96,8 +95,8 @@ public:
KHistoryComboBox *m_urlCombo;
QString m_recentDirClass;
KUrl m_startURL;
- KAction* moveToTrash;
- KAction* deleteAction;
+ QAction* moveToTrash;
+ QAction* deleteAction;
QAction* showHiddenFoldersAction;
};

@@ -328,24 +327,24 @@ KDirSelectDialog::KDirSelectDialog(const QUrl &startDir, bool localOnly,

d->m_contextMenu = new KMenu( this );

- KAction* newFolder = new KAction( i18nc("@action:inmenu","New Folder..."), this);
+ QAction* newFolder = new QAction( i18nc("@action:inmenu","New Folder..."), this);
d->m_actions->addAction( newFolder->objectName(), newFolder );
newFolder->setIcon( QIcon::fromTheme( "folder-new" ) );
newFolder->setShortcut( Qt::Key_F10);
connect( newFolder, SIGNAL(triggered(bool)), this, SLOT(slotNewFolder()) );
d->m_contextMenu->addAction( newFolder );

- d->moveToTrash = new KAction( i18nc( "@action:inmenu","Move to Trash" ), this );
+ d->moveToTrash = new QAction( i18nc( "@action:inmenu","Move to Trash" ), this );
d->m_actions->addAction( d->moveToTrash->objectName(), d->moveToTrash );
d->moveToTrash->setIcon( QIcon::fromTheme( "user-trash" ) );
- d->moveToTrash->setShortcut(KShortcut(Qt::Key_Delete));
+ d->moveToTrash->setShortcuts(KShortcut(Qt::Key_Delete));
connect( d->moveToTrash, SIGNAL(triggered(bool)), this, SLOT(slotMoveToTrash()) );
d->m_contextMenu->addAction( d->moveToTrash );

- d->deleteAction = new KAction( i18nc("@action:inmenu","Delete"), this );
+ d->deleteAction = new QAction( i18nc("@action:inmenu","Delete"), this );
d->m_actions->addAction( d->deleteAction->objectName(), d->deleteAction );
d->deleteAction->setIcon( QIcon::fromTheme( "edit-delete" ) );
- d->deleteAction->setShortcut( KShortcut( Qt::SHIFT + Qt::Key_Delete ) );
+ d->deleteAction->setShortcuts( KShortcut( Qt::SHIFT + Qt::Key_Delete ) );
connect( d->deleteAction, SIGNAL(triggered(bool)), this, SLOT(slotDelete()) );
d->m_contextMenu->addAction( d->deleteAction );

@@ -358,10 +357,10 @@ KDirSelectDialog::KDirSelectDialog(const QUrl &startDir, bool localOnly,
d->m_contextMenu->addAction( d->showHiddenFoldersAction );
d->m_contextMenu->addSeparator();

- KAction* propertiesAction = new KAction( i18nc("@action:inmenu","Properties"), this);
+ QAction* propertiesAction = new QAction( i18nc("@action:inmenu","Properties"), this);
d->m_actions->addAction(propertiesAction->objectName(), propertiesAction);
propertiesAction->setIcon(QIcon::fromTheme("document-properties"));
- propertiesAction->setShortcut(KShortcut(Qt::ALT + Qt::Key_Return));
+ propertiesAction->setShortcuts(KShortcut(Qt::ALT + Qt::Key_Return));
connect( propertiesAction, SIGNAL(triggered(bool)), this, SLOT(slotProperties()) );
d->m_contextMenu->addAction( propertiesAction );

diff --git a/khtml/ecma/debugger/debugwindow.cpp b/khtml/ecma/debugger/debugwindow.cpp
index 8f224f8..d99d114 100644
--- a/khtml/ecma/debugger/debugwindow.cpp
+++ b/khtml/ecma/debugger/debugwindow.cpp
@@ -30,7 +30,6 @@
#include <klocalizedstring.h>
#include <kdebug.h>
#include <kmenu.h>
-#include <kaction.h>
#include <kactioncollection.h>
#include <ktoggleaction.h>
#include <kshortcut.h>
@@ -183,28 +182,28 @@ void DebugWindow::createActions()
m_stopAct->setEnabled(true);
connect(m_stopAct, SIGNAL(triggered(bool)), this, SLOT(stopAtNext()));

- m_continueAct = new KAction(QIcon::fromTheme(":/images/continue.png"), i18n("Continue"), this );
+ m_continueAct = new QAction(QIcon::fromTheme(":/images/continue.png"), i18n("Continue"), this );
actionCollection()->addAction( "continue", m_continueAct );
m_continueAct->setShortcut(Qt::Key_F9);
m_continueAct->setEnabled(false);
connect(m_continueAct, SIGNAL(triggered(bool)), this, SLOT(continueExecution()));


- m_stepOverAct = new KAction(QIcon::fromTheme(":/images/step-over.png"), i18n("Step Over"), this );
+ m_stepOverAct = new QAction(QIcon::fromTheme(":/images/step-over.png"), i18n("Step Over"), this );
actionCollection()->addAction( "stepOver", m_stepOverAct );
m_stepOverAct->setShortcut(Qt::Key_F10);
m_stepOverAct->setEnabled(false);
connect(m_stepOverAct, SIGNAL(triggered(bool)), this, SLOT(stepOver()) );


- m_stepIntoAct = new KAction(QIcon::fromTheme(":/images/step-into.png"), i18n("Step Into"), this );
+ m_stepIntoAct = new QAction(QIcon::fromTheme(":/images/step-into.png"), i18n("Step Into"), this );
actionCollection()->addAction( "stepInto", m_stepIntoAct );
m_stepIntoAct->setShortcut(Qt::Key_F11);
m_stepIntoAct->setEnabled(false);

connect(m_stepIntoAct, SIGNAL(triggered(bool)), this, SLOT(stepInto()));

- m_stepOutAct = new KAction(QIcon::fromTheme(":/images/step-out.png"), i18n("Step Out"), this );
+ m_stepOutAct = new QAction(QIcon::fromTheme(":/images/step-out.png"), i18n("Step Out"), this );
actionCollection()->addAction( "stepOut", m_stepOutAct );
m_stepOutAct->setShortcut(Qt::Key_F12);
m_stepOutAct->setEnabled(false);
diff --git a/khtml/ecma/debugger/debugwindow.h b/khtml/ecma/debugger/debugwindow.h
index fa94a1c..7aef4fb 100644
--- a/khtml/ecma/debugger/debugwindow.h
+++ b/khtml/ecma/debugger/debugwindow.h
@@ -45,7 +45,7 @@
#include "interpreter_ctx.h"
#include "debugdocument.h"

-class KAction;
+class QAction;
class KToggleAction;
class QTabWidget;
class QFrame;
@@ -167,14 +167,14 @@ private:
bool checkSourceLocation(KJS::ExecState* exec, int sourceId, int firstLine, int lastLine);

// Standard actions
- KAction *m_exitAct;
+ QAction *m_exitAct;

// Flow control actions
- KAction *m_continueAct;
- KAction *m_stopAct;
- KAction *m_stepIntoAct;
- KAction *m_stepOutAct;
- KAction *m_stepOverAct;
+ QAction *m_continueAct;
+ QAction *m_stopAct;
+ QAction *m_stepIntoAct;
+ QAction *m_stepOutAct;
+ QAction *m_stepOverAct;

KToggleAction *m_catchExceptionsAction;
KToggleAction *m_reindentAction;
diff --git a/khtml/khtml_ext.cpp b/khtml/khtml_ext.cpp
index 114c228..1d3e278 100644
--- a/khtml/khtml_ext.cpp
+++ b/khtml/khtml_ext.cpp
@@ -262,7 +262,7 @@ void KHTMLPartBrowserExtension::copy()

void KHTMLPartBrowserExtension::searchProvider()
{
- KAction *action = qobject_cast<KAction*>(sender());
+ QAction *action = qobject_cast<QAction*>(sender());
if (action) {
KUrl url = action->data().toUrl();
if (url.host().isEmpty()) {
@@ -428,14 +428,14 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const KUrl &url )
selectedTextURL.truncate(15);
selectedTextURL += "...";
}
- KAction *action = new KAction(i18n("Open '%1'", selectedTextURL), this);
+ QAction *action = new QAction(i18n("Open '%1'", selectedTextURL), this);
d->m_actionCollection->addAction( "openSelection", action );
action->setIcon( QIcon::fromTheme( "window-new" ) );
connect( action, SIGNAL(triggered(bool)), this, SLOT(openSelection()) );
editActions.append(action);
}

- KAction* separator = new KAction(d->m_actionCollection);
+ QAction* separator = new QAction(d->m_actionCollection);
separator->setSeparator(true);
editActions.append(separator);

@@ -445,17 +445,17 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const KUrl &url )
if (!url.isEmpty()) {
QList<QAction *> linkActions;
if (url.scheme() == "mailto") {
- KAction *action = new KAction( i18n( "&Copy Email Address" ), this );
+ QAction *action = new QAction( i18n( "&Copy Email Address" ), this );
d->m_actionCollection->addAction( "copylinklocation", action );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotCopyLinkLocation()) );
linkActions.append(action);
} else {
- KAction *action = new KAction( i18n( "&Save Link As..." ), this );
+ QAction *action = new QAction( i18n( "&Save Link As..." ), this );
d->m_actionCollection->addAction( "savelinkas", action );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotSaveLinkAs()) );
linkActions.append(action);

- action = new KAction( i18n( "&Copy Link Address" ), this );
+ action = new QAction( i18n( "&Copy Link Address" ), this );
d->m_actionCollection->addAction( "copylinklocation", action );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotCopyLinkLocation()) );
linkActions.append(action);
@@ -468,59 +468,59 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const KUrl &url )
if (!hasSelection) {
if ( khtml->parentPart() ) {
KActionMenu* menu = new KActionMenu( i18nc("@title:menu HTML frame/iframe", "Frame"), this);
- KAction *action = new KAction( i18n( "Open in New &Window" ), this );
+ QAction *action = new QAction( i18n( "Open in New &Window" ), this );
d->m_actionCollection->addAction( "frameinwindow", action );
action->setIcon( QIcon::fromTheme( "window-new" ) );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotFrameInWindow()) );
menu->addAction(action);

- action = new KAction( i18n( "Open in &This Window" ), this );
+ action = new QAction( i18n( "Open in &This Window" ), this );
d->m_actionCollection->addAction( "frameintop", action );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotFrameInTop()) );
menu->addAction(action);

- action = new KAction( i18n( "Open in &New Tab" ), this );
+ action = new QAction( i18n( "Open in &New Tab" ), this );
d->m_actionCollection->addAction( "frameintab", action );
action->setIcon( QIcon::fromTheme( "tab-new" ) );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotFrameInTab()) );
menu->addAction(action);

- action = new KAction(d->m_actionCollection);
+ action = new QAction(d->m_actionCollection);
action->setSeparator(true);
menu->addAction(action);

- action = new KAction( i18n( "Reload Frame" ), this );
+ action = new QAction( i18n( "Reload Frame" ), this );
d->m_actionCollection->addAction( "reloadframe", action );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotReloadFrame()) );
menu->addAction(action);

- action = new KAction( i18n( "Print Frame..." ), this );
+ action = new QAction( i18n( "Print Frame..." ), this );
d->m_actionCollection->addAction( "printFrame", action );
action->setIcon( QIcon::fromTheme( "document-print-frame" ) );
connect( action, SIGNAL(triggered(bool)), d->m_khtml->browserExtension(), SLOT(print()) );
menu->addAction(action);

- action = new KAction( i18n( "Save &Frame As..." ), this );
+ action = new QAction( i18n( "Save &Frame As..." ), this );
d->m_actionCollection->addAction( "saveFrame", action );
connect( action, SIGNAL(triggered(bool)), d->m_khtml, SLOT(slotSaveFrame()) );
menu->addAction(action);

- action = new KAction( i18n( "View Frame Source" ), this );
+ action = new QAction( i18n( "View Frame Source" ), this );
d->m_actionCollection->addAction( "viewFrameSource", action );
connect( action, SIGNAL(triggered(bool)), d->m_khtml, SLOT(slotViewDocumentSource()) );
menu->addAction(action);

- action = new KAction( i18n( "View Frame Information" ), this );
+ action = new QAction( i18n( "View Frame Information" ), this );
d->m_actionCollection->addAction( "viewFrameInfo", action );
connect( action, SIGNAL(triggered(bool)), d->m_khtml, SLOT(slotViewPageInfo()) );

- action = new KAction(d->m_actionCollection);
+ action = new QAction(d->m_actionCollection);
action->setSeparator(true);
menu->addAction(action);

if ( KHTMLGlobal::defaultHTMLSettings()->isAdFilterEnabled() ) {
if ( khtml->d->m_frame->m_type == khtml::ChildFrame::IFrame ) {
- action = new KAction( i18n( "Block IFrame..." ), this );
+ action = new QAction( i18n( "Block IFrame..." ), this );
d->m_actionCollection->addAction( "blockiframe", action );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotBlockIFrame()) );
menu->addAction(action);
@@ -545,18 +545,18 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const KUrl &url )
}
else
d->m_imageURL = KUrl( static_cast<DOM::HTMLInputElement>( e ).src().string() );
- KAction *action = new KAction( i18n( "Save Image As..." ), this );
+ QAction *action = new QAction( i18n( "Save Image As..." ), this );
d->m_actionCollection->addAction( "saveimageas", action );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotSaveImageAs()) );
partActions.append(action);

- action = new KAction( i18n( "Send Image..." ), this );
+ action = new QAction( i18n( "Send Image..." ), this );
d->m_actionCollection->addAction( "sendimage", action );
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotSendImage()) );
partActions.append(action);

#ifndef QT_NO_MIMECLIPBOARD
- action = new KAction( i18n( "Copy Image" ), this );
+ action = new QAction( i18n( "Copy Image" ), this );
d->m_actionCollection->addAction( "copyimage", action );
action->setEnabled(!d->m_pixmap.isNull());
connect( action, SIGNAL(triggered(bool)), this, SLOT(slotCopyImage()) );
@@ -564,7 +564,7 @@ KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const KUrl &url )