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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Oct 14 19:13:56 UTC 2007


Revision: 2061
          http://rkward.svn.sourceforge.net/rkward/?rev=2061&view=rev
Author:   tfry
Date:     2007-10-14 12:13:55 -0700 (Sun, 14 Oct 2007)

Log Message:
-----------
Another subdir compiles (with some cheating in rkradio and rkdropdown)

Modified Paths:
--------------
    branches/KDE4_port/TODO_KDE4
    branches/KDE4_port/rkward/plugin/rkabstractoptionselector.cpp
    branches/KDE4_port/rkward/plugin/rkcomponent.cpp
    branches/KDE4_port/rkward/plugin/rkcomponentcontext.cpp
    branches/KDE4_port/rkward/plugin/rkcomponentcontext.h
    branches/KDE4_port/rkward/plugin/rkcomponentmap.cpp
    branches/KDE4_port/rkward/plugin/rkcomponentmap.h
    branches/KDE4_port/rkward/plugin/rkcomponentproperties.cpp
    branches/KDE4_port/rkward/plugin/rkdropdown.cpp
    branches/KDE4_port/rkward/plugin/rkdropdown.h
    branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp
    branches/KDE4_port/rkward/plugin/rkradio.cpp
    branches/KDE4_port/rkward/plugin/rkstandardcomponent.cpp
    branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp
    branches/KDE4_port/rkward/plugin/rktext.cpp
    branches/KDE4_port/rkward/plugin/rkvarselector.cpp
    branches/KDE4_port/rkward/plugin/rkvarslot.cpp
    branches/KDE4_port/rkward/scriptbackends/phpbackend.h
    branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp
    branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h

Modified: branches/KDE4_port/TODO_KDE4
===================================================================
--- branches/KDE4_port/TODO_KDE4	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/TODO_KDE4	2007-10-14 19:13:55 UTC (rev 2061)
@@ -52,3 +52,9 @@
 
 rkloadlibsdialog:
 	- does it work?
+
+rkradio:
+	- does disabling single options work (in plugins)?
+
+rkdropdown:
+	- take care of enabling / disabling single options!

Modified: branches/KDE4_port/rkward/plugin/rkabstractoptionselector.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkabstractoptionselector.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkabstractoptionselector.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -88,7 +88,7 @@
 
 		QString mod = identifier.section (".", 1);
 		if (mod != "enabled") {
-			RK_DO (qDebug ("options do not have property '%s'", mod.toLatin1()), PLUGIN, DL_DEBUG);
+			RK_DO (qDebug ("options do not have property '%s'", mod.toLatin1().data ()), PLUGIN, DL_DEBUG);
 			return this;
 		}
 

Modified: branches/KDE4_port/rkward/plugin/rkcomponent.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponent.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkcomponent.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -26,7 +26,7 @@
 	RK_ASSERT (remainder);
 
 	if (identifier.isEmpty ()) return this;
