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

Barth Netterfield netterfield at astro.utoronto.ca
Sat Sep 8 01:19:05 UTC 2012


SVN commit 1315371 by netterfield:

A bunch of hopefully harmless changes which fix warnings from clang.
Predominantly fixing virtual functions which hide overloaded virtual
functions.


 M  +0 -1      libkst/matrix.cpp  
 M  +1 -1      libkstapp/cartesianrenderitem.cpp  
 M  +6 -6      libkstapp/eventmonitordialog.cpp  
 M  +1 -1      libkstapp/eventmonitordialog.h  
 M  +5 -5      libkstapp/plotrenderitem.cpp  
 M  +3 -3      libkstapp/plotrenderitem.h  
 M  +2 -1      libkstapp/view.cpp  
 M  +1 -1      libkstapp/view.h  
 M  +1 -2      libkstapp/viewitemscriptinterface.cpp  
 M  +1 -1      libkstmath/basicplugin.h  
 M  +1 -1      libkstmath/dataobject.cpp  
 M  +1 -1      libkstmath/dataobject.h  
 M  +1 -1      libkstmath/equation.cpp  
 M  +1 -1      libkstmath/equation.h  
 M  +2 -2      libkstmath/eventmonitorentry.h  
 M  +1 -1      plugins/dataobject/genericfilter/genericfilter.cpp  


--- branches/work/kst/portto4/kst/src/libkst/matrix.cpp #1315370:1315371
@@ -218,7 +218,6 @@
 
   // prefill the list
   for (i=0; i<n_list; i++) {
-    j = int(i*n_skip);
     min_list[i] = 1E+300;
     max_list[i] = -1E+300;
   }
--- branches/work/kst/portto4/kst/src/libkstapp/cartesianrenderitem.cpp #1315370:1315371
@@ -23,7 +23,7 @@
 
 CartesianRenderItem::CartesianRenderItem(PlotItem *parentItem)
   : PlotRenderItem(parentItem) {
-  setType(Cartesian);
+  setRenderType(Cartesian);
   setTypeName(tr("Cartesian Plot"));
 }
 
--- branches/work/kst/portto4/kst/src/libkstapp/eventmonitordialog.cpp #1315370:1315371
@@ -99,7 +99,7 @@
 }
 
 
