mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Commit df156a56c0 replaced "virtual"
by "override" where appropriate. Unfortunately, this had the
unintended consequence of producing numerous clang warnings. If
clang finds a override-modified function in a class definition,
it warns for *all* overriden virtual functions without the override
modifier.
To solve this, go the easy route and remove all overrides. At least
it is consistent.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
		
	
			
		
			
				
	
	
		
			42 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0
 | |
| #ifndef CLEANERTABLEMODEL_H
 | |
| #define CLEANERTABLEMODEL_H
 | |
| 
 | |
| #include <QAbstractTableModel>
 | |
| #include <QStringList>
 | |
| #include <QPixmap>
 | |
| 
 | |
| /* Retrieve the trash icon pixmap, common to most table models */
 | |
| const QPixmap &trashIcon();
 | |
| const QPixmap &trashForbiddenIcon();
 | |
| 
 | |
| /* When using a QAbstractTableModel, consider using this instead
 | |
|  * of the default implementation, as it's easyer to setup the columns
 | |
|  * and headers.
 | |
|  * Most subsurface classes uses this one to save loads of lines
 | |
|  * of code and share a consistent layout. */
 | |
| 
 | |
| class CleanerTableModel : public QAbstractTableModel {
 | |
| 	Q_OBJECT
 | |
| public:
 | |
| 	explicit CleanerTableModel(QObject *parent = 0);
 | |
| 	int columnCount(const QModelIndex &parent = QModelIndex()) const;
 | |
| 	QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
 | |
| 
 | |
| protected:
 | |
| 	void setHeaderDataStrings(const QStringList &headers);
 | |
| signals:
 | |
| 
 | |
| 	/* instead of using QMessageBox directly, wire a QWidget to this signal and display the result.
 | |
| 	 * This is because the QModels will be used from the Mobile version and the desktop version. */
 | |
| 	void warningMessage(const QString& title, const QString& message);
 | |
| 
 | |
| private:
 | |
| 	QStringList headers;
 | |
| };
 | |
| 
 | |
| /* Has the string value changed */
 | |
| #define CHANGED() \
 | |
| 	(vString = value.toString()) != data(index, role).toString()
 | |
| 
 | |
| #endif
 |