-	RK_DO (qDebug ("looking up '%s'", identifier.toLatin1 ()), PLUGIN, DL_DEBUG);
+	RK_DO (qDebug ("looking up '%s'", identifier.toLatin1 ().data ()), PLUGIN, DL_DEBUG);
 
 	RKComponentBase *child = child_map.find (identifier.section (".", 0, 0));
 	if (!child) {	// if we do not have such a child, return this (and set remainder)
@@ -84,7 +84,7 @@
 QString RKComponentBase::value (const QString &modifier) {
 	RK_TRACE (PLUGIN);
 
-	RK_DO (qDebug ("Component type %d does not have a value. Remaining modifier is: '%s'", type (), modifier.toLatin1 ()), PLUGIN, DL_WARNING);
+	RK_DO (qDebug ("Component type %d does not have a value. Remaining modifier is: '%s'", type (), modifier.toLatin1 ().data ()), PLUGIN, DL_WARNING);
 	return QString ();
 }
 

Modified: branches/KDE4_port/rkward/plugin/rkcomponentcontext.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentcontext.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkcomponentcontext.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -18,6 +18,7 @@
 #include "rkcomponentcontext.h"
 
 #include <kaction.h>
+#include <kactioncollection.h>
 
 #include "../misc/xmlhelper.h"
 
@@ -82,7 +83,9 @@
 void RKContextHandler::addAction (const QString &id, RKComponentHandle *handle) {
 	RK_TRACE (PLUGIN);
 
-	action_map.insert (new KAction (handle->getLabel (), 0, this, SLOT (componentActionActivated ()), actionCollection (), id.toLatin1 ()), handle);
+	QAction *action = actionCollection ()->addAction (id, this, SLOT (componentActionActivated()));
+	action->setText (handle->getLabel ());
+	action_map.insert (action, handle);
 }
 
 void RKContextHandler::componentActionActivated () {
@@ -90,7 +93,7 @@
 
 	// find handle that triggered action
 	RKComponentHandle *handle = 0;
-	const KAction *action = dynamic_cast<const KAction *> (sender ());
+	const QAction *action = dynamic_cast<const QAction *> (sender ());
 	if (action_map.contains (action)) handle = action_map[action];
 	if (!handle) {
 		RK_ASSERT (false);
@@ -116,7 +119,7 @@
 
 			RK_ASSERT (it.current ()->isProperty ());
 			if (!(client && remainder.isEmpty () && client->isProperty () && it.current ()->isProperty ())) {
-				RK_DO (qDebug ("Could not set context property %s", id.toLatin1 ()), PLUGIN, DL_INFO);
+				RK_DO (qDebug ("Could not set context property %s", id.toLatin1 ().data ()), PLUGIN, DL_INFO);
 				continue;
 			}
 

Modified: branches/KDE4_port/rkward/plugin/rkcomponentcontext.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentcontext.h	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkcomponentcontext.h	2007-10-14 19:13:55 UTC (rev 2061)
@@ -79,7 +79,8 @@
 /** slot to handle plugin activation */
 	void componentActionActivated ();
 private:
-	typedef QMap<const KAction *, RKComponentHandle *> ActionMap;
+// KDE4: TODO: This can probably be made more straight-forward by using QAction::setData()
+	typedef QMap<const QAction *, RKComponentHandle *> ActionMap;
 	ActionMap action_map;
 };
 

Modified: branches/KDE4_port/rkward/plugin/rkcomponentmap.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentmap.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkcomponentmap.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -21,6 +21,7 @@
 #include <qdir.h>
 
 #include <klocale.h>
+#include <kactioncollection.h>
 
 #include "rkcomponentcontext.h"
 #include "../misc/xmlhelper.h"
@@ -114,7 +115,7 @@
 
 		RKComponentHandle* handle = RKComponentMap::getComponentHandle (id);
 		if ((!handle) || (!handle->isPlugin ())) {
-			RK_DO (qDebug ("No such component found while creating menu-entries or component is not a standalone plugin: \"%s\". No entry created.", id.toLatin1 ()), PLUGIN, DL_ERROR);
+			RK_DO (qDebug ("No such component found while creating menu-entries or component is not a standalone plugin: \"%s\". No entry created.", id.toLatin1 ().data ()), PLUGIN, DL_ERROR);
 		} else {
 			findOrCreateElement (menu_element, "Action", id, QString::null, xml->getIntAttribute ((*it), "index", -1, DL_INFO));
 			addedEntry (id, handle);
@@ -154,7 +155,7 @@
 	for (ComponentMap::iterator it = components.begin (); it != components.end (); ++it) {
 		delete (it.data ());
 /* TODO: this is not technically correct, as there may be several actions for this id, and we're only deleting one. But practically this should not really be relevant. */
-		delete (actionCollection ()->action (it.key ().toLatin1 ()));
+		delete (actionCollection ()->action (it.key ()));
 	}
 	components.clear ();
 
@@ -180,7 +181,7 @@
 	RKContextMap *context = getMap ()->getContextLocal (id);
 	if (context) return context;
 
-	RK_DO (qDebug ("no such context %s", id.toLatin1 ()), PLUGIN, DL_WARNING);
+	RK_DO (qDebug ("no such context %s", id.toLatin1 ().data ()), PLUGIN, DL_WARNING);
 	return (0);
 }
 
@@ -197,7 +198,7 @@
 	RKComponentHandle *handle = getMap ()->getComponentHandleLocal (id);
 	if (handle) return handle;
 
-	RK_DO (qDebug ("no such component %s", id.toLatin1 ()), PLUGIN, DL_WARNING);
+	RK_DO (qDebug ("no such component %s", id.toLatin1 ().data ()), PLUGIN, DL_WARNING);
 	return (0);
 }
 
@@ -239,7 +240,7 @@
 
 	QString plugin_map_file_abs = QFileInfo (plugin_map_file).absoluteFilePath ();
 	if (pluginmapfiles.contains (plugin_map_file_abs)) {
-		RK_DO (qDebug ("Plugin map file '%s' already loaded", plugin_map_file.toLatin1()), PLUGIN, DL_INFO);
+		RK_DO (qDebug ("Plugin map file '%s' already loaded", plugin_map_file.toLatin1().data ()), PLUGIN, DL_INFO);
 		return 0;
 	}
 
@@ -265,7 +266,7 @@
 		if (QFileInfo (file).isReadable ()) {
 			includelist.append (file);
 		} else {
-			RK_DO (qDebug ("Specified required file '%s' does not exist or is not readable. Ignoring.", file.toLatin1 ()), PLUGIN, DL_ERROR);
+			RK_DO (qDebug ("Specified required file '%s' does not exist or is not readable. Ignoring.", file.toLatin1 ().data ()), PLUGIN, DL_ERROR);
 		}
 	}
 	for (QStringList::const_iterator it = includelist.constBegin (); it != includelist.constEnd (); ++it) {
@@ -283,9 +284,9 @@
 		QString label = xml->getStringAttribute ((*it), "label", i18n ("(no label)"), DL_WARNING);
 
 		if (components.contains (id)) {
-			RK_DO (qDebug ("RKComponentMap already contains a component with id \"%s\". Ignoring second entry.", id.toLatin1 ()), PLUGIN, DL_WARNING);
+			RK_DO (qDebug ("RKComponentMap already contains a component with id \"%s\". Ignoring second entry.", id.toLatin1 ().data ()), PLUGIN, DL_WARNING);
 		} else if (!QFileInfo (pluginmap_file_desc->makeFileName (filename)).isReadable ()) {
-			RK_DO (qDebug ("Specified file '%s' for component id \"%s\" does not exist or is not readable. Ignoring.", filename.toLatin1 (), id.toLatin1 ()), PLUGIN, DL_ERROR);
+			RK_DO (qDebug ("Specified file '%s' for component id \"%s\" does not exist or is not readable. Ignoring.", filename.toLatin1 ().data (), id.toLatin1 ().data ()), PLUGIN, DL_ERROR);
 		} else {
 			// create and initialize component handle
 			RKComponentHandle *handle = new RKComponentHandle (pluginmap_file_desc, filename, label, (RKComponentType) type);
@@ -322,7 +323,7 @@
 	RK_TRACE (PLUGIN);
 
 	if (handle->isPlugin ()) {
-		new KAction (handle->getLabel (), 0, handle, SLOT (activated ()), actionCollection (), id.toLatin1 ());
+		actionCollection ()->addAction (id, handle, SLOT (activated()))->setText (handle->getLabel ());
 	}
 }
 

Modified: branches/KDE4_port/rkward/plugin/rkcomponentmap.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentmap.h	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkcomponentmap.h	2007-10-14 19:13:55 UTC (rev 2061)
@@ -38,6 +38,8 @@
 };
 
 #include <qobject.h>
