소스 검색

The description which is displayed as a tooltip by the Tree- and TableModel
must not be synchronized with the XNAT server.
Hence it should be a member of the private implementation

Andreas Fetzer 10 년 전
부모
커밋
c2acdeb190
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      Libs/XNAT/Core/ctkXnatObject.cpp
  2. 2 0
      Libs/XNAT/Core/ctkXnatObjectPrivate.h

+ 4 - 2
Libs/XNAT/Core/ctkXnatObject.cpp

@@ -92,13 +92,15 @@ void ctkXnatObject::setName(const QString& name)
 //----------------------------------------------------------------------------
 QString ctkXnatObject::description() const
 {
-  return property("description");
+  Q_D(const ctkXnatObject);
+  return d->description;
 }
 
 //----------------------------------------------------------------------------
 void ctkXnatObject::setDescription(const QString& description)
 {
-  setProperty("description", description);
+  Q_D(ctkXnatObject);
+  d->description = description;
 }
 
 //----------------------------------------------------------------------------

+ 2 - 0
Libs/XNAT/Core/ctkXnatObjectPrivate.h

@@ -49,6 +49,8 @@ private:
 
   QList<ctkXnatObject*> children;
 
+  QString description;
+
   QDateTime lastModifiedTime;
 
   bool fetched;