-QString EventMonitorTab::event() const {
+QString EventMonitorTab::kstEvent() const {
   return _equation->text();
 }
 
@@ -288,7 +288,7 @@
 void EventMonitorDialog::configureTab(ObjectPtr object) {
   if (EventMonitorEntryPtr eventMonitorEntry = kst_cast<EventMonitorEntry>(object)) {
     _eventMonitorTab->setScript(eventMonitorEntry->scriptCode());
-    _eventMonitorTab->setEvent(eventMonitorEntry->event());
+    _eventMonitorTab->setEvent(eventMonitorEntry->kstEvent());
     _eventMonitorTab->setDescription(eventMonitorEntry->description());
     _eventMonitorTab->setLogLevel(eventMonitorEntry->level());
     _eventMonitorTab->setLogDebug(eventMonitorEntry->logDebug());
@@ -307,7 +307,7 @@
 
 
 void EventMonitorDialog::updateButtons() {
-  _buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!_eventMonitorTab->event().isEmpty() || (editMode() == EditMultiple));
+  _buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!_eventMonitorTab->kstEvent().isEmpty() || (editMode() == EditMultiple));
 }
 
 
@@ -316,7 +316,7 @@
   EventMonitorEntryPtr eventMonitor = _document->objectStore()->createObject<EventMonitorEntry>();
 
   eventMonitor->setScriptCode(_eventMonitorTab->script());
-  eventMonitor->setEvent(_eventMonitorTab->event());
+  eventMonitor->setEvent(_eventMonitorTab->kstEvent());
   eventMonitor->setDescription(_eventMonitorTab->description());
   eventMonitor->setLevel(_eventMonitorTab->logLevel());
   eventMonitor->setLogDebug(_eventMonitorTab->logDebug());
@@ -342,7 +342,7 @@
         EventMonitorEntryPtr eventMonitor = kst_cast<EventMonitorEntry>(_document->objectStore()->retrieveObject(objectName));
         if (eventMonitor) {
           const QString script = _eventMonitorTab->scriptDirty() ? _eventMonitorTab->script() : eventMonitor->scriptCode();
-          const QString event = _eventMonitorTab->eventDirty() ? _eventMonitorTab->event() : eventMonitor->event();
+          const QString event = _eventMonitorTab->eventDirty() ? _eventMonitorTab->kstEvent() : eventMonitor->kstEvent();
           const QString description = _eventMonitorTab->descriptionDirty() ? _eventMonitorTab->description() : eventMonitor->description();
           const QString emailRecipients = _eventMonitorTab->emailRecipientsDirty() ? _eventMonitorTab->emailRecipients() : eventMonitor->eMailRecipients();
           const Debug::LogLevel logLevel = _eventMonitorTab->logLevelDirty() ?  _eventMonitorTab->logLevel() : eventMonitor->level();
@@ -368,7 +368,7 @@
     } else {
       eventMonitor->writeLock();
       eventMonitor->setScriptCode(_eventMonitorTab->script());
-      eventMonitor->setEvent(_eventMonitorTab->event());
+      eventMonitor->setEvent(_eventMonitorTab->kstEvent());
       eventMonitor->setDescription(_eventMonitorTab->description());
       eventMonitor->setLevel(_eventMonitorTab->logLevel());
       eventMonitor->setLogDebug(_eventMonitorTab->logDebug());
--- branches/work/kst/portto4/kst/src/libkstapp/eventmonitordialog.h #1315370:1315371
@@ -36,7 +36,7 @@
     bool scriptDirty() const;
     void setScript(const QString script);
 
-    QString event() const;
+    QString kstEvent() const;
     bool eventDirty() const;
     void setEvent(const QString event);
 
--- branches/work/kst/portto4/kst/src/libkstapp/plotrenderitem.cpp #1315370:1315371
@@ -98,12 +98,12 @@
 }
 
 
-PlotRenderItem::RenderType PlotRenderItem::type() {
+PlotRenderItem::RenderType PlotRenderItem::renderType() const {
   return _type;
 }
 
 
-void PlotRenderItem::setType(PlotRenderItem::RenderType type) {
+void PlotRenderItem::setRenderType(PlotRenderItem::RenderType type) {
   _type = type;
 }
 
@@ -200,7 +200,7 @@
   QStringRef av;
   av = attrs.value("type");
   if (!av.isNull()) {
-    setType((RenderType)av.toString().toInt());
+    setRenderType((RenderType)av.toString().toInt());
   }
   QString expectedEnd;
   while (!(xml.isEndElement() && (xml.name().toString() == primaryTag))) {
@@ -866,8 +866,8 @@
 }
 
 
-void PlotRenderItem::createCustomLayout() {
-  plotItem()->createCustomLayout();
+void PlotRenderItem::createCustomLayout(int columns) {
+  plotItem()->createCustomLayout(columns);
 }
 
 
--- branches/work/kst/portto4/kst/src/libkstapp/plotrenderitem.h #1315370:1315371
@@ -37,8 +37,8 @@
 
     PlotItem *plotItem() const;
 
-    RenderType type();
-    void setType(RenderType type);
+    virtual RenderType renderType() const;
+    void setRenderType(RenderType type);
 
     QRectF plotRect() const;
 
@@ -76,7 +76,7 @@
     virtual void raise();
     virtual void lower();
     virtual void createAutoLayout();
-    virtual void createCustomLayout();
+    virtual void createCustomLayout(int columns = 0);
     virtual void remove();
     virtual void referenceMode();
     virtual void referenceModeDisabled();
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #1315370:1315371
@@ -675,7 +675,8 @@
 }
 
 
-void View::contextMenuEvent() {
+void View::contextMenuEvent( QContextMenuEvent * event ) {
+  Q_UNUSED(event)
   QMenu menu;
 
   addTitle(&menu);
--- branches/work/kst/portto4/kst/src/libkstapp/view.h #1315370:1315371
@@ -104,7 +104,7 @@
     void setDataMode(bool dataMode) { _dataMode = dataMode; }
     bool isDataMode() { return _dataMode; }
 
-    virtual void contextMenuEvent();
+    virtual void contextMenuEvent( QContextMenuEvent * event = 0);
 
     bool plotBordersDirty() const {return _plotBordersDirty;}
     void setPlotBordersDirty(bool dirty) {_plotBordersDirty = dirty;}
--- branches/work/kst/portto4/kst/src/libkstapp/viewitemscriptinterface.cpp #1315370:1315371
@@ -201,8 +201,7 @@
 
     qreal relativeWidth = (command == "setGeoX") ? parameter :item->relativeWidth();
     qreal relativeHeight = (command == "setGeoY") ? parameter :item->relativeHeight();
-    bool fixedAspect = (command == "checkFixAspectRatio") ? true :item->lockAspectRatio();
-    fixedAspect = (command == "uncheckFixAspectRatio") ? false :item->lockAspectRatio();
+    bool fixedAspect = (command == "uncheckFixAspectRatio") ? false :item->lockAspectRatio();
 
     qreal width = relativeWidth * parentWidth;
     qreal height;
--- branches/work/kst/portto4/kst/src/libkstmath/basicplugin.h #1315370:1315371
@@ -53,7 +53,7 @@
     virtual QString descriptionTip() const;
 
     // Validator of plugin data.  Expensive, only use to verify successful creation.
-    bool isValid() { return (inputsExist() && algorithm()); }
+    virtual bool isValid() { return (inputsExist() && algorithm()); }
     QString errorMessage() { return _errorString; }
 
   public slots:
--- branches/work/kst/portto4/kst/src/libkstmath/dataobject.cpp #1315370:1315371
@@ -636,7 +636,7 @@
 }
 
 
-bool DataObject::isValid() const {
+bool DataObject::isValid() {
   return true;
 }
 
--- branches/work/kst/portto4/kst/src/libkstmath/dataobject.h #1315370:1315371
@@ -108,7 +108,7 @@
     virtual void writeLock() const;
     virtual void unlock() const;
 
-    virtual bool isValid() const;
+    virtual bool isValid();
 
     virtual const CurveHintList* curveHints() const;
 
--- branches/work/kst/portto4/kst/src/libkstmath/equation.cpp #1315370:1315371
@@ -105,7 +105,7 @@
 }
 
 
-bool Equation::isValid() const {
+bool Equation::isValid() {
   return _isValid;
 }
 
--- branches/work/kst/portto4/kst/src/libkstmath/equation.h #1315370:1315371
@@ -63,7 +63,7 @@
 
     bool doInterp() const { return _doInterp; }
 
-    bool isValid() const;
+    bool isValid();
 
     void showNewDialog();
     void showEditDialog();
--- branches/work/kst/portto4/kst/src/libkstmath/eventmonitorentry.h #1315370:1315371
@@ -41,10 +41,10 @@
     void showEditDialog();
 
     bool needToEvaluate();
-    bool isValid() const { return _isValid; }
+    bool isValid() { return _isValid; }
 
     void log(int idx);
-    const QString& event() const { return _event; }
+    const QString& kstEvent() const { return _event; }
     const QString& description() const { return _description; }
     Debug::LogLevel level() const { return _level; }
     Equations::Node* expression() const { return _pExpression; }
--- branches/work/kst/portto4/kst/src/plugins/dataobject/genericfilter/genericfilter.cpp #1315370:1315371
@@ -219,7 +219,7 @@
   // Create filter
   filter<double> theFilter(Num,Den,DeltaT);
   double in = 0.0;
-  theFilter.ConnectTo(in);
+  theFilter.ConnectTo(in); // the filter keeps a pointer to "in"
   theFilter.Reset();
   for (int i=0; i<length; i++) {
     in = inputVector->value()[i];


More information about the Kst mailing list