+#include <QPair>
+#include <QMap>
 
 class RKComponent;
 class RKComponentMap;

Modified: branches/KDE4_port/rkward/plugin/rkcomponentproperties.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentproperties.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkcomponentproperties.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -146,7 +146,7 @@
 
 void RKComponentPropertyBase::warnModifierNotRecognized (const QString &modifier) {
 	RK_TRACE (PLUGIN);
-	RK_DO (qDebug ("Modifier '%s' not recognized.", modifier.toLatin1 ()), PLUGIN, DL_ERROR);
+	RK_DO (qDebug ("Modifier '%s' not recognized.", modifier.toLatin1 (). data ()), PLUGIN, DL_ERROR);
 }
 
 ///////////////////////////////////////////// Bool //////////////////////////////////////////
@@ -1076,7 +1076,7 @@
 			sources.append (s);
 			connect (s.property, SIGNAL (valueChanged (RKComponentPropertyBase *)), this, SLOT (sourcePropertyChanged (RKComponentPropertyBase *)));
 		} else {
-			RK_DO (qDebug ("Not found or not a property: %s", (*it).toLatin1 ()), PLUGIN, DL_WARNING);
+			RK_DO (qDebug ("Not found or not a property: %s", (*it).toLatin1 ().data ()), PLUGIN, DL_WARNING);
 		}
 	}
 

