[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi
From: Jarosław Staniek <staniek () kde ! org>
Date: 2010-10-06 10:20:05
Message-ID: 20101006102005.746C2AC892 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1183126 by staniek:
Forms
*clearing form data source selection in the combo box properly resets assignment, so \
selecting the same datasource later works properly
M +2 -2 plugins/forms/kexidatasourcepage.cpp
M +10 -1 widget/kexidatasourcecombobox.cpp
M +2 -1 widget/kexidatasourcecombobox.h
--- trunk/koffice/kexi/plugins/forms/kexidatasourcepage.cpp #1183125:1183126
@@ -291,11 +291,11 @@
void KexiDataSourcePage::clearWidgetDataSourceSelection()
{
- if (!m_widgetDataSourceCombo->currentText().isEmpty()) {
+// if (!m_widgetDataSourceCombo->currentText().isEmpty()) {
//2.0 m_widgetDataSourceCombo->setEditText(QString());
m_widgetDataSourceCombo->setFieldOrExpression(QString());
slotFieldSelected();
- }
+// }
/*2.0: clear button is available in the combobox itself
m_clearWidgetDSButton->setEnabled(false);*/
}
--- trunk/koffice/kexi/widget/kexidatasourcecombobox.cpp #1183125:1183126
@@ -1,5 +1,5 @@
/* This file is part of the KDE project
- Copyright (C) 2005-2006 Jarosław Staniek <staniek@kde.org>
+ Copyright (C) 2005-2010 Jarosław Staniek <staniek@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -20,6 +20,8 @@
#include "kexidatasourcecombobox.h"
#include <QPixmap>
+#include <QLineEdit>
+
#include <kdebug.h>
#include <kiconloader.h>
@@ -77,6 +79,7 @@
connect(this, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
connect(this, SIGNAL(returnPressed(const QString &)),
this, SLOT(slotReturnPressed(const QString &)));
+ connect(lineEdit(), SIGNAL(clearButtonClicked()), this, \
SLOT(slotClearButtonClicked()));
d->tableIcon = SmallIcon("table");
d->queryIcon = SmallIcon("query");
@@ -272,6 +275,12 @@
}
}
+void KexiDataSourceComboBox::slotClearButtonClicked()
+{
+ setCurrentIndex(0);
+ slotActivated(0);
+}
+
QString KexiDataSourceComboBox::selectedPartClass() const
{
if (selectedName().isEmpty())
--- trunk/koffice/kexi/widget/kexidatasourcecombobox.h #1183125:1183126
@@ -1,5 +1,5 @@
/* This file is part of the KDE project
- Copyright (C) 2005-2006 Jarosław Staniek <staniek@kde.org>
+ Copyright (C) 2005-2010 Jarosław Staniek <staniek@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -79,6 +79,7 @@
void slotItemRenamed(const KexiPart::Item& item, const QString& oldName);
void slotActivated(int index);
void slotReturnPressed(const QString & text);
+ void slotClearButtonClicked();
protected:
virtual void focusOutEvent(QFocusEvent *e);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic