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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Nov 18 16:05:27 UTC 2007


Revision: 2232
          http://rkward.svn.sourceforge.net/rkward/?rev=2232&view=rev
Author:   tfry
Date:     2007-11-18 08:05:27 -0800 (Sun, 18 Nov 2007)

Log Message:
-----------
Finish removing Qt3 support code (now why do we still link against libQt3Support?)

Modified Paths:
--------------
    branches/KDE4_port/CMakeLists.txt
    branches/KDE4_port/rkward/core/rcontainerobject.cpp
    branches/KDE4_port/rkward/core/rkvariable.cpp
    branches/KDE4_port/rkward/core/robject.cpp
    branches/KDE4_port/rkward/core/robjectlist.cpp
    branches/KDE4_port/rkward/dataeditor/celleditor.cpp
    branches/KDE4_port/rkward/dataeditor/editformatdialog.cpp
    branches/KDE4_port/rkward/dataeditor/twintable.cpp
    branches/KDE4_port/rkward/main.cpp
    branches/KDE4_port/rkward/misc/getfilenamewidget.cpp
    branches/KDE4_port/rkward/misc/multistringselector.cpp
    branches/KDE4_port/rkward/misc/rkcanceldialog.cpp
    branches/KDE4_port/rkward/misc/rkcanceldialog.h
    branches/KDE4_port/rkward/misc/rkcommonfunctions.cpp
    branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp
    branches/KDE4_port/rkward/misc/rksaveobjectchooser.cpp
    branches/KDE4_port/rkward/misc/rkspinbox.cpp
    branches/KDE4_port/rkward/misc/xmlhelper.cpp
    branches/KDE4_port/rkward/plugin/rkabstractoptionselector.cpp
    branches/KDE4_port/rkward/plugin/rkdropdown.cpp
    branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp
    branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp
    branches/KDE4_port/rkward/rbackend/rcommandreceiver.cpp
    branches/KDE4_port/rkward/rbackend/rinterface.cpp
    branches/KDE4_port/rkward/rbackend/rthread.cpp
    branches/KDE4_port/rkward/rbackend/rthread.h
    branches/KDE4_port/rkward/rkconsole.cpp
    branches/KDE4_port/rkward/rkward.cpp
    branches/KDE4_port/rkward/rkwardapplication.cpp
    branches/KDE4_port/rkward/rkwardapplication.h
    branches/KDE4_port/rkward/robjectbrowser.cpp
    branches/KDE4_port/rkward/robjectviewer.cpp
    branches/KDE4_port/rkward/scriptbackends/phpbackend.cpp
    branches/KDE4_port/rkward/scriptbackends/simplebackend.cpp
    branches/KDE4_port/rkward/settings/rksettingsmodulecommandeditor.cpp
    branches/KDE4_port/rkward/settings/rksettingsmoduledebug.cpp
    branches/KDE4_port/rkward/settings/rksettingsmodulegeneral.cpp
    branches/KDE4_port/rkward/settings/rksettingsmodulephp.cpp
    branches/KDE4_port/rkward/settings/rksettingsmoduleplugins.cpp
    branches/KDE4_port/rkward/settings/rksettingsmoduler.cpp
    branches/KDE4_port/rkward/settings/rksettingsmodulewatch.cpp
    branches/KDE4_port/rkward/windows/rkmdiwindow.cpp

Modified: branches/KDE4_port/CMakeLists.txt
===================================================================
--- branches/KDE4_port/CMakeLists.txt	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/CMakeLists.txt	2007-11-18 16:05:27 UTC (rev 2232)
@@ -5,7 +5,7 @@
 
 SET(CMAKE_VERBOSE_MAKEFILE OFF)
 
-ADD_DEFINITIONS(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT)
+ADD_DEFINITIONS(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
 
 LINK_DIRECTORIES(${KDE4_LIB_DIR})
 

Modified: branches/KDE4_port/rkward/core/rcontainerobject.cpp
===================================================================
--- branches/KDE4_port/rkward/core/rcontainerobject.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/core/rcontainerobject.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -313,7 +313,6 @@
 	if ((position < 0) || (position > childmap.size ())) position = childmap.size ();
 
 	RKGlobals::tracker ()->addObject (ret, this, position);
-#warning TODO should we create the object in R, here?
 
 	return ret;
 }

Modified: branches/KDE4_port/rkward/core/rkvariable.cpp
===================================================================
--- branches/KDE4_port/rkward/core/rkvariable.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/core/rkvariable.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -420,7 +420,7 @@
 		RK_ASSERT (data->cell_doubles == 0);
 		QString *new_data = new QString[target];
 		if (data->allocated_length) {		// if not yet allocated, don't mem-move
-			qmemmove (new_data, data->cell_strings, data->allocated_length * sizeof (QString));
+			memmove (new_data, data->cell_strings, data->allocated_length * sizeof (QString));
 		}
 		delete [] (data->cell_strings);
 		data->cell_strings = new_data;
@@ -428,14 +428,14 @@
 		RK_ASSERT (data->cell_strings == 0);
 		double *new_data = new double[target];
 		if (data->allocated_length) {		// if not yet allocated, don't mem-move
-			qmemmove (new_data, data->cell_doubles, data->allocated_length * sizeof (double));
+			memmove (new_data, data->cell_doubles, data->allocated_length * sizeof (double));
 		}
 		delete [] (data->cell_doubles);
 		data->cell_doubles = new_data;
 	}
 	int *new_states = new int[target];
 	if (data->allocated_length) {		// if not yet allocated, don't mem-move
-		qmemmove (new_states, data->cell_states, data->allocated_length * sizeof (int));
+		memmove (new_states, data->cell_states, data->allocated_length * sizeof (int));
 	}
 	delete [] (data->cell_states);
 	data->cell_states = new_states;