Modified: branches/KDE4_port/rkward/plugin/rkdropdown.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkdropdown.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkdropdown.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -21,7 +21,6 @@
 #include <qlabel.h>
 #include <qlayout.h>
 #include <qcombobox.h>
-#include <q3listbox.h>
 //Added by qt3to4:
 #include <Q3VBoxLayout>
 
@@ -45,10 +44,6 @@
 
 	// create ComboBox
 	box = new QComboBox (false, this);
-	if (!(box->listBox ())) {
-		// make sure the combo box uses a list box internally
-		box->setListBox (new Q3ListBox (this));
-	}
 
 	addOptionsAndInit (element);
 
@@ -63,11 +58,8 @@
 void RKDropDown::comboItemActivated (int id) {
 	RK_TRACE (PLUGIN);
 
-	Q3ListBox *list = box->listBox ();
-	RK_ASSERT (list);
-	Q3ListBoxItem *item = list->item (id);
-	RK_ASSERT (item);
-	if (!item->isSelectable ()) return;		// yes, apparently not selectable items can be "activated"
+//KDE4: TODO!!!
+	// make sure only selectable items get selected
 
 	itemSelected (id);
 }
@@ -87,20 +79,13 @@
 void RKDropDown::setItemEnabledInGUI (int id, bool enabled) {
 	RK_TRACE (PLUGIN);
 
-	Q3ListBox *list = box->listBox ();
-	RK_ASSERT (list);
-	Q3ListBoxItem *item = list->item (id);
-	RK_ASSERT (item);
+//	QModelIndex offset = box->model ()->createIndex (id, box->modelColumn ());
 
-	if (item->rtti () != ID_RKDROPDOWNLISTITEM) {
-		// this item won't show whether it is enabled or not. We need to replace it.
-		item = new RKDropDownListItem (0, list->text (id));
-		list->changeItem (item, id);
-	}
-
-	item->setSelectable (enabled);
+//KDE4 TODO: enable/disable item
+//	item->setSelectable (enabled);
 }
 
+/*
 ////////////////// RKDropDownListItem ////////////////////////
 
 #include <qpainter.h>
@@ -116,6 +101,6 @@
 	}
 
 	Q3ListBoxText::paint (painter);
-}
+}*/
 
 #include "rkdropdown.moc"

Modified: branches/KDE4_port/rkward/plugin/rkdropdown.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkdropdown.h	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkdropdown.h	2007-10-14 19:13:55 UTC (rev 2061)
@@ -42,18 +42,4 @@
 	QComboBox *box;
 };
 
