just cleanup.
From aa4465509c8ed6a85b817c3401bc7e8892132e8a Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <[email protected]>
Date: Tue, 6 Jan 2015 21:05:14 -0200
Subject: [PATCH 28/29] Remove drag operations from the 'From' Widget.

Signed-off-by: Tomaz Canabrava <[email protected]>
---
 qt-ui/divelogimportdialog.cpp | 26 --------------------------
 qt-ui/divelogimportdialog.h   |  4 ----
 2 files changed, 30 deletions(-)

diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 7e37219..3e50e4a 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -100,32 +100,6 @@ void ColumnNameView::mousePressEvent(QMouseEvent *press)
 	}
 }
 
-void ColumnNameView::dragLeaveEvent(QDragLeaveEvent *leave)
-{
-}
-
-void ColumnNameView::dragEnterEvent(QDragEnterEvent *event)
-{
-	if(event->mimeData()->data(subsurface_mimedata).count())
-		event->acceptProposedAction();
-}
-
-void ColumnNameView::dragMoveEvent(QDragMoveEvent *event)
-{
-	if (event->mimeData()->data(subsurface_mimedata).count())
-		event->acceptProposedAction();
-}
-
-void ColumnNameView::dropEvent(QDropEvent *event)
-{
-	const QMimeData *mimeData = event->mimeData();
-	if (mimeData->data(subsurface_mimedata).count()) {
-		QVariant value = QString(mimeData->data(subsurface_mimedata));
-		model()->insertRow(model()->rowCount());
-		model()->setData(model()->index(model()->rowCount()-1, 0), value);
-	}
-}
-
 ColumnDropCSVView::ColumnDropCSVView(QWidget *parent)
 {
 	setAcceptDrops(true);
diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h
index 7799045..8dc260a 100644
--- a/qt-ui/divelogimportdialog.h
+++ b/qt-ui/divelogimportdialog.h
@@ -49,10 +49,6 @@ public:
 	ColumnNameView(QWidget *parent);
 protected:
 	void mousePressEvent(QMouseEvent *press);
-	void dragLeaveEvent(QDragLeaveEvent *leave);
-	void dragEnterEvent(QDragEnterEvent *event);
-	void dragMoveEvent(QDragMoveEvent *event);
-	void dropEvent(QDropEvent *event);
 private:
 	int currentDraggedIndex;
 };
-- 
2.2.1

From 715381ecf77b46d894e07e11becb642f774a71e9 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <[email protected]>
Date: Tue, 6 Jan 2015 21:09:40 -0200
Subject: [PATCH 29/29] Added missing returns

Signed-off-by: Tomaz Canabrava <[email protected]>
---
 qt-ui/divelogimportdialog.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 3e50e4a..d5fcd40 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -36,6 +36,7 @@ bool ColumnNameProvider::insertRows(int row, int count, const QModelIndex &paren
 	beginInsertRows(QModelIndex(), row, row);
 	columnNames.append(QString());
 	endInsertRows();
+	return true;
 }
 
 bool ColumnNameProvider::removeRows(int row, int count, const QModelIndex &parent)
@@ -43,6 +44,7 @@ bool ColumnNameProvider::removeRows(int row, int count, const QModelIndex &paren
 	beginRemoveRows(QModelIndex(), row, row);
 	columnNames.removeAt(row);
 	endRemoveRows();
+	return true;
 }
 
 bool ColumnNameProvider::setData(const QModelIndex &index, const QVariant &value, int role)
@@ -51,6 +53,7 @@ bool ColumnNameProvider::setData(const QModelIndex &index, const QVariant &value
 		columnNames[index.row()] = value.toString();
 	}
 	dataChanged(index, index);
+	return true;
 }
 
 QVariant ColumnNameProvider::data(const QModelIndex &index, int role) const
@@ -150,6 +153,7 @@ bool ColumnNameResult::setData(const QModelIndex &index, const QVariant &value,
 		columnNames[index.column()] = value.toString();
 		dataChanged(index, index);
 	}
+	return true;
 }
 
 QVariant ColumnNameResult::data(const QModelIndex &index, int role) const
-- 
2.2.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to