[Kst] branches/work/kst/portto4/kst/src

Joshua Netterfield drmrshdw at gmail.com
Fri Sep 2 16:27:49 UTC 2011


SVN commit 1250995 by joshuanetterfield:

Bugfixes.


 M  +0 -3      libkst/coredocument.cpp  
 M  +0 -2      libkst/coredocument.h  
 M  +1 -1      libkst/editablevector.h  
 M  +3 -0      libkstapp/document.cpp  
 M  +2 -0      libkstapp/document.h  
 M  +1 -1      widgets/cclineedit.cpp  
 M  +1 -16     widgets/vectorselector.cpp  


--- branches/work/kst/portto4/kst/src/libkst/coredocument.cpp #1250994:1250995
@@ -22,19 +22,16 @@
 #include <QXmlStreamReader>
 
 #include "objectstore.h"
-#include "../libkstapp/scriptserver.h"
 
 namespace Kst {
 
 CoreDocument::CoreDocument()
 : _objectStore(new ObjectStore()), _dirty(false), _isOpen(false) {
-  _scriptServer = new ScriptServer(_objectStore);
   _fileName.clear();
 }
 
 
 CoreDocument::~CoreDocument() {
-  delete _scriptServer;
   delete _objectStore;
   _objectStore = 0;
 }
--- branches/work/kst/portto4/kst/src/libkst/coredocument.h #1250994:1250995
@@ -25,7 +25,6 @@
 
 namespace Kst {
 
-class ScriptServer;
 class ObjectStore;
 
 class KSTCORE_EXPORT CoreDocument 
@@ -48,7 +47,6 @@
     virtual QString lastError() const;
 
   private:
-    ScriptServer *_scriptServer;
     ObjectStore *_objectStore;
     bool _dirty;
     bool _isOpen;
--- branches/work/kst/portto4/kst/src/libkst/editablevector.h #1250994:1250995
@@ -23,7 +23,7 @@
 
 namespace Kst {
 
-class EditableVector : public Vector {
+class KSTCORE_EXPORT EditableVector : public Vector {
   Q_OBJECT
 
   public:
--- branches/work/kst/portto4/kst/src/libkstapp/document.cpp #1250994:1250995
@@ -24,6 +24,7 @@
 #include <commandlineparser.h>
 #include "objectstore.h"
 #include "updatemanager.h"
+#include "scriptserver.h"
 
 #include <QDebug>
 #include <QFile>
@@ -35,6 +36,7 @@
 Document::Document(MainWindow *window)
 : CoreDocument(), _win(window), _dirty(false), _isOpen(false) {
   _session = new SessionModel(objectStore());
+  _scriptServer = new ScriptServer(objectStore());
 
   _fileName.clear();
   UpdateManager::self()->setStore(objectStore());
@@ -43,6 +45,7 @@
 
 Document::~Document() {
   delete _session;
+  delete _scriptServer;
   _session = 0;
 }
 
--- branches/work/kst/portto4/kst/src/libkstapp/document.h #1250994:1250995
@@ -25,6 +25,7 @@
 class View;
 class ViewItem;
 class CommandLineParser;
+class ScriptServer;
 
 class Document : public CoreDocument {
   public:
@@ -51,6 +52,7 @@
     View *currentView() const;
 
   private:
+    ScriptServer* _scriptServer;
     QPointer<MainWindow> _win;
     SessionModel *_session;
     bool _dirty;
--- branches/work/kst/portto4/kst/src/widgets/cclineedit.cpp #1250994:1250995
@@ -582,7 +582,7 @@
 }
 
 #define SIZE_LIMITED_NAME sizeLimitedName( (_cc&&_cc->_tableView)?_cc->_tableView->font():QFont(), \
-    (_cc&&_cc->_tableView)? ((_cc->_tableView->width()/2-50)): 900000000000)
+    (_cc&&_cc->_tableView)? ((_cc->_tableView->width()/2-50)): INT_MAX)
 
 void SVCCLineEdit::fillKstObjects()
 {
--- branches/work/kst/portto4/kst/src/widgets/vectorselector.cpp #1250994:1250995
@@ -18,8 +18,6 @@
 #include "dialogdefaults.h"
 #include "curve.h"
 
-#include <QLabel>
-
 namespace Kst {
 
 VectorSelector::VectorSelector(QWidget *parent, ObjectStore *store)
@@ -37,14 +35,10 @@
 
   fillVectors();
 
-  _vector->setProperty("si","data vector");
-
   connect(_newVector, SIGNAL(pressed()), this, SLOT(newVector()));
   connect(_editVector, SIGNAL(pressed()), this, SLOT(editVector()));
-  connect(_vector, SIGNAL(currentIndexChanged(int)), this, SLOT(emitSelectionChanged()));
-  connect(_vector, SIGNAL(editTextChanged(QString)), this, SLOT(emitSelectionChanged()));
+  connect(_vector, SIGNAL(activated(int)), this, SLOT(emitSelectionChanged()));
   connect(_vector, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDescriptionTip()));
-  connect(_vector, SIGNAL(editTextChanged(QString)), this, SLOT(updateDescriptionTip()));
 }
 
 
@@ -68,15 +62,6 @@
 
 
 void VectorSelector::emitSelectionChanged() {
-  if(_vector->currentIndex()!=-1&&_vector->currentIndex()<_vector->count()&&
-         _vector->currentText()!=_vector->itemText(_vector->currentIndex())){
-      for(int i=0;i<_vector->count();i++) {
-          if(_vector->itemText(i).contains(_vector->currentText())) {
-              _vector->setCurrentIndex(i);
-              break;
-          }
-      }
-  }
   if (_allowEmptySelection && (_vector->count()>0)) {
       _editVector->setDisabled(_vector->currentIndex()==0);
   }


More information about the Kst mailing list