-#include <q3listbox.h>
-
-#define ID_RKDROPDOWNLISTITEM 1001
-
-/** Item used in RKDropDown. The difference to a regular QListBoxText is that the item looks different when disabled */
-class RKDropDownListItem : public Q3ListBoxText {
-public:
-	RKDropDownListItem (Q3ListBox *listbox, const QString &text);
-	~RKDropDownListItem () {};
-	int rtti () const { return ID_RKDROPDOWNLISTITEM; };
-protected:
-	void paint (QPainter *painter);
-};
-
 #endif

Modified: branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -62,7 +62,7 @@
 		code_property = static_cast<RKComponentPropertyCode *> (cp);
 		connect (code_property, SIGNAL (valueChanged (RKComponentPropertyBase *)), this, SLOT (changedCode (RKComponentPropertyBase *)));
 	} else {
-		RK_DO (qDebug ("Could not find code property in preview box (remainder: %s)", dummy.toLatin1()), PLUGIN, DL_WARNING);
+		RK_DO (qDebug ("Could not find code property in preview box (remainder: %s)", dummy.toLatin1().data ()), PLUGIN, DL_WARNING);
 		code_property = 0;
 	}
 

Modified: branches/KDE4_port/rkward/plugin/rkradio.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkradio.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkradio.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -20,7 +20,7 @@
 #include <qdom.h>
 #include <qlabel.h>
 #include <qlayout.h>
-#include <qvbuttongroup.h>
+#include <Q3VButtonGroup>
 #include <qradiobutton.h>
 //Added by qt3to4:
 #include <Q3VBoxLayout>
@@ -74,7 +74,7 @@
 void RKRadio::setItemEnabledInGUI (int id, bool enabled) {
 	RK_TRACE (PLUGIN);
 
-	QButton *button = group->find (id);
+	QAbstractButton *button = group->find (id);
 	RK_ASSERT (button);
 	button->setEnabled (enabled);
 }

