[Kst] branches/work/kst/portto4/kst/src/libkst
Adam Treat
treat at kde.org
Wed Jul 4 17:51:56 CEST 2007
SVN commit 683328 by treat:
* Move away from K3*
M +3 -3 kstextension.cpp
M +2 -2 kstextension.h
M +5 -5 stdinsource.cpp
M +2 -2 stdinsource.h
--- branches/work/kst/portto4/kst/src/libkst/kstextension.cpp #683327:683328
@@ -19,7 +19,7 @@
// application specific includes
#include "kstextension.h"
-#include <kmainwindow.h>
+#include <qmainwindow.h>
KstExtension::KstExtension(QObject *parent, const QStringList&) : QObject(parent) {
}
@@ -45,8 +45,8 @@
}
-KMainWindow* KstExtension::app() const {
- return static_cast<KMainWindow*>(parent());
+QMainWindow* KstExtension::app() const {
+ return qobject_cast<QMainWindow*>(parent());
}
--- branches/work/kst/portto4/kst/src/libkst/kstextension.h #683327:683328
@@ -23,7 +23,7 @@
#include "kst_export.h"
-class KMainWindow;
+class QMainWindow;
class KST_EXPORT KstExtension : public QObject {
Q_OBJECT
@@ -40,7 +40,7 @@
// Clear internal state
virtual void clear();
- KMainWindow *app() const;
+ QMainWindow *app() const;
signals:
void unregister();
--- branches/work/kst/portto4/kst/src/libkst/stdinsource.cpp #683327:683328
@@ -18,7 +18,7 @@
#include "config.h"
#include "stdinsource.h"
-#include <k3tempfile.h>
+#include <qtemporaryfile.h>
#include <stdlib.h>
#include <unistd.h>
@@ -36,8 +36,8 @@
KstStdinSource::KstStdinSource(QSettings *cfg)
: KstDataSource(cfg, "stdin", "stdin") {
- _file = new K3TempFile;
- _filename = _file->name();
+ _file = new QTemporaryFile;
+ _filename = _file->fileName();
// Unfortunately we have to update here. stdin is a special case.
update();
_src = KstDataSource::loadSource(_filename, "ASCII");
@@ -49,7 +49,6 @@
KstStdinSource::~KstStdinSource() {
_file->close();
- _file->unlink();
delete _file;
_file = 0L;
}
@@ -77,7 +76,8 @@
bool new_data = false;
bool got_some = false;
- FILE *fp = _file->fstream();
+ int handle = _file->handle();
+ FILE *fp = fdopen(handle, "w+");
if (!fp) {
return setLastUpdateResult(KstObject::NO_CHANGE);
--- branches/work/kst/portto4/kst/src/libkst/stdinsource.h #683327:683328
@@ -22,7 +22,7 @@
#include "kst_export.h"
-class K3TempFile;
+class QTemporaryFile;
class KST_EXPORT KstStdinSource : public KstDataSource {
public:
@@ -50,7 +50,7 @@
private:
KstDataSourcePtr _src;
- K3TempFile *_file;
+ QTemporaryFile *_file;
};
More information about the Kst
mailing list