[rkward-cvs] SF.net SVN: rkward: [2066] branches/KDE4_port
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Oct 14 21:12:42 UTC 2007
Revision: 2066
http://rkward.svn.sourceforge.net/rkward/?rev=2066&view=rev
Author: tfry
Date: 2007-10-14 14:12:41 -0700 (Sun, 14 Oct 2007)
Log Message:
-----------
subdir rbackend compiles
Modified Paths:
--------------
branches/KDE4_port/TODO_KDE4
branches/KDE4_port/rkward/rbackend/CMakeLists.txt
branches/KDE4_port/rkward/rbackend/rdata.cpp
branches/KDE4_port/rkward/rbackend/rembedinternal.cpp
branches/KDE4_port/rkward/rbackend/rinterface.cpp
branches/KDE4_port/rkward/rbackend/rklocalesupport.cpp
branches/KDE4_port/rkward/rbackend/rkstructuregetter.cpp
branches/KDE4_port/rkward/rbackend/rthread.cpp
Modified: branches/KDE4_port/TODO_KDE4
===================================================================
--- branches/KDE4_port/TODO_KDE4 2007-10-14 20:45:57 UTC (rev 2065)
+++ branches/KDE4_port/TODO_KDE4 2007-10-14 21:12:41 UTC (rev 2066)
@@ -67,3 +67,9 @@
data editor:
- definitely needs better porting
- does cell painting work ok?
+
+rkthread:
+ - find out how to call dbus for the help browser!
+
+rklocalesupport:
+ - does locale switching / detection work? Does Qt have something, yet?
\ No newline at end of file
Modified: branches/KDE4_port/rkward/rbackend/CMakeLists.txt
===================================================================
--- branches/KDE4_port/rkward/rbackend/CMakeLists.txt 2007-10-14 20:45:57 UTC (rev 2065)
+++ branches/KDE4_port/rkward/rbackend/CMakeLists.txt 2007-10-14 21:12:41 UTC (rev 2066)
@@ -7,21 +7,28 @@
########### next target ###############
-SET(rbackend_STAT_SRCS
- rembedinternal.cpp
- rinterface.cpp
- rthread.cpp
- rcommand.cpp
- rcommandreceiver.cpp
- rcommandstack.cpp
- rdata.cpp
- rkpthreadsupport.cpp
- rklocalesupport.cpp
- )
+SET(
+ rbackend_STAT_SRCS
+ rembedinternal.cpp
+ rinterface.cpp
+ rthread.cpp
+ rcommand.cpp
+ rcommandreceiver.cpp
+ rcommandstack.cpp
+ rdata.cpp
+ rkpthreadsupport.cpp
+ rklocalesupport.cpp
+)
+
QT4_AUTOMOC(${rbackend_STAT_SRCS})
ADD_LIBRARY(rbackend STATIC ${rbackend_STAT_SRCS})
TARGET_LINK_LIBRARIES(rbackend ${R_USED_LIBS})
LINK_DIRECTORIES(${R_SHAREDLIBDIR})
INCLUDE_DIRECTORIES(${R_INCLUDEDIR})
+
+SET_SOURCE_FILES_PROPERTIES(
+ rembedinternal.cpp
+ PROPERTIES COMPILE_FLAGS -fno-strict-aliasing
+)
\ No newline at end of file
Modified: branches/KDE4_port/rkward/rbackend/rdata.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rdata.cpp 2007-10-14 20:45:57 UTC (rev 2065)
+++ branches/KDE4_port/rkward/rbackend/rdata.cpp 2007-10-14 21:12:41 UTC (rev 2066)
@@ -93,36 +93,36 @@
void RData::printStructure (const QString &prefix) {
switch (datatype) {
case NoData:
- qDebug ("%s: NoData, length %d", prefix.toLatin1(), length);
+ qDebug ("%s: NoData, length %d", prefix.toLatin1().data(), length);
break;
case IntVector:
- qDebug ("%s: IntVector, length %d", prefix.toLatin1(), length);
+ qDebug ("%s: IntVector, length %d", prefix.toLatin1().data(), length);
for (unsigned int i = 0; i < length; ++i) {
- qDebug ("%s%d: %d", prefix.toLatin1(), i, getIntVector ()[i]);
+ qDebug ("%s%d: %d", prefix.toLatin1().data(), i, getIntVector ()[i]);
}
break;
case RealVector:
- qDebug ("%s: RealVector, length %d", prefix.toLatin1(), length);
+ qDebug ("%s: RealVector, length %d", prefix.toLatin1().data(), length);
for (unsigned int i = 0; i < length; ++i) {
- qDebug ("%s%d: %f", prefix.toLatin1(), i, getRealVector ()[i]);
+ qDebug ("%s%d: %f", prefix.toLatin1().data(), i, getRealVector ()[i]);
}
break;
case StringVector:
- qDebug ("%s: StringVector, length %d", prefix.toLatin1(), length);
+ qDebug ("%s: StringVector, length %d", prefix.toLatin1().data(), length);
for (unsigned int i = 0; i < length; ++i) {
- qDebug ("%s%d: %s", prefix.toLatin1(), i, getStringVector ()[i].toLatin1());
+ qDebug ("%s%d: %s", prefix.toLatin1().data(), i, getStringVector ()[i].toLatin1().data());
}
break;
case StructureVector:
- qDebug ("%s: StructureVector, length %d", prefix.toLatin1(), length);
+ qDebug ("%s: StructureVector, length %d", prefix.toLatin1().data(), length);
for (unsigned int i = 0; i < length; ++i) {
QString sub_prefix = prefix + QString::number (i);
getStructureVector ()[i]->printStructure (sub_prefix);
}
break;
default:
- qDebug ("%s: INVALID %d, length %d", prefix.toLatin1(), datatype, length);
+ qDebug ("%s: INVALID %d, length %d", prefix.toLatin1().data(), datatype, length);
}
- qDebug ("%s: END\n\n", prefix.toLatin1 ());
+ qDebug ("%s: END\n\n", prefix.toLatin1 ().data());
}
Modified: branches/KDE4_port/rkward/rbackend/rembedinternal.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rembedinternal.cpp 2007-10-14 20:45:57 UTC (rev 2065)
+++ branches/KDE4_port/rkward/rbackend/rembedinternal.cpp 2007-10-14 21:12:41 UTC (rev 2066)
@@ -16,8 +16,6 @@
***************************************************************************/
#include "rembedinternal.h"
-//Added by qt3to4:
-#include <Q3CString>
// static
REmbedInternal *REmbedInternal::this_pointer = 0;
@@ -27,6 +25,8 @@
#define FALSE (const bool)!0
#include <qstring.h>
#include <qtextcodec.h>
+//Added by qt3to4:
+#include <Q3CString>
#include "../core/robject.h"
#include "../debug.h"
#undef TRUE
@@ -34,6 +34,16 @@
#include "rklocalesupport.h"
+#include <dlfcn.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+#include <sys/resource.h>
+#include <sys/types.h>
+//#include <signal.h>
+//#include <unistd.h>
+#include <math.h>
+
extern "C" {
#define R_INTERFACE_PTRS 1
@@ -56,15 +66,6 @@
#include "Rversion.h"
#include "R_ext/Parse.h"
-#include <dlfcn.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-//#include <signal.h>
-//#include <unistd.h>
-#include <math.h>
-
#if (R_VERSION > R_Version(2, 2, 9))
#define R_2_3
#endif
@@ -657,7 +658,7 @@
RK_DO (qDebug ("Changing locale"), RBACKEND, DL_WARNING);
REmbedInternal::this_pointer->current_locale_codec = RKGetCurrentLocaleCodec ();
- RK_DO (qDebug ("New locale codec is %s", REmbedInternal::this_pointer->current_locale_codec->name ()), RBACKEND, DL_WARNING);
+ RK_DO (qDebug ("New locale codec is %s", REmbedInternal::this_pointer->current_locale_codec->name ().data ()), RBACKEND, DL_WARNING);
return R_NilValue;
}
Modified: branches/KDE4_port/rkward/rbackend/rinterface.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rinterface.cpp 2007-10-14 20:45:57 UTC (rev 2065)
+++ branches/KDE4_port/rkward/rbackend/rinterface.cpp 2007-10-14 21:12:41 UTC (rev 2066)
@@ -305,11 +305,11 @@
QString object_name = request->call[i];
RObject *obj = RObjectList::getObjectList ()->findObject (object_name);
if (obj) {
- RK_DO (qDebug ("triggering update for symbol %s", object_name.toLatin1 ()), RBACKEND, DL_DEBUG);
+ RK_DO (qDebug ("triggering update for symbol %s", object_name.toLatin1 ().data()), RBACKEND, DL_DEBUG);
obj->markDataDirty ();
obj->updateFromR (request->in_chain);
} else {
- RK_DO (qDebug ("lookup failed for changed symbol %s", object_name.toLatin1 ()), RBACKEND, DL_WARNING);
+ RK_DO (qDebug ("lookup failed for changed symbol %s", object_name.toLatin1 ().data()), RBACKEND, DL_WARNING);
}
}
} else if (call == "syncall") {
@@ -395,7 +395,7 @@
// not to worry, just some help file to display
// TODO: maybe move this to ShowEditTextFileAgent instead
for (int n=0; n < args->int_a; ++n) {
- RKWardMainWindow::getMain ()->openHTML (args->chars_a[n]);
+ RKWardMainWindow::getMain ()->openHTML (KUrl (args->chars_a[n]));
}
} else {
ShowEditTextFileAgent::showEditFiles (args);
Modified: branches/KDE4_port/rkward/rbackend/rklocalesupport.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rklocalesupport.cpp 2007-10-14 20:45:57 UTC (rev 2065)
+++ branches/KDE4_port/rkward/rbackend/rklocalesupport.cpp 2007-10-14 21:12:41 UTC (rev 2066)
@@ -21,6 +21,8 @@
// seems to be needed for GCC 4.3 as well.
#include <langinfo.h>
#include <stdlib.h>
+#include <locale.h>
+#include <ctype.h>
#include <qtextcodec.h>
//Added by qt3to4:
Modified: branches/KDE4_port/rkward/rbackend/rkstructuregetter.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rkstructuregetter.cpp 2007-10-14 20:45:57 UTC (rev 2065)
+++ branches/KDE4_port/rkward/rbackend/rkstructuregetter.cpp 2007-10-14 21:12:41 UTC (rev 2066)
@@ -154,7 +154,7 @@
if (ok != TRUE) {
storage->discardData();
- Rf_warning ("failure to get object %s", name.toLatin1());
+ Rf_warning ("failure to get object %s", name.toLatin1().data ());
getStructureWorker (R_NilValue, name, misplaced, storage);
}
}
@@ -201,7 +201,7 @@
unsigned int type = 0;
unsigned int count;
- RK_DO (qDebug ("fetching '%s': %p, s-type %d", name.toLatin1(), val, TYPEOF (val)), RBACKEND, DL_DEBUG);
+ RK_DO (qDebug ("fetching '%s': %p, s-type %d", name.toLatin1().data(), val, TYPEOF (val)), RBACKEND, DL_DEBUG);
PROTECT (val);
// manually resolve any promises
@@ -385,7 +385,7 @@
}
if (do_env) {
- RK_DO (qDebug ("recurse into environment %s", name.toLatin1()), RBACKEND, DL_DEBUG);
+ RK_DO (qDebug ("recurse into environment %s", name.toLatin1().data ()), RBACKEND, DL_DEBUG);
for (unsigned int i = 0; i < childcount; ++i) {
SEXP current_childname = install(CHAR(STRING_ELT(childnames_s, i)));
PROTECT (current_childname);
@@ -416,7 +416,7 @@
UNPROTECT (2); /* childname, child */
}
} else if (do_cont) {
- RK_DO (qDebug ("recurse into list %s", name.toLatin1()), RBACKEND, DL_DEBUG);
+ RK_DO (qDebug ("recurse into list %s", name.toLatin1().data ()), RBACKEND, DL_DEBUG);
if (Rf_isList (value) && (!Rf_isObject (value))) { // old style list
for (unsigned int i = 0; i < childcount; ++i) {
SEXP child = CAR (value);
Modified: branches/KDE4_port/rkward/rbackend/rthread.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rthread.cpp 2007-10-14 20:45:57 UTC (rev 2065)
+++ branches/KDE4_port/rkward/rbackend/rthread.cpp 2007-10-14 21:12:41 UTC (rev 2066)
@@ -28,7 +28,6 @@
#include <kapplication.h>
#include <klocale.h>
-#include <dcopclient.h>
#include <qstring.h>
#include <qapplication.h>
@@ -75,7 +74,7 @@
void RThread::run () {
RK_TRACE (RBACKEND);
- thread_id = currentThread ();
+ thread_id = currentThreadId ();
locked = Startup;
killed = false;
int err;
@@ -159,7 +158,7 @@
int ctype = command->type ();
QString ccommand = command->command (); // easier typing below
- RK_DO (qDebug ("running command: %s", ccommand.toLatin1()), RBACKEND, DL_DEBUG);
+ RK_DO (qDebug ("running command: %s", ccommand.toLatin1().data ()), RBACKEND, DL_DEBUG);
if (command->type () & RCommand::DirectToOutput) {
runCommandInternal (".rk.cat.output (\"<hr>\\n\")", &error, false);
@@ -207,7 +206,7 @@
#endif
RK_DO (qDebug ("Command failed (other)"), RBACKEND, dl);
}
- RK_DO (qDebug ("failed command was: '%s'", command->command ().toLatin1 ()), RBACKEND, dl);
+ RK_DO (qDebug ("failed command was: '%s'", command->command ().toLatin1 ().data ()), RBACKEND, dl);
} else {
command->status |= RCommand::WasTried;
}
@@ -230,7 +229,7 @@
}
if (error) {
- RK_DO (qDebug ("- error message was: '%s'", command->error ().toLatin1 ()), RBACKEND, dl);
+ RK_DO (qDebug ("- error message was: '%s'", command->error ().toLatin1 ().data ()), RBACKEND, dl);
// runCommandInternal (".rk.init.handlers ()\n", &dummy);
}
RK_DO (qDebug ("done running command"), RBACKEND, DL_DEBUG);
@@ -322,10 +321,10 @@
qApp->postEvent (RKGlobals::rInterface (), event);
}
- RK_DO (qDebug ("output '%s'", current_output->output.toLatin1 ()), RBACKEND, DL_DEBUG);
+ RK_DO (qDebug ("output '%s'", current_output->output.toLatin1 ().data ()), RBACKEND, DL_DEBUG);
} else {
// running Rcmdr, eh?
- RK_DO (qDebug ("output without receiver'%s'", current_output->output.toLatin1 ()), RBACKEND, DL_WARNING);
+ RK_DO (qDebug ("output without receiver'%s'", current_output->output.toLatin1 ().data ()), RBACKEND, DL_WARNING);
delete current_output;
}
@@ -359,7 +358,7 @@
current_command->status |= RCommand::HasError;
}
- RK_DO (qDebug ("error '%s'", call[0].toLatin1 ()), RBACKEND, DL_DEBUG);
+ RK_DO (qDebug ("error '%s'", call[0].toLatin1 ().data ()), RBACKEND, DL_DEBUG);
MUTEX_UNLOCK;
}
@@ -509,7 +508,7 @@
runCommandInternal ((*it).local8Bit (), &error);
if (error) {
status |= OtherFail;
- RK_DO (qDebug ("error in initialization call '%s'", (*it).toLatin1()), RBACKEND, DL_ERROR);
+ RK_DO (qDebug ("error in initialization call '%s'", (*it).toLatin1().data ()), RBACKEND, DL_ERROR);
}
}
@@ -518,7 +517,7 @@
if (error) status |= SinkFail;
runCommandInternal ("rk.set.output.html.file (\"" + RKSettingsModuleGeneral::filesPath () + "/rk_out.html\")\n", &error);
if (error) status |= SinkFail;
- runCommandInternal ("options (htmlhelp=TRUE); options (browser=\"dcop " + kapp->dcopClient ()->appId () + " rkwardapp openHTMLHelp \")", &error);
+//KDE4 TODO! runCommandInternal ("options (htmlhelp=TRUE); options (browser=\"dcop " + kapp->dcopClient ()->appId () + " rkwardapp openHTMLHelp \")", &error);
if (error) status |= OtherFail;
// TODO: error-handling?
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