diff options
| author | Richard Maudsley <richard.maudsley@isode.com> | 2014-07-01 12:54:14 (GMT) | 
|---|---|---|
| committer | Richard Maudsley <richard.maudsley@isode.com> | 2014-07-01 12:57:14 (GMT) | 
| commit | 9179b54ac93ddc88765c3cd984916d7ffd130d20 (patch) | |
| tree | ddcbacdd0228d52ba3f0ad4d6e8e5f09e8d12c87 /Swift/QtUI/QtMainWindow.cpp | |
| parent | f90a0307a16a93376270a84be61451faa9bd9701 (diff) | |
| download | swift-contrib-9179b54ac93ddc88765c3cd984916d7ffd130d20.zip swift-contrib-9179b54ac93ddc88765c3cd984916d7ffd130d20.tar.bz2  | |
Reset roster filter when hitting enter to start chat.
Test-Information:
Enter search term and use keyboard arrows to move to select a contact and pressing enter will start a chat and clear the filter. Confirm that pressing escape still clears the filter without starting a chat and that the changes do not interfere with starting a chat normally by double clicking on a contact.
Change-Id: I90f5d431da56896eeb10f16c0ba23bdc143c4857
Diffstat (limited to 'Swift/QtUI/QtMainWindow.cpp')
| -rw-r--r-- | Swift/QtUI/QtMainWindow.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp index 7af9728..1acc519 100644 --- a/Swift/QtUI/QtMainWindow.cpp +++ b/Swift/QtUI/QtMainWindow.cpp @@ -47,71 +47,71 @@  #else  #include <Swift/QtUI/QtCertificateViewerDialog.h>  #endif  namespace Swift {  QtMainWindow::QtMainWindow(SettingsProvider* settings, UIEventStream* uiEventStream, QtLoginWindow::QtMenus loginMenus, StatusCache* statusCache, bool emoticonsExist) : QWidget(), MainWindow(false), loginMenus_(loginMenus) {  	uiEventStream_ = uiEventStream;  	settings_ = settings;  	setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));  	QBoxLayout *mainLayout = new QBoxLayout(QBoxLayout::TopToBottom, this);  	mainLayout->setContentsMargins(0,0,0,0);  	mainLayout->setSpacing(0);  	meView_ = new QtRosterHeader(settings, statusCache, this);  	mainLayout->addWidget(meView_);  	connect(meView_, SIGNAL(onChangeStatusRequest(StatusShow::Type, const QString&)), this, SLOT(handleStatusChanged(StatusShow::Type, const QString&)));  	connect(meView_, SIGNAL(onEditProfileRequest()), this, SLOT(handleEditProfileRequest()));  	connect(meView_, SIGNAL(onShowCertificateInfo()), this, SLOT(handleShowCertificateInfo()));  	tabs_ = new QtTabWidget(this);  #if QT_VERSION >= 0x040500  	tabs_->setDocumentMode(true);  #endif  	tabs_->setTabPosition(QTabWidget::South);  	mainLayout->addWidget(tabs_);  	contactsTabWidget_ = new QWidget(this);  	contactsTabWidget_->setContentsMargins(0, 0, 0, 0);  	QBoxLayout *contactTabLayout = new QBoxLayout(QBoxLayout::TopToBottom, contactsTabWidget_);  	contactsTabWidget_->setLayout(contactTabLayout);  	contactTabLayout->setSpacing(0);  	contactTabLayout->setContentsMargins(0, 0, 0, 0);  	treeWidget_ = new QtRosterWidget(uiEventStream_, settings_, this);  	contactTabLayout->addWidget(treeWidget_); -	new QtFilterWidget(this, treeWidget_, contactTabLayout); +	new QtFilterWidget(this, treeWidget_, uiEventStream_, contactTabLayout);  	tabs_->addTab(contactsTabWidget_, tr("&Contacts"));  	eventWindow_ = new QtEventWindow(uiEventStream_);  	connect(eventWindow_, SIGNAL(onNewEventCountUpdated(int)), this, SLOT(handleEventCountUpdated(int)));  	chatListWindow_ = new QtChatListWindow(uiEventStream_, settings_);  	connect(chatListWindow_, SIGNAL(onCountUpdated(int)), this, SLOT(handleChatCountUpdated(int)));  	tabs_->addTab(chatListWindow_, tr("C&hats"));  	tabs_->addTab(eventWindow_, tr("&Notices"));  	tabs_->setCurrentIndex(settings_->getSetting(QtUISettingConstants::CURRENT_ROSTER_TAB));  	connect(tabs_, SIGNAL(currentChanged(int)), this, SLOT(handleTabChanged(int)));  	tabBarCombo_ = NULL;  	if (settings_->getSetting(QtUISettingConstants::USE_SCREENREADER)) {  		tabs_->tabBar()->hide();  		tabBarCombo_ = new QComboBox(this);  		tabBarCombo_->setAccessibleName("Current View");  		tabBarCombo_->addItem(tr("Contacts"));  		tabBarCombo_->addItem(tr("Chats"));  		tabBarCombo_->addItem(tr("Notices"));  		tabBarCombo_->setCurrentIndex(tabs_->currentIndex());  		mainLayout->addWidget(tabBarCombo_);  		connect(tabBarCombo_, SIGNAL(currentIndexChanged(int)), tabs_, SLOT(setCurrentIndex(int)));  	}  	this->setLayout(mainLayout);  	QMenu* viewMenu = new QMenu(tr("&View"), this);  	menus_.push_back(viewMenu);  | 
 Swift