@@ -729,11 +729,11 @@
 
 	if (to_row < (data->allocated_length - 1)) {	// not the last rows
 		if (data->cell_strings) {
-			qmemmove (&(data->cell_strings[from_row]), &(data->cell_strings[to_row+1]), (data->allocated_length - to_row - 1) * sizeof (QString));
+			memmove (&(data->cell_strings[from_row]), &(data->cell_strings[to_row+1]), (data->allocated_length - to_row - 1) * sizeof (QString));
 		} else {
-			qmemmove (&(data->cell_doubles[from_row]), &(data->cell_doubles[to_row+1]), (data->allocated_length - to_row - 1) * sizeof (double));
+			memmove (&(data->cell_doubles[from_row]), &(data->cell_doubles[to_row+1]), (data->allocated_length - to_row - 1) * sizeof (double));
 		}
-		qmemmove (&(data->cell_states[from_row]), &(data->cell_states[to_row+1]), (data->allocated_length - to_row - 1) * sizeof (int));
+		memmove (&(data->cell_states[from_row]), &(data->cell_states[to_row+1]), (data->allocated_length - to_row - 1) * sizeof (int));
 	}
 
 	for (int row = (data->allocated_length - offset); row < data->allocated_length; ++row) {
@@ -777,9 +777,9 @@
 		if (data->cell_doubles) data->cell_doubles[row+count] = 0.0;
 		data->cell_states[row+count] = RKVarEditData::NA;
 	} else {
-		if (data->cell_strings) qmemmove (&(data->cell_strings[row+count]), &(data->cell_strings[row]), (data->allocated_length - (row + count) - 1) * sizeof (QString));
-		if (data->cell_doubles) qmemmove (&(data->cell_doubles[row+count]), &(data->cell_doubles[row]), (data->allocated_length - (row + count) - 1) * sizeof (double));
-		qmemmove (&(data->cell_states[row+count]), &(data->cell_states[row]), (data->allocated_length - (row + count) - 1) * sizeof (int));
+		if (data->cell_strings) memmove (&(data->cell_strings[row+count]), &(data->cell_strings[row]), (data->allocated_length - (row + count) - 1) * sizeof (QString));
+		if (data->cell_doubles) memmove (&(data->cell_doubles[row+count]), &(data->cell_doubles[row]), (data->allocated_length - (row + count) - 1) * sizeof (double));
+		memmove (&(data->cell_states[row+count]), &(data->cell_states[row]), (data->allocated_length - (row + count) - 1) * sizeof (int));
 	}
 	
 	for (int i=row+count-1; i >= row; --i) {
@@ -886,7 +886,7 @@
 	RK_ASSERT (data);
 
 	ValueLabels new_labels;	
-	QStringList list = QStringList::split ("#,#", string);
+	QStringList list = string.split ("#,#");
 
 	int i = 1;
 	for (QStringList::const_iterator it = list.constBegin (); it != list.constEnd (); ++it) {
@@ -965,7 +965,7 @@
 	formatting_options.precision = 0;
 	bool empty = true;
 
-	QStringList list = QStringList::split ("#", string);
+	QStringList list = string.split ("#");
 	QString option, parameter;
 	for (QStringList::const_iterator it = list.constBegin (); it != list.constEnd (); ++it) {
 		option = (*it).section (':', 0, 0);

Modified: branches/KDE4_port/rkward/core/robject.cpp
===================================================================
--- branches/KDE4_port/rkward/core/robject.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/core/robject.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -84,7 +84,7 @@
 	if (meta_map) {
 		RObject::MetaMap::iterator it;
 		if ((it = meta_map->find (id)) != meta_map->end ()) {
-			return (it.data ());
+			return (it.value ());
 		}
 	}
 	return QString ();
@@ -95,7 +95,7 @@
 	if (meta_map) {
 		RObject::MetaMap::iterator it;
 		if ((it = meta_map->find ("label")) != meta_map->end ()) {
-			return (getShortName () + " (" + it.data () + ')');
+			return (getShortName () + " (" + it.value () + ')');
 		}
 	}
 	return getShortName ();;
@@ -171,7 +171,7 @@
 	if (meta_map) {
 		RObject::MetaMap::iterator it;
 		if ((it = meta_map->find (id)) != meta_map->end ()) {
-			if (it.data () == value) return;
+			if (it.value () == value) return;
 		}
 	} else {
 		meta_map = new MetaMap;
@@ -232,7 +232,7 @@
 		if (it != meta_map->constBegin ()) {
 			command_string.append (", ");
 		}
-		command_string.append (rQuote (it.key ()) + '=' + rQuote (it.data ()));
+		command_string.append (rQuote (it.key ()) + '=' + rQuote (it.value ()));
 	}
 	command_string.append ("))");
 	

Modified: branches/KDE4_port/rkward/core/robjectlist.cpp
===================================================================
--- branches/KDE4_port/rkward/core/robjectlist.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/core/robjectlist.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -42,7 +42,7 @@
 	object_list = this;
 
 	update_timer = new QTimer (this);
-	
+	update_timer->setSingleShot (true);
 	connect (update_timer, SIGNAL (timeout ()), this, SLOT (timeout ()));
 	
 	//update_timer->start (AUTO_UPDATE_INTERVAL, true);
@@ -61,7 +61,7 @@
 	RK_TRACE (OBJECTS);
 	if (update_chain) {
 		// gee, looks like another update is still on the way. lets schedule one for later:
-		update_timer->start (UPDATE_DELAY_INTERVAL, true);
+		update_timer->start (UPDATE_DELAY_INTERVAL);
 		RK_DO (qDebug ("another object-list update is already running. Rescheduling a further update for later"), OBJECTS, DL_DEBUG);
 		return;
 	}

Modified: branches/KDE4_port/rkward/dataeditor/celleditor.cpp
===================================================================
--- branches/KDE4_port/rkward/dataeditor/celleditor.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/dataeditor/celleditor.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -48,7 +48,7 @@
 	value_list->installEventFilter (this);	// somehow setting us as a focus proxy is not enough to continue to receive the key-presses
 
 	for (RObject::ValueLabels::const_iterator it = labels.constBegin (); it != labels.constEnd (); ++it) {
-		value_list->addAction (it.key () + ": " + it.data ())->setData (it.key ());
+		value_list->addAction (it.key () + ": " + it.value ())->setData (it.key ());
 	}
 	connect (value_list, SIGNAL (triggered(QAction*)), SLOT (selectedFromList(QAction*)));
 
@@ -78,7 +78,7 @@
 }
 
 void CellEditor::keyPressEvent (QKeyEvent *e) {
-	if (!e->state ()) {
+	if (e->modifiers () == Qt::NoModifier) {
 		if ((e->key () == Qt::Key_Left) || (e->key () == Qt::Key_Backspace)) {
 			if (cursorPosition () < 1) {
 				emit (done (this, RKItemDelegate::EditorExitLeft));

Modified: branches/KDE4_port/rkward/dataeditor/editformatdialog.cpp
===================================================================
--- branches/KDE4_port/rkward/dataeditor/editformatdialog.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/dataeditor/editformatdialog.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -59,7 +59,8 @@
 	group_layout->addWidget (button);
 	precision_group->addButton (button = new QRadioButton (i18n ("Fixed precision:"), precision_box), (int) RKVariable::FormattingOptions::PrecisionFixed);
 	group_layout->addWidget (button);
-	precision_field = new QSpinBox (0, 10, 1, precision_box);
+	precision_field = new QSpinBox (precision_box);
+	precision_field->setRange (0, 10);
 	connect (precision_field, SIGNAL (valueChanged (int)), this, SLOT (precisionFieldChanged (int)));
 	group_layout->addWidget (precision_field);
 	precision_group->button ((int) RKVariable::FormattingOptions::PrecisionDefault)->setChecked (true);

Modified: branches/KDE4_port/rkward/dataeditor/twintable.cpp
===================================================================
--- branches/KDE4_port/rkward/dataeditor/twintable.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/dataeditor/twintable.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -43,11 +43,12 @@
 	splitter->setOrientation(Qt::Vertical);
 
 	metaview = new TwinTableMember (splitter);
-	splitter->setResizeMode (metaview, QSplitter::KeepSize);
+	splitter->setStretchFactor (splitter->indexOf (metaview), 0);
 	metaview->verticalHeader ()->setResizeMode (QHeaderView::Fixed);
 	metaview->setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
 	
 	dataview = new TwinTableMember (splitter);
+	splitter->setStretchFactor (splitter->indexOf (dataview), 1);
 	dataview->verticalHeader ()->setResizeMode (QHeaderView::Fixed);
 	dataview->horizontalHeader ()->hide ();
 

Modified: branches/KDE4_port/rkward/main.cpp
===================================================================
--- branches/KDE4_port/rkward/main.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/main.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -97,7 +97,7 @@
 	// This is so it prints "Usage rkward..." instead of "Usage rkward.bin...", etc.
 	// it seems safest to keep a copy, since the shell still owns argv[0]
 	char *argv_zero_copy = argv[0];
-	argv[0] = qstrdup (QString (argv_zero_copy).remove (".bin").local8Bit ());
+	argv[0] = qstrdup (QString (argv_zero_copy).remove (".bin").toLocal8Bit ());
 	KCmdLineArgs::init( argc, argv, &aboutData );
 	KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
 
@@ -111,7 +111,7 @@
 	RKWardStartupOptions *stoptions = new RKWardStartupOptions;
 	KUrl *open_url = 0;
 	if (args->count ()) {
-		open_url = new KUrl (args->makeURL (args->arg (0).latin1()));
+		open_url = new KUrl (args->makeURL (args->arg (0).toLatin1()));
 	}
 	stoptions->initial_url = open_url;
 	stoptions->no_stack_check = args->isSet ("disable-stack-check");

Modified: branches/KDE4_port/rkward/misc/getfilenamewidget.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/getfilenamewidget.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/getfilenamewidget.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -29,7 +29,7 @@
 	RK_TRACE (MISC);
 	QVBoxLayout *vbox = new QVBoxLayout (this);
 	vbox->setContentsMargins (0, 0, 0, 0);
-	vbox->setResizeMode (QLayout::Minimum);
+	vbox->setSizeConstraint (QLayout::SetMinimumSize);
 
 	vbox->addWidget (new QLabel (label, this));
 
@@ -48,8 +48,8 @@
 		RK_ASSERT (false);
 	}
 
-	if (caption.isEmpty ()) edit->setCaption (label);
-	else edit->setCaption (caption);
+	if (caption.isEmpty ()) edit->setWindowTitle (label);
+	else edit->setWindowTitle (caption);
 }
 
 GetFileNameWidget::~GetFileNameWidget () {
@@ -81,7 +81,9 @@
 void GetFileNameWidget::setBackgroundColor (const QColor & color) {
 	RK_TRACE (MISC);
 
-	edit->lineEdit ()->setBackgroundColor (color);
+	QPalette palette = edit->lineEdit ()->palette ();
+	palette.setColor (edit->lineEdit ()->backgroundRole (), color);
+	edit->lineEdit ()->setPalette (palette);
 }
 
 #include "getfilenamewidget.moc"

Modified: branches/KDE4_port/rkward/misc/multistringselector.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/multistringselector.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/multistringselector.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -19,7 +19,6 @@
 
 #include <QTreeWidget>
 #include <qpushbutton.h>
-#include <qlayout.h>
 #include <qlabel.h>
 #include <QHBoxLayout>
 #include <QVBoxLayout>
@@ -35,9 +34,11 @@
 	QHBoxLayout *hbox = new QHBoxLayout (this);
 	hbox->setContentsMargins (0, 0, 0, 0);
 
-	QVBoxLayout *main_box = new QVBoxLayout (hbox);
+	QVBoxLayout *main_box = new QVBoxLayout ();
+	hbox->addLayout (main_box);
 	main_box->setContentsMargins (0, 0, 0, 0);
-	QVBoxLayout *button_box = new QVBoxLayout (hbox);
+	QVBoxLayout *button_box = new QVBoxLayout ();
+	hbox->addLayout (button_box);
 	button_box->setContentsMargins (0, 0, 0, 0);
 
 	QLabel *label_widget = new QLabel (label, this);

Modified: branches/KDE4_port/rkward/misc/rkcanceldialog.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkcanceldialog.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/rkcanceldialog.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -16,6 +16,8 @@
  ***************************************************************************/
 #include "rkcanceldialog.h"
 
+#if 0
+
 #include <qlayout.h>
 #include <qlabel.h>
 #include <qpushbutton.h>
@@ -83,3 +85,4 @@
 }
 
 #include "rkcanceldialog.moc"
+#endif

Modified: branches/KDE4_port/rkward/misc/rkcanceldialog.h
===================================================================
--- branches/KDE4_port/rkward/misc/rkcanceldialog.h	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/rkcanceldialog.h	2007-11-18 16:05:27 UTC (rev 2232)
@@ -17,6 +17,9 @@
 #ifndef RKCANCELDIALOG_H
 #define RKCANCELDIALOG_H
 
+#warning TODO: remove
+#if 0
+
 #include <qdialog.h>
 
 class QCloseEvent;
@@ -47,3 +50,4 @@
 };
 
 #endif
+#endif

Modified: branches/KDE4_port/rkward/misc/rkcommonfunctions.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkcommonfunctions.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/rkcommonfunctions.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -127,8 +127,8 @@
 		}
 
 		// find out the next non-word stuff left and right of the current cursor position
-		*start = context_line.findRev (rx_no_word, cursor_pos-1) + 1;
-		*end = context_line.find (rx_no_word, cursor_pos);
+		*start = context_line.lastIndexOf (rx_no_word, cursor_pos-1) + 1;
+		*end = context_line.indexOf (rx_no_word, cursor_pos);
 		if (*end < 0) *end = context_line.length ();
 	}
 

Modified: branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/rkprogresscontrol.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -193,9 +193,10 @@
 #include <kvbox.h>
 #include <kstandardguiitem.h>
 
-RKProgressControlDialog::RKProgressControlDialog (const QString &text, const QString &caption, int mode_flags, bool modal) : KDialog (0, Qt::WDestructiveClose) {
+RKProgressControlDialog::RKProgressControlDialog (const QString &text, const QString &caption, int mode_flags, bool modal) : KDialog (0) {
 	RK_TRACE (MISC);
 
+	setAttribute (Qt::WA_DeleteOnClose, true);
 	setModal (modal);
 	setCaption (caption);
 
@@ -206,7 +207,9 @@
 	label->setWordWrap (true);
 
 	error_indicator = new QLabel (i18n ("<b>There have been errors and / or warnings! See below for a transcript</b>"), vbox);
-	error_indicator->setPaletteForegroundColor (QColor (255, 0, 0));
+	QPalette palette = error_indicator->palette ();
+	palette.setColor (error_indicator->foregroundRole (), QColor (255, 0, 0));
+	error_indicator->setPalette (palette);
 	error_indicator->hide ();
 
 	KVBox* output_box = new KVBox ();
@@ -258,9 +261,9 @@
 		output_text->insertPlainText ("\n");
 
 		if (output->type == ROutput::Output) {
-			output_text->setColor (Qt::black);
+			output_text->setTextColor (Qt::black);
 		} else {
-			output_text->setColor (Qt::red);
+			output_text->setTextColor (Qt::red);
 			setDetailsWidgetVisible (true);
 			error_indicator->show ();
 		}

Modified: branches/KDE4_port/rkward/misc/rksaveobjectchooser.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rksaveobjectchooser.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/rksaveobjectchooser.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -106,7 +106,9 @@
 void RKSaveObjectChooser::setBackgroundColor (const QColor &color) {
 	RK_TRACE (MISC);
 
-	name_edit->setBackgroundColor (color);
+	QPalette palette = name_edit->palette ();
+	palette.setColor (name_edit->backgroundRole (), color);
+	name_edit->setPalette (palette);
 }
 
 #include "rksaveobjectchooser.moc"

Modified: branches/KDE4_port/rkward/misc/rkspinbox.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkspinbox.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/rkspinbox.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -157,8 +157,7 @@
 		1) set the value to 0
 		2) whenever the value has changed, change the real value by that many steps (updateDisplay ())
 		3) goto 1 */
-	setMinValue (-1000);
-	setMaxValue (1000);
+	setRange (-1000, 1000);
 	setSingleStep (1);
 
 	real_value = initial;
@@ -178,8 +177,7 @@
 
 	/* see setRealMode for comments */
 
-	setMinValue (-1000);
-	setMaxValue (1000);
+	setRange (-1000, 1000);
 	setSingleStep (1);
 
 	int_min = min;

Modified: branches/KDE4_port/rkward/misc/xmlhelper.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/xmlhelper.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/misc/xmlhelper.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -74,7 +74,7 @@
 			QDomElement el = *it;
 
 			QString inc_filename = getStringAttribute (el, "file", QString::null, DL_ERROR);
-			QDir base = QFileInfo (filename).dir (true);
+			QDir base = QFileInfo (filename).absoluteDir ();
 			inc_filename = base.filePath (inc_filename);
 
 			// import
@@ -249,12 +249,12 @@
 int XMLHelper::getMultiChoiceAttribute (const QDomElement &element, const QString &name, const QString &values, int def, int debug_level) {
 	RK_TRACE (XML);
 
-	QStringList value_list = QStringList::split (';', values);
+	QStringList value_list = values.split (';');
 
 	QString plain_value = getStringAttribute (element, name, value_list[def], debug_level);
 	
 	int index;
-	if ((index = value_list.findIndex (plain_value)) >= 0) {
+	if ((index = value_list.indexOf (plain_value)) >= 0) {
 		return (index);
 	} else {
 		displayError (&element, i18n ("Illegal attribute value. Allowed values are one of '%1', only.", values), debug_level, DL_ERROR);

Modified: branches/KDE4_port/rkward/plugin/rkabstractoptionselector.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkabstractoptionselector.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/plugin/rkabstractoptionselector.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -36,7 +36,7 @@
 	RK_TRACE (PLUGIN);
 
 	for (OptionsMap::const_iterator it = options.begin(); it != options.end(); ++it) {
-		delete (it.data ());
+		delete (it.value ());
 	}
 }
 
@@ -135,9 +135,9 @@
 	Option *opt = 0;
 	int id = -1;
 	for (OptionsMap::const_iterator it = options.begin(); it != options.end(); ++it) {
-		RK_ASSERT (it.data ());
-		if (it.data ()->enabledness_prop == property) {
-			opt = it.data ();
+		RK_ASSERT (it.value ());
+		if (it.value ()->enabledness_prop == property) {
+			opt = it.value ();
 			id = it.key ();
 			break;
 		}
@@ -155,9 +155,9 @@
 		if (id == number->intValue ()) {	// current item was disabled
 			int settable_opt = -1;
 			for (OptionsMap::const_iterator it = options.begin(); it != options.end(); ++it) {
-				RK_ASSERT (it.data ());
+				RK_ASSERT (it.value ());
 
-				if ((!(it.data ()->enabledness_prop)) || (it.data ()->enabledness_prop->boolValue ())) {
+				if ((!(it.value ()->enabledness_prop)) || (it.value ()->enabledness_prop->boolValue ())) {
 					settable_opt = it.key();
 					break;
 				}
@@ -184,8 +184,8 @@
 	RK_TRACE (PLUGIN);
 
 	for (OptionsMap::const_iterator it = options.begin(); it != options.end(); ++it) {
-		RK_ASSERT (it.data ());
-		if (it.data ()->value == option_string) return (it.key ());
+		RK_ASSERT (it.value ());
+		if (it.value ()->value == option_string) return (it.key ());
 	}
 	return -1;
 }

Modified: branches/KDE4_port/rkward/plugin/rkdropdown.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkdropdown.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/plugin/rkdropdown.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -43,7 +43,8 @@
 	vbox->addWidget (label);
 
 	// create ComboBox
-	box = new QComboBox (false, this);
+	box = new QComboBox (this);
+	box->setEditable (false);
 	listwidget = new QListWidget (box);
 	box->setModel (listwidget->model ());
 	box->setView (listwidget);

Modified: branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -67,6 +67,7 @@
 
 	// initialize
 	update_timer = new QTimer (this);
+	update_timer->setSingleShot (true);
 	connect (update_timer, SIGNAL (timeout ()), this, SLOT (tryPreviewNow ()));
 	updating = false;
 	changedState (0);
@@ -105,7 +106,7 @@
 void RKPreviewBox::tryPreview () {
 	RK_TRACE (PLUGIN);
 
-	if (isEnabled () && toggle_preview_box->isChecked ()) update_timer->start (10, true);
+	if (isEnabled () && toggle_preview_box->isChecked ()) update_timer->start (10);
 	else killPreview ();
 
 	updateStatusLabel ();

Modified: branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -55,6 +55,7 @@
 
 	// code update timer
 	code_update_timer = new QTimer (this);
+	code_update_timer->setSingleShot (true);
 	connect (code_update_timer, SIGNAL (timeout ()), this, SLOT (updateCodeNow ()));
 
 	if (!enslaved) {
@@ -87,7 +88,8 @@
 	hbox->addWidget (line);
 
 	// buttons
-	QVBoxLayout* vbox = new QVBoxLayout (hbox);
+	QVBoxLayout* vbox = new QVBoxLayout ();
+	hbox->addLayout (vbox);
 	vbox->setContentsMargins (0, 0, 0, 0);
 	vbox->setSpacing (RKGlobals::spacingHint ());
 	ok_button = new QPushButton (i18n ("Submit"), upper_widget);
@@ -113,7 +115,7 @@
 	vbox->addStretch (2);
 	
 	toggle_code_button = new QPushButton (i18n ("Code"), upper_widget);
-	toggle_code_button->setToggleButton (true);
+	toggle_code_button->setCheckable (true);
 	connect (toggle_code_button, SIGNAL (clicked ()), this, SLOT (toggleCode ()));
 	vbox->addWidget (toggle_code_button);
 	if (enslaved) toggle_code_button->hide ();
@@ -127,7 +129,7 @@
 	main_vbox->addWidget (code_display);
 
 	if (!enslaved && RKSettingsModulePlugins::showCodeByDefault ()) {
-		toggle_code_button->setOn (true);	// will trigger showing the code along with the dialog
+		toggle_code_button->setChecked (true);	// will trigger showing the code along with the dialog
 	}
 }
 
@@ -170,7 +172,7 @@
 
 	int new_height = height ();
 
-	if (toggle_code_button->isOn()) {
+	if (toggle_code_button->isChecked ()) {
 		new_height += RKSettingsModulePlugins::defaultCodeHeight ();
 		code_display->show ();
 	} else {
@@ -197,7 +199,7 @@
 
 	QString id = RKComponentMap::getComponentId (component->getHandle ());
 
-	QString path = QStringList::split ("::", id).join ("/");
+	QString path = id.split ("::").join ("/");
 	RKWorkplace::mainWorkplace ()->openHelpWindow (KUrl ("rkward://component/" + path));
 }
 
@@ -223,8 +225,8 @@
 void RKStandardComponentGUI::updateCode () {
 	RK_TRACE (PLUGIN);
 
-	if (!code_display->isShown ()) return;
-	code_update_timer->start (0, true);
+	if (code_display->isHidden ()) return;
+	code_update_timer->start (0);
 }
 
 void RKStandardComponentGUI::updateCodeNow () {
@@ -266,14 +268,14 @@
 	// create main layout and stack
 	QGridLayout *main_grid = new QGridLayout (this);
 	main_widget = stack = new RKStandardComponentStack (this);
-	main_grid->addMultiCellWidget (stack, 0, 0, 0, 3);
+	main_grid->addWidget (stack, 0, 0, 1, 4);
 
 	// build standard elements
 	// lines
 	QFrame *line = new QFrame (main_widget);
 	line->setFrameShape (QFrame::HLine);
 	line->setFrameShadow (QFrame::Plain);
-	main_grid->addMultiCellWidget (line, 1, 1, 0, 3);
+	main_grid->addWidget (line, 1, 0, 1, 4);
 
 	// buttons
 	cancel_button = new QPushButton (i18n ("Cancel"), this);
@@ -374,7 +376,7 @@
 		next_button->setEnabled (stack->currentPageSatisfied ());
 	} else {			// on last page
 		// do code update when on last page
-		if (!stack->havePage (true)) code_update_timer->start (0, true);
+		if (!stack->havePage (true)) code_update_timer->start (0);
 		next_button->setText (i18n ("Submit"));
 		next_button->setEnabled (submit_enabled);
 	}

Modified: branches/KDE4_port/rkward/rbackend/rcommandreceiver.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rcommandreceiver.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/rbackend/rcommandreceiver.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -58,7 +58,7 @@
 
 void RCommandReceiver::delCommand (RCommand *command) {
 	RK_TRACE (RBACKEND);
-	outstanding_commands.remove (command);
+	outstanding_commands.removeAll (command);
 
 	if (delete_when_done && outstanding_commands.isEmpty ()) delete this;
 }

Modified: branches/KDE4_port/rkward/rbackend/rinterface.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rinterface.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/rbackend/rinterface.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -57,7 +57,7 @@
 #define FLUSH_INTERVAL 100
 
 //static
-QMutex RInterface::mutex (true);
+QMutex RInterface::mutex (QMutex::Recursive);
 #ifdef DEBUG_MUTEX
 	int RInterface::mutex_counter;
 #endif // DEBUG_MUTEX
@@ -96,12 +96,12 @@
 RInterface::~RInterface(){
 	RK_TRACE (RBACKEND);
 
-	if (r_thread->running ()) {
+	if (r_thread->isRunning ()) {
 		RK_DO (qDebug ("Waiting for R thread to finish up..."), RBACKEND, DL_INFO);
 		r_thread->interruptProcessing (true);
 		r_thread->kill ();
 		r_thread->wait (1000);
-		if (r_thread->running ()) {
+		if (r_thread->isRunning ()) {
 			RK_DO (qDebug ("Backend thread is still running. It will be killed, now."), RBACKEND, DL_WARNING);
 			r_thread->terminate ();
 			RK_ASSERT (false);
@@ -115,7 +115,7 @@
 bool RInterface::backendIsDead () {
 	RK_TRACE (RBACKEND);
 
-	return (!r_thread->running ());
+	return (!r_thread->isRunning ());
 }
 
 bool RInterface::backendIsIdle () {
@@ -143,8 +143,17 @@
 
 void RInterface::customEvent (QEvent *e) {
 	RK_TRACE (RBACKEND);
-	if (e->type () == RCOMMAND_OUTPUT_EVENT) {
-		RThread::ROutputContainer *container = (static_cast <RThread::ROutputContainer *> (static_cast<QCustomEvent*> (e)->data ()));
+
+	RKRBackendEvent *ev;
+	if (((int) e->type ()) >= ((int) RKRBackendEvent::Base)) {
+		ev = static_cast<RKRBackendEvent*> (e);
+	} else {
+		RK_ASSERT (false);
+		return;
+	}
+
+	if (ev->etype () == RKRBackendEvent::RCommandOutput) {
+		RThread::ROutputContainer *container = (static_cast <RThread::ROutputContainer *> (ev->data ()));
 		container->command->newOutput (container->output);
 		delete container;
 
@@ -155,10 +164,10 @@
 			qApp->processEvents ();
 			r_thread->pauseOutput (false);
 		}
-	} else if (e->type () == RCOMMAND_IN_EVENT) {
-		RKCommandLog::getLog ()->addInput (static_cast <RCommand *> (static_cast<QCustomEvent*> (e)->data ()));
-	} else if (e->type () == RCOMMAND_OUT_EVENT) {
-		RCommand *command = static_cast <RCommand *> (static_cast<QCustomEvent*> (e)->data ());
+	} else if (ev->etype () == RKRBackendEvent::RCommandIn) {
+		RKCommandLog::getLog ()->addInput (static_cast <RCommand *> (ev->data ()));
+	} else if (ev->etype () == RKRBackendEvent::RCommandOut) {
+		RCommand *command = static_cast <RCommand *> (ev->data ());
 		if (command->status & RCommand::Canceled) {
 			command->status |= RCommand::HasError;
 			ROutput *out = new ROutput;
@@ -180,21 +189,23 @@
 			RKWorkplace::mainWorkplace ()->newOutput (true);
 		}
 		delete command;
-	} else if ((e->type () == RIDLE_EVENT)) {
+	} else if ((ev->etype () == RKRBackendEvent::RIdle)) {
 		RKWardMainWindow::getMain ()->setRStatus (RKWardMainWindow::Idle);	
-	} else if ((e->type () == RBUSY_EVENT)) {
+	} else if ((ev->etype () == RKRBackendEvent::RBusy)) {
 		RKWardMainWindow::getMain ()->setRStatus (RKWardMainWindow::Busy);
-	} else if ((e->type () == R_EVAL_REQUEST_EVENT)) {
+	} else if ((ev->etype () == RKRBackendEvent::REvalRequest)) {
 		r_thread->pauseOutput (false); // we may be recursing downwards into event loops here. Hence we need to make sure, we don't create a deadlock
-		processREvalRequest (static_cast<REvalRequest *> (static_cast<QCustomEvent*> (e)->data ()));
-	} else if ((e->type () == R_CALLBACK_REQUEST_EVENT)) {
+		processREvalRequest (static_cast<REvalRequest *> (ev->data ()));
+	} else if ((ev->etype () == RKRBackendEvent::RCallbackRequest)) {
 		r_thread->pauseOutput (false); // see above
-		processRCallbackRequest (static_cast<RCallbackArgs *> (static_cast<QCustomEvent*> (e)->data ()));
-	} else if ((e->type () == RSTARTED_EVENT)) {
+		processRCallbackRequest (static_cast<RCallbackArgs *> (ev->data ()));
+	} else if ((ev->etype () == RKRBackendEvent::RStarted)) {
 		r_thread->unlock (RThread::Startup);
 		RKWardMainWindow::discardStartupOptions ();
-	} else if ((e->type () > RSTARTUP_ERROR_EVENT)) {
-		int err = e->type () - RSTARTUP_ERROR_EVENT;
+	} else if ((ev->etype () == RKRBackendEvent::RStartupError)) {
+		int* err_p = static_cast<int*> (ev->data ());
+		int err = *err_p;
+		delete err_p;
 		QString message = i18n ("There was a problem starting the R backend. The following error(s) occurred:\n");
 		if (err & RThread::LibLoadFail) {
 			message.append (i18n ("\t- The 'rkward' R-library could not be loaded. This library is needed for communication between R and RKWard and many things will not work properly if this library is not present. Likely RKWard will even crash. The 'rkward' R-library should have been included in your distribution or RKWard, and should have been set up when you ran 'make install'. Please try 'make install' again and check for any errors. You should quit RKWard now.\n"));
@@ -207,6 +218,8 @@
 		}
 		KMessageBox::error (0, message, i18n ("Error starting R"));
 		r_thread->unlock (RThread::Startup);
+	} else {
+		RK_ASSERT (false);
 	}
 }
 
@@ -387,7 +400,7 @@
 		bool ok = RKReadLineDialog::readLine (0, i18n ("R backend requests information"), *(args->chars_a), runningCommand (), &result);
 
 		result = result.left (args->int_a - 2) + '\n';
-		qstrcpy (*(args->chars_b), result.local8Bit ());
+		qstrcpy (*(args->chars_b), result.toLocal8Bit ());
 
 		if (!ok) args->int_c = 0;	// will be cancelled deep inside REmbedInternal, where it's safest
 	} else if ((type == RCallbackArgs::RShowFiles) || (type == RCallbackArgs::REditFiles)) {

Modified: branches/KDE4_port/rkward/rbackend/rthread.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rthread.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/rbackend/rthread.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -32,8 +32,6 @@
 #include <qapplication.h>
 #include <QDBusConnection>
 #include <QList>
-//Added by qt3to4:
-#include <QCustomEvent>
 
 #include <signal.h>		// needed for pthread_kill
 
@@ -87,9 +85,11 @@
 	MUTEX_UNLOCK;
 
 	if ((err = initialize ())) {
-		qApp->postEvent (RKGlobals::rInterface (), new QCustomEvent (RSTARTUP_ERROR_EVENT + err));
+		int* err_c = new int;
+		*err_c = err;
+		qApp->postEvent (RKGlobals::rInterface (), new RKRBackendEvent (RKRBackendEvent::RStartupError, err_c));
 	}
-	qApp->postEvent (RKGlobals::rInterface (), new QCustomEvent (RSTARTED_EVENT));
+	qApp->postEvent (RKGlobals::rInterface (), new RKRBackendEvent (RKRBackendEvent::RStarted));
 
 	// wait until RKWard is set to go (esp, it has handled any errors during startup, etc.)
 	while (locked) {
@@ -108,7 +108,7 @@
 
 		if (previously_idle) {
 			if (!RCommandStack::regular_stack->isEmpty ()) {
-				qApp->postEvent (RKGlobals::rInterface (), new QCustomEvent (RBUSY_EVENT));
+				qApp->postEvent (RKGlobals::rInterface (), new RKRBackendEvent (RKRBackendEvent::RBusy));
 				previously_idle = false;
 			}
 		}
@@ -135,7 +135,7 @@
 
 		if (!previously_idle) {
 			if (RCommandStack::regular_stack->isEmpty ()) {
-				qApp->postEvent (RKGlobals::rInterface (), new QCustomEvent (RIDLE_EVENT));
+				qApp->postEvent (RKGlobals::rInterface (), new RKRBackendEvent (RKRBackendEvent::RIdle));
 				previously_idle = true;
 			}
 		}
@@ -154,8 +154,7 @@
 void RThread::doCommand (RCommand *command) {
 	RK_TRACE (RBACKEND);
 	// step 1: notify GUI-thread that a new command is being tried and initialize
-	QCustomEvent *event = new QCustomEvent (RCOMMAND_IN_EVENT);
-	event->setData (command);
+	RKRBackendEvent* event = new RKRBackendEvent (RKRBackendEvent::RCommandIn, command);
 	qApp->postEvent (RKGlobals::rInterface (), event);
 
 	// step 2: actual handling
@@ -265,8 +264,7 @@
 	current_command = 0;
 
 	// notify GUI-thread that command was finished
-	QCustomEvent* event = new QCustomEvent (RCOMMAND_OUT_EVENT);
-	event->setData (command);
+	RKRBackendEvent* event = new RKRBackendEvent (RKRBackendEvent::RCommandOut, command);
 	qApp->postEvent (RKGlobals::rInterface (), event);
 }
 
@@ -334,11 +332,10 @@
 			}
 
 			// pass a signal to the main thread for real-time update of output
-			QCustomEvent *event = new QCustomEvent (RCOMMAND_OUTPUT_EVENT);
 			ROutputContainer *outc = new ROutputContainer;
 			outc->output = output;
 			outc->command = *it;
-			event->setData (outc);
+			RKRBackendEvent* event = new RKRBackendEvent (RKRBackendEvent::RCommandOutput, outc);
 			qApp->postEvent (RKGlobals::rInterface (), event);
 		}
 
@@ -406,8 +403,7 @@
 	request->in_chain = reply_stack->startChain (reply_stack);
 	MUTEX_UNLOCK;
 
-	QCustomEvent *event = new QCustomEvent (R_EVAL_REQUEST_EVENT);
-	event->setData (request);
+	RKRBackendEvent* event = new RKRBackendEvent (RKRBackendEvent::REvalRequest, request);
 	qApp->postEvent (RKGlobals::rInterface (), event);
 	
 	bool done = false;
@@ -445,6 +441,7 @@
 	}
 
 	MUTEX_LOCK;
+	delete request;
 	delete reply_stack;
 	MUTEX_UNLOCK;
 }
@@ -457,8 +454,7 @@
 	MUTEX_UNLOCK;
 	args->done = false;
 
-	QCustomEvent *event = new QCustomEvent (R_CALLBACK_REQUEST_EVENT);
-	event->setData (args);
+	RKRBackendEvent* event = new RKRBackendEvent (RKRBackendEvent::RCallbackRequest, args);
 	qApp->postEvent (RKGlobals::rInterface (), event);
 	
 	bool *done = &(args->done);
@@ -504,7 +500,7 @@
 	if ((error) || (c != 1)) {
 		status |= LibLoadFail;
 	} else {
-		if (!registerFunctions (paths[0].local8Bit ())) status |= LibLoadFail;
+		if (!registerFunctions (paths[0].toLocal8Bit ())) status |= LibLoadFail;
 	}
 	delete [] paths;
 
@@ -519,7 +515,7 @@
 // apply user configurable run time options
 	QStringList commands = RKSettingsModuleR::makeRRunTimeOptionCommands () + RKSettingsModuleRPackages::makeRRunTimeOptionCommands ();
 	for (QStringList::const_iterator it = commands.begin (); it != commands.end (); ++it) {
-		runCommandInternal ((*it).local8Bit (), &error);
+		runCommandInternal ((*it).toLocal8Bit (), &error);
 		if (error) {
 			status |= OtherFail;
 			RK_DO (qDebug ("error in initialization call '%s'", (*it).toLatin1().data ()), RBACKEND, DL_ERROR);

Modified: branches/KDE4_port/rkward/rbackend/rthread.h
===================================================================
--- branches/KDE4_port/rkward/rbackend/rthread.h	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/rbackend/rthread.h	2007-11-18 16:05:27 UTC (rev 2232)
@@ -34,37 +34,27 @@
 class RKRBackendEvent : public QEvent {
 public:
 	enum EventType {
-		BaseEvent = QEvent::User + 1,
-		RCommandInEvent,
-		RCommandOutEvent,
-		RBusyEvent,
-		RIdleEvent,
-		RCommandOutputEvent,
-		RStaredEvent,
-		REvalRequestEvent,
-		RCallbackRequestEvent,
-		RStartupErrorEvent
+		Base = QEvent::User + 1,
+		RCommandIn,
+		RCommandOut,
+		RBusy,
+		RIdle,
+		RCommandOutput,
+		RStarted,
+		REvalRequest,
+		RCallbackRequest,
+		RStartupError
 	};
 
-	RKRBackendEvent (EventType type, void* data) : QEvent (type) { _data = data; };
+	RKRBackendEvent (EventType type, void* data=0) : QEvent ((QEvent::Type) type) { _data = data; };
 	RKRBackendEvent ();
 
+	EventType etype () { return ((EventType) type ()); };
 	void* data () { return _data; };
 private:
 	void* _data;
 };
 
-#define RCOMMAND_IN_EVENT 10001
-#define RCOMMAND_OUT_EVENT 10002
-#define RBUSY_EVENT 10003
-#define RIDLE_EVENT 10004
-#define RCOMMAND_OUTPUT_EVENT 10005
-#define RSTARTED_EVENT 11001
-#define R_EVAL_REQUEST_EVENT 12001
-#define R_CALLBACK_REQUEST_EVENT 12002
-// don't use the numbers following RSTARTUP_ERROR_EVENT, because an error code will be added!
-#define RSTARTUP_ERROR_EVENT 13000
-
 /** This class represents the thread the R backend is running in. So to speak, this is where the "eventloop" of R is running. The main thing happening
 in this class, is that an infinite loop is running. Whenever there are commands to be executed, those get evaluated. Also, at regular intervals,
 processing of X11-Events in R is triggered. The rest of the time the thread sleeps.

Modified: branches/KDE4_port/rkward/rkconsole.cpp
===================================================================
--- branches/KDE4_port/rkward/rkconsole.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/rkconsole.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -381,8 +381,8 @@
 
 	// should we try a file name completion? Let's do some heuristics
 	bool do_file_completion = false;
-	int quote_start = current_line.findRev ('"', cursor_pos - 1);
-	if (quote_start < 0) quote_start = current_line.findRev ('\'', cursor_pos - 1);
+	int quote_start = current_line.lastIndexOf ('"', cursor_pos - 1);
+	if (quote_start < 0) quote_start = current_line.lastIndexOf ('\'', cursor_pos - 1);
 
 	if (quote_start >= 0) {
 		// we found a quoting char at some earlier position on the line, we might need a filename completion
@@ -399,8 +399,8 @@
 		if ((char_after_quote == ',') || (char_after_quote == ')') || (char_after_quote == ' ') || (char_after_quote == ';')) do_file_completion = false;
 
 		if (do_file_completion) {
-			int quote_end = current_line.find ('"', cursor_pos);
-			if (quote_end < 0) quote_end = current_line.find ('\'', cursor_pos);
+			int quote_end = current_line.indexOf ('"', cursor_pos);
+			if (quote_end < 0) quote_end = current_line.indexOf ('\'', cursor_pos);
 			if (quote_end < 0) quote_end = current_line.length ();
 	
 			QString current_name = current_line.mid (quote_start + 1, quote_end - quote_start - 1);
@@ -640,7 +640,7 @@
 	if (current_command) return;
 	// splitting batch, not allowing empty entries.
 	// TODO: hack something so we can have empty entries.
-	commands_batch = QStringList::split ("\n", batch, true);
+	commands_batch = batch.split ("\n", QString::SkipEmptyParts);
 	tryNextInBatch (false);
 }
 
@@ -648,7 +648,7 @@
 	RK_TRACE (APP);
 	if (add_new_line) {
 		if (RKSettingsModuleConsole::maxConsoleLines ()) {
-			int c = doc->lines();
+			uint c = doc->lines();
 			if (c > RKSettingsModuleConsole::maxConsoleLines ()) {
 				// KDE4 TODO: setUpdatesEnabled(false) still faster?
 				view->setUpdatesEnabled (false);
@@ -853,7 +853,7 @@
 		QString command_string = command->command ();
 		QString text = command_string;
 		if (RKSettingsModuleConsole::addPipedCommandsToHistory()) {
-			QStringList lines = QStringList::split ('\n', text);
+			QStringList lines = text.split ('\n');
 			for (QStringList::const_iterator it = lines.constBegin (); it != lines.constEnd (); ++it) {
 				addCommandToHistory (*it);
 			}

Modified: branches/KDE4_port/rkward/rkward.cpp
===================================================================
--- branches/KDE4_port/rkward/rkward.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/rkward.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -296,12 +296,12 @@
 	QDir dir (RKSettingsModuleGeneral::filesPath());
 	if (!dir.exists ()) {
 		QDir current (dir.currentPath ());
-		current.mkdir (dir.path (), true);
+		current.mkdir (dir.path ());
 	}
 	dir = dir.filePath (".packagetemp");
 	if (!dir.exists ()) {
 		QDir current (dir.currentPath ());
-		current.mkdir (dir.path (), true);
+		current.mkdir (dir.path ());
 	}
 	
 	RKGlobals::rinter = new RInterface ();

Modified: branches/KDE4_port/rkward/rkwardapplication.cpp
===================================================================
--- branches/KDE4_port/rkward/rkwardapplication.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/rkwardapplication.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -17,6 +17,8 @@
 
 #include "rkwardapplication.h"
 
+#include "windows/rkmdiwindow.h"
+
 #include <X11/X.h>
 #include <X11/Xlib.h>
 
@@ -77,7 +79,7 @@
 	return created_window;
 }
 
-void RKWardApplication::registerNameWatcher (WId watched, QWidget *watcher) {
+void RKWardApplication::registerNameWatcher (WId watched, RKMDIWindow *watcher) {
 	RK_TRACE (APP);
 	RK_ASSERT (!name_watchers_list.contains (watched));
 

Modified: branches/KDE4_port/rkward/rkwardapplication.h
===================================================================
--- branches/KDE4_port/rkward/rkwardapplication.h	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/rkwardapplication.h	2007-11-18 16:05:27 UTC (rev 2232)
@@ -22,6 +22,8 @@
 
 #include <qmap.h>
 
+class RKMDIWindow;
+
 /** The purpose of subclassing KApplication as RKWardApplication, is to obtain raw access to X11 events. This is needed to detect the creation of new toplevel windows (R X11 windows), and changed in the caption of those windows. */
 
 class RKWardApplication : public KApplication {
@@ -42,7 +44,7 @@
 	WId endWindowCreationDetection ();
 
 	/** watch the given window for changes in its WM_NAME property (i.e. changes in caption). When a change is detected, the caption will be set on watcher. WARNING: Do not use to watch windows managed by Qt! Will override the event mask for this window (within qt_xdisplay ()). WARNING: Remember to call unregisterNameWatcher, when watcher is deleted! */
-	void registerNameWatcher (WId watched, QWidget *watcher);
+	void registerNameWatcher (WId watched, RKMDIWindow *watcher);
 	/** remove a watch created with registerNameWatcher */
 	void unregisterNameWatcher (WId watched);
 private:
@@ -50,7 +52,7 @@
 	bool detect_x11_creations;
 	WId created_window;
 
-	QMap<WId, QWidget*> name_watchers_list;
+	QMap<WId, RKMDIWindow*> name_watchers_list;
 };
 
 #endif

Modified: branches/KDE4_port/rkward/robjectbrowser.cpp
===================================================================
--- branches/KDE4_port/rkward/robjectbrowser.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/robjectbrowser.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -64,6 +64,8 @@
 	RKDummyPart *part = new RKDummyPart (this, layout_widget);
 	setPart (part);
 	initializeActivationSignals ();
+
+	setCaption (i18n ("Objects in the R workspace"));
 }
 
 RObjectBrowser::~RObjectBrowser () {
@@ -74,7 +76,7 @@
 	RK_TRACE (APP);
 
 	locked = false;
-	if (isShown ()) {
+	if (!isHidden ()) {
 		initialize ();
 	}
 }
@@ -114,8 +116,6 @@
 
 	update_button = new QPushButton (i18n ("Update"), this);
 	vbox->addWidget (update_button);
-	
-	setCaption (i18n ("Objects in the R workspace"));
 
 	actions.insert (Help, new QAction (i18n ("Search Help"), this));
 	connect (actions[Help], SIGNAL(triggered(bool)), this, SLOT(popupHelp()));

Modified: branches/KDE4_port/rkward/robjectviewer.cpp
===================================================================
--- branches/KDE4_port/rkward/robjectviewer.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/robjectviewer.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -108,22 +108,22 @@
 void RObjectViewer::toggleSummary () {
 	RK_TRACE (APP);
 
-	summary_area->setShown (!summary_area->isShown ());
-	if (summary_area->isShown ()) {
+	summary_area->setShown (summary_area->isHidden ());
+	if (summary_area->isHidden ()) {
+		toggle_summary_button->setText (i18n ("Show"));
+	} else {
 		toggle_summary_button->setText (i18n ("Hide"));
-	} else {
-		toggle_summary_button->setText (i18n ("Show"));
 	}
 }
 
 void RObjectViewer::togglePrint () {
 	RK_TRACE (APP);
 
-	print_area->setShown (!print_area->isShown ());
-	if (print_area->isShown ()) {
+	print_area->setShown (print_area->isHidden ());
+	if (print_area->isHidden ()) {
+		toggle_print_button->setText (i18n ("Show"));
+	} else {
 		toggle_print_button->setText (i18n ("Hide"));
-	} else {
-		toggle_print_button->setText (i18n ("Show"));
 	}
 }
 

Modified: branches/KDE4_port/rkward/scriptbackends/phpbackend.cpp
===================================================================
--- branches/KDE4_port/rkward/scriptbackends/phpbackend.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/scriptbackends/phpbackend.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -146,8 +146,8 @@
 	bool have_request = false;
 
 	// is there a request in the output stream?
-	if ((i = output_raw_buffer.find (eot_string)) >= 0) {
-		if ((j = output_raw_buffer.find (eoq_string, i)) >= 0) {
+	if ((i = output_raw_buffer.indexOf (eot_string)) >= 0) {
+		if ((j = output_raw_buffer.indexOf (eoq_string, i)) >= 0) {
 			have_request = true;
 			// is there also pending data?
 			if (i) {

Modified: branches/KDE4_port/rkward/scriptbackends/simplebackend.cpp
===================================================================
--- branches/KDE4_port/rkward/scriptbackends/simplebackend.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/scriptbackends/simplebackend.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -97,7 +97,7 @@
 		else if (current_type == Printout) current_template = printout_template;
 		else if (current_type == Calculate) current_template = calculate_template;
 		else if (current_type == Preview) current_template = preview_template;
-		template_sep = current_template.find ("!!!");
+		template_sep = current_template.indexOf ("!!!");
 
 		if (template_sep < 0) {
 			commandFinished ("");
@@ -111,12 +111,12 @@
 void SimpleBackend::processCall () {
 	RK_TRACE (PHP);
 
-	int next_token = current_template.find ("$$$", template_pos);
+	int next_token = current_template.indexOf ("$$$", template_pos);
 	if (next_token < 0) next_token = template_sep;
 	if (next_token > template_sep) next_token = template_sep;
 
 	if (next_token < template_sep) {
-		int token_end = current_template.find ("$$$", next_token + 3);
+		int token_end = current_template.indexOf ("$$$", next_token + 3);
 		RK_ASSERT (token_end >= 0);
 		QString token = current_template.mid (next_token + 3, token_end - (next_token + 3));
 		template_pos = token_end + 3;
@@ -143,15 +143,15 @@
 	int pos = 3;
 	int max = conds.length ();
 	do {
-		int cond_end = conds.find ("!?!", pos);
+		int cond_end = conds.indexOf ("!?!", pos);
 		if (cond_end < 0) cond_end = max;
 		QString condition = conds.mid (pos, cond_end - pos);
 
-		int if_end = condition.find ("!:!");
+		int if_end = condition.indexOf ("!:!");
 		RK_ASSERT (if_end >= 0);
 		QString if_part = condition.left (if_end);
 
-		int if_mid = if_part.find ("!=!");
+		int if_mid = if_part.indexOf ("!=!");
 		RK_ASSERT (if_mid >= 0);
 		QString if_compare = if_part.left (if_mid);
 

Modified: branches/KDE4_port/rkward/settings/rksettingsmodulecommandeditor.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmodulecommandeditor.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/settings/rksettingsmodulecommandeditor.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -38,7 +38,7 @@
 RKSettingsModuleCommandEditor::RKSettingsModuleCommandEditor (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
 	RK_TRACE (SETTINGS);
 
-	QVBoxLayout* main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
+	QVBoxLayout* main_vbox = new QVBoxLayout (this);
 
 	QGroupBox* group = new QGroupBox (i18n ("Code Completion"), this);
 	QVBoxLayout* box_layout = new QVBoxLayout (group);

Modified: branches/KDE4_port/rkward/settings/rksettingsmoduledebug.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmoduledebug.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/settings/rksettingsmoduledebug.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -34,7 +34,7 @@
 RKSettingsModuleDebug::RKSettingsModuleDebug (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
 	RK_TRACE (SETTINGS);
 
-	QVBoxLayout* main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
+	QVBoxLayout* main_vbox = new QVBoxLayout (this);
 
 	QLabel* label = new QLabel (i18n ("<b>These settings are for debugging purposes, only.</b> It is safe to leave the untouched. Also, these settings will only apply to the current session, and not be saved."), this);
 	label->setWordWrap (true);

Modified: branches/KDE4_port/rkward/settings/rksettingsmodulegeneral.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmodulegeneral.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/settings/rksettingsmodulegeneral.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -61,12 +61,13 @@
 	main_vbox->addSpacing (2*RKGlobals::spacingHint ());
 
 	main_vbox->addWidget (new QLabel (i18n ("Startup Action (*)"), this));
-	startup_action_choser = new QComboBox (false, this);
-	startup_action_choser->insertItem (i18n ("Start with an empty workspace"), StartupDialog::EmptyWorkspace);
-	startup_action_choser->insertItem (i18n ("Start with an empty table"), StartupDialog::EmptyTable);
-	startup_action_choser->insertItem (i18n ("Ask for a file to open"), StartupDialog::ChoseFile);
-	startup_action_choser->insertItem (i18n ("Show selection dialog (default)"), StartupDialog::NoSavedSetting);
-	startup_action_choser->setCurrentItem (startup_action);
+	startup_action_choser = new QComboBox (this);
+	startup_action_choser->setEditable (false);
+	startup_action_choser->insertItem (StartupDialog::EmptyWorkspace, i18n ("Start with an empty workspace"));
+	startup_action_choser->insertItem (StartupDialog::EmptyTable, i18n ("Start with an empty table"));
+	startup_action_choser->insertItem (StartupDialog::ChoseFile, i18n ("Ask for a file to open"));
+	startup_action_choser->insertItem (StartupDialog::NoSavedSetting, i18n ("Show selection dialog (default)"));
+	startup_action_choser->setCurrentIndex (startup_action);
 	connect (startup_action_choser, SIGNAL (activated (int)), this, SLOT (boxChanged (int)));
 	main_vbox->addWidget (startup_action_choser);
 
@@ -139,7 +140,7 @@
 void RKSettingsModuleGeneral::applyChanges () {
 	RK_TRACE (SETTINGS);
 	new_files_path = files_choser->getLocation ();
-	startup_action = static_cast<StartupDialog::Result> (startup_action_choser->currentItem ());
+	startup_action = static_cast<StartupDialog::Result> (startup_action_choser->currentIndex ());
 	show_help_on_startup = show_help_on_startup_box->isChecked ();
 	workplace_save_mode = static_cast<WorkplaceSaveMode> (workplace_save_chooser->checkedId ());
 	warn_size_object_edit = warn_size_object_edit_box->intValue ();

Modified: branches/KDE4_port/rkward/settings/rksettingsmodulephp.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmodulephp.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/settings/rksettingsmodulephp.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -35,7 +35,7 @@
 RKSettingsModulePHP::RKSettingsModulePHP (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
 	RK_TRACE (SETTINGS);
 
-	QVBoxLayout *main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
+	QVBoxLayout *main_vbox = new QVBoxLayout (this);
 	QLabel *label = new QLabel (i18n ("Changes in this section take effect the next time you start a plugin"), this);
 	label->setWordWrap (true);
 	main_vbox->addWidget (label);

Modified: branches/KDE4_port/rkward/settings/rksettingsmoduleplugins.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmoduleplugins.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/settings/rksettingsmoduleplugins.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -47,7 +47,7 @@
 RKSettingsModulePlugins::RKSettingsModulePlugins (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
 	RK_TRACE (SETTINGS);
 
-	QVBoxLayout *main_vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
+	QVBoxLayout *main_vbox = new QVBoxLayout (this);
 	
 	main_vbox->addSpacing (2*RKGlobals::spacingHint ());
 	

Modified: branches/KDE4_port/rkward/settings/rksettingsmoduler.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmoduler.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/settings/rksettingsmoduler.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -59,17 +59,19 @@
 	label->setWordWrap (true);
 	main_vbox->addWidget (label);
 
-	QGridLayout *grid = new QGridLayout (main_vbox, 1, 2, RKGlobals::spacingHint ());
+	QGridLayout *grid = new QGridLayout ();
+	main_vbox->addLayout (grid);
 	int row = -1;
 
 	// options (warn)
 	grid->addWidget (new QLabel (i18n ("Display warnings"), this), ++row, 0);
-	warn_input = new QComboBox (false, this);
-	warn_input->insertItem (i18n ("Suppress warnings"));			// do not change the order of options! See also: applyChanges ()
-	warn_input->insertItem (i18n ("Print warnings later (default)"));
-	warn_input->insertItem (i18n ("Print warnings immediately"));
-	warn_input->insertItem (i18n ("Convert warnings to errors"));
-	warn_input->setCurrentItem (options_warn + 1);
+	warn_input = new QComboBox (this);
+	warn_input->setEditable (false);
+	warn_input->insertItem (0, i18n ("Suppress warnings"));			// do not change the order of options! See also: applyChanges ()
+	warn_input->insertItem (1, i18n ("Print warnings later (default)"));
+	warn_input->insertItem (2, i18n ("Print warnings immediately"));
+	warn_input->insertItem (3, i18n ("Convert warnings to errors"));
+	warn_input->setCurrentIndex (options_warn + 1);
 	connect (warn_input, SIGNAL (activated (int)), this, SLOT (boxChanged (int)));
 	grid->addWidget (warn_input, row, 1);
 
@@ -100,19 +102,21 @@
 
 	// options (keep.source)
 	grid->addWidget (new QLabel (i18n ("Keep comments in functions"), this), ++row, 0);
-	keepsource_input = new QComboBox (false, this);
-	keepsource_input->insertItem (i18n ("TRUE (default)"));			// do not change the order of options! See also: applyChanges ()
-	keepsource_input->insertItem (i18n ("FALSE"));
-	keepsource_input->setCurrentItem (options_keepsource ? 0 : 1);
+	keepsource_input = new QComboBox (this);
+	keepsource_input->setEditable (false);
+	keepsource_input->addItem (i18n ("TRUE (default)"), true);
+	keepsource_input->addItem (i18n ("FALSE"), false);
+	keepsource_input->setCurrentIndex (options_keepsource ? 0 : 1);
 	connect (keepsource_input, SIGNAL (activated (int)), this, SLOT (boxChanged (int)));
 	grid->addWidget (keepsource_input, row, 1);
 
 	// options (keep.source.pkgs)
 	grid->addWidget (new QLabel (i18n ("Keep comments in packages"), this), ++row, 0);
-	keepsourcepkgs_input = new QComboBox (false, this);
-	keepsourcepkgs_input->insertItem (i18n ("TRUE)"));			// do not change the order of options! See also: applyChanges ()
-	keepsourcepkgs_input->insertItem (i18n ("FALSE (default)"));
-	keepsourcepkgs_input->setCurrentItem (options_keepsourcepkgs ? 0 : 1);
+	keepsourcepkgs_input = new QComboBox (this);
+	keepsourcepkgs_input->setEditable (false);
+	keepsourcepkgs_input->addItem (i18n ("TRUE)"), true);
+	keepsourcepkgs_input->addItem (i18n ("FALSE (default)"), false);
+	keepsourcepkgs_input->setCurrentIndex (options_keepsourcepkgs ? 0 : 1);
 	connect (keepsourcepkgs_input, SIGNAL (activated (int)), this, SLOT (boxChanged (int)));
 	grid->addWidget (keepsourcepkgs_input, row, 1);
 
@@ -130,10 +134,11 @@
 
 	// options (check.bounds)
 	grid->addWidget (new QLabel (i18n ("Check vector bounds (warn)"), this), ++row, 0);
-	checkbounds_input = new QComboBox (false, this);
-	checkbounds_input->insertItem (i18n ("TRUE)"));			// do not change the order of options! See also: applyChanges ()
-	checkbounds_input->insertItem (i18n ("FALSE (default)"));
-	checkbounds_input->setCurrentItem (options_checkbounds ? 0 : 1);
+	checkbounds_input = new QComboBox (this);
+	checkbounds_input->setEditable (false);
+	checkbounds_input->addItem (i18n ("TRUE)"), true);
+	checkbounds_input->addItem (i18n ("FALSE (default)"), false);
+	checkbounds_input->setCurrentIndex (options_checkbounds ? 0 : 1);
 	connect (checkbounds_input, SIGNAL (activated (int)), this, SLOT (boxChanged (int)));
 	grid->addWidget (checkbounds_input, row, 1);
 
@@ -179,14 +184,14 @@
 
 	options_outdec = outdec_input->text ();
 	options_width = width_input->value ();
-	options_warn = warn_input->currentItem () - 1;
+	options_warn = warn_input->currentIndex () - 1;
 	options_warningslength = warningslength_input->value ();
 	options_maxprint = maxprint_input->value ();
-	options_keepsource = (keepsource_input->currentItem () == 0);
-	options_keepsourcepkgs = (keepsourcepkgs_input->currentItem () == 0);
+	options_keepsource = keepsource_input->itemData (keepsource_input->currentIndex ()).toBool ();
+	options_keepsourcepkgs = keepsourcepkgs_input->itemData (keepsourcepkgs_input->currentIndex ()).toBool ();
 	options_expressions = expressions_input->value ();
 	options_digits = digits_input->value ();
-	options_checkbounds = (checkbounds_input->currentItem () == 0);
+	options_checkbounds = checkbounds_input->itemData (checkbounds_input->currentIndex ()).toBool ();
 	options_printcmd = printcmd_input->text ();
 
 // apply run time options in R

Modified: branches/KDE4_port/rkward/settings/rksettingsmodulewatch.cpp
===================================================================
--- branches/KDE4_port/rkward/settings/rksettingsmodulewatch.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/settings/rksettingsmodulewatch.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -118,14 +118,15 @@
 RKSettingsModuleWatch::RKSettingsModuleWatch (RKSettings *gui, QWidget *parent) : RKSettingsModule (gui, parent) {
 	RK_TRACE (SETTINGS);
 
-	QVBoxLayout *vbox = new QVBoxLayout (this, RKGlobals::marginHint ());
+	QVBoxLayout *vbox = new QVBoxLayout (this);
 
 	QLabel *label = new QLabel (i18n ("For now, settings only apply to new commands. All previous commands remain visible/invisible."), this);
 	label->setWordWrap (true);
 	vbox->addWidget (label);
 	vbox->addSpacing (10);
 	
-	QGridLayout *grid = new QGridLayout (vbox, 5, 5);
+	QGridLayout *grid = new QGridLayout ();
+	vbox->addLayout (grid);
 
 	label = new QLabel (i18n ("always show command"), this);
 	label->setWordWrap (true);

Modified: branches/KDE4_port/rkward/windows/rkmdiwindow.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkmdiwindow.cpp	2007-11-16 16:33:50 UTC (rev 2231)
+++ branches/KDE4_port/rkward/windows/rkmdiwindow.cpp	2007-11-18 16:05:27 UTC (rev 2232)
@@ -120,11 +120,9 @@
 		return true;
 	}
 
-// TODO: can the also_delete parameter be removed? If the asserts never trigger, likely so.
 	if (also_delete) {
-		RK_ASSERT (testAttribute (Qt::WA_DeleteOnClose));
 		bool closed = QWidget::close ();
-//		if (closed) deleteLater ();
+		if (closed) deleteLater ();
 		return closed;
 	} else {
 		RK_ASSERT (!testAttribute (Qt::WA_DeleteOnClose));


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