[Kst] branches/work/kst/portto4/kst
Adam Treat
treat at kde.org
Fri Feb 16 20:40:25 CET 2007
SVN commit 634281 by treat:
* Clean-up formatting of cmake files
* Get rid of ksdebug in favor of qDebug which is threadsafe
* Link with kde3support for now
And with that libkst can compile and link against KDE4 and Qt4 :)
M +4 -4 CMakeLists.txt
M +9 -9 src/libkst/CMakeLists.txt
D src/libkst/ksdebug.cpp
D src/libkst/ksdebug.h
M +3 -3 src/libkst/kstdataplugin.h
M +2 -2 src/libkst/kstdatasource.cpp
M +1 -1 src/libkst/kstdebug.cpp
M +1 -1 src/libkst/kstmatrix.cpp
M +1 -1 src/libkst/kstobject.cpp
M +1 -1 src/libkst/kstobject.h
M +1 -1 src/libkst/kstobjectcollection.h
M +1 -1 src/libkst/kstprimitive.cpp
M +1 -1 src/libkst/kstrvector.cpp
M +1 -1 src/libkst/kstscalar.cpp
M +1 -1 src/libkst/kstsharedptr.h
M +1 -1 src/libkst/kstsvector.cpp
M +1 -1 src/libkst/kstvector.cpp
M +5 -5 src/libkst/rwlock.cpp
--- branches/work/kst/portto4/kst/CMakeLists.txt #634280:634281
@@ -16,11 +16,11 @@
# create config.h
include(ConfigureChecks.cmake)
-configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
+configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-add_subdirectory( src )
-#add_subdirectory( misc )
-#add_subdirectory( tests )
+add_subdirectory(src)
+#add_subdirectory(misc)
+#add_subdirectory(tests)
########### install files ###############
--- branches/work/kst/portto4/kst/src/libkst/CMakeLists.txt #634280:634281
@@ -4,10 +4,10 @@
endif(Subversion_FOUND)
#FIXME need to run this whenever .svn/entries changes...
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kstrevision.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kstrevision.h )
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ksttimers.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ksttimers.h )
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kstrevision.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kstrevision.h)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ksttimers.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ksttimers.h)
-include_directories( ${CMAKE_SOURCE_DIR}/kst/src/extdate ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
+include_directories(${CMAKE_SOURCE_DIR}/kst/src/extdate ${KDE4_INCLUDE_DIR} ${QT_INCLUDES})
########### next target ###############
@@ -38,22 +38,22 @@
kstmatrixdefaults.cpp
kstprimitive.cpp
defaultprimitivenames.cpp
- kstwaitcondition_unix.cpp )
+ kstwaitcondition_unix.cpp)
kde4_automoc(${kst_LIB_SRCS})
kde4_add_library(kst SHARED ${kst_LIB_SRCS})
-# target_link_libraries(kst ${KDE4_KIO_LIBS} kstextdate )
-target_link_libraries(kst ${KDE4_KIO_LIBS} )
+# target_link_libraries(kst kstextdate)
+target_link_libraries(kst kde3support)
-set_target_properties(kst PROPERTIES VERSION ${KST_LIBKST_VERSION} SOVERSION 1 )
-install(TARGETS kst DESTINATION ${LIB_INSTALL_DIR} )
+set_target_properties(kst PROPERTIES VERSION ${KST_LIBKST_VERSION} SOVERSION 1)
+install(TARGETS kst DESTINATION ${LIB_INSTALL_DIR})
########### install files ###############
-install( FILES kstdatasource.h kstobject.h kst_export.h kstsharedptr.h rwlock.h kstdateparser.h kstwaitcondition.h kstobjectcollection.h DESTINATION ${INCLUDE_INSTALL_DIR} )
+install(FILES kstdatasource.h kstobject.h kst_export.h kstsharedptr.h rwlock.h kstdateparser.h kstwaitcondition.h kstobjectcollection.h DESTINATION ${INCLUDE_INSTALL_DIR})
--- branches/work/kst/portto4/kst/src/libkst/kstdataplugin.h #634280:634281
@@ -17,7 +17,7 @@
#include <assert.h>
-#include "ksdebug.h"
+#include <qdebug.h>
#include <kio/netaccess.h>
#include <klibloader.h>
#include <klocale.h>
@@ -48,7 +48,7 @@
//kstdDebug() << "Create plugin " << (void*)this << " " << service->property("Name").toString() << endl;
}
- protected:
+ protected:
virtual ~Plugin() {
//kstdDebug() << "Destroy plugin " << (void*)this << " " << service->property("Name").toString() << endl;
if (_lib) {
@@ -56,7 +56,7 @@
}
}
- public:
+ public:
quint32 key() const {
quint32 (*sym)() = (quint32(*)())symbol("key");
if (sym) {
--- branches/work/kst/portto4/kst/src/libkst/kstdatasource.cpp #634280:634281
@@ -19,7 +19,7 @@
#include <assert.h>
-#include "ksdebug.h"
+#include <qdebug.h>
#include <kio/netaccess.h>
#include <klibloader.h>
#include <klocale.h>
@@ -208,7 +208,7 @@
if (l.count() > 0) {
QDomElement e2 = l.item(0).toElement();
if (!e2.isNull()) {
- kstdDebug() << "Restoring tag " << e2.text() << " to KstDataSource" << endl;
+ qDebug() << "Restoring tag " << e2.text() << " to KstDataSource" << endl;
plugin->setTagName(KstObjectTag::fromString(e2.text()));
}
}
--- branches/work/kst/portto4/kst/src/libkst/kstdebug.cpp #634280:634281
@@ -22,7 +22,7 @@
#include <kapplication.h>
#include <ktoolinvocation.h>
-#include "ksdebug.h"
+#include <qdebug.h>
#include <kglobal.h>
#include <klocale.h>
--- branches/work/kst/portto4/kst/src/libkst/kstmatrix.cpp #634280:634281
@@ -27,7 +27,7 @@
#include "defaultprimitivenames.h"
#include "kstdatacollection.h"
#include "kstdebug.h"
-#include "ksdebug.h"
+#include <qdebug.h>
#include "kstmatrix.h"
#include "kstmath.h"
--- branches/work/kst/portto4/kst/src/libkst/kstobject.cpp #634280:634281
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include "ksdebug.h"
+#include <qdebug.h>
#include "kstobject.h"
/** Tag globals */
--- branches/work/kst/portto4/kst/src/libkst/kstobject.h #634280:634281
@@ -28,7 +28,7 @@
#include "kst_export.h"
#include "kstsharedptr.h"
-#include "ksdebug.h"
+#include <qdebug.h>
#include "rwlock.h"
//We define two different keys for datasource VS dataobject plugins
--- branches/work/kst/portto4/kst/src/libkst/kstobjectcollection.h #634280:634281
@@ -26,7 +26,7 @@
//Added by qt3to4:
#include <Q3ValueList>
-#include "ksdebug.h"
+#include <qdebug.h>
#include "kstobject.h"
// Forward Declarations
--- branches/work/kst/portto4/kst/src/libkst/kstprimitive.cpp #634280:634281
@@ -22,7 +22,7 @@
#include <assert.h>
-#include "ksdebug.h"
+#include <qdebug.h>
KstPrimitive::KstPrimitive(KstObject *provider)
--- branches/work/kst/portto4/kst/src/libkst/kstrvector.cpp #634280:634281
@@ -22,7 +22,7 @@
#include <q3stylesheet.h>
-#include "ksdebug.h"
+#include <qdebug.h>
#include <klocale.h>
#include "kstdatacollection.h"
--- branches/work/kst/portto4/kst/src/libkst/kstscalar.cpp #634280:634281
@@ -22,7 +22,7 @@
#include "kstscalar.h"
#include "kstdatacollection.h"
#include "defaultprimitivenames.h"
-#include "ksdebug.h"
+#include <qdebug.h>
static int iAnonymousScalarCounter = 0;
--- branches/work/kst/portto4/kst/src/libkst/kstsharedptr.h #634280:634281
@@ -21,7 +21,7 @@
#include <q3semaphore.h>
-// #include <ksdebug.h>
+#include <qdebug.h>
// NOTE: In order to preserve binary compatibility with plugins, you must
// not add, remove, or change member variables or virtual functions.
--- branches/work/kst/portto4/kst/src/libkst/kstsvector.cpp #634280:634281
@@ -15,7 +15,7 @@
* *
***************************************************************************/
#include "kstsvector.h"
-#include "ksdebug.h"
+#include <qdebug.h>
#include <q3stylesheet.h>
#include <qtextstream.h>
--- branches/work/kst/portto4/kst/src/libkst/kstvector.cpp #634280:634281
@@ -28,7 +28,7 @@
#include <klocale.h>
#include <kcodecs.h>
-#include "ksdebug.h"
+#include <qdebug.h>
#include "kstdatacollection.h"
#include "defaultprimitivenames.h"
#include "kstmath.h"
--- branches/work/kst/portto4/kst/src/libkst/rwlock.cpp #634280:634281
@@ -17,7 +17,7 @@
#include "rwlock.h"
-#include "ksdebug.h"
+#include <qdebug.h>
//#define LOCKTRACE
@@ -90,7 +90,7 @@
QMap<Qt::HANDLE, int>::Iterator it = _readLockers.find(me);
if (it != _readLockers.end() && it.value() > 0) {
// cannot acquire a write lock if I already have a read lock -- ERROR
- kstdFatal() << "Thread " << (int)QThread::currentThreadId() << " tried to write lock KstRWLock " << (void*)this << " while holding a read lock" << endl;
+ qDebug() << "Thread " << (int)QThread::currentThreadId() << " tried to write lock KstRWLock " << (void*)this << " while holding a read lock" << endl;
return;
}
}
@@ -126,7 +126,7 @@
QMap<Qt::HANDLE, int>::Iterator it = _readLockers.find(me);
if (it == _readLockers.end()) {
// read locked but not by me -- ERROR
- kstdFatal() << "Thread " << (int)QThread::currentThreadId() << " tried to unlock KstRWLock " << (void*)this << " (read locked) without holding the lock" << endl;
+ qDebug() << "Thread " << (int)QThread::currentThreadId() << " tried to unlock KstRWLock " << (void*)this << " (read locked) without holding the lock" << endl;
return;
} else {
--_readCount;
@@ -139,14 +139,14 @@
} else if (_writeCount > 0) {
if (_writeLocker != me) {
// write locked but not by me -- ERROR
- kstdFatal() << "Thread " << (int)QThread::currentThread() << " tried to unlock KstRWLock " << (void*)this << " (write locked) without holding the lock" << endl;
+ qDebug() << "Thread " << (int)QThread::currentThread() << " tried to unlock KstRWLock " << (void*)this << " (write locked) without holding the lock" << endl;
return;
} else {
--_writeCount;
}
} else if (_readCount == 0 && _writeCount == 0) {
// not locked -- ERROR
- kstdFatal() << "Thread " << (int)QThread::currentThread() << " tried to unlock KstRWLock " << (void*)this << " (unlocked) without holding the lock" << endl;
+ qDebug() << "Thread " << (int)QThread::currentThread() << " tried to unlock KstRWLock " << (void*)this << " (unlocked) without holding the lock" << endl;
return;
}
More information about the Kst
mailing list