mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Mobile: remove full-text properties from DiveObjectHelper
These properties are not needed anymore, because the full text search was decoupled from the DiveObjectHelper. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									37a3daf2dd
								
							
						
					
					
						commit
						b7cddcc737
					
				
					 4 changed files with 0 additions and 22 deletions
				
			
		|  | @ -391,15 +391,3 @@ QStringList DiveObjectHelper::firstGas() const | ||||||
| 	} | 	} | ||||||
| 	return gas; | 	return gas; | ||||||
| } | } | ||||||
| 
 |  | ||||||
| // for a full text search / filter function
 |  | ||||||
| QString DiveObjectHelper::fullText() const |  | ||||||
| { |  | ||||||
| 	return fullTextNoNotes() + ":-:" + notes(); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| QString DiveObjectHelper::fullTextNoNotes() const |  | ||||||
| { |  | ||||||
| 	QString tripLocation = m_dive->divetrip ? m_dive->divetrip->location : QString(); |  | ||||||
| 	return tripLocation + ":-:" + location() + ":-:" + buddy() + ":-:" + divemaster() + ":-:" + suit() + ":-:" + tags(); |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  | @ -49,8 +49,6 @@ class DiveObjectHelper : public QObject { | ||||||
| 	Q_PROPERTY(QStringList startPressure READ startPressure CONSTANT) | 	Q_PROPERTY(QStringList startPressure READ startPressure CONSTANT) | ||||||
| 	Q_PROPERTY(QStringList endPressure READ endPressure CONSTANT) | 	Q_PROPERTY(QStringList endPressure READ endPressure CONSTANT) | ||||||
| 	Q_PROPERTY(QStringList firstGas READ firstGas CONSTANT) | 	Q_PROPERTY(QStringList firstGas READ firstGas CONSTANT) | ||||||
| 	Q_PROPERTY(QString fullText READ fullText CONSTANT) |  | ||||||
| 	Q_PROPERTY(QString fullTextNoNotes READ fullTextNoNotes CONSTANT) |  | ||||||
| public: | public: | ||||||
| 	DiveObjectHelper(struct dive *dive); | 	DiveObjectHelper(struct dive *dive); | ||||||
| 	int number() const; | 	int number() const; | ||||||
|  | @ -94,8 +92,6 @@ public: | ||||||
| 	QStringList startPressure() const; | 	QStringList startPressure() const; | ||||||
| 	QStringList endPressure() const; | 	QStringList endPressure() const; | ||||||
| 	QStringList firstGas() const; | 	QStringList firstGas() const; | ||||||
| 	QString fullText() const; |  | ||||||
| 	QString fullTextNoNotes() const; |  | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
| 	struct dive *m_dive; | 	struct dive *m_dive; | ||||||
|  |  | ||||||
|  | @ -243,8 +243,6 @@ QVariant DiveListModel::data(const QModelIndex &index, int role) const | ||||||
| 	switch(role) { | 	switch(role) { | ||||||
| 	case DiveRole: return QVariant::fromValue<QObject*>(curr_dive); | 	case DiveRole: return QVariant::fromValue<QObject*>(curr_dive); | ||||||
| 	case DiveDateRole: return (qlonglong)curr_dive->timestamp(); | 	case DiveDateRole: return (qlonglong)curr_dive->timestamp(); | ||||||
| 	case FullTextRole: return curr_dive->fullText(); |  | ||||||
| 	case FullTextNoNotesRole: return curr_dive->fullTextNoNotes(); |  | ||||||
| 	} | 	} | ||||||
| 	return QVariant(); | 	return QVariant(); | ||||||
| 
 | 
 | ||||||
|  | @ -255,8 +253,6 @@ QHash<int, QByteArray> DiveListModel::roleNames() const | ||||||
| 	QHash<int, QByteArray> roles; | 	QHash<int, QByteArray> roles; | ||||||
| 	roles[DiveRole] = "dive"; | 	roles[DiveRole] = "dive"; | ||||||
| 	roles[DiveDateRole] = "date"; | 	roles[DiveDateRole] = "date"; | ||||||
| 	roles[FullTextRole] = "fulltext"; |  | ||||||
| 	roles[FullTextNoNotesRole] = "fulltextnonotes"; |  | ||||||
| 	return roles; | 	return roles; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -38,8 +38,6 @@ public: | ||||||
| 	enum DiveListRoles { | 	enum DiveListRoles { | ||||||
| 		DiveRole = Qt::UserRole + 1, | 		DiveRole = Qt::UserRole + 1, | ||||||
| 		DiveDateRole, | 		DiveDateRole, | ||||||
| 		FullTextRole, |  | ||||||
| 		FullTextNoNotesRole |  | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	static DiveListModel *instance(); | 	static DiveListModel *instance(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue