[rkward-cvs] SF.net SVN: rkward: [2054] branches/KDE4_port/rkward/windows

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Oct 14 14:51:43 UTC 2007


Revision: 2054
          http://rkward.svn.sourceforge.net/rkward/?rev=2054&view=rev
Author:   tfry
Date:     2007-10-14 07:51:43 -0700 (Sun, 14 Oct 2007)

Log Message:
-----------
Two more files compile

Modified Paths:
--------------
    branches/KDE4_port/rkward/windows/rkcommandlog.cpp
    branches/KDE4_port/rkward/windows/rkcommandlog.h
    branches/KDE4_port/rkward/windows/rkhelpsearchwindow.cpp

Modified: branches/KDE4_port/rkward/windows/rkcommandlog.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandlog.cpp	2007-10-14 14:38:28 UTC (rev 2053)
+++ branches/KDE4_port/rkward/windows/rkcommandlog.cpp	2007-10-14 14:51:43 UTC (rev 2054)
@@ -37,7 +37,7 @@
 #include <QEvent>
 
 #include <klocale.h>
-#include <kstandardaction.h>
+#include <kactioncollection.h>
 
 #include "../debug.h"
 
@@ -48,7 +48,7 @@
 	RK_TRACE (APP);
 
 	log_view = new RKCommandLogView (this);
-	log_view->setTextFormat (PlainText);
+	log_view->setTextFormat (Qt::PlainText);
 	log_view->setUndoRedoEnabled (false);
 	log_view->setReadOnly (true);
 
@@ -64,7 +64,7 @@
 
 	setPart (new RKCommandLogPart (this));
 	initializeActivationSignals ();
-	setFocusPolicy (QWidget::ClickFocus);
+	setFocusPolicy (Qt::ClickFocus);
 }
 
 RKCommandLog::~RKCommandLog(){
@@ -237,13 +237,12 @@
 RKCommandLogView::RKCommandLogView (RKCommandLog *parent) : Q3TextEdit (parent) {
 	RK_TRACE (APP);
 
-	const QObjectList *list = children ();
-	QObjectListIt it (*list);
-	QObject *obj;
-	
-	while ((obj = it.current()) != 0) {
+	const QList<QObject*> list = children ();
+	QList<QObject*>::const_iterator it = list.constBegin ();
+
+	while (it != list.constEnd()) {
+		(*it)->installEventFilter (this);
 		++it;
-		obj->installEventFilter (this);
 	}
 }
 
@@ -277,19 +276,23 @@
 RKCommandLogPart::RKCommandLogPart (RKCommandLog *for_log) : KParts::Part (0) {
 	RK_TRACE (APP);
 
-	KInstance* instance = new KInstance ("rkward");
-	setInstance (instance);
+	setComponentData (KGlobal::mainComponent ());
 
 	setWidget (log = for_log);
 
 	setXMLFile ("rkcommandlogpart.rc");
 
-	copy = KStandardAction::copy (log->getView (), SLOT (copy ()), actionCollection (), "log_copy");
-	KStandardAction::clear (log, SLOT (clearLog ()), actionCollection (), "log_clear");
-	KStandardAction::selectAll (log->getView (), SLOT (selectAll ()), actionCollection (), "log_select_all");
-	new KAction (i18n ("Configure"), 0, log, SLOT (configureLog ()), actionCollection (), "log_configure");
-	run_selection = new KAction (i18n ("Run selection"), QIcon (RKCommonFunctions::getRKWardDataDir () + "icons/run_selection.png"), KShortcut ("F8"), log, SLOT (runSelection ()), actionCollection (), "log_run_selection");
+	copy = actionCollection ()->addAction (KStandardAction::Copy, "log_copy", log->getView (), SLOT (copy()));
+	actionCollection ()->addAction (KStandardAction::Clear, "log_clear", log, SLOT (clearLog()));
+	actionCollection ()->addAction (KStandardAction::SelectAll, "log_select_all", log->getView (), SLOT (selectAll()));
+	QAction *configure = actionCollection ()->addAction ("log_configure", log, SLOT(configureLog()));
+	configure->setText (i18n ("Configure"));
 
+	run_selection = actionCollection ()->addAction ("log_run_selection", log, SLOT(runSelection()));
+	run_selection->setText (i18n ("Run selection"));
+	run_selection->setIcon (QIcon (RKCommonFunctions::getRKWardDataDir () + "icons/run_selection.png"));
+	run_selection->setShortcut (Qt::Key_F8);
+
 	connect (log->getView (), SIGNAL (popupMenuRequest (const QPoint &)), this, SLOT (doPopupMenu (const QPoint &)));
 }
 

Modified: branches/KDE4_port/rkward/windows/rkcommandlog.h
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandlog.h	2007-10-14 14:38:28 UTC (rev 2053)
+++ branches/KDE4_port/rkward/windows/rkcommandlog.h	2007-10-14 14:51:43 UTC (rev 2054)
@@ -22,7 +22,6 @@
 #include <q3textedit.h>
 //Added by qt3to4:
 #include <QEvent>
-#include <k3mdichildview.h>
 
 #include "rkmdiwindow.h"
 #include "../rbackend/rcommandreceiver.h"
@@ -108,8 +107,8 @@
 private:
 	RKCommandLog *log;
 
-	KAction *run_selection;
-	KAction *copy;
+	QAction *run_selection;
+	QAction *copy;
 };
 
 #endif

Modified: branches/KDE4_port/rkward/windows/rkhelpsearchwindow.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkhelpsearchwindow.cpp	2007-10-14 14:38:28 UTC (rev 2053)
+++ branches/KDE4_port/rkward/windows/rkhelpsearchwindow.cpp	2007-10-14 14:51:43 UTC (rev 2054)
@@ -27,6 +27,7 @@
 #include <qlineedit.h>
 #include <qlayout.h>
 #include <qlabel.h>
+#include <qpushbutton.h>
 //Added by qt3to4:
 #include <Q3HBoxLayout>
 #include <QFocusEvent>
@@ -50,7 +51,7 @@
 	RK_TRACE (APP);
 	setPart (new RKDummyPart (0, this));
 	initializeActivationSignals ();
-	setFocusPolicy (QWidget::ClickFocus);
+	setFocusPolicy (Qt::ClickFocus);
 
 	Q3VBoxLayout* main_layout = new Q3VBoxLayout (this, RKGlobals::marginHint (), RKGlobals::spacingHint ());
 	Q3HBoxLayout* selection_layout = new Q3HBoxLayout (main_layout, RKGlobals::spacingHint ());
@@ -118,7 +119,7 @@
 	RK_TRACE (APP);
 
 	RKMDIWindow::focusInEvent (e);
-	if (e->reason () != QFocusEvent::Mouse) {
+	if (e->reason () != Qt::MouseFocusReason) {
 		field->setFocus ();
 	}
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list