From 8be61d8b2e308b4f33b4496a7ad127bb23d40a31 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <tcanabr...@kde.org>
Date: Mon, 6 Jan 2014 20:00:10 -0200
Subject: [PATCH 1/2] Added CaseInsensitivity to all of the completers.

Just one of the completers had Qt::CaseInsentitive set,
setting for all of them.

Signed-off-by: Tomaz Canabrava <tcanabr...@kde.org>
---
 qt-ui/maintab.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index fb37992..1de4b6d 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -91,6 +91,11 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
 	completers.location = new QCompleter(LocationCompletionModel::instance(), ui.location);
 	completers.suit = new QCompleter(SuitCompletionModel::instance(), ui.suit);
 	completers.tags = new QCompleter(TagCompletionModel::instance(), ui.tagWidget);
+	completers.buddy->setCaseSensitivity(Qt::CaseInsensitive);
+	completers.divemaster->setCaseSensitivity(Qt::CaseInsensitive);
+	completers.location->setCaseSensitivity(Qt::CaseInsensitive);
+	completers.suit->setCaseSensitivity(Qt::CaseInsensitive);
+	completers.buddy->setCaseSensitivity(Qt::CaseInsensitive);
 	completers.tags->setCaseSensitivity(Qt::CaseInsensitive);
 	ui.buddy->setCompleter(completers.buddy);
 	ui.divemaster->setCompleter(completers.divemaster);
-- 
1.8.5.2

From 3b9d562208fffc19cb5409849be764fbaeafa683 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <tcanabr...@kde.org>
Date: Mon, 6 Jan 2014 20:13:21 -0200
Subject: [PATCH 2/2] Restoring the selection was not setting dives as
 'current', broke key navigation.

Restoring the selection was not setting dives as current, and thus, breaking
keyboard navigation.

Signed-off-by: Tomaz Canabrava <tcanabr...@kde.org>
---
 qt-ui/divelistview.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 0af6fbb..9f5b0c0 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -203,7 +203,7 @@ void DiveListView::selectDive(int i, bool scrollto, bool toggle)
 	QModelIndex idx = match.first();
 	flags = toggle ? QItemSelectionModel::Toggle : QItemSelectionModel::Select;
 	flags |= QItemSelectionModel::Rows;
-	selectionModel()->select(idx, flags);
+	selectionModel()->setCurrentIndex(idx, flags);
 	if(idx.parent().isValid()){
 		setAnimated(false);
 		expand(idx.parent());
-- 
1.8.5.2

_______________________________________________
subsurface mailing list
subsurface@hohndel.org
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to