Modified: branches/KDE4_port/rkward/plugin/rkstandardcomponent.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkstandardcomponent.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkstandardcomponent.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -535,7 +535,7 @@
 		} else if (e.tagName () == "tabbook") {
 			QTabWidget *tabbook = new QTabWidget (parent_widget);
 			QDomNodeList tabs = e.childNodes ();
-			for (unsigned int t=0; t < tabs.count (); ++t) {
+			for (int t=0; t < tabs.count (); ++t) {
 				QDomElement tab_e = tabs.item (t).toElement ();
 				if (tab_e.tagName () == "tab") {
 					RKTabPage *tabpage = new RKTabPage (tab_e, component (), tabbook);
@@ -675,7 +675,7 @@
 	XMLHelper *xml = XMLHelper::getStaticHelper ();
 
 	for (ConnectionList::const_iterator it = connection_list.begin (); it != connection_list.end (); ++it) {
-		RK_DO (qDebug ("Connecting '%s' to '%s'", (*it).client_property.toLatin1 (), (*it).governor_property.toLatin1 ()), PLUGIN, DL_DEBUG);
+		RK_DO (qDebug ("Connecting '%s' to '%s'", (*it).client_property.toLatin1 ().data (), (*it).governor_property.toLatin1 ().data ()), PLUGIN, DL_DEBUG);
 
 		QString dummy;
 		RKComponentBase *client = parent->lookupComponent ((*it).client_property, &dummy);

Modified: branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -19,6 +19,7 @@
 
 #include <klocale.h>
 #include <kaction.h>
+#include <kactioncollection.h>
 #include <kurl.h>
 
 #include <qtimer.h>
@@ -63,7 +64,7 @@
 
 	if (!enslaved) {
 		KActionCollection *action_collection = new KActionCollection (this);
-		KStandardAction::copy (this, SLOT (copyCode ()), action_collection);
+		action_collection->addAction (KStandardAction::Copy, this, SLOT (copyCode()));
 	}
 }
 

Modified: branches/KDE4_port/rkward/plugin/rktext.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rktext.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rktext.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -44,7 +44,7 @@
 
 	QString initial_text;
 	QStringList lines = lines.split ("\n", element.text (), false);
-	for (unsigned int i=0; i < lines.count (); i++) {
+	for (int i=0; i < lines.count (); i++) {
 		QString line = lines[i].trimmed ();
 		if (!line.isEmpty ()) {
 			initial_text.append (line + '\n');

Modified: branches/KDE4_port/rkward/plugin/rkvarselector.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkvarselector.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkvarselector.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -68,7 +68,7 @@
 	RK_TRACE (PLUGIN);
 
 	selected->setFromListView (list_view, true);
-	RK_DO (qDebug ("selected in varselector: %s", selected->value ().toLatin1 ()), PLUGIN, DL_DEBUG);
+	RK_DO (qDebug ("selected in varselector: %s", selected->value ().toLatin1 ().data ()), PLUGIN, DL_DEBUG);
 }
 
 #include "rkvarselector.moc"

Modified: branches/KDE4_port/rkward/plugin/rkvarslot.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkvarslot.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/plugin/rkvarslot.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -133,7 +133,7 @@
 	list->clear ();
 	item_map.clear ();
 
-	RK_DO (qDebug ("contained in varslot: %s", available->value ().toLatin1 ()), PLUGIN, DL_DEBUG);
+	RK_DO (qDebug ("contained in varslot: %s", available->value ().toLatin1 ().data ()), PLUGIN, DL_DEBUG);
 
 	ObjectList objlist = available->objectList ();
 	ObjectList::const_iterator it = objlist.begin ();
@@ -171,7 +171,7 @@
 void RKVarSlot::selectPressed () {
 	RK_TRACE (PLUGIN);
 
-	RK_DO (qDebug ("select press in varslot: mode %d, source %s, selected %s", add_mode, source->value ().toLatin1 (), selected->value ().toLatin1 ()), PLUGIN, DL_DEBUG);
+	RK_DO (qDebug ("select press in varslot: mode %d, source %s, selected %s", add_mode, source->value ().toLatin1 ().data (), selected->value ().toLatin1 ().data ()), PLUGIN, DL_DEBUG);
 
 	// first update the properties
 	if (add_mode) {

Modified: branches/KDE4_port/rkward/scriptbackends/phpbackend.h
===================================================================
--- branches/KDE4_port/rkward/scriptbackends/phpbackend.h	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/scriptbackends/phpbackend.h	2007-10-14 19:13:55 UTC (rev 2061)
@@ -24,7 +24,6 @@
 #include <k3process.h>
 #include <qstringlist.h>
 #include <q3valuelist.h>
-#include <ktempfile.h>
 
 class RKPlugin;
 

Modified: branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp	2007-10-14 19:13:55 UTC (rev 2061)
@@ -40,6 +40,7 @@
 #include <QLabel>
 #include <QKeyEvent>
 #include <QEvent>
+#include <QClipboard>
 
 #include <klocale.h>
 #include <kmenubar.h>
@@ -163,12 +164,11 @@
 	m_doc->setHighlightingMode("R Script");
 }
 
-/* KDE4 no longer needed?
 void RKCommandEditorWindow::copy () {
 	RK_TRACE (COMMANDEDITOR);
 
-	m_view->copy ();
-} */
+	QApplication::clipboard()->setText (m_view->selectionText ());
+}
 
 void RKCommandEditorWindow::setReadOnly (bool ro) {
 	RK_TRACE (COMMANDEDITOR);

Modified: branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h	2007-10-14 18:06:12 UTC (rev 2060)
+++ branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h	2007-10-14 19:13:55 UTC (rev 2061)
@@ -100,7 +100,7 @@
 /** set the current text (clear all previous text, and sets new text) */
 	void setText (const QString &text);
 /** copy current selection. Wrapper for use by external classes */
-//KDE4: no longer needed?	void copy ();
+	void copy ();
 
 	QString getDescription